On bug 39011 we added the ability to search on the coded value description, but the changes have not been covered by tests.
Depends on Cypress tests from bug 38108.
Created attachment 179201 [details] [review] Bug 39315: Move KohaTable cypress tests to a separate directory
Created attachment 179202 [details] [review] Bug 39315: Move holdings Cypress tests to a separate file
Created attachment 179203 [details] [review] Bug 39315: MockData - generate full objects for libraries and item types
Created attachment 179204 [details] [review] Bug 39315: (bug 38108 follow-up) Add Cypress tests 1. We move from const to var so that we can modify the value of the variable from the Cypress tests. 2. Also remove win.libraries_map as it seems that our code is no longer failing if it's missing (we added more checks I guess) 3. Improved selectors for the show/hide filters links - cy.get(".hide_filters").click(); + cy.get(`.${table_id}_table_controls .hide_filters`).click(); Test plan: Both commands should pass yarn cypress run --spec t/cypress/integration/PatronSearch_spec.ts yarn cypress run --spec t/cypress/integration/t/mockData.ts
Created attachment 179365 [details] [review] Bug 39315: Move KohaTable cypress tests to a separate directory Signed-off-by: David Nind <david@davidnind.com>
Created attachment 179366 [details] [review] Bug 39315: Move holdings Cypress tests to a separate file Signed-off-by: David Nind <david@davidnind.com>
Created attachment 179367 [details] [review] Bug 39315: MockData - generate full objects for libraries and item types Signed-off-by: David Nind <david@davidnind.com>
Created attachment 179368 [details] [review] Bug 39315: (bug 38108 follow-up) Add Cypress tests 1. We move from const to var so that we can modify the value of the variable from the Cypress tests. 2. Also remove win.libraries_map as it seems that our code is no longer failing if it's missing (we added more checks I guess) 3. Improved selectors for the show/hide filters links - cy.get(".hide_filters").click(); + cy.get(`.${table_id}_table_controls .hide_filters`).click(); Test plan: Both commands should pass yarn cypress run --spec t/cypress/integration/PatronSearch_spec.ts yarn cypress run --spec t/cypress/integration/t/mockData.ts Signed-off-by: David Nind <david@davidnind.com>
Testing notes (using KTD): 1. When applying patches for dependency 38108, use interactive mode and comment out all patches except the last one (Add Cypress tests), otherwise the patches don't apply cleanly (all the other patches for the dependency are already in main). 2. Running the tests - these should all pass (there was an incorrect path in the test plan for PatronSearch_spec.ts): - yarn cypress run --spec t/cypress/integration/t/mockData.ts - yarn cypress run --spec t/cypress/integration/KohaTable/Holdings_spec.ts - yarn cypress run --spec t/cypress/integration/KohaTable/KohaTable_spec.ts - yarn cypress run --spec t/cypress/integration/KohaTable/PatronSearch_spec.ts 3. When I run the tests in step 2, they all pass. However, I get this error (both before and after): DevTools listening on ws://127.0.0.1:40643/devtools/browser/4b47ab3b-14a7-4a1f-ac7d-cb9008446e76 [9571:0316/171820.196254:ERROR:gpu_memory_buffer_support_x11.cc(44)] dri3 extension not supported. Missing baseUrl in compilerOptions. tsconfig-paths will be skipped
Hmm.. QA script doesn't like something here: FAIL t/cypress/integration/KohaTable/Holdings_spec.ts FAIL forbidden patterns forbidden pattern: .only detected (line 272)
Created attachment 180285 [details] [review] Bug 39315: (bug 38108 follow-up) Add Cypress tests 1. We move from const to var so that we can modify the value of the variable from the Cypress tests. 2. Also remove win.libraries_map as it seems that our code is no longer failing if it's missing (we added more checks I guess) 3. Improved selectors for the show/hide filters links - cy.get(".hide_filters").click(); + cy.get(`.${table_id}_table_controls .hide_filters`).click(); Test plan: Both commands should pass yarn cypress run --spec t/cypress/integration/PatronSearch_spec.ts yarn cypress run --spec t/cypress/integration/t/mockData.ts Signed-off-by: David Nind <david@davidnind.com>
(In reply to Martin Renvoize (ashimema) from comment #11) > Hmm.. QA script doesn't like something here: > > FAIL t/cypress/integration/KohaTable/Holdings_spec.ts > FAIL forbidden patterns > forbidden pattern: .only detected (line 272) Oops sorry about that. I knew it was a good idea to add this test :D
Created attachment 180317 [details] [review] Bug 39315: Move KohaTable cypress tests to a separate directory Signed-off-by: David Nind <david@davidnind.com>
Created attachment 180318 [details] [review] Bug 39315: Move holdings Cypress tests to a separate file Signed-off-by: David Nind <david@davidnind.com>
Created attachment 180319 [details] [review] Bug 39315: MockData - generate full objects for libraries and item types Signed-off-by: David Nind <david@davidnind.com>
Created attachment 180320 [details] [review] Bug 39315: (bug 38108 follow-up) Add Cypress tests 1. We move from const to var so that we can modify the value of the variable from the Cypress tests. 2. Also remove win.libraries_map as it seems that our code is no longer failing if it's missing (we added more checks I guess) 3. Improved selectors for the show/hide filters links - cy.get(".hide_filters").click(); + cy.get(`.${table_id}_table_controls .hide_filters`).click(); Test plan: Both commands should pass yarn cypress run --spec t/cypress/integration/PatronSearch_spec.ts yarn cypress run --spec t/cypress/integration/t/mockData.ts Signed-off-by: David Nind <david@davidnind.com>
Created attachment 180371 [details] [review] Bug 39315: Move KohaTable cypress tests to a separate directory Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Created attachment 180372 [details] [review] Bug 39315: Move holdings Cypress tests to a separate file Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Created attachment 180373 [details] [review] Bug 39315: MockData - generate full objects for libraries and item types Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Created attachment 180374 [details] [review] Bug 39315: (bug 38108 follow-up) Add Cypress tests 1. We move from const to var so that we can modify the value of the variable from the Cypress tests. 2. Also remove win.libraries_map as it seems that our code is no longer failing if it's missing (we added more checks I guess) 3. Improved selectors for the show/hide filters links - cy.get(".hide_filters").click(); + cy.get(`.${table_id}_table_controls .hide_filters`).click(); Test plan: Both commands should pass yarn cypress run --spec t/cypress/integration/PatronSearch_spec.ts yarn cypress run --spec t/cypress/integration/t/mockData.ts Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Tests, tests, all the tests :)
Created attachment 180386 [details] [review] Bug 39315: Move KohaTable cypress tests to a separate directory Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Created attachment 180387 [details] [review] Bug 39315: Move holdings Cypress tests to a separate file Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Created attachment 180388 [details] [review] Bug 39315: MockData - generate full objects for libraries and item types Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Created attachment 180389 [details] [review] Bug 39315: (bug 38108 follow-up) Add Cypress tests 1. We move from const to var so that we can modify the value of the variable from the Cypress tests. 2. Also remove win.libraries_map as it seems that our code is no longer failing if it's missing (we added more checks I guess) 3. Improved selectors for the show/hide filters links - cy.get(".hide_filters").click(); + cy.get(`.${table_id}_table_controls .hide_filters`).click(); Test plan: Both commands should pass yarn cypress run --spec t/cypress/integration/PatronSearch_spec.ts yarn cypress run --spec t/cypress/integration/t/mockData.ts Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Pushed for 25.05! Well done everyone, thank you!