Skip to content

Commit

Permalink
Fix flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
quietbits committed Dec 18, 2024
1 parent 794bb73 commit 41b4c13
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions tests/feeBumpPage.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,25 +53,29 @@ test.describe("Fee Bump Page", () => {

test("Sign in Transaction Signer", async ({ page }) => {
await page.getByLabel("Base Fee").fill(BASE_FEE);
await page.getByText("Sign in Transaction Signer").click();

// Adding extra delay because sometimes it takes longer to load the next page
await expect(page.locator("h1")).toHaveText("Transaction Overview", {
timeout: 5000,
const signButton = page.getByText("Sign in Transaction Signer", {
exact: true,
});

await expect(signButton).toBeVisible();
await signButton.click();

await expect(page.locator("h1")).toHaveText("Transaction Overview");
await expect(page.getByLabel("Transaction Envelope XDR")).toHaveText(
MOCK_XDR,
);
});

test("View in XDR viewer", async ({ page }) => {
await page.getByLabel("Base Fee").fill(BASE_FEE);
await page.getByText("View in XDR Viewer").click();

// Adding extra delay because sometimes it takes longer to load the next page
await expect(page.locator("h1")).toHaveText("View XDR", {
timeout: 5000,
});
const viewButton = page.getByText("View in XDR viewer", { exact: true });

await expect(viewButton).toBeVisible();
await viewButton.click();

await expect(page.locator("h1")).toHaveText("View XDR");
await expect(page.getByLabel("Base-64 encoded XDR")).toHaveText(MOCK_XDR);
});
});
Expand Down

0 comments on commit 41b4c13

Please sign in to comment.