Skip to content

Commit

Permalink
chore: handle blank proposal view error
Browse files Browse the repository at this point in the history
  • Loading branch information
kneerose committed Aug 2, 2024
1 parent 3e44c0b commit 36560fc
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { expect, Locator, Page } from "@playwright/test";
import { ProposalCreateRequest, ProposedGovAction } from "@types";
import environments from "lib/constants/environments";
import ProposalDiscussionDetailsPage from "./proposalDiscussionDetailsPage";
import { isMobile } from "@helpers/mobile";

export default class ProposalDiscussionPage {
// Buttons
Expand All @@ -28,6 +29,15 @@ export default class ProposalDiscussionPage {

async goto() {
await this.page.goto(`${environments.frontendUrl}/proposal_discussion`);
// Temporary fix for blank proposals issue in proposal view during disconnected state
// This code handles the blank proposals error, which is causing failing tests.
// It will be removed once the underlying issue is resolved.
await this.page.getByTestId("logo-button").click();
if (isMobile(this.page)) {
await this.page.getByTestId("open-drawer-button").click();
}
await this.page.getByText("Proposals", { exact: true }).click();

await this.page.waitForTimeout(2_000);
}

Expand Down

0 comments on commit 36560fc

Please sign in to comment.