Bug 10190: fix failing Permissions.t and overhaul CirculationTriggers Cypress spec
Permissions.t:
- Remove edit_notice_status_triggers from userpermissions.sql so fresh installs
no longer seed this deprecated permission (existing installs are handled by
the atomic update)
- Add a defensive DELETE in the test to cover DBs that pre-date the atomic update
CirculationTriggers_spec.ts:
- Fix getMockCirculationRule: the helper was returning the old {rule_name,
rule_value, branchcode, ...} format; update to the current API format
{context: {...}, overdue_N_delay: ..., ...}
- Remove assertions for UI elements that do not exist (success/error flash
messages, "Existing triggers" heading, "rule set will be removed" text)
- Fix reset confirmation text to match actual component output
- Fix duplicate patron_category_id "ST" in mock patron categories
- Remove aspirational tests that checked non-implemented behaviour
- Add describe block for the no-default-triggers warning (no rules anywhere,
rules only at specific libraries, library link switches the filter)
- Add regression test for NaN trigger number when adding first rule for a library
Signed-off-by: Michaela <michaela.sieber@kit.edu>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
This commit is contained in:
parent
f631df5afd
commit
c53a2ead10
|
|
@ -109,7 +109,6 @@ INSERT INTO permissions (module_bit, code, description) VALUES
|
|||
(13, 'edit_calendar', 'Define days when the library is closed'),
|
||||
(13, 'moderate_comments', 'Moderate patron comments'),
|
||||
(13, 'edit_notices', 'Define notices'),
|
||||
(13, 'edit_notice_status_triggers', 'Set notice/status triggers for overdue items'),
|
||||
(13, 'edit_quotes', 'Edit quotes for quote-of-the-day feature'),
|
||||
(13, 'view_system_logs', 'Browse the system logs'),
|
||||
(13, 'inventory', 'Perform inventory (stocktaking) of your catalog'),
|
||||
|
|
|
|||
|
|
@ -20,8 +20,14 @@ use Modern::Perl;
|
|||
use Test::NoWarnings;
|
||||
use Test::More tests => 4;
|
||||
|
||||
use C4::Context;
|
||||
|
||||
use_ok('Koha::Auth::Permissions');
|
||||
|
||||
# Remove the deprecated edit_notice_status_triggers permission (bug 10190).
|
||||
# It may still be present in DBs that pre-date the atomic update.
|
||||
C4::Context->dbh->do(q|DELETE FROM permissions WHERE code = 'edit_notice_status_triggers'|);
|
||||
|
||||
subtest 'normal staff user test' => sub {
|
||||
|
||||
plan tests => 1;
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue