<!-- 
RSS generated by JIRA (1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d) at Thu Feb 08 23:08:27 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary add field=key&field=summary to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>FOLIO Jira</title>
    <link>https://folio-org.atlassian.net</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>1001.0.0-SNAPSHOT</version>
        <build-number>100246</build-number>
        <build-date>07-02-2024</build-date>
    </build-info>

<item>
            <title>[UITEST-5] Document how to write module tests to be included in regression test suite.</title>
                <link>https://folio-org.atlassian.net/browse/UITEST-5</link>
                <project id="10041" key="UITEST">stripes-testing</project>
                    <description>&lt;p&gt;Where to put the tests in the module and how to use the test context that ui-testing provides to the module. &lt;/p&gt;</description>
                <environment></environment>
        <key id="36951">UITEST-5</key>
            <summary>Document how to write module tests to be included in regression test suite.</summary>
                <type id="10004" iconUrl="https://folio-org.atlassian.net/rest/api/2/universal_avatar/view/type/issuetype/avatar/10300?size=medium">Sub-task</type>
                            <parent id="36953">UITEST-2</parent>
                                    <priority id="10002" iconUrl="https://dev.folio.org/assets/jira-priority/jira-p3.svg">P3</priority>
                        <status id="6" iconUrl="https://folio-org.atlassian.net/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="green"/>
                                    <resolution id="10003">Done</resolution>
                                                        <assignee accountid="5bffed5e2434bf3a1a91d37a">Niels Erik Nielsen</assignee>
                                                                <reporter accountid="5bffed5e2434bf3a1a91d37a">Niels Erik Nielsen</reporter>
                                    <labels>
                            <label>demo21</label>
                            <label>sprint21</label>
                    </labels>
                <created>Fri, 25 Aug 2017 22:02:02 +0000</created>
                <updated>Fri, 1 Sep 2017 06:32:30 +0000</updated>
                            <resolved>Thu, 31 Aug 2017 12:11:56 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                    <timespent seconds="18300">5 hours, 5 minutes</timespent>
                                <comments>
                                                            <comment id="83254" author="5bffed5e2434bf3a1a91d37a" created="Fri, 25 Aug 2017 22:14:34 +0000"  >&lt;p&gt;Either documented in the contribution guide or linked to from there.&lt;/p&gt;

