121 lines
3.5 KiB
TypeScript
121 lines
3.5 KiB
TypeScript
import { toFirstStepsChecklistVM, toWelcomeSetupVM } from "@hivegrid/view-models";
|
|
import { createMemoryRouter, RouterProvider } from "react-router";
|
|
|
|
import { CheckoutSuccessPage } from "~/components/screens/billing/CheckoutSuccessPage";
|
|
import { WelcomeSetupPage } from "./WelcomeSetupPage";
|
|
|
|
const noOp = (): void => undefined;
|
|
|
|
export function Bill20CheckoutSuccessVisualFixture(): React.JSX.Element {
|
|
const router = createMemoryRouter(
|
|
[
|
|
{
|
|
path: "*",
|
|
element: (
|
|
<CheckoutSuccessPage
|
|
state="success"
|
|
activationKind="paid"
|
|
homeHref="/analytical-engines/dashboard"
|
|
workspaceName="Analytical Engines GmbH"
|
|
planTitle="Core"
|
|
formattedPrice="236,81 €"
|
|
interval="Monat"
|
|
nextInvoice="2. September 2026"
|
|
actions={{ onStartSetup: noOp, onOpenBilling: noOp, onRetry: noOp, onRestartCheckout: noOp }}
|
|
/>
|
|
),
|
|
},
|
|
],
|
|
{ initialEntries: ["/analytical-engines/subscribe/success"] }
|
|
);
|
|
return <RouterProvider router={router} />;
|
|
}
|
|
|
|
export function Bill20TrialSuccessVisualFixture(): React.JSX.Element {
|
|
const router = createMemoryRouter(
|
|
[
|
|
{
|
|
path: "*",
|
|
element: (
|
|
<CheckoutSuccessPage
|
|
state="success"
|
|
activationKind="trial"
|
|
homeHref="/analytical-engines/dashboard"
|
|
workspaceName="Analytical Engines GmbH"
|
|
planTitle="Core"
|
|
formattedPrice="236,81 €"
|
|
interval="Monat"
|
|
nextInvoice="16. August 2026"
|
|
actions={{ onStartSetup: noOp, onOpenBilling: noOp, onRetry: noOp, onRestartCheckout: noOp }}
|
|
/>
|
|
),
|
|
},
|
|
],
|
|
{ initialEntries: ["/analytical-engines/subscribe/trial-success"] }
|
|
);
|
|
return <RouterProvider router={router} />;
|
|
}
|
|
|
|
export function Bill20WelcomeSetupVisualFixture(): React.JSX.Element {
|
|
const checklist = toFirstStepsChecklistVM({
|
|
id: "session_bill_20",
|
|
status: "active",
|
|
dismissed: false,
|
|
items: [
|
|
{
|
|
id: "profile",
|
|
block: "profile",
|
|
titleKey: "onboarding.firstSteps.profile",
|
|
href: "/analytical-engines/settings/profile",
|
|
completed: true,
|
|
},
|
|
{
|
|
id: "team",
|
|
block: "team",
|
|
titleKey: "onboarding.firstSteps.team",
|
|
href: "/analytical-engines/settings/team/members/new",
|
|
completed: false,
|
|
canComplete: false,
|
|
},
|
|
{
|
|
id: "contacts",
|
|
block: "contacts",
|
|
titleKey: "onboarding.firstSteps.contacts",
|
|
href: "/analytical-engines/contacts",
|
|
completed: false,
|
|
},
|
|
{
|
|
id: "projects",
|
|
block: "projects",
|
|
titleKey: "onboarding.firstSteps.projects",
|
|
href: "/analytical-engines/projects",
|
|
completed: false,
|
|
},
|
|
{
|
|
id: "billing",
|
|
block: "billing",
|
|
titleKey: "onboarding.firstSteps.billing",
|
|
href: "/analytical-engines/settings/billing",
|
|
completed: true,
|
|
},
|
|
],
|
|
});
|
|
const vm = toWelcomeSetupVM({
|
|
firstName: "Ada",
|
|
workspaceName: "Analytical Engines GmbH",
|
|
dashboardHref: "/analytical-engines/dashboard",
|
|
checklist,
|
|
});
|
|
|
|
const router = createMemoryRouter(
|
|
[
|
|
{
|
|
path: "*",
|
|
element: <WelcomeSetupPage vm={vm} homeHref="/analytical-engines/dashboard" actions={{ onOpen: noOp, onDashboard: noOp }} />,
|
|
},
|
|
],
|
|
{ initialEntries: ["/analytical-engines/onboarding/welcome"] }
|
|
);
|
|
return <RouterProvider router={router} />;
|
|
}
|