https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36607
Mark Hofstetter <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |In Discussion --- Comment #8 from Mark Hofstetter <[email protected]> --- hi, I think Jonathan is right, ideally tests should be idempotent ie you have to clean up after testing. I added a "teardown" option in both t/cypress/support/e2e.js t/cypress/support/cypress_builder.pl additionally I think there was an error in t/lib/TestBuilder.pm because it used hashes and not objects when trying to delete objects to run yarn cypress run --config video=false,screenshotOnRunFailure=false --spec t/cypress/integration/DataTestSetupTeardown_spec.ts which creates a patron and then removes exactly this patron + the library/branch created implicitly. If this approach seems worthwhile it needs fleshing out for each object. the point of this approach is that you may not simply create an object randomly but you have to use a identifier, in the case of a patron the cardnumber. with this identifier you "keep state" during the test and in the end you issue a teardown command which not only deletes the explictly created object, but also all dependent object. -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
