diff --git a/apps/nextjs/src/components/onboarding/board-tour.tsx b/apps/nextjs/src/components/onboarding/board-tour.tsx index f51a8451f..1eddd39be 100644 --- a/apps/nextjs/src/components/onboarding/board-tour.tsx +++ b/apps/nextjs/src/components/onboarding/board-tour.tsx @@ -93,7 +93,7 @@ export const BoardTourProvider = ({ children }: PropsWithChildren) => { return ( - + {children} diff --git a/apps/nextjs/src/components/onboarding/tour-shell.tsx b/apps/nextjs/src/components/onboarding/tour-shell.tsx index 5387c2176..4224567e9 100644 --- a/apps/nextjs/src/components/onboarding/tour-shell.tsx +++ b/apps/nextjs/src/components/onboarding/tour-shell.tsx @@ -181,8 +181,8 @@ export const TourShell = ({ steps, started, onEnd, stepRoutes, position, childre focusRevealProps={{ disableTargetInteraction: true, popoverProps: { - position: position ?? { base: "bottom", sm: "right" }, - width: 420, + position: position ?? { base: "bottom", md: "right" }, + width: { base: "calc(100vw - 32px)", md: 420 }, shadow: "xl", radius: "lg", middlewares: { shift: { padding: 16 }, flip: true }, diff --git a/e2e/manage-collections.spec.ts b/e2e/manage-collections.spec.ts index 78aee5ebe..c2861f3a1 100644 --- a/e2e/manage-collections.spec.ts +++ b/e2e/manage-collections.spec.ts @@ -115,7 +115,13 @@ describe("Management collections", () => { await page.goto(`${baseUrl}/manage/integrations`); await page.getByRole("heading", { name: "Integrations", exact: true }).waitFor(); expect(await page.getByRole("list", { name: "Configured integrations" }).getByRole("listitem").count()).toBe(1); - expect(await page.getByText("Sonarr", { exact: true }).isVisible()).toBe(true); + expect( + await page + .getByRole("list", { name: "Configured integrations" }) + .getByRole("listitem") + .getByText("Sonarr", { exact: true }) + .isVisible(), + ).toBe(true); await page.goto(`${baseUrl}/manage/search-engines`); await page.getByRole("heading", { name: "Search engines", exact: true }).waitFor(); @@ -131,7 +137,7 @@ describe("Management collections", () => { await page.setViewportSize({ width: 375, height: 812 }); for (const route of ["apps", "integrations", "search-engines", "boards"]) { await page.goto(`${baseUrl}/manage/${route}`); - await page.locator("h1").waitFor(); + await page.locator("h1:visible").last().waitFor(); expect(await page.evaluate(() => document.documentElement.scrollWidth <= window.innerWidth + 1)).toBe(true); } await captureScreenshotAsync(page, "mobile-boards"); diff --git a/e2e/onboarding.spec.ts b/e2e/onboarding.spec.ts index 1ba87df77..47c7f4a8b 100644 --- a/e2e/onboarding.spec.ts +++ b/e2e/onboarding.spec.ts @@ -103,7 +103,7 @@ describe("Onboarding", () => { const serverOrigin = page.getByLabel("Domain, IP, or reverse-proxy path"); await serverOrigin.fill("https://home.example/homarr"); - await page.getByLabel("Default language").click(); + await page.getByRole("combobox", { name: "Default language" }).click(); await page.getByRole("option", { name: /Français/ }).click(); expect(await serverOrigin.inputValue()).toBe("https://home.example/homarr"); expect(await page.getByRole("heading", { name: "Start with familiar defaults" }).isVisible()).toBe(true); @@ -138,14 +138,14 @@ describe("Onboarding", () => { } await page.getByRole("button", { name: /^Board/ }).click(); - const boardPreview = page.getByLabel("Live preview of the first board layout"); + const boardPreview = page.locator('figure[aria-label="Live preview of the first board layout"]'); expect(await boardPreview.getAttribute("data-layout-role")).toBe("base"); expect(await boardPreview.getAttribute("data-layout-columns")).toBe("10"); - await page.getByRole("radio", { name: "Mobile", exact: true }).click(); + await page.getByText("Mobile", { exact: true }).click(); expect(await boardPreview.getAttribute("data-layout-role")).toBe("mobile"); expect(await boardPreview.getAttribute("data-layout-columns")).toBe("3"); - await page.getByRole("radio", { name: "Wide", exact: true }).click(); - await page.getByRole("radio", { name: "Base", exact: true }).click(); + await page.getByText("Wide", { exact: true }).click(); + await page.getByText("Base", { exact: true }).click(); expect(await boardPreview.getAttribute("data-layout-columns")).toBe("12"); await page.getByRole("button", { name: /^Connect/ }).click(); @@ -299,9 +299,7 @@ describe("Onboarding", () => { await page.goto(`${baseUrl}/init`); await page.getByRole("button", { name: "Get started" }).click(); await page.getByRole("heading", { name: "Create your administrator" }).waitFor(); - await page.route("**/api/auth/callback/credentials**", async (route) => { - await route.fulfill({ status: 500, contentType: "application/json", body: '{"error":"forced-e2e-failure"}' }); - }); + await page.route(/\/api\/auth\/callback\/credentials(?:\?.*)?$/, (route) => route.abort("failed")); await page.getByLabel("Administrator username").fill("admin"); await page.getByLabel("Password", { exact: true }).fill("Comp(exP4sswOrd"); await page.getByLabel("Confirm password").fill("Comp(exP4sswOrd"); @@ -457,9 +455,9 @@ describe("Onboarding", () => { await page.getByLabel("Provider URL").waitFor(); const provider = page.getByRole("combobox", { name: "Provider", exact: true }); - await expect.poll(() => provider.inputValue(), { timeout: 10_000 }).toBe("custom"); + await expect.poll(() => provider.inputValue(), { timeout: 10_000 }).toBe("Custom endpoint"); expect(await page.getByLabel("Provider URL").inputValue()).toBe("http://assistant.local/v1"); - expect(await page.getByLabel("Default model").inputValue()).toBe("local-model"); + expect(await page.locator('input[value="local-model"]').inputValue()).toBe("local-model"); expect(await page.getByText("Model discovery is unavailable.").count()).toBe(1); } finally { try { diff --git a/packages/onboarding/src/account.tsx b/packages/onboarding/src/account.tsx index 7a7af61fe..724b9dd9f 100644 --- a/packages/onboarding/src/account.tsx +++ b/packages/onboarding/src/account.tsx @@ -91,7 +91,6 @@ const CredentialsSetup = () => { if (didCredentialsSignInFail(result)) throw new Error(); } catch { setRequiresSignIn(true); - await revalidatePathActionAsync("/init").catch(() => undefined); return; }