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

[TestRuns] Fix removeCases function #3282

Closed
wants to merge 2 commits into from

Conversation

somenewacc
Copy link
Contributor

@somenewacc somenewacc commented Jul 11, 2023

There are cases when several TEs are created from single TC (when TC is parametrized):

removeCases function in tcms/testruns/static/testruns/js/get.js does not take it into account.
As a result, it is not possible to re-add the same test case without reloading the page. Also, the counter shows the wrong number.

See video with defect:
https://i.imgur.com/NxqHDq1.mp4

.data('test-execution-id')
)
}
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is definitely wrong and has been wrong from the very beginning. When you select test executions and delete them the expected behavior is that only items which are selected will be deleted, not everything else related to the same test case.

IMO fixing the problem will require a few more steps, probably best to be done separately.

  1. Copy TestRun.remove_case() API method under a new name TestRun.remove_execution and modify it to accept a dictionary (see methods which accept values parameters). That will needs some tests.

  2. Adjust the UI and replace TestRun.remove_case with TestRun.remove_execution in all places where it is used, leaving the .remove_case() method to be used by external API consumers until it is removed.

  3. Come back to this PR and adjust as needed in order to allow adding parametrized test case variants for executions which have been previously removed! (if that is desired).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm actually OK with this behavior, but I understand what you mean :)

At the moment I don't have time for that.

atodorov added a commit that referenced this pull request Feb 20, 2024
atodorov added a commit that referenced this pull request Feb 20, 2024
instead of removing all of them. Adjusts internal state accordingly.

Add deprecation warning for API method TestRun.remove_case()
atodorov added a commit that referenced this pull request Feb 20, 2024
instead of removing all of them. Adjusts internal state accordingly.

Add deprecation warning for API method TestRun.remove_case()
atodorov added a commit that referenced this pull request Feb 20, 2024
@atodorov atodorov closed this in d08a95b Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants