Skip to content

Commit 85d80e7

Browse files
authored
Merge pull request #3892 from IntersectMBO/fix/access-gov-action-page-test
fix: governance action page accessibility test
2 parents 7a4d396 + 56c5a89 commit 85d80e7

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

tests/govtool-frontend/playwright/tests/4-proposal-visibility/proposalVisibility.loggedin.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ test("4A_1. Should access Governance Actions page with connecting wallet", async
2020
await openDrawer(page);
2121
}
2222

23-
await page.getByTestId("governance-actions-link").click();
24-
await expect(page.getByText(/Governance Actions/i)).toHaveCount(2);
23+
await page.getByTestId("governance-actions-live-voting-link").click();
24+
await expect(page.getByText(/Live Voting/i)).toHaveCount(2);
2525
});
2626

2727
test("4B_1. Should restrict voting for users who are not registered as DReps (with wallet connected)", async ({

tests/govtool-frontend/playwright/tests/4-proposal-visibility/proposalVisibility.spec.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import removeAllSpaces from "@helpers/removeAllSpaces";
1515
import { functionWaitedAssert } from "@helpers/waitedLoop";
1616
import extractExpiryDateFromText from "@helpers/extractExpiryDateFromText";
1717
import { InvalidMetadata } from "@constants/index";
18+
import { isMobile } from "@helpers/mobile";
1819

1920
test.beforeEach(async () => {
2021
await setAllureEpic("4. Proposal visibility");
@@ -44,7 +45,11 @@ test("4A_2. Should access Governance Actions page without connecting wallet", as
4445
await page.goto("/");
4546
await page.getByTestId("move-to-governance-actions-button").click();
4647

47-
await expect(page.getByText(/Governance actions/i)).toHaveCount(2);
48+
if (!isMobile(page)) {
49+
await page.getByTestId("governance-actions").click();
50+
}
51+
52+
await expect(page.getByText(/Live Voting/i)).toHaveCount(2);
4853
});
4954

5055
test("4B_2. Should restrict voting for users who are not registered as DReps (without wallet connected)", async ({

0 commit comments

Comments
 (0)