app icon indicating copy to clipboard operation
app copied to clipboard

Step formatting breaks in test cases after editing a step in the "Steps" section

Open milatM365 opened this issue 9 months ago • 5 comments

Describe the bug When a step is edited in the "Steps" section, the formatting of that step is broken in all related test cases. Specifically, the space between the step number and the step text disappears, which breaks the ordered list structure in the test cases.

To Reproduce

  1. Go to the "Steps" section.
  2. Edit any existing step.
  3. Open a test case that includes the edited step.

Expected behavior The step is updated and keeps the correct formatting in test cases.

Impact In all test cases where the edited step is used, you have to open each one and manually add a space to keep the correct step formatting.

Image

Image

milatM365 avatar Apr 15 '25 19:04 milatM365

Tested, but the issue is still present with some examples of markdown @trumenov, please review below:

Step formatting is broken after editing steps using the 'Edit Steps' button.

Image

Image

Image

YanaBaranova0909 avatar Apr 21 '25 16:04 YanaBaranova0909

reproduced with classical test description:

### Steps

-  Step1
    * Expected result: Step1.1
    * Expected result: Step1.1

-  Step2
*Expected:* ячсячс2
ячсячс3
ячсячс4

-  Step3

Save description, go to test view page, press edit steps - and see strange edit modal:

Image

What to do with it?

  1. Ask strict format for steps from users.
  2. Disable opening "Steps edit modal" if format have some errors in the Steps block.
  3. Create autoconverting function into this strict format.

trumenov avatar Apr 23 '25 23:04 trumenov

don't allow nested lists

TetianaKhomenko avatar Apr 25 '25 12:04 TetianaKhomenko

@TetianaKhomenko I think the restriction contradicts the recommendations in the documentation https://docs.testomat.io/project/tests/#steps-with-expected-results-as-nested-list

Image

littlefrontender avatar Apr 28 '25 12:04 littlefrontender

Tested, and have an issue with editing steps (without nested lists)

STR:

  1. Copy an example and paste it to the test

Image

  1. Click 'Edit Steps' button
  2. Click 'Save' button without any changes
  3. Pay attention to the 'broken' steps after it

Image

https://github.com/user-attachments/assets/feba8fa2-2322-43e7-ac64-124197497145

YanaBaranova0909 avatar Apr 29 '25 14:04 YanaBaranova0909

Tested and verified as fixed. Nested lists are allowed.

https://github.com/user-attachments/assets/183db93f-54e0-41f8-8e4d-e3eb1ced0c4a

YanaBaranova0909 avatar May 08 '25 12:05 YanaBaranova0909