Implement undo delete test case functionality #411
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of changes made
Currently, users can delete generated test cases but there is no way to restore a test case deleted by accident. This PR implements the functionality for recovering a test case after its deletion. When the user deletes a test case, its UI gets swapped with
hiddenTestCasePanel
that displays a message indicating that the test is removed and two buttons: "Undo" and "Remove permanently".When a test case gets deleted, it is only hidden in the UI. However, its state is still kept in memory. This allows to restore the test case back with all user changes easily. This PR also contains changes to parts of the code responsible for displaying and managing the state of other UI components such as statistics in the top line, and checkboxes, and makes sure the "Select/Unselect all", "Run all", and "Apply to test suite" buttons apply only to visible tests.
Why is merge request needed
Closes #230
What is missing?
When there are too few tests and they are all hidden, the list layout makes them occupy the whole possible height. The UI could be further improved to display elements more compactly, but it should be first agreed upon with designers and project maintainers.
It would be good to test the provided functionality in an automated way.
I have checked that I am merging into correct branch