&lt;p&gt;There are examples in ui-users, ui-items, ui-checkout and stubs in ui-requests, ui-checkin.&lt;/p&gt;</comment>
                                                            <comment id="83255" author="5bffed5e2434bf3a1a91d37a" created="Mon, 28 Aug 2017 11:40:52 +0000"  >&lt;p&gt;For ui-testing to include a module&apos;s own tests in an overall test suite, the module should contain a folder &lt;tt&gt;./test/ui-testing&lt;/tt&gt; with the script  &lt;tt&gt;test.js&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;This script will receive one argument from ui-testing, a testing context. With that, the script can run Nightmare tests  ( see &lt;a href=&quot;https://github.com/segmentio/nightmare/blob/master/Readme.md&quot; class=&quot;external-link&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://github.com/segmentio/nightmare/blob/master/Readme.md&lt;/a&gt; ).&lt;/p&gt;

&lt;p&gt;This is an example of the most minimal module test  (it logs in and confirms that the app page opens): &lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
 module.exports.test = function(uiTestCtx) {

  describe(&lt;span class=&quot;code-quote&quot;&gt;&apos;Module test: app:minimal&apos;&lt;/span&gt;, function() {
    &lt;span class=&quot;code-keyword&quot;&gt;const&lt;/span&gt; { config, helpers: { login, openApp, logout }, meta: { testVersion } } = uiTestCtx;
    &lt;span class=&quot;code-keyword&quot;&gt;const&lt;/span&gt; nightmare = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Nightmare(config.nightmare);

    &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;.timeout(&lt;span class=&quot;code-object&quot;&gt;Number&lt;/span&gt;(config.test_timeout));

    describe(&lt;span class=&quot;code-quote&quot;&gt;&apos;Login &amp;gt; Open module &lt;span class=&quot;code-quote&quot;&gt;&quot;Requests&quot;&lt;/span&gt; &amp;gt; Logout&apos;&lt;/span&gt;, () =&amp;gt; {
      before( done =&amp;gt; {
        login(nightmare, config, done);  &lt;span class=&quot;code-comment&quot;&gt;// logs in with the &lt;span class=&quot;code-keyword&quot;&gt;default&lt;/span&gt; admin credentials
&lt;/span&gt;      })
      after( done =&amp;gt; {
        logout(nightmare, config, done);
      })
      it(&lt;span class=&quot;code-quote&quot;&gt;&apos;should open module &lt;span class=&quot;code-quote&quot;&gt;&quot;Requests&quot;&lt;/span&gt; and find version tag &apos;&lt;/span&gt;, done =&amp;gt; {
        nightmare
        .use(openApp(nightmare, config, done, &lt;span class=&quot;code-quote&quot;&gt;&apos;requests&apos;&lt;/span&gt;, testVersion))
        .then(result =&amp;gt; result )
      })
    })
  })
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The main script &lt;tt&gt;test.js&lt;/tt&gt; should probably just be a pointer to the actual tests, so that module developers can select exactly which tests to include in the overall ui-testing suite at any time: &lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
&lt;span class=&quot;code-keyword&quot;&gt;const&lt;/span&gt; minimal = require(&lt;span class=&quot;code-quote&quot;&gt;&apos;./minimal.js&apos;&lt;/span&gt;);
&lt;span class=&quot;code-keyword&quot;&gt;const&lt;/span&gt; extensive = require(&lt;span class=&quot;code-quote&quot;&gt;&apos;./extensive.js&apos;&lt;/span&gt;);

module.exports.test = function(uiTestCtx) {
  minimal.test(uiTestCtx);
  extensive.test(uiTestCtx);
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The individual tests can always be run directly from &lt;tt&gt;ui-testing&lt;/tt&gt; around &lt;tt&gt;test.js&lt;/tt&gt;, provided they are found in &lt;tt&gt;./test/ui-testing&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;The contents of the testing context argument are: &lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
{
 config :  (see ui-testing/folio-ui.config.js)
 helpers: {  
   login:    function &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; logging in to the FOLIO app
   logout,
   openApp:   function &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; opening a module&apos;s page
   namegen:  function &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; generating user names and addresses 
 }
 meta:  {
   testVersion:  the npm version of the module that the test is pulled from
 }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Note:  The test context is in its very first version and could be subject to change. &lt;/p&gt;</comment>
                                                            <comment id="83256" author="5bffed5e2434bf3a1a91d37a" created="Mon, 28 Aug 2017 12:50:19 +0000"  >&lt;h5&gt;&lt;a name=&quot;DevelopingUImodulesandwritingtests.&quot;&gt;&lt;/a&gt;Developing UI modules and writing tests.&lt;/h5&gt;

&lt;p&gt;Programmers developing UI modules are conventionally installing a Stripes platform, checking out their UI module from Github or similar, and yarn link&apos;ing the local project into the platform. &lt;/p&gt;

&lt;p&gt;To test the UI module as work progresses, &lt;tt&gt;ui-testing&lt;/tt&gt; should be installed too and pointed to the Stripes web service serving the developing module, and the module&apos;s tests can be run as described &lt;del&gt;elsewhere&lt;/del&gt;&lt;/p&gt;

&lt;p&gt;This will suffice if the changes do not require test changes, for instance if it is a refactoring that is not supposed to change UI behavior.&lt;/p&gt;

&lt;p&gt;On the other hand, if the changes to the UI module do require the tests to be updated as well, the UI module project should be yarn link&apos;ed into both the Stripes platform &lt;em&gt;and&lt;/em&gt; &lt;tt&gt;ui-testing&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;When writing tests for an already submitted UI module, the project could be yarn link&apos;ed into &lt;tt&gt;ui-testing&lt;/tt&gt; only.&lt;/p&gt;</comment>
                                                            <comment id="83257" author="557058:b8e64633-1f7c-402d-9caf-9959a5ba5d0d" created="Mon, 28 Aug 2017 13:23:37 +0000"  >&lt;p&gt;&lt;a href=&quot;https://folio-org.atlassian.net/secure/ViewProfile.jspa?accountId=61cd0ca0bce5e00069e98be7&quot; class=&quot;user-hover&quot; rel=&quot;61cd0ca0bce5e00069e98be7&quot; data-account-id=&quot;61cd0ca0bce5e00069e98be7&quot; accountid=&quot;61cd0ca0bce5e00069e98be7&quot; rel=&quot;noreferrer&quot;&gt;David Crossley&lt;/a&gt; &lt;a href=&quot;https://folio-org.atlassian.net/secure/ViewProfile.jspa?accountId=5bffed52a1b46046f530c8f7&quot; class=&quot;user-hover&quot; rel=&quot;5bffed52a1b46046f530c8f7&quot; data-account-id=&quot;5bffed52a1b46046f530c8f7&quot; accountid=&quot;5bffed52a1b46046f530c8f7&quot; rel=&quot;noreferrer&quot;&gt;Mike Taylor&lt;/a&gt; Guys, let&apos;s decide where the above documentation should be incorporated (also 
    &lt;span class=&quot;jira-issue-macro resolved&quot; data-jira-key=&quot;UITEST-6&quot; &gt;
                &lt;a href=&quot;https://folio-org.atlassian.net/browse/UITEST-6&quot; class=&quot;jira-issue-macro-key issue-link&quot;  title=&quot;Document how to run module tests from ui-testing&quot; &gt;
            &lt;img class=&quot;icon&quot; src=&quot;https://folio-org.atlassian.net/rest/api/2/universal_avatar/view/type/issuetype/avatar/10300?size=medium&quot; /&gt;
            UITEST-6
        &lt;/a&gt;
                                                    &lt;span class=&quot;aui-lozenge aui-lozenge-subtle aui-lozenge-success jira-macro-single-issue-export-pdf&quot;&gt;Closed&lt;/span&gt;
            &lt;/span&gt;
, 
    &lt;span class=&quot;jira-issue-macro resolved&quot; data-jira-key=&quot;STRIPES-461&quot; &gt;
                &lt;a href=&quot;https://folio-org.atlassian.net/browse/STRIPES-461&quot; class=&quot;jira-issue-macro-key issue-link&quot;  title=&quot;document ID/naming scheme&quot; &gt;
            &lt;img class=&quot;icon&quot; src=&quot;https://folio-org.atlassian.net/rest/api/2/universal_avatar/view/type/issuetype/avatar/10300?size=medium&quot; /&gt;
            STRIPES-461
        &lt;/a&gt;
                                                    &lt;span class=&quot;aui-lozenge aui-lozenge-subtle aui-lozenge-success jira-macro-single-issue-export-pdf&quot;&gt;Closed&lt;/span&gt;
            &lt;/span&gt;
): dev.folio.org CONTRIBUTING guildelines or Stripes developer&apos;s guide.&lt;/p&gt;</comment>
                                                            <comment id="83258" author="5bffed52a1b46046f530c8f7" created="Tue, 29 Aug 2017 10:04:07 +0000"  >&lt;p&gt;Seems to me like it belongs in &lt;a href=&quot;https://github.com/folio-org/stripes-core/blob/master/doc/dev-guide.md&quot; class=&quot;external-link&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://github.com/folio-org/stripes-core/blob/master/doc/dev-guide.md&lt;/a&gt; &amp;#8211; it&apos;s Stripes-specific, not something about being a FOLIO contributor in general. Agree, &lt;a href=&quot;https://folio-org.atlassian.net/secure/ViewProfile.jspa?accountId=61cd0ca0bce5e00069e98be7&quot; class=&quot;user-hover&quot; rel=&quot;61cd0ca0bce5e00069e98be7&quot; data-account-id=&quot;61cd0ca0bce5e00069e98be7&quot; accountid=&quot;61cd0ca0bce5e00069e98be7&quot; rel=&quot;noreferrer&quot;&gt;David Crossley&lt;/a&gt;?&lt;/p&gt;</comment>
                                                            <comment id="83259" author="5bffed5e2434bf3a1a91d37a" created="Tue, 29 Aug 2017 10:24:28 +0000"  >&lt;p&gt;Right, &lt;a href=&quot;https://folio-org.atlassian.net/secure/ViewProfile.jspa?accountId=5bffed52a1b46046f530c8f7&quot; class=&quot;user-hover&quot; rel=&quot;5bffed52a1b46046f530c8f7&quot; data-account-id=&quot;5bffed52a1b46046f530c8f7&quot; accountid=&quot;5bffed52a1b46046f530c8f7&quot; rel=&quot;noreferrer&quot;&gt;Mike Taylor&lt;/a&gt;, &lt;a href=&quot;https://folio-org.atlassian.net/secure/ViewProfile.jspa?accountId=61cd0ca0bce5e00069e98be7&quot; class=&quot;user-hover&quot; rel=&quot;61cd0ca0bce5e00069e98be7&quot; data-account-id=&quot;61cd0ca0bce5e00069e98be7&quot; accountid=&quot;61cd0ca0bce5e00069e98be7&quot; rel=&quot;noreferrer&quot;&gt;David Crossley&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The places I know of that already describe or refer to or touch on  this:&lt;/p&gt;

&lt;p&gt;ui-testing itself:    &lt;a href=&quot;https://github.com/folio-org/ui-testing/blob/master/README.md&quot; class=&quot;external-link&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://github.com/folio-org/ui-testing/blob/master/README.md&lt;/a&gt;    &lt;/p&gt;

&lt;p&gt;The UI release procedure:    &lt;a href=&quot;https://github.com/folio-org/stripes-core/blob/master/doc/release-procedure.md#notes-on-testing&quot; class=&quot;external-link&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://github.com/folio-org/stripes-core/blob/master/doc/release-procedure.md#notes-on-testing&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/folio-org/stripes-core/blob/master/doc/dev-guide.md#unit-testing&quot; class=&quot;external-link&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://github.com/folio-org/stripes-core/blob/master/doc/dev-guide.md#unit-testing&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://dev.folio.org/community/contrib-code#automation&quot; class=&quot;external-link&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://dev.folio.org/community/contrib-code#automation&lt;/a&gt;&lt;/p&gt;</comment>
                                                            <comment id="83260" author="61cd0ca0bce5e00069e98be7" created="Wed, 30 Aug 2017 06:18:53 +0000"  >&lt;p&gt;In discussion with Niels Erik, we decided to put documentation in &quot;ui-testing&quot; README, and link to it from various places.&lt;/p&gt;</comment>
                                                            <comment id="83261" author="5bffed52a1b46046f530c8f7" created="Wed, 30 Aug 2017 08:39:10 +0000"  >&lt;p&gt;OK, makes sense.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10003">
                    <name>Relates</name>
                                            <outwardlinks description="relates to">
                                        <issuelink>
            <issuekey id="36952">UITEST-6</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="relates to">
                                        <issuelink>
            <issuekey id="61178">STRIPES-461</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10000" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummarycf">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10019" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|hzxydr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10020" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10024" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>[CHART] Date of First Response</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 28 Aug 2017 13:23:37 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10025" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>[CHART] Time in Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>