Skip to content

Commit

Permalink
use timeout constant
Browse files Browse the repository at this point in the history
  • Loading branch information
Jay-Topher committed Sep 26, 2023
1 parent 1e4a499 commit cc9b8d3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cypress/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ Cypress.Commands.add("deleteMachine", (hostname: string) => {
cy.visit(generateMAASURL("/machines"));
cy.findByRole("combobox", { name: "Group by" }).select("No grouping");
cy.findByRole("searchbox").type(hostname);
cy.findByText(/Showing 1 out of 1 machines/, { timeout: 15000 }).should(
"exist"
);
cy.findByText(/Showing 1 out of 1 machines/, {
timeout: LONG_TIMEOUT,
}).should("exist");
cy.findByRole("grid", { name: /Machines/ }).within(() =>
cy
.findByRole("checkbox", { name: new RegExp(hostname) })
Expand Down Expand Up @@ -148,7 +148,7 @@ Cypress.Commands.add("waitForPageToLoad", () => {

Cypress.Commands.add("waitForTableToLoad", ({ name } = { name: undefined }) => {
cy.findByRole("grid", { name: /Loading/i }).should("exist");
cy.findByRole("grid", { name: /Loading/i, timeout: 15000 }).should(
cy.findByRole("grid", { name: /Loading/i, timeout: LONG_TIMEOUT }).should(
"not.exist"
);
return cy.findByRole("grid", { name }).should("exist");
Expand Down

0 comments on commit cc9b8d3

Please sign in to comment.