<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Test Management 2.0 - line breaks are not considered while writing tests in Community Central forum</title>
    <link>https://www.servicenow.com/community/community-central-forum/test-management-2-0-line-breaks-are-not-considered-while-writing/m-p/3242776#M2852</link>
    <description>&lt;P&gt;Hi Community,&amp;nbsp;&lt;BR /&gt;We are using PPM test management 2.0 to maintain our test cases.&amp;nbsp;&lt;/P&gt;&lt;P&gt;And we got compliances from quite some colleagues, as while they are writing a test for story, the line breaks are not considered, they need to type in a notebook and then copy/paste to a test, which is not conveniences for daily work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you let us know is there a customization we could do to make the test steps in a Test consider the line break.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;BR /&gt;Daisy&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DaisyHuang_0-1745223116836.png" style="width: 999px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/436546i0C8EC4E0B8EAE11A/image-size/large?v=v2&amp;amp;px=999" role="button" title="DaisyHuang_0-1745223116836.png" alt="DaisyHuang_0-1745223116836.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 21 Apr 2025 08:12:18 GMT</pubDate>
    <dc:creator>Community Alums</dc:creator>
    <dc:date>2025-04-21T08:12:18Z</dc:date>
    <item>
      <title>Test Management 2.0 - line breaks are not considered while writing tests</title>
      <link>https://www.servicenow.com/community/community-central-forum/test-management-2-0-line-breaks-are-not-considered-while-writing/m-p/3242776#M2852</link>
      <description>&lt;P&gt;Hi Community,&amp;nbsp;&lt;BR /&gt;We are using PPM test management 2.0 to maintain our test cases.&amp;nbsp;&lt;/P&gt;&lt;P&gt;And we got compliances from quite some colleagues, as while they are writing a test for story, the line breaks are not considered, they need to type in a notebook and then copy/paste to a test, which is not conveniences for daily work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you let us know is there a customization we could do to make the test steps in a Test consider the line break.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;BR /&gt;Daisy&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DaisyHuang_0-1745223116836.png" style="width: 999px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/436546i0C8EC4E0B8EAE11A/image-size/large?v=v2&amp;amp;px=999" role="button" title="DaisyHuang_0-1745223116836.png" alt="DaisyHuang_0-1745223116836.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Apr 2025 08:12:18 GMT</pubDate>
      <guid>https://www.servicenow.com/community/community-central-forum/test-management-2-0-line-breaks-are-not-considered-while-writing/m-p/3242776#M2852</guid>
      <dc:creator>Community Alums</dc:creator>
      <dc:date>2025-04-21T08:12:18Z</dc:date>
    </item>
    <item>
      <title>Re: Test Management 2.0 - line breaks are not considered while writing tests</title>
      <link>https://www.servicenow.com/community/community-central-forum/test-management-2-0-line-breaks-are-not-considered-while-writing/m-p/3243026#M2858</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Yes this can be done. But does require a customisation which could break. So needs to be done with the risk accepted by the business.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create a new UI script within the 'Test Management' scope called 'handle_enter_key' and the following script.&lt;/P&gt;
&lt;P&gt;This script will look for the key-combo shift+enter and allow it to be used to create new lines&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;$j(document).ready(function() {

    document.body.addEventListener('keydown', (event) =&amp;gt; {
        const target = event.target;

        if (
            target &amp;amp;&amp;amp;
            (target.matches('textarea.add_step_textbox') ||
                (
                    target.matches('textarea') &amp;amp;&amp;amp;
                    target.closest('.step_content')
                )) &amp;amp;&amp;amp;
            event.key === 'Enter' &amp;amp;&amp;amp;
            event.shiftKey
        ) {
            console.log("Shift+Enter intercepted")
            event.stopPropagation();
        }
    }, true)
});&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Open the sys_ui_macro 'test_version_step_list' and add the following line&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;//&amp;lt;g2:requires name="scripts/angular_includes_1.5.11.js" includes="true" /&amp;gt; add the following, below this line
&amp;lt;g:requires name="sn_test_management.handle_enter_key.jsdbx" params="cache=$[jvar_stamp]" /&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hard reload the test step page and you can now use shift+enter to insert a new line. The enter key will continue to act as is OOB&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Apr 2025 12:16:05 GMT</pubDate>
      <guid>https://www.servicenow.com/community/community-central-forum/test-management-2-0-line-breaks-are-not-considered-while-writing/m-p/3243026#M2858</guid>
      <dc:creator>Kieran Anson</dc:creator>
      <dc:date>2025-04-21T12:16:05Z</dc:date>
    </item>
    <item>
      <title>Re: Test Management 2.0 - line breaks are not considered while writing tests</title>
      <link>https://www.servicenow.com/community/community-central-forum/test-management-2-0-line-breaks-are-not-considered-while-writing/m-p/3243470#M2864</link>
      <description>&lt;P&gt;Hi &lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/431446"&gt;@Kieran Anson&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;Thank you so much for you quick and helpful response!&lt;BR /&gt;My colleague did the implementation in a copied instance and it's working!&amp;nbsp;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt; Cooool~~~&lt;/P&gt;&lt;P&gt;I will align internally about the real implementation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Daisy&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Apr 2025 03:12:49 GMT</pubDate>
      <guid>https://www.servicenow.com/community/community-central-forum/test-management-2-0-line-breaks-are-not-considered-while-writing/m-p/3243470#M2864</guid>
      <dc:creator>Community Alums</dc:creator>
      <dc:date>2025-04-22T03:12:49Z</dc:date>
    </item>
  </channel>
</rss>

