Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Newly written test case can be lost #2737

Open
JFoederer opened this issue Mar 25, 2024 · 2 comments
Open

Newly written test case can be lost #2737

JFoederer opened this issue Mar 25, 2024 · 2 comments
Labels
analyze Analyze, Research or Investigate: solutions, complexity, reproducibility, ... bug Malfunctions that should be fixed to comply with the expected behavior prio-medium Behaving incorrectly, but still somewhat usable

Comments

@JFoederer
Copy link
Collaborator

There is some weird behaviour in creating a new test case that cascades to make things worse. Eventually causing all work done on a new test case to be lost when saving.

Consider this scenario:
With the Text edit tab open and the first test suite selected in the tree view, right click the second test suite to create a new test case.
image

Applogies, I accidentally typed 'New suite' as the name for a test case. Sorry for the confusion, but I already included all the screenshots before I noticed.

New suite is now created in the selected test suite, instead of where I right clicked
image

Switching to the grid editor shows an error
image

Clicking Yes switches to the grid editor and the test is still there. I can edit it just fine, so what was the error about?
image

Now when I drag and drop the test case to the second test suite as intended, the new test case also stays in the first test suite. I would expect a drag and drop to be a move-action. And maybe it is, because now I can't delete 'New suite' from the first test suite.
image
(The menu item is there, but doesn't do anything)
The test case is removed when checking the text editor, but now it is also gone from the second test suite, even though it is still visible in the tree view and editable from the grid editor.

When saving all files and reloading the project in RIDE, all precious work on the new test case is lost.
image

@HelioGuilherme66
Copy link
Member

@JFoederer The problem started with the active Test Suite. When you right-click and see the long menu list, that allows to Create a New Test Case, you are in the context of the current selected Test Suite (the one in Text Editor or the parent of the Test Case or Keyword in Grid Editor). Even when created and replying Yes to revert changes, the Text Editor still shows the New Test Case because still exists in Tree. If you click Apply, you will see again the blank test case error. The same if you move to Grid Editor. Then you add the No Operation step, which allows to save the Test Suite.

Indeed we can end in the situation where we have two Test Cases with the same name in different Test Suites, but the navigation and content is only in one of them. When you Delete the actual one with content you lost all. The refreshing of the Tree is happening when we click Apply in Text Editor.

To complicate things, when we Drag-and-Drop a Test Case (and probably a Keyword too), between different Test Suites, it actually makes a copy of the item.

I did experiment, without saving the files to disk

Has a safeguard, always try to save the files.

@HelioGuilherme66 HelioGuilherme66 added prio-medium Behaving incorrectly, but still somewhat usable bug Malfunctions that should be fixed to comply with the expected behavior analyze Analyze, Research or Investigate: solutions, complexity, reproducibility, ... labels Mar 25, 2024
@JFoederer
Copy link
Collaborator Author

There are a few oddities going here, but let's not make it more difficult than needed. I think there are two issues that need addressing:

  1. Right clicking on an item should act on the item you click on. That is common behaviour. Just try it in Windows Explorer or Slack, or basically any main stream tool. For instance in Slack. Select one channel, then right-click on another and copy its name. See which one you have on the clipboard. I feel this one is important, because this single step would have prevented the other steps from being needed.
  2. If it is intended behaviour to make a copy with drag and drop, then the copy is not a proper copy. I don't know exactly what is going on, but they somehow stay connected. Actions, like the delete from the example, but also typing new keywords can actually carry over from one test case to the other. I can type a new line in one of the two test cases, switch to the other one and see that change there as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyze Analyze, Research or Investigate: solutions, complexity, reproducibility, ... bug Malfunctions that should be fixed to comply with the expected behavior prio-medium Behaving incorrectly, but still somewhat usable
Projects
None yet
Development

No branches or pull requests

2 participants