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

Implement undo delete test case functionality #411

Open
wants to merge 9 commits into
base: development
Choose a base branch
from

Conversation

DanielRendox
Copy link

@DanielRendox DanielRendox commented Nov 1, 2024

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.

Image showcasing undo delete test functionality

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

Now the bin icon only hides the test case while still keeping the test data in memory. From there, users can either restore it (which shows it again) or remove it permanently.
Fixed problems:
- Swapping test case panel with removed test panel was not implemented properly and created multiple listeners for buttons.
- The top bar statistics was not correct after removing a test permanently.
- Remove separator below the test case when it is removed permanently.
- Make test case containers wrap their content size
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add undo to test case removing
2 participants