File tree Expand file tree Collapse file tree 2 files changed +33
-3
lines changed
tests/govtool-frontend/playwright Expand file tree Collapse file tree 2 files changed +33
-3
lines changed Original file line number Diff line number Diff line change 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+ }
Original file line number Diff line number Diff line change 11import { test } from "@fixtures/walletExtension" ;
22import { setAllureEpic } from "@helpers/allure" ;
3- import { skipTestForProposalBudget } from "@helpers/cardano" ;
3+ import BudgetDiscussionPage from "@pages/budgetDiscussionPage" ;
4+ import { expect } from "@playwright/test" ;
45
56test . 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
1219test . describe ( "Budget proposal list manipulation" , ( ) => {
1320 test ( "11B_1. Should search for budget proposals by title" , async ( { } ) => { } ) ;
You can’t perform that action at this time.
0 commit comments