-
-
Notifications
You must be signed in to change notification settings - Fork 284
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
Conversation
- delete all TEs related to TCs
.data('test-execution-id') | ||
) | ||
} | ||
) |
There was a problem hiding this comment.
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.
-
Copy
TestRun.remove_case()
API method under a new nameTestRun.remove_execution
and modify it to accept a dictionary (see methods which acceptvalues
parameters). That will needs some tests. -
Adjust the UI and replace
TestRun.remove_case
withTestRun.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. -
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).
There was a problem hiding this comment.
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.
instead of removing all of them. Adjusts internal state accordingly. Add deprecation warning for API method TestRun.remove_case()
instead of removing all of them. Adjusts internal state accordingly. Add deprecation warning for API method TestRun.remove_case()
There are cases when several TEs are created from single TC (when TC is parametrized):
![](https://private-user-images.githubusercontent.com/62895232/252815298-889e7040-39af-49a3-a0e8-786bd9af5b4a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE4NDA3MTksIm5iZiI6MTcyMTg0MDQxOSwicGF0aCI6Ii82Mjg5NTIzMi8yNTI4MTUyOTgtODg5ZTcwNDAtMzlhZi00OWEzLWEwZTgtNzg2YmQ5YWY1YjRhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzI0VDE3MDAxOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTM1YzI3YWIzZThmOTk3YmFhYTdmZWEzM2NkZWFiMjBiNmE0MTM2YTgxYzI3MTljMTAyZTQ3NTI4OWMxODU0ZGMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.UfY9L1voJaEgbvzq5jyKr56w8Kn7H3oHFFEkuAnNYHQ)
removeCases
function intcms/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