https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18974
--- Comment #17 from Jonathan Druart <[email protected]> --- (In reply to Victor Grousset/tuxayo from comment #16) > There are currently 2 big holes in my rewrite. They are the TODOs in the > code, I'm copying them here. > > # TODO test fails depending on what we have from LOC. > # e.g. If Title or Transcribing agency is not provided > # * tag 040 subfield c Transcribing agency in tab 0 > # * tag 245 subfield a Title in tab 2 > # * Field 040 is mandatory, at least one of its subfields must be filled. > # * Field 245 is mandatory, at least one of its subfields must be filled. > > # Idea: a simple & reliable way to handle this would be to unconditionally > # fill 040$c and 245. > # Before doing that (inventing my thing): has this problem already been > solved in our knowledge in a better way? I am not sure I understand. Make the tests pass using the default framework will be a good first step. > # TODO we have the issue of when we run the test twice, the record exists > # and Koha asks about what to do about this. > # Is there an obvious way to cleanup this? > # notes: the need is to cleanup after the test sucess > # and to cleanup before starting the test again in the case after a failure. > # Will bug 19821 help? > # Bug 19821 - Run tests on a separate database See what is done in other selenium tests, using cleanup() > # Idea from the current cleanup(): (whose code seems mostly not related to > this test) > # - name the record specifically like test_cataloging_workflow > # - delete it and it's related items > # - question: isn't it risky about data integrity? Data integrity? Why? > # Another idea: > # - pick a random number and replace the ISBN by it You can generate random data using TestBuilder is you like, then delete the object and reuse the data, like: my $patron = $builder->build_object({ class => 'Koha::Patrons' }); my $patron_info = $patron->unblessed; $patron->delete; # reuse $patron_info, you may need to remove some key, like IDs In basic_workflow.t we use hardcoded values, that can work too. -- 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/
