fix(onboarding): harden release acceptance
This commit is contained in:
1 parent
6437e57565
commit
4f693b0465
5 files changed
+19
-16
No files matched your search
@@ -93,7 +93,7 @@ export const BoardTourProvider = ({ children }: PropsWithChildren) => {
|
||||
|
||||
return (
|
||||
<TourTargetsProvider enabled={started}>
|
||||
<TourShell steps={steps} started={started} onEnd={handleEnd} position={{ base: "bottom", sm: "left" }}>
|
||||
<TourShell steps={steps} started={started} onEnd={handleEnd} position={{ base: "bottom", md: "left" }}>
|
||||
{children}
|
||||
</TourShell>
|
||||
</TourTargetsProvider>
|
||||
|
||||
@@ -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 },
|
||||
|
||||
@@ -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");
|
||||
|
||||
+8
-10
@@ -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 {
|
||||
|
||||
@@ -91,7 +91,6 @@ const CredentialsSetup = () => {
|
||||
if (didCredentialsSignInFail(result)) throw new Error();
|
||||
} catch {
|
||||
setRequiresSignIn(true);
|
||||
await revalidatePathActionAsync("/init").catch(() => undefined);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user