Bugzilla – Attachment 182932 Details for
Bug 40046
Remove wait and screenshot from Tools/ManageMarcImport_spec.ts
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40046: Prevent random failures when verifying select's values
Bug-40046-Prevent-random-failures-when-verifying-s.patch (text/plain), 2.91 KB, created by
Jonathan Druart
on 2025-06-04 08:47:33 UTC
(
hide
)
Description:
Bug 40046: Prevent random failures when verifying select's values
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2025-06-04 08:47:33 UTC
Size:
2.91 KB
patch
obsolete
>From 55195c1efd4343f635de4cc7725ae74311beb85d Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 3 Jun 2025 16:12:32 +0200 >Subject: [PATCH] Bug 40046: Prevent random failures when verifying select's > values > >Commands like .select() are queued. We need to prevent the should to >happen before the select is executed. >--- > .../Tools/ManageMarcImport_spec.ts | 35 ++++++++++--------- > 1 file changed, 18 insertions(+), 17 deletions(-) > >diff --git a/t/cypress/integration/Tools/ManageMarcImport_spec.ts b/t/cypress/integration/Tools/ManageMarcImport_spec.ts >index f88ee91731e..f3483e6cfc5 100644 >--- a/t/cypress/integration/Tools/ManageMarcImport_spec.ts >+++ b/t/cypress/integration/Tools/ManageMarcImport_spec.ts >@@ -27,12 +27,9 @@ describe("loads the manage MARC import page", () => { > it("upload a MARC record", () => { > cy.visit("/cgi-bin/koha/tools/stage-marc-import.pl"); > >- cy.get('input[type="file"]').selectFile( >- "t/cypress/fixtures/sample.mrc" >- ); >- cy.get('form[id="uploadfile"]').within(() => { >- cy.get('button[id="fileuploadbutton"]').click(); >- }); >+ cy.fixture("sample.mrc", null).as("sample_mrc"); >+ cy.get("input[type=file]").selectFile("@sample_mrc"); >+ cy.get("#fileuploadbutton").click(); > > cy.get("#fileuploadstatus").contains("100%"); > cy.get("legend") >@@ -54,20 +51,24 @@ describe("loads the manage MARC import page", () => { > "always_add" > ); > >- cy.get('select[name="format"]').select("MARCXML", { force: true }); >- cy.get("#format").should("have.value", "MARCXML"); >+ cy.get('select[name="format"]') >+ .select("MARCXML", { force: true }) >+ .should("have.value", "MARCXML"); > > //select some new options > cy.get("#matcher").select("3", { force: true }); >- cy.get("#overlay_action").select("create_new", { force: true }); >- cy.get("#nomatch_action").select("ignore", { force: true }); >- cy.get("#item_action").select("ignore", { force: true }); >- >- // Now verify all values >- cy.get("#matcher").should("have.value", "3"); >- cy.get("#overlay_action").should("have.value", "create_new"); >- cy.get("#nomatch_action").should("have.value", "ignore"); >- cy.get("#item_action").should("have.value", "ignore"); >+ cy.get("#matcher") >+ .select("3", { force: true }) >+ .should("have.value", "3"); >+ cy.get("#overlay_action") >+ .select("create_new", { force: true }) >+ .should("have.value", "create_new"); >+ cy.get("#nomatch_action") >+ .select("ignore", { force: true }) >+ .should("have.value", "ignore"); >+ cy.get("#item_action") >+ .select("ignore", { force: true }) >+ .should("have.value", "ignore"); > > cy.get("#mainformsubmit").click(); > >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 40046
:
182903
|
182912
|
182921
| 182932 |
183195
|
183196