[Bug 40170] New: Replace cypress-mysql with mysql2
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40170 Bug ID: 40170 Summary: Replace cypress-mysql with mysql2 Change sponsored?: --- Product: Koha Version: 24.11 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Test Suite Assignee: chris@bigballofwax.co.nz Reporter: jonathan.druart@gmail.com QA Contact: testopia@bugs.koha-community.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40170 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|chris@bigballofwax.co.nz |jonathan.druart@gmail.com Depends on| |40127 Version|24.11 |unspecified Status|NEW |ASSIGNED Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40127 [Bug 40127] JS error on biblio detail page when there are no items -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40170 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|40127 |40168 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40127 [Bug 40127] JS error on biblio detail page when there are no items https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40168 [Bug 40168] afterEach not called in KohaTable cypress tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40170 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40170 --- Comment #1 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 183352 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183352&action=edit Bug 40170: Replace cypress-mysql with mysql2 - Cypress tests This patch suggests to replace cypress-mysql with mysql2 cypress-mysql provides a custom Cypress command (cy.query) that run within the browser context. This approach mixes test-side and server-side and is limited in flexibility and error handling. mysql2 runs inside Cypress plugins (Node process) via cy.task calls, which are executed server-side (outside the browser) This is needed for the follow-up bug reports where we need to request the DB from other plugins Test plan: Run `yarn install` to install the mysql2 All the Cypress tests modified by this patch must still pass The new test t/cypress/integration/t/db.ts must also pass -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40170 David Nind <david@davidnind.com> 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=40170 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #183352|0 |1 is obsolete| | --- Comment #2 from David Nind <david@davidnind.com> --- Created attachment 183359 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183359&action=edit Bug 40170: Replace cypress-mysql with mysql2 - Cypress tests This patch suggests to replace cypress-mysql with mysql2 cypress-mysql provides a custom Cypress command (cy.query) that run within the browser context. This approach mixes test-side and server-side and is limited in flexibility and error handling. mysql2 runs inside Cypress plugins (Node process) via cy.task calls, which are executed server-side (outside the browser) This is needed for the follow-up bug reports where we need to request the DB from other plugins Test plan: Run `yarn install` to install the mysql2 All the Cypress tests modified by this patch must still pass The new test t/cypress/integration/t/db.ts must also pass Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40170 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #3 from David Nind <david@davidnind.com> --- Testing notes (using KTD): 1. New or changed tests: yarn cypress run --spec t/cypress/integration/Auth/csrf.ts yarn cypress run --spec t/cypress/integration/Islands/AcquisitionsMenu_spec.ts yarn cypress run --spec t/cypress/integration/KohaTable/Holdings_spec.ts yarn cypress run --spec t/cypress/integration/KohaTable/PatronSearch_spec.ts yarn cypress run --spec t/cypress/integration/t/db.ts -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40170 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |40174 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174 [Bug 40174] Add a way to cleanly insert data in DB from Cypress tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40170 Pedro Amorim <pedro.amorim@openfifth.co.uk> 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=40170 Pedro Amorim <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #183359|0 |1 is obsolete| | --- Comment #4 from Pedro Amorim <pedro.amorim@openfifth.co.uk> --- Created attachment 183867 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183867&action=edit Bug 40170: Replace cypress-mysql with mysql2 - Cypress tests This patch suggests to replace cypress-mysql with mysql2 cypress-mysql provides a custom Cypress command (cy.query) that run within the browser context. This approach mixes test-side and server-side and is limited in flexibility and error handling. mysql2 runs inside Cypress plugins (Node process) via cy.task calls, which are executed server-side (outside the browser) This is needed for the follow-up bug reports where we need to request the DB from other plugins Test plan: Run `yarn install` to install the mysql2 All the Cypress tests modified by this patch must still pass The new test t/cypress/integration/t/db.ts must also pass Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40170 Pedro Amorim <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pedro.amorim@openfifth.co.u | |k QA Contact|testopia@bugs.koha-communit |pedro.amorim@openfifth.co.u |y.org |k -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40170 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |25.11.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40170 --- Comment #5 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 25.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40170 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Pushed to stable Version(s)|25.11.00 |25.11.00,25.05.02 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40170 --- Comment #6 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Nice work everyone! Pushed to 25.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40170 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |40446 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40446 [Bug 40446] DB config used by Cypress (mysql2) is not configurable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40170 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Needs documenting CC| |fridolin.somers@biblibre.co | |m --- Comment #7 from Fridolin Somers <fridolin.somers@biblibre.com> --- Enhancement not pushed to 24.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40170 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED --- Comment #8 from David Nind <david@davidnind.com> --- Test suite changes, no changes to the manual required. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40170 Bug 40170 depends on bug 40168, which changed state. Bug 40168 Summary: afterEach not called in KohaTable cypress tests https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40168 What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org