View | Details | Raw Unified | Return to bug 40046
Collapse All | Expand All

(-)a/t/cypress/integration/Tools/ManageMarcImport_spec.ts (-18 / +18 lines)
Lines 27-38 describe("loads the manage MARC import page", () => { Link Here
27
    it("upload a MARC record", () => {
27
    it("upload a MARC record", () => {
28
        cy.visit("/cgi-bin/koha/tools/stage-marc-import.pl");
28
        cy.visit("/cgi-bin/koha/tools/stage-marc-import.pl");
29
29
30
        cy.get('input[type="file"]').selectFile(
30
        cy.fixture("sample.mrc", null).as("sample_mrc");
31
            "t/cypress/fixtures/sample.mrc"
31
        cy.get("input[type=file]").selectFile("@sample_mrc");
32
        );
32
        cy.get("#fileuploadbutton").click();
33
        cy.get('form[id="uploadfile"]').within(() => {
34
            cy.get('button[id="fileuploadbutton"]').click();
35
        });
36
33
37
        cy.get("#fileuploadstatus").contains("100%");
34
        cy.get("#fileuploadstatus").contains("100%");
38
        cy.get("legend")
35
        cy.get("legend")
Lines 54-73 describe("loads the manage MARC import page", () => { Link Here
54
            "always_add"
51
            "always_add"
55
        );
52
        );
56
53
57
        cy.get('select[name="format"]').select("MARCXML", { force: true });
54
        cy.get('select[name="format"]')
58
        cy.get("#format").should("have.value", "MARCXML");
55
            .select("MARCXML", { force: true })
56
            .should("have.value", "MARCXML");
59
57
60
        //select some new options
58
        //select some new options
61
        cy.get("#matcher").select("3", { force: true });
59
        cy.get("#matcher").select("3", { force: true });
62
        cy.get("#overlay_action").select("create_new", { force: true });
60
        cy.get("#matcher")
63
        cy.get("#nomatch_action").select("ignore", { force: true });
61
            .select("3", { force: true })
64
        cy.get("#item_action").select("ignore", { force: true });
62
            .should("have.value", "3");
65
63
        cy.get("#overlay_action")
66
        // Now verify all values
64
            .select("create_new", { force: true })
67
        cy.get("#matcher").should("have.value", "3");
65
            .should("have.value", "create_new");
68
        cy.get("#overlay_action").should("have.value", "create_new");
66
        cy.get("#nomatch_action")
69
        cy.get("#nomatch_action").should("have.value", "ignore");
67
            .select("ignore", { force: true })
70
        cy.get("#item_action").should("have.value", "ignore");
68
            .should("have.value", "ignore");
69
        cy.get("#item_action")
70
            .select("ignore", { force: true })
71
            .should("have.value", "ignore");
71
72
72
        cy.get("#mainformsubmit").click();
73
        cy.get("#mainformsubmit").click();
73
74
74
- 

Return to bug 40046