|
6 | 6 | proposal05Wallet, |
7 | 7 | proposal06Wallet, |
8 | 8 | proposal07Wallet, |
| 9 | + proposal08Wallet, |
9 | 10 | } from "@constants/staticWallets"; |
10 | 11 | import { faker } from "@faker-js/faker"; |
11 | 12 | import { test } from "@fixtures/proposal"; |
@@ -544,3 +545,51 @@ test.describe("Treasury Proposal Draft", () => { |
544 | 545 | ); |
545 | 546 | }); |
546 | 547 | }); |
| 548 | + |
| 549 | +test.describe("Update the constitution Proposal Draft", () => { |
| 550 | + test.use({ storageState: ".auth/proposal08.json", wallet: proposal08Wallet }); |
| 551 | + |
| 552 | + test("7M_3. Should edit update the constitution proposal draft", async ({ |
| 553 | + page, |
| 554 | + }) => { |
| 555 | + await skipIfNotInfoAndBootstrapping(ProposalType.updatesToTheConstitution); |
| 556 | + |
| 557 | + const proposalSubmissionPage = new ProposalSubmissionPage(page); |
| 558 | + const { proposalFormValue } = await proposalSubmissionPage.createDraft( |
| 559 | + ProposalType.updatesToTheConstitution |
| 560 | + ); |
| 561 | + |
| 562 | + const newTitle = faker.lorem.sentence(6); |
| 563 | + |
| 564 | + await proposalSubmissionPage.viewFirstDraft(); |
| 565 | + await proposalSubmissionPage.titleInput.fill(newTitle); |
| 566 | + await proposalSubmissionPage.continueBtn.click(); |
| 567 | + |
| 568 | + await expect(proposalSubmissionPage.governanceActionTypeContent).toHaveText( |
| 569 | + ProposalType.updatesToTheConstitution |
| 570 | + ); |
| 571 | + await expect(proposalSubmissionPage.titleContent).toHaveText(newTitle); |
| 572 | + await expect(proposalSubmissionPage.abstractContent).toHaveText( |
| 573 | + proposalFormValue.prop_abstract |
| 574 | + ); |
| 575 | + await expect(proposalSubmissionPage.motivationContent).toHaveText( |
| 576 | + proposalFormValue.prop_motivation |
| 577 | + ); |
| 578 | + await expect(proposalSubmissionPage.rationaleContent).toHaveText( |
| 579 | + proposalFormValue.prop_rationale |
| 580 | + ); |
| 581 | + await expect(proposalSubmissionPage.constitutionUrlContent).toHaveText( |
| 582 | + proposalFormValue.prop_constitution_url |
| 583 | + ); |
| 584 | + await expect(proposalSubmissionPage.guardrailsScriptUrlContent).toHaveText( |
| 585 | + proposalFormValue.prop_guardrails_script_url |
| 586 | + ); |
| 587 | + await expect(proposalSubmissionPage.guardrailsScriptHashContent).toHaveText( |
| 588 | + proposalFormValue.prop_guardrails_script_hash |
| 589 | + ); |
| 590 | + |
| 591 | + await expect(proposalSubmissionPage.linkTextContent).toHaveText( |
| 592 | + proposalFormValue.proposal_links[0].prop_link_text |
| 593 | + ); |
| 594 | + }); |
| 595 | +}); |
0 commit comments