mirror of
https://github.com/stack-auth/stack.git
synced 2026-07-20 21:29:36 +08:00
fix(dashboard): enable hosted auth preview in onboarding wizard
Remove the preview overlay so users can interact with tabs and inputs while configuring auth during project onboarding. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
co-authored by
Cursor
parent
4d002d825b
commit
3a4c5bceea
+12
@@ -1,6 +1,9 @@
|
||||
// @vitest-environment jsdom
|
||||
|
||||
import type { ButtonHTMLAttributes, HTMLAttributes, ReactNode } from "react";
|
||||
import { readFileSync } from "fs";
|
||||
import { dirname, join } from "path";
|
||||
import { fileURLToPath } from "url";
|
||||
import { afterEach, describe, expect, it, vi } from "vitest";
|
||||
import { cleanup, fireEvent, render, screen, waitFor } from "@testing-library/react";
|
||||
|
||||
@@ -173,6 +176,15 @@ function createDeferred<T>() {
|
||||
}
|
||||
|
||||
describe("ProjectOnboardingWizard", () => {
|
||||
it("keeps the hosted auth preview interactive", () => {
|
||||
const testDir = dirname(fileURLToPath(import.meta.url));
|
||||
const source = readFileSync(join(testDir, "project-onboarding-wizard.tsx"), "utf-8");
|
||||
|
||||
expect(source).not.toContain("pointer-events-none");
|
||||
expect(source).not.toContain("inert>");
|
||||
expect(source).not.toContain("bg-transparent");
|
||||
});
|
||||
|
||||
it("keeps required apps when normalizing persisted onboarding state", () => {
|
||||
const normalizedState = normalizeProjectOnboardingState({
|
||||
selected_config_choice: "create-new",
|
||||
|
||||
+1
-2
@@ -823,8 +823,7 @@ export function ProjectOnboardingWizard(props: {
|
||||
>
|
||||
<BrowserFrame url="your-website.com/signin" className="w-full">
|
||||
<div className="flex min-h-[180px] items-center justify-center px-4 py-3 sm:min-h-[220px] md:min-h-[260px] md:px-5 md:py-4 lg:min-h-[300px]">
|
||||
<div className="pointer-events-none relative flex w-full items-center justify-center" inert>
|
||||
<div className="absolute inset-0 z-10 bg-transparent" />
|
||||
<div className="relative flex w-full items-center justify-center">
|
||||
<HostedAuthMethodPreview project={authPreviewProject} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user