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

(-)a/t/cypress/integration/ERM/DataProviders_spec.ts (-3 / +5 lines)
Lines 586-595 describe("Data provider tab options", () => { Link Here
586
                "X-Base-Total-Count": "0",
586
                "X-Base-Total-Count": "0",
587
                "X-Total-Count": "0",
587
                "X-Total-Count": "0",
588
            },
588
            },
589
        });
589
        }).as("no-titles");
590
590
591
        // We'll test using titles but the component is the same for all four data types
591
        // We'll test using titles but the component is the same for all four data types
592
        cy.get("#usage_data_providerstabs").contains("Titles").click();
592
        cy.get("#usage_data_providerstabs").contains("Titles").click();
593
        cy.wait("@no-titles");
593
        cy.get("main div[class='alert alert-info']").should(
594
        cy.get("main div[class='alert alert-info']").should(
594
            "have.text",
595
            "have.text",
595
            "No title data has been harvested for this provider"
596
            "No title data has been harvested for this provider"
Lines 599-614 describe("Data provider tab options", () => { Link Here
599
600
600
        const title = cy.get_usage_title();
601
        const title = cy.get_usage_title();
601
        const titles = [title];
602
        const titles = [title];
602
        cy.intercept("GET", "/api/v1/erm/usage_titles*", {
603
        cy.intercept("GET", "/api/v1/erm/usage_titles?*", {
603
            statusCode: 200,
604
            statusCode: 200,
604
            body: titles,
605
            body: titles,
605
            headers: {
606
            headers: {
606
                "X-Base-Total-Count": "1",
607
                "X-Base-Total-Count": "1",
607
                "X-Total-Count": "1",
608
                "X-Total-Count": "1",
608
            },
609
            },
609
        });
610
        }).as("provider-titles");
610
611
611
        cy.get("#usage_data_providerstabs").contains("Titles").click();
612
        cy.get("#usage_data_providerstabs").contains("Titles").click();
613
        cy.wait(["@provider-titles", "@provider-titles"]);
612
        cy.get("#data_list").contains("Showing 1 to 1 of 1 entries");
614
        cy.get("#data_list").contains("Showing 1 to 1 of 1 entries");
613
    });
615
    });
614
616
(-)a/t/cypress/support/e2e.js (-14 / +11 lines)
Lines 1490-1508 cy.get_usage_data_provider = () => { Link Here
1490
};
1490
};
1491
1491
1492
cy.get_usage_title = () => {
1492
cy.get_usage_title = () => {
1493
    return [
1493
    return {
1494
        {
1494
        online_issn: "2472-5390",
1495
            online_issn: "2472-5390",
1495
        print_issn: "2472-5390",
1496
            print_issn: "2472-5390",
1496
        publisher: "Wiley",
1497
            publisher: "Wiley",
1497
        publisher_id: "0000000403801313",
1498
            publisher_id: "0000000403801313",
1498
        title: "AEM Education and Training",
1499
            title: "AEM Education and Training",
1499
        title_doi: "10.1002/(ISSN)2472-5390",
1500
            title_doi: "10.1002/(ISSN)2472-5390",
1500
        title_id: 1338,
1501
            title_id: 1338,
1501
        title_uri: "",
1502
            title_uri: "",
1502
        usage_data_provider_id: 5,
1503
            usage_data_provider_id: 5,
1503
    };
1504
        },
1505
    ];
1506
};
1504
};
1507
1505
1508
cy.get_default_report = () => {
1506
cy.get_default_report = () => {
1509
- 

Return to bug 6473