Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: fix e2e shutdown test #3390

Merged
merged 1 commit into from
Jan 9, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading