Skip to content

Commit

Permalink
tests: fix e2e shutdown test (#3390)
Browse files Browse the repository at this point in the history
  • Loading branch information
mscolnick authored Jan 9, 2025
1 parent 56cedb8 commit ced11b6
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions frontend/e2e-tests/shutdown.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,20 @@ test("restart kernel", async ({ page }) => {
const appUrl = getAppUrl("shutdown.py");
await page.goto(appUrl);

// Wait for page to be fully loaded
await page.waitForLoadState("networkidle");

await page.getByTestId("notebook-menu-dropdown").click();
await page.getByText("Restart kernel").click();
await page.getByLabel("Confirm Restart").click();
// Wait for dropdown to be visible and stable
await page.waitForTimeout(100);

const restartButton = page.getByRole("menuitem", { name: "Restart kernel" });
await restartButton.waitFor({ state: "visible" });
await restartButton.click();

const confirmButton = page.getByRole("button", { name: "Confirm Restart" });
await confirmButton.waitFor({ state: "visible" });
await confirmButton.click();

await expect(page.getByText("None", { exact: true })).toBeVisible();
});
Expand Down

0 comments on commit ced11b6

Please sign in to comment.