Creating a code block on a test step with step template include whole text in the step in the code block

1 - What is it about
When I create a new “Code” block in a test step that is with “Step” template, it includes all other text in the code block too.

2 - Environment
v1.8.1 (a7184ed5d@HEAD) · production

3 - Steps to reproduce

  • Go to a test case with “Step” template
  • Create a new test step
  • Write sth to the first line and skip to the next line
  • Choose “Code” on the drop down to create a code block on the second line

4 - Expected result
A new empty code block is created.

5 - Actual result
The first line is also included in the code block.
It adds every text in test test step to the code block
This behaviour is same for other types - Paragraph/Caption

6 - Error logs and or visual proof

Additional info : It does sometimes also occur on test cases with “Text” template. However I could not reproduce it again, not able to find the pattern there.

Hi,

What do you mean by “skip to the next line”?

The behavior should depend on the use of “Enter” or “Shift+Enter”:

  • Enter: creates a new paragraph, only this paragraph will be influenced by formatting changes
  • Shift+Enter: creates a new line in the same paragraph → formatting changes influence the whole paragraph, i.e all lines created with “Shift+Enter”

If you use a simple “Enter” and then you change the formatting in the second line, the first line should not be influenced.

Best Regards,
Alex

Hi, thanks for the fast response. I did the “Shift+Enter” and that’s why, got it now :slight_smile:

Thanks,
Mustafa