[Bug 39606] New: Cover Bug 39294 with a cypress test
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39606 Bug ID: 39606 Summary: Cover Bug 39294 with a cypress test Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: lucas@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org It wouldn't be a bad idea to cover the changes from Bug 39294 with a Cypress test to prevent the same type of regression from happening again. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39606 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |lucas@bywatersolutions.com |ity.org | Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39606 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39606 --- Comment #1 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 180802 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=180802&action=edit Bug 39606: Add a cypress test To test: 1. APPLY PATCH 2. cypress run --spec "t/cypress/integration/Tools/" 3. Tests should pass -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39606 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |39294 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39294 [Bug 39294] Not all settings stick when staging MARC records for import -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39606 Magnus Enger <magnus@libriotech.no> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA CC| |magnus@libriotech.no --- Comment #2 from Magnus Enger <magnus@libriotech.no> --- Sorry, the tests do not pass for me: $ cypress run --spec "t/cypress/integration/Tools/" It looks like this is your first time using Cypress: 12.17.4 ✔ Verified Cypress! /var/lib/koha/kohadev/.cache/Cypress/12.17.4/Cypress Opening Cypress... DevTools listening on ws://127.0.0.1:36659/devtools/browser/d019295e-472a-49f7-87c3-70639d72152f [10079:0411/113306.396390:ERROR:gpu_memory_buffer_support_x11.cc(44)] dri3 extension not supported. Missing baseUrl in compilerOptions. tsconfig-paths will be skipped ==================================================================================================== (Run Starting) ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ │ Cypress: 12.17.4 │ │ Browser: Electron 106 (headless) │ │ Node Version: v18.20.6 (/usr/bin/node) │ │ Specs: 1 found (ManageMarcImport_spec.ts) │ │ Searched: t/cypress/integration/Tools │ │ Experiments: experimentalStudio=true │ └────────────────────────────────────────────────────────────────────────────────────────────────┘ ──────────────────────────────────────────────────────────────────────────────────────────────────── Running: ManageMarcImport_spec.ts (1 of 1) Breadcrumb tests ✓ Breadcrumbs (2236ms) loads the manage MARC import page ✓ loads the manage MARC import page (1164ms) 1) upload a MARC record 2 passing (27s) 1 failing 1) loads the manage MARC import page upload a MARC record: Timed out retrying after 10000ms + expected - actual -'replace' +'create_new' at Context.eval (webpack://koha/./t/cypress/integration/Tools/ManageMarcImport_spec.ts:91:34) (Results) ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ │ Tests: 3 │ │ Passing: 2 │ │ Failing: 1 │ │ Pending: 0 │ │ Skipped: 0 │ │ Screenshots: 4 │ │ Video: true │ │ Duration: 26 seconds │ │ Spec Ran: ManageMarcImport_spec.ts │ └────────────────────────────────────────────────────────────────────────────────────────────────┘ (Screenshots) - /kohadevbox/koha/t/cypress/screenshots/ManageMarcImport_spec.ts/after_selection. (1000x1528) png - /kohadevbox/koha/t/cypress/screenshots/ManageMarcImport_spec.ts/right_before_sub (1000x1528) mission.png - /kohadevbox/koha/t/cypress/screenshots/ManageMarcImport_spec.ts/after_waiting.pn (1000x1216) g - /kohadevbox/koha/t/cypress/screenshots/ManageMarcImport_spec.ts/loads the manage (1280x720) MARC import page -- upload a MARC record (failed).png (Video) - Started compressing: Compressing to 32 CRF - Finished compressing: 1 second - Video output: /kohadevbox/koha/t/cypress/videos/ManageMarcImport_spec.ts.mp4 ==================================================================================================== (Run Finished) Spec Tests Passing Failing Pending Skipped ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ │ ✖ ManageMarcImport_spec.ts 00:26 3 2 1 - - │ └────────────────────────────────────────────────────────────────────────────────────────────────┘ ✖ 1 of 1 failed (100%) 00:26 3 2 1 - - -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39606 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff --- Comment #3 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Hey Magnus, thanks for testing! Can you confirm that you have Bug 39294 or do a git pull? It was only pushed yesterday to main, so maybe there is a chance you didn't have it? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39606 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #4 from David Nind <david@davidnind.com> --- All the tests are passing for me: Spec Tests Passing Failing Pending Skipped ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ │ ✔ ManageMarcImport_spec.ts 00:18 3 3 - - - │ └────────────────────────────────────────────────────────────────────────────────────────────────┘ ✔ All specs passed! 00:18 3 3 - - - -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39606 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=39606 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #180802|0 |1 is obsolete| | --- Comment #5 from David Nind <david@davidnind.com> --- Created attachment 180888 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=180888&action=edit Bug 39606: Add a cypress test To test: 1. APPLY PATCH 2. cypress run --spec "t/cypress/integration/Tools/" 3. Tests should 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=39606 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This adds Cyress tests for release notes| |staging MARC records for | |import. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39606 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39606 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #180888|0 |1 is obsolete| | --- Comment #6 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 181264 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=181264&action=edit Bug 39606: Add a cypress test To test: 1. APPLY PATCH 2. cypress run --spec "t/cypress/integration/Tools/" 3. Tests should pass Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@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=39606 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@openfifth.c | |o.uk QA Contact|testopia@bugs.koha-communit |martin.renvoize@openfifth.c |y.org |o.uk Status|Signed Off |Passed QA --- Comment #7 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Great to see tests getting added :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39606 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Cover Bug 39294 with a |Cover change from bug 39294 |cypress test |with a Cypress test -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39606 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |25.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39606 --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 25.05! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39606 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@gmail.com --- Comment #9 from Jonathan Druart <jonathan.druart@gmail.com> --- Why are you taking screenshots? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39606 --- Comment #10 from Jonathan Druart <jonathan.druart@gmail.com> --- The wait statements will certainly cause random failures. cy.wait(5000); cy.wait(2000); -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39606 --- Comment #11 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 181355 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=181355&action=edit Bug 39606: Remove waits and screenshots -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39606 --- Comment #12 from Jonathan Druart <jonathan.druart@gmail.com> --- Notice the following couple of lines: cy.get("#fileuploadstatus").contains("100%"); cy.get("legend").contains("Look for existing records in catalog?").should('be.visible'); It makes Cypress wait 10s until "100%" appears (ie. the file is updated), then the block with the dropdown lists you are going to interact with to be visible. You should almost never use cy.wait. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39606 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |additional_work_needed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39606 --- Comment #13 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Jonathan Druart from comment #12)
Notice the following couple of lines: cy.get("#fileuploadstatus").contains("100%"); cy.get("legend").contains("Look for existing records in catalog?").should('be.visible');
It makes Cypress wait 10s until "100%" appears (ie. the file is updated), then the block with the dropdown lists you are going to interact with to be visible.
You should almost never use cy.wait.
Can you please respond to this? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39606 --- Comment #14 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- (In reply to Katrin Fischer from comment #13)
(In reply to Jonathan Druart from comment #12)
Notice the following couple of lines: cy.get("#fileuploadstatus").contains("100%"); cy.get("legend").contains("Look for existing records in catalog?").should('be.visible');
It makes Cypress wait 10s until "100%" appears (ie. the file is updated), then the block with the dropdown lists you are going to interact with to be visible.
You should almost never use cy.wait.
Can you please respond to this?
Unless I am mistaken Jonathan's follow-up dealt with this. Is there more to do here? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39606 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|additional_work_needed | --- Comment #15 from Jonathan Druart <jonathan.druart@gmail.com> --- Yes, all good here. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39606 --- Comment #16 from Jonathan Druart <jonathan.druart@gmail.com> --- Last patch has not been pushed :-/ -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39606 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |40046 --- Comment #17 from Jonathan Druart <jonathan.druart@gmail.com> --- (In reply to Jonathan Druart from comment #11)
Created attachment 181355 [details] [review] Bug 39606: Remove waits and screenshots
Moved to bug 40046. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40046 [Bug 40046] Remove wait and screenshot from Tools/ManageMarcImport_spec.ts -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39606 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|25.05.00 |25.05.00,24.11.10 released in| | Status|Pushed to main |Pushed to stable CC| |fridolin.somers@biblibre.co | |m --- Comment #18 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 24.11.x for 24.11.10 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39606 --- Comment #19 from Jonathan Druart <jonathan.druart@gmail.com> --- (In reply to Fridolin Somers from comment #18)
Pushed to 24.11.x for 24.11.10
Hum nope, this one is messy. And the follow-up makes it fail randomly. I would not backport it. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39606 Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Needs documenting --- Comment #20 from Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> --- Not backporting to 22.11.x as it wasn't backported to 24.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39606 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Needs documenting |RESOLVED --- Comment #21 from David Nind <david@davidnind.com> --- Test suite related, no change to the manual required. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org