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

Add restore test case button #374

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

Conversation

zkkv
Copy link

@zkkv zkkv commented Oct 6, 2024

Description of changes made

This PR allows users to restore a test case if they previously removed it. The test appears inactive and there's a message saying "This test was removed". The remove button is replaced with the restore button (in red in the screenshot below).

Why is merge request needed

It is an improvement of user experience.

Other notes

Closes #230

Manually Tested Scenarios

  • Removing a test. Expected behavior:

    • Test is deselected and cannot be reselected

    • Test cannot be edited

    • Run, send, and two reset buttons are disabled

    • A message appears saying "This test was removed"

    • Remove button is replaced with Restore button

    • Test is not included in coverage statistics

    • Test is not included in the tob-bar statistics

    • Lines covered only by that test are not highlighted in the IDE

  • Restoring a test. Expected behavior:

    • Remove button behavior is reversed

    • Test is selected automatically

  • Pressing "Apply to test suite" when one or more tests are removed. Expected behavior: removed tests are not applied; if all test cases are removed, the test class is empty.

  • Pressing "Select all" when one or more tests are removed. Expected behavior: removed tests are not selected.

  • Pressing "Run all" when one or more tests are removed. Expected behavior: removed tests are not run.

  • Running a restored a test. Expected behavior: test is run normally.

  • Making changes to a test, deleting and then restoring the test. Expected behavior: user changes are preserved.

  • Removing a test, switching to another tab and then switching back. Expected behavior: test stays removed.

  • Removing previously run test. Expected behavior: border stays in place.

  • Restoring previously run test. Expected behavior: run button is disabled.

  • Generating another request for a test case, removing it and switching between requests. Expected behavior: test is not reselected

  • Removing a test, running all tests and clicking on green square in the IDE. Expected behavior: the removed test is not listed.

  • Removing all tests. Expected behavior: no dialog window pops up saying that all test cases will be removed; this reverts the change done in Close generated tests tab, if all test were deleted #331.

Screenshots

A screenshot of the IDE with a removed test and restore button highlighted in red

What is missing?

I haven't found anything except that it would be good to be able test this in an automated way.

  • I have checked that I am merging into correct branch

@zkkv zkkv marked this pull request as draft October 6, 2024 19:21
@zkkv zkkv marked this pull request as ready for review October 6, 2024 19:53
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