Bug 34691

Summary: Active link in the menu is not always correctly styled - again
Product: Koha Reporter: Pedro Amorim <pedro.amorim>
Component: ERMAssignee: Pedro Amorim <pedro.amorim>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P5 - low CC: fridolin.somers, jonathan.druart, jonathan.field, martin.renvoize, matt.blenkinsop, pedro.amorim
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33381
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.11.00
Bug Depends on: 33169    
Bug Blocks:    
Attachments: Bug 34691: Fix linkActiveClass in createRouter
Bug 34691: Add cypress tests
Bug 34691: Fix linkActiveClass in createRouter
Bug 34691: Add cypress tests
Bug 34691: Fix linkActiveClass in createRouter

Description Pedro Amorim 2023-09-01 13:02:42 UTC
Fixed by bug 33381 but I think bug 33169 broke it.

To reproduce:
1) Visit /cgi-bin/koha/erm/agreements/add
2) Notice the "Agreements" menu item is not active
Comment 1 Pedro Amorim 2023-09-01 13:04:13 UTC
Created attachment 155114 [details] [review]
Bug 34691: Fix linkActiveClass in createRouter

Test plan:
1) Visit /cgi-bin/koha/erm/agreements/add
2) Notice the "Agreements" menu item is not active
3) Apply patch, restart yarn js:watch. Repeat
Comment 2 Pedro Amorim 2023-09-01 13:04:38 UTC
This is not done yet, we need to add Cypress tests for this to make sure we don't break it again.
Comment 3 Pedro Amorim 2023-09-01 13:33:28 UTC
Created attachment 155117 [details] [review]
Bug 34691: Add cypress tests
Comment 4 Pedro Amorim 2023-09-01 13:33:31 UTC
Created attachment 155118 [details] [review]
Bug 34691: Fix linkActiveClass in createRouter

Test plan:
1) Visit /cgi-bin/koha/erm/agreements/add
2) Notice the "Agreements" menu item is not active
3) Apply the tests patch only
4) Run tests, watch them fail
5) Apply this patch, restart yarn js:watch and hard refresh browser
6) Repeat steps 1) and 2) Verify it's now active
7) Run tests, watch them pass
Comment 5 Jonathan Druart 2023-09-01 13:41:51 UTC
Created attachment 155120 [details] [review]
Bug 34691: Add cypress tests

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 6 Jonathan Druart 2023-09-01 13:41:54 UTC
Created attachment 155121 [details] [review]
Bug 34691: Fix linkActiveClass in createRouter

Test plan:
1) Visit /cgi-bin/koha/erm/agreements/add
2) Notice the "Agreements" menu item is not active
3) Apply the tests patch only
4) Run tests, watch them fail
5) Apply this patch, restart yarn js:watch and hard refresh browser
6) Repeat steps 1) and 2) Verify it's now active
7) Run tests, watch them pass

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 7 Tomás Cohen Arazi 2023-09-01 14:25:09 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 8 Pedro Amorim 2023-09-05 11:33:21 UTC
The new command is/was supposed to be in support/commands.js instead of support/index.js but this gets fixed by bug 34319 anyway so no follow-up required here.
Comment 9 Fridolin Somers 2023-09-08 05:55:49 UTC
Depends on Bug 33169 not in 23.05.x