- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2025 01:09 AM - edited 04-21-2025 01:12 AM
Hi Community,
We are using PPM test management 2.0 to maintain our test cases.
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.
Can you let us know is there a customization we could do to make the test steps in a Test consider the line break.
Thanks.
Daisy
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2025 05:16 AM
Hi,
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.
Create a new UI script within the 'Test Management' scope called 'handle_enter_key' and the following script.
This script will look for the key-combo shift+enter and allow it to be used to create new lines
$j(document).ready(function() {
document.body.addEventListener('keydown', (event) => {
const target = event.target;
if (
target &&
(target.matches('textarea.add_step_textbox') ||
(
target.matches('textarea') &&
target.closest('.step_content')
)) &&
event.key === 'Enter' &&
event.shiftKey
) {
console.log("Shift+Enter intercepted")
event.stopPropagation();
}
}, true)
});
Open the sys_ui_macro 'test_version_step_list' and add the following line
//<g2:requires name="scripts/angular_includes_1.5.11.js" includes="true" /> add the following, below this line
<g:requires name="sn_test_management.handle_enter_key.jsdbx" params="cache=$[jvar_stamp]" />
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2025 05:16 AM
Hi,
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.
Create a new UI script within the 'Test Management' scope called 'handle_enter_key' and the following script.
This script will look for the key-combo shift+enter and allow it to be used to create new lines
$j(document).ready(function() {
document.body.addEventListener('keydown', (event) => {
const target = event.target;
if (
target &&
(target.matches('textarea.add_step_textbox') ||
(
target.matches('textarea') &&
target.closest('.step_content')
)) &&
event.key === 'Enter' &&
event.shiftKey
) {
console.log("Shift+Enter intercepted")
event.stopPropagation();
}
}, true)
});
Open the sys_ui_macro 'test_version_step_list' and add the following line
//<g2:requires name="scripts/angular_includes_1.5.11.js" includes="true" /> add the following, below this line
<g:requires name="sn_test_management.handle_enter_key.jsdbx" params="cache=$[jvar_stamp]" />
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2025 08:12 PM
Hi @Kieran Anson
Thank you so much for you quick and helpful response!
My colleague did the implementation in a copied instance and it's working! 😎 Cooool~~~
I will align internally about the real implementation.
Thanks,
Daisy