Skip to content

Commit 78c1f23

Browse files
committed
tests: access budget discussion page
1 parent 24aac2f commit 78c1f23

File tree

2 files changed

+33
-3
lines changed

2 files changed

+33
-3
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { Page } from "@playwright/test";
2+
import environments from "lib/constants/environments";
3+
4+
export default class BudgetDiscussionPage {
5+
// Buttons
6+
readonly drawerBtn = this.page.getByTestId("open-drawer-button");
7+
readonly proposalBudgetDiscussionBtn = this.page.getByTestId(
8+
"propose-a-budget-discussion-button"
9+
);
10+
readonly verifyIdentityBtn = this.page.getByTestId("verify-identity-button");
11+
12+
constructor(private readonly page: Page) {}
13+
14+
get currentPage(): Page {
15+
return this.page;
16+
}
17+
18+
async goto() {
19+
await this.page.goto(`${environments.frontendUrl}/budget_discussion`);
20+
// wait for the proposal cards to load
21+
await this.page.waitForTimeout(2_000);
22+
}
23+
}

tests/govtool-frontend/playwright/tests/11-proposal-budget/proposalBudget.spec.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
11
import { test } from "@fixtures/walletExtension";
22
import { setAllureEpic } from "@helpers/allure";
3-
import { skipTestForProposalBudget } from "@helpers/cardano";
3+
import BudgetDiscussionPage from "@pages/budgetDiscussionPage";
4+
import { expect } from "@playwright/test";
45

56
test.beforeEach(async ({}) => {
67
await setAllureEpic("11. Proposal Budget");
7-
await skipTestForProposalBudget();
88
});
99

10-
test("11A. Should access budget proposal page", async ({}) => {});
10+
test("11A. Should access budget proposal page in disconnect state", async ({ page }) => {
11+
const budgetDiscussionPage = new BudgetDiscussionPage(page);
12+
await budgetDiscussionPage.goto();
13+
14+
await expect(
15+
budgetDiscussionPage.currentPage.getByText("/Budget Proposals/i")
16+
).toHaveCount(2);
17+
});
1118

1219
test.describe("Budget proposal list manipulation", () => {
1320
test("11B_1. Should search for budget proposals by title", async ({}) => {});

0 commit comments

Comments
 (0)