|
Description
Lucas Gass (lukeg)
2025-12-01 14:06:13 UTC
Created attachment 190077 [details] [review] Bug 41336: Remove 'No match found for location with path' warnings Cypress tests for Vue app are currently failing because of the following warnings in the console: "[Vue Router warn] No match found for location with path" It happens for routes that are disabled. We should not build a router-link but a "disabled" link instead. Created attachment 190079 [details] [review] Bug 41336: Fix current (?) On top of "Bug 41354: Fix record sources Vue app" there is still one failing test for t/cypress/integration/Admin/RecordSources_spec.ts 1) Breadcrumbs tests Breadcrumbs: AssertionError: Timed out retrying after 10000ms: Expected to find element: `.current`, but never found it. at Context.eval (webpack://koha/./t/cypress/integration/Admin/RecordSources_spec.ts:18:11) This patch is trying to fix it but it does not The tests still don't pass for me, even with bug 41354 and 41355 applied first - yarn cypress run --spec t/cypress/integration/Admin/RecordSources_spec.ts: 1) Breadcrumbs tests Breadcrumbs: AssertionError: Timed out retrying after 10000ms: Expected to find element: `.current`, but never found it. at Context.eval (webpack://koha/./t/cypress/integration/Admin/RecordSources_spec.ts:18:11) Testing notes (using KTD): 1. Enable ERM (ERMModule system preference) 2. Turn on the developer tools for your browser 3. Go to the ERM landing page 4. Note these warnings in the console: - [Vue Router warn]: No match found for location with path "/cgi-bin/koha/erm/eholdings" - [Vue Router warn]: No match found for location with path "/cgi-bin/koha/erm/eholdings/local" - [Vue Router warn]: No match found for location with path "/cgi-bin/koha/erm/eusage" 5. Bonus: Test other areas of ERM and modules that use Vue and DataTables, such as preservation. 7. Run the test: yarn cypress run --spec t/cypress/integration/Admin/RecordSources_spec.ts 8. Apply the patches. 9. yarn build 10. restart_all 11. Repeat steps 3-7: no warnings, test passes It does fix 'No match found for location with path' warnings 8-) Created attachment 190107 [details] [review] Bug 41336: Remove 'No match found for location with path' warnings Cypress tests for Vue app are currently failing because of the following warnings in the console: "[Vue Router warn] No match found for location with path" It happens for routes that are disabled. We should not build a router-link but a "disabled" link instead. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Created attachment 190108 [details] [review] Bug 41336: Fix current (?) On top of "Bug 41354: Fix record sources Vue app" there is still one failing test for t/cypress/integration/Admin/RecordSources_spec.ts 1) Breadcrumbs tests Breadcrumbs: AssertionError: Timed out retrying after 10000ms: Expected to find element: `.current`, but never found it. at Context.eval (webpack://koha/./t/cypress/integration/Admin/RecordSources_spec.ts:18:11) This patch is trying to fix it but it does not Signed-off-by: Nick Clemens <nick@bywatersolutions.com> These worked for me, the tests all pass Created attachment 190112 [details] [review] Bug 41336: Remove 'No match found for location with path' warnings Cypress tests for Vue app are currently failing because of the following warnings in the console: "[Vue Router warn] No match found for location with path" It happens for routes that are disabled. We should not build a router-link but a "disabled" link instead. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> Created attachment 190113 [details] [review] Bug 41336: Fix current (?) On top of "Bug 41354: Fix record sources Vue app" there is still one failing test for t/cypress/integration/Admin/RecordSources_spec.ts 1) Breadcrumbs tests Breadcrumbs: AssertionError: Timed out retrying after 10000ms: Expected to find element: `.current`, but never found it. at Context.eval (webpack://koha/./t/cypress/integration/Admin/RecordSources_spec.ts:18:11) This patch is trying to fix it but it does not Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> Created attachment 190114 [details] [review] Bug 41336: (follow-up) Fix breadcrumb selector in Cypress test The test was looking for .current class but the Vue component uses aria-current="page" attribute instead. Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> Nice work everyone! Pushed to main for 25.11 |