Skip to content

Commit

Permalink
chore: add assertion on governance list to wait until loading button …
Browse files Browse the repository at this point in the history
…is hidden
  • Loading branch information
kneerose committed Dec 5, 2024
1 parent 368e448 commit 20665ae
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ test.describe("Logged in DRep", () => {
const govActionsPage = new GovernanceActionsPage(page);
await govActionsPage.goto();

// assert to wait until the loading button is hidden
await expect(page.getByTestId("to-vote-tab")).toBeVisible({
timeout: 15_000,
});

govActionDetailsPage = (await isBootStrapingPhase())
? await govActionsPage.viewFirstProposalByGovernanceAction(
GovernanceActionType.InfoAction
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ test.describe("Proposal checks", () => {
const govActionsPage = new GovernanceActionsPage(page);
await govActionsPage.goto();

// assert to wait until the loading button is hidden
await expect(page.getByTestId("to-vote-tab")).toBeVisible({
timeout: 15_000,
});

currentPage = page;
govActionDetailsPage = (await isBootStrapingPhase())
? await govActionsPage.viewFirstProposalByGovernanceAction(
Expand Down Expand Up @@ -181,6 +186,11 @@ test.describe("Perform voting", () => {
const govActionsPage = new GovernanceActionsPage(dRepPage);
await govActionsPage.goto();

// assert to wait until the loading button is hidden
await expect(dRepPage.getByTestId("to-vote-tab")).toBeVisible({
timeout: 15_000,
});

govActionDetailsPage = (await isBootStrapingPhase())
? await govActionsPage.viewFirstProposalByGovernanceAction(
GovernanceActionType.InfoAction
Expand Down Expand Up @@ -211,7 +221,7 @@ test.describe("Perform voting", () => {

await expect(
govActionDetailsPage.currentPage.getByTestId("my-vote").getByText("No")
).toBeVisible();
).toBeVisible({ timeout: 15_000 });
});

test("5F. Should show notification of casted vote after vote", async ({}, testInfo) => {
Expand Down

0 comments on commit 20665ae

Please sign in to comment.