Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/test proposal draft #1596

Merged
merged 4 commits into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -150,21 +150,30 @@ export default class ProposalSubmissionPage {
}

async getAllDrafts() {
await this.page.waitForTimeout(2_000); // wait until draft is loaded
await expect(
this.page.locator('[data-testid^="draft-"][data-testid$="-card"]')
).toBeVisible({ timeout: 10_000 }); // slow rendering

return await this.page
.locator('[data-testid^="draft-"][data-testid$="-card"]')
.all();
}

async getFirstDraft() {
await this.page.waitForTimeout(2_000); // wait until draft is loaded
await expect(
this.page.locator('[data-testid^="draft-"][data-testid$="-card"]')
).toBeVisible({ timeout: 10_000 }); // slow rendering

return this.page
.locator('[data-testid^="draft-"][data-testid$="-card"]')
.first();
}

async viewFirstDraft() {
await this.page.waitForTimeout(2_000); // wait until draft is loaded
await expect(
this.page.locator('[data-testid^="draft-"][data-testid$="-card"]')
).toBeVisible({ timeout: 10_000 }); // slow rendering

return await this.page
.locator('[data-testid^="draft-"][data-testid$="-start-editing"]')
.first()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,8 @@ test.describe("Temporary proposal users", () => {

test.beforeEach(async () => {
proposalSubmissionPage = new ProposalSubmissionPage(userPage);
await proposalSubmissionPage.goto();
await proposalSubmissionPage.proposalCreateBtn.click();
await proposalSubmissionPage.continueBtn.click();

await proposalSubmissionPage.addLinkBtn.click();
proposalFormValue =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ test.describe("Proposal created logged in state", () => {

test.describe("Proposal created with poll enabled (user auth)", () => {
test.use({
storageState: ".auth/user01.json",
wallet: user01Wallet,
storageState: ".auth/proposal02.json",
wallet: proposal02Wallet,
pollEnabled: true,
});

Expand All @@ -84,8 +84,6 @@ test.describe("Proposal created with poll enabled (user auth)", () => {
proposalDiscussionDetailsPage = new ProposalDiscussionDetailsPage(page);
await proposalDiscussionDetailsPage.goto(proposalId);
await proposalDiscussionDetailsPage.verifyIdentityBtn.click();

await proposalDiscussionDetailsPage.closeUsernamePrompt();
});

test("8Q. Should vote on poll.", async ({ page }) => {
Expand Down