Skip to content

Commit 463c6ee

Browse files
committed
feat: update review submission test for new constitution
1 parent 3c6404d commit 463c6ee

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

tests/govtool-frontend/playwright/lib/_mock/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export const invalid = {
8080
return " ";
8181
},
8282

83-
constitutionUrl : () => {
83+
constitutionUrl: () => {
8484
const choice = faker.number.int({ min: 1, max: 2 });
8585
if (choice === 1) {
8686
return invalid.url();

tests/govtool-frontend/playwright/lib/pages/proposalSubmissionPage.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ export default class ProposalSubmissionPage {
172172
await this.treasuryBtn.click();
173173
} else {
174174
await this.updateTheConstitutionBtn.click();
175+
await this.guardrailsScriptCheckbox.click();
175176
}
176177

177178
await this.fillupFormWithTypeSelected(governanceProposal);

tests/govtool-frontend/playwright/tests/7-proposal-submission/proposalSubmission.loggedin.spec.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,18 @@ test.describe("Proposal created logged state", () => {
229229
proposal.prop_amount
230230
);
231231
}
232+
233+
if (type === ProposalType.updatesToTheConstitution) {
234+
await expect(
235+
proposalSubmissionPage.constitutionUrlContent
236+
).toHaveText(proposal.prop_constitution_url);
237+
await expect(
238+
proposalSubmissionPage.guardrailsScriptUrlContent
239+
).toHaveText(proposal.prop_guardrails_script_url);
240+
await expect(
241+
proposalSubmissionPage.guardrailsScriptHashContent
242+
).toHaveText(proposal.prop_guardrails_script_hash);
243+
}
232244
});
233245
});
234246
});

0 commit comments

Comments
 (0)