rockmelonqa / rockmelonqa-ide

Test Automation IDE that generates and runs Playwright and Selenium code
MIT License
4 stars 3 forks source link

Show a warning message when a page definition that is used by a test case(s) and/or a test routine(s) is being deleted #147

Closed brogreenmoon closed 1 year ago

brogreenmoon commented 1 year ago

Show the message "This page definition is being used by the following test cases and test routines. Do you want to remove it? [list the test cases and routines that are using this page definition]" when deleting a page definition that is referenced by one or more test cases and/or test routines.

Currently the page definition is deleted without a warning, and the page references are simply removed from the test case:

image

image

Which in turn causes a codegen error that is very difficult to troubleshoot:

image

brogreenmoon commented 1 year ago

The message is good:

image

but you should still be able to delete the page, i.e. ask "Do you want to remove it?" with [Yes] [No] buttons. Right now you can only cancel and never delete the page.

quockhanh commented 1 year ago

I think user should delete page/page element out of test case/test routine manually. That is our design

It is different from confirmation and auto delete test case out of test suite <-- because this one does not affect to anything However, deleting page/page element out of test case automatically (via YES button of confirmation message) would affect strongly to whole test case/test routine. User cannot undo it, and it's good to let them go back to review and delete page/page element manually

It looks like when you drop columns or tables (in SQL) which are being referenced by the other (viaforeign key). You must manually solve that issue first then run delete statement again

My suggestion: Should not delete automatically (user will not aware how it afftects without reviewing, and cannot undo). Just remind and let them solve manully