Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasStordeur committed May 8, 2024
1 parent 9026c49 commit 31f46be
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cypress/e2e/scenario-6-resources.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -571,36 +571,36 @@ describe("Scenario 6 : Resources", () => {
);

cy.get(
"#PaginationWidget-top-top-toggle > .pf-v5-c-pagination__total-items > b:first-of-type",
"#PaginationWidget-top-top-toggle > .pf-v5-c-menu-toggle__text > b:first-of-type",
).should("have.text", "1 - 20");

//Go to next page
cy.get('[aria-label="Go to next page"]').first().click();
cy.get('[aria-label="ResourcesView-Success"]').should("be.visible");
cy.get(
"#PaginationWidget-top-top-toggle > .pf-v5-c-pagination__total-items > b:first-of-type",
"#PaginationWidget-top-top-toggle > .pf-v5-c-menu-toggle__text > b:first-of-type",
).should("have.text", "21 - 40");

//Go to last page
cy.get('[aria-label="Go to next page"]').first().click();
cy.get('[aria-label="ResourcesView-Success"]').should("be.visible");
cy.get(
"#PaginationWidget-top-top-toggle > .pf-v5-c-pagination__total-items > b:first-of-type",
"#PaginationWidget-top-top-toggle > .pf-v5-c-menu-toggle__text > b:first-of-type",
).should("have.text", "41 - 49");

//Go to previous page
cy.get('[aria-label="Go to previous page"]').first().click();
cy.get('[aria-label="ResourcesView-Success"]').should("be.visible");

cy.get(
"#PaginationWidget-top-top-toggle > .pf-v5-c-pagination__total-items > b:first-of-type",
"#PaginationWidget-top-top-toggle > .pf-v5-c-menu-toggle__text > b:first-of-type",
).should("have.text", "21 - 40");

//Change page and come back to check if we are at the same page as we was
cy.get(".pf-v5-c-nav__link").contains("Dashboard").click();
cy.go("back");
cy.get(
"#PaginationWidget-top-top-toggle > .pf-v5-c-pagination__total-items > b:first-of-type",
"#PaginationWidget-top-top-toggle > .pf-v5-c-menu-toggle__text > b:first-of-type",
).should("have.text", "21 - 40");
});
} else {
Expand Down

0 comments on commit 31f46be

Please sign in to comment.