diff --git a/tests/govtool-frontend/playwright/lib/pages/proposalSubmissionPage.ts b/tests/govtool-frontend/playwright/lib/pages/proposalSubmissionPage.ts index 14b69459..213de74e 100644 --- a/tests/govtool-frontend/playwright/lib/pages/proposalSubmissionPage.ts +++ b/tests/govtool-frontend/playwright/lib/pages/proposalSubmissionPage.ts @@ -16,8 +16,8 @@ const formErrors = { abstract: "abstract-helper-error", motivation: "motivation-helper-error", rationale: "rationale-helper-error", - receivingAddress: "receiving-address-text-error", - amount: "amount-text-error", + receivingAddress: "receiving-address-0-text-error", + amount: "amount-0-text-error", link: "link-0-url-input-error", }; @@ -39,6 +39,9 @@ export default class ProposalSubmissionPage { readonly continueBtn = this.page.getByTestId("continue-button"); readonly addLinkBtn = this.page.getByTestId("add-link-button"); + readonly addWithdrawalAddressBtn = this.page.getByTestId( + "add-withdrawal-link-button" + ); readonly infoBtn = this.page.getByTestId("info-button"); readonly treasuryBtn = this.page.getByTestId("treasury-button"); readonly editSubmissionButton = this.page.getByTestId( @@ -61,9 +64,9 @@ export default class ProposalSubmissionPage { readonly motivationInput = this.page.getByTestId("motivation-input"); readonly rationaleInput = this.page.getByTestId("rationale-input"); readonly receivingAddressInput = this.page.getByTestId( - "receiving-address-input" + "receiving-address-0-text-input" ); - readonly amountInput = this.page.getByTestId("amount-input"); + readonly amountInput = this.page.getByTestId("amount-0-text-input"); readonly closeDraftSuccessModalBtn = this.page.getByTestId("close-button"); constructor(private readonly page: Page) {} diff --git a/tests/govtool-frontend/playwright/tests/7-proposal-submission/proposalSubmission.loggedin.spec.ts b/tests/govtool-frontend/playwright/tests/7-proposal-submission/proposalSubmission.loggedin.spec.ts index b61e6e3c..96a215ae 100644 --- a/tests/govtool-frontend/playwright/tests/7-proposal-submission/proposalSubmission.loggedin.spec.ts +++ b/tests/govtool-frontend/playwright/tests/7-proposal-submission/proposalSubmission.loggedin.spec.ts @@ -65,6 +65,19 @@ test.describe("Proposal created logged state", () => { await proposalSubmissionPage.validateForm(formFields); } + if (type === ProposalType.treasury) { + for (let i = 0; i < 9; i++) { + await expect( + proposalSubmissionPage.addWithdrawalAddressBtn + ).toBeVisible(); + await proposalSubmissionPage.addWithdrawalAddressBtn.click(); + } + } + + await expect( + proposalSubmissionPage.addWithdrawalAddressBtn + ).toBeHidden(); + for (let i = 0; i < 6; i++) { await expect(proposalSubmissionPage.addLinkBtn).toBeVisible(); await proposalSubmissionPage.addLinkBtn.click();