RIDE icon indicating copy to clipboard operation
RIDE copied to clipboard

Once you save an empty Suite file, it is no longer possible to add and save test cases.

Open ZDabrowski opened this issue 1 year ago • 2 comments

Once you save an empty Suite file, it is no longer possible to add and save test cases.

Environment Python 3.10.12 wxPython 4.2.1 robotframework 6.0.2 robotframework-ride 2.1.dev70 Ubuntu 22.04.4 LTS

Steps

  1. On a Tree View, Right click on Folder and select New Suite obraz
  2. After selection goes to the newly created Suite, Editor tab is active, save the file obraz
  3. Under Suite file create New Test case by New Test Case right click command, and check the Text Edit tab - file is empty! obraz
  4. After switching back to the Editor Tab, test case is gone.

Additional info It's possible to add settings, variables and keywords. Just like for the Resource file. In case when newly created Suite file has an *, it is possible to create and save test cases.

ZDabrowski avatar Aug 20 '24 10:08 ZDabrowski

This is a corner case, because you switched to Text Edit before adding any content, so the *** Test Cases *** was not written, and disappeared. That's why the file is considered to be a Resource file, and as such, no Tests can be added.

HelioGuilherme66 avatar Aug 20 '24 15:08 HelioGuilherme66

It can be reproduced if you just save the "Suite" file before adding test cases. You can ommit switching to Text Edit to have this defect reproduced. Steps

  1. New Suite "newsuite.robot"
  2. Save the "newsuite.robot" obraz
  3. New Test Case and add content obraz
  4. Save the "newsuite.robot". Test case disappear (at least on my side).

If the empty files are considered as "Resource" files, so what about adding *** Test Cases *** section to New Suite files by default?

ZDabrowski avatar Aug 21 '24 08:08 ZDabrowski

@ZDabrowski This is fixed in current development, v2.1de73.

HelioGuilherme66 avatar Sep 03 '24 21:09 HelioGuilherme66