[Bug 25113] New: Make CirculationRules.t flexible for new scope combinations
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25113 Bug ID: 25113 Summary: Make CirculationRules.t flexible for new scope combinations Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Test Suite Assignee: chris@bigballofwax.co.nz Reporter: lari.taskula@hypernova.fi QA Contact: testopia@bugs.koha-community.org We used to test rule scopes by explicitly defining each combination. When adding new scopes, it is much easier if these tests are auto- generated for you so that you don't have to repeat similar code. Remove those "duplicates" and adds a method that returns test cases for each scope as follows: branchcode categorycode itemtype __________ ____________ ________ branchcode categorycode itemtype branchcode categorycode * branchcode * itemtype branchcode * * * categorycode itemtype * categorycode * * * itemtype * * * And automatically extends the test when new scopes are added. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25113 Lari Taskula <lari.taskula@hypernova.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25113 --- Comment #1 from Lari Taskula <lari.taskula@hypernova.fi> --- Created attachment 102765 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=102765&action=edit Bug 25113: Refactor CirculationRules.t when testing scope combinations We used to test rule scopes by explicitly defining each combination. When adding new scopes, it is much easier if these tests are auto- generated for you so that you don't have to repeat similar code. This patch removes those "duplicates" and adds a method that returns test cases for each scope as follows: branchcode categorycode itemtype __________ ____________ ________ branchcode categorycode itemtype branchcode categorycode * branchcode * itemtype branchcode * * * categorycode itemtype * categorycode * * * itemtype * * * And automatically extends the test when new scopes are added. This also obsoletes the "Get effective issuing rule in correct order" test in t/db_dependent/Koha/IssuingRules.t To test: 1. prove t/db_dependent/Koha/CirculationRules.t Sponsored-by: The National Library of Finland -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25113 Lari Taskula <lari.taskula@hypernova.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|chris@bigballofwax.co.nz |lari.taskula@hypernova.fi Change sponsored?|--- |Sponsored CC| |lari.taskula@hypernova.fi -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25113 Lari Taskula <lari.taskula@hypernova.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |25089 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25089 [Bug 25089] Add checkout_type to circulation rules -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25113 Lari Taskula <lari.taskula@hypernova.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #102765|0 |1 is obsolete| | --- Comment #2 from Lari Taskula <lari.taskula@hypernova.fi> --- Created attachment 103350 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=103350&action=edit Bug 25113: Refactor CirculationRules.t when testing scope combinations We used to test rule scopes by explicitly defining each combination. When adding new scopes, it is much easier if these tests are auto- generated for you so that you don't have to repeat similar code. This patch removes those "duplicates" and adds a method that returns test cases for each scope as follows: branchcode categorycode itemtype __________ ____________ ________ branchcode categorycode itemtype branchcode categorycode * branchcode * itemtype branchcode * * * categorycode itemtype * categorycode * * * itemtype * * * And automatically extends the test when new scopes are added. This also obsoletes the "Get effective issuing rule in correct order" test in t/db_dependent/Koha/IssuingRules.t To test: 1. prove t/db_dependent/Koha/CirculationRules.t Sponsored-by: The National Library of Finland -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25113 Joonas Kylmälä <joonas.kylmala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |joonas.kylmala@helsinki.fi --- Comment #3 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- In the patch you mention
This also obsoletes the "Get effective issuing rule in correct order" test in t/db_dependent/Koha/IssuingRules.t
why is it obsoleted? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25113 --- Comment #4 from Lari Taskula <lari.taskula@hypernova.fi> --- (In reply to Joonas Kylmälä from comment #3)
In the patch you mention
This also obsoletes the "Get effective issuing rule in correct order" test in t/db_dependent/Koha/IssuingRules.t
why is it obsole(In reply to Joonas Kylmälä from comment #3) In the patch you mention
This also obsoletes the "Get effective issuing rule in correct order" test in t/db_dependent/Koha/IssuingRules.t
why is it obsoleted?
It is the test I refer to in the original post of this Bug.
We used to test rule scopes by explicitly defining each combination. When adding new scopes, it is much easier if these tests are auto- generated for you so that you don't have to repeat similar code. Remove those "duplicates" ...
Manually adding 2^n tests, where n is the number of scopes, is no longer needed because wiith this patch we are autogenerating those test cases. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25113 Joonas Kylmälä <joonas.kylmala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25113 Joonas Kylmälä <joonas.kylmala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #103350|0 |1 is obsolete| | --- Comment #5 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- Created attachment 106904 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106904&action=edit Bug 25113: Refactor CirculationRules.t when testing scope combinations We used to test rule scopes by explicitly defining each combination. When adding new scopes, it is much easier if these tests are auto- generated for you so that you don't have to repeat similar code. This patch removes those "duplicates" and adds a method that returns test cases for each scope as follows: branchcode categorycode itemtype __________ ____________ ________ branchcode categorycode itemtype branchcode categorycode * branchcode * itemtype branchcode * * * categorycode itemtype * categorycode * * * itemtype * * * And automatically extends the test when new scopes are added. This also obsoletes the "Get effective issuing rule in correct order" test in t/db_dependent/Koha/IssuingRules.t To test: 1. prove t/db_dependent/Koha/CirculationRules.t Sponsored-by: The National Library of Finland Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25113 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25113 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #106904|0 |1 is obsolete| | --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 108963 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=108963&action=edit Bug 25113: Refactor CirculationRules.t when testing scope combinations We used to test rule scopes by explicitly defining each combination. When adding new scopes, it is much easier if these tests are auto- generated for you so that you don't have to repeat similar code. This patch removes those "duplicates" and adds a method that returns test cases for each scope as follows: branchcode categorycode itemtype __________ ____________ ________ branchcode categorycode itemtype branchcode categorycode * branchcode * itemtype branchcode * * * categorycode itemtype * categorycode * * * itemtype * * * And automatically extends the test when new scopes are added. This also obsoletes the "Get effective issuing rule in correct order" test in t/db_dependent/Koha/IssuingRules.t To test: 1. prove t/db_dependent/Koha/CirculationRules.t Sponsored-by: The National Library of Finland Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25113 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #108963|0 |1 is obsolete| | --- Comment #7 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 108978 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=108978&action=edit Bug 25113: Refactor CirculationRules.t when testing scope combinations We used to test rule scopes by explicitly defining each combination. When adding new scopes, it is much easier if these tests are auto- generated for you so that you don't have to repeat similar code. This patch removes those "duplicates" and adds a method that returns test cases for each scope as follows: branchcode categorycode itemtype __________ ____________ ________ branchcode categorycode itemtype branchcode categorycode * branchcode * itemtype branchcode * * * categorycode itemtype * categorycode * * * itemtype * * * And automatically extends the test when new scopes are added. This also obsoletes the "Get effective issuing rule in correct order" test in t/db_dependent/Koha/IssuingRules.t To test: 1. prove t/db_dependent/Koha/CirculationRules.t Sponsored-by: The National Library of Finland Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> JD amended patch: perl tidy -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25113 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |20.11.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25113 --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 20.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25113 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com --- Comment #9 from Lucas Gass <lucas@bywatersolutions.com> --- enhancement will not be backported to 20.05.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org