Once you save an empty Suite file, it is no longer possible to add and save test cases.
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
- On a Tree View, Right click on Folder and select
New Suite - After selection goes to the newly created Suite,
Editortab is active, save the file - Under Suite file create New Test case by
New Test Caseright click command, and check theText Edittab - file is empty! - After switching back to the
EditorTab, 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.
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.
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
New Suite"newsuite.robot"- Save the "newsuite.robot"
New Test Caseand add content- 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 This is fixed in current development, v2.1de73.