diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stage-marc-import.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stage-marc-import.tt index d5ff4771b5..e42fde81c6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stage-marc-import.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stage-marc-import.tt @@ -471,7 +471,7 @@ $('#fileuploadbutton').show(); $("#fileuploadcancel").hide(); var filename=$('#fileToUpload').prop('files')[0].name; - if( filename.match( new RegExp(/\.[^.]+xml$/) ) ) { + if( filename.match( new RegExp(/[^.]+\.xml$/) ) ) { $('#format').val('MARCXML'); } $("#processfile").show(); diff --git a/t/cypress/fixtures/sample.mrc b/t/cypress/fixtures/sample.xml similarity index 100% rename from t/cypress/fixtures/sample.mrc rename to t/cypress/fixtures/sample.xml diff --git a/t/cypress/integration/Tools/ManageMarcImport_spec.ts b/t/cypress/integration/Tools/ManageMarcImport_spec.ts index f3483e6cfc..e27f3cf9a1 100644 --- a/t/cypress/integration/Tools/ManageMarcImport_spec.ts +++ b/t/cypress/integration/Tools/ManageMarcImport_spec.ts @@ -27,8 +27,8 @@ describe("loads the manage MARC import page", () => { it("upload a MARC record", () => { cy.visit("/cgi-bin/koha/tools/stage-marc-import.pl"); - cy.fixture("sample.mrc", null).as("sample_mrc"); - cy.get("input[type=file]").selectFile("@sample_mrc"); + cy.fixture("sample.xml", null).as("sample_xml"); + cy.get("input[type=file]").selectFile("@sample_xml"); cy.get("#fileuploadbutton").click(); cy.get("#fileuploadstatus").contains("100%"); @@ -51,9 +51,7 @@ describe("loads the manage MARC import page", () => { "always_add" ); - cy.get('select[name="format"]') - .select("MARCXML", { force: true }) - .should("have.value", "MARCXML"); + cy.get('select[name="format"]').should("have.value", "MARCXML"); //select some new options cy.get("#matcher").select("3", { force: true });