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 |
|