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

test: mobile snapshots for page stories #436

Merged
merged 11 commits into from
Dec 10, 2024
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { AilaPersistedChat } from "@oakai/aila/src/protocol/schema";
import type { Meta, StoryObj } from "@storybook/react";

import { chromaticParams } from "../../../../../.storybook/chromatic";
import { DemoProvider } from "../../../../../src/components/ContextProviders/Demo";
import { DownloadContent } from "./DownloadView";

Expand All @@ -9,6 +10,7 @@ const meta: Meta<typeof DownloadContent> = {
component: DownloadContent,
parameters: {
layout: "fullscreen",
...chromaticParams(["mobile", "legacy"]),
},
decorators: [
(Story) => (
Expand Down
2 changes: 2 additions & 0 deletions apps/nextjs/src/app/aila/[id]/share/index.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import type { LooseLessonPlan } from "@oakai/aila/src/protocol/schema";
import type { Meta, StoryObj } from "@storybook/react";

import { chromaticParams } from "../../../../../.storybook/chromatic";
import ShareChat from "./";

const meta: Meta<typeof ShareChat> = {
title: "Pages/Chat/Share",
component: ShareChat,
parameters: {
layout: "fullscreen",
...chromaticParams(["mobile", "legacy"]),
},
};

Expand Down
2 changes: 2 additions & 0 deletions apps/nextjs/src/app/aila/help/index.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ import type { Meta, StoryObj } from "@storybook/react";
import { DemoProvider } from "@/components/ContextProviders/Demo";

import { HelpContent } from ".";
import { chromaticParams } from "../../../../.storybook/chromatic";

const meta: Meta<typeof HelpContent> = {
title: "Pages/Chat/Help",
component: HelpContent,
parameters: {
// Including custom decorators changes the layout from fullscreen
layout: "fullscreen",
...chromaticParams(["mobile", "legacy"]),
},
decorators: [
(Story) => (
Expand Down
4 changes: 4 additions & 0 deletions apps/nextjs/src/app/faqs/index.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import type { Meta, StoryObj } from "@storybook/react";

import { FAQPageContent } from ".";
import { chromaticParams } from "../../../.storybook/chromatic";

const meta: Meta<typeof FAQPageContent> = {
title: "Pages/FAQs",
component: FAQPageContent,
parameters: {
...chromaticParams(["mobile", "legacy"]),
},
};

export default meta;
Expand Down
4 changes: 4 additions & 0 deletions apps/nextjs/src/app/home-page.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import type { Meta, StoryObj } from "@storybook/react";

import { chromaticParams } from "../../.storybook/chromatic";
import { HomePageContent } from "./home-page";

const meta: Meta<typeof HomePageContent> = {
title: "Pages/Homepage",
component: HomePageContent,
parameters: {
...chromaticParams(["mobile", "legacy"]),
},
};

export default meta;
Expand Down
4 changes: 4 additions & 0 deletions apps/nextjs/src/app/legal/[slug]/legal.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import type { Meta, StoryObj } from "@storybook/react";

import { chromaticParams } from "../../../../.storybook/chromatic";
import { LegalContent } from "./legal";

const meta: Meta<typeof LegalContent> = {
title: "Pages/Legal/Sanity dynamic",
component: LegalContent,
parameters: {
...chromaticParams(["mobile", "legacy"]),
},
};

export default meta;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import type { Meta, StoryObj } from "@storybook/react";

import { chromaticParams } from "../../../../.storybook/chromatic";
import { AccountLocked } from "./account-locked";

const meta: Meta<typeof AccountLocked> = {
title: "Pages/Legal/Account Locked",
component: AccountLocked,
parameters: {
...chromaticParams(["mobile", "legacy"]),
},
};

export default meta;
Expand Down
4 changes: 4 additions & 0 deletions apps/nextjs/src/app/prompts/prompts.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import type { Meta, StoryObj } from "@storybook/react";

import { chromaticParams } from "../../../.storybook/chromatic";
import { PromptsContent } from "./prompts";

const meta: Meta<typeof PromptsContent> = {
title: "Pages/Prompts",
component: PromptsContent,
parameters: {
...chromaticParams(["mobile", "legacy"]),
},
};

export default meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type { Meta, StoryObj } from "@storybook/react";

import { DemoProvider } from "@/components/ContextProviders/Demo";

import { chromaticParams } from "../../../../.storybook/chromatic";
import { DialogProvider } from "../DialogContext";
import { ChatStart } from "./chat-start";

Expand All @@ -11,6 +12,7 @@ const meta: Meta<typeof ChatStart> = {
parameters: {
// Including custom decorators changes the layout from fullscreen
layout: "fullscreen",
...chromaticParams(["mobile", "legacy"]),
},
decorators: [
(Story) => (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import type { Meta, StoryObj } from "@storybook/react";

import { chromaticParams } from "../../../.storybook/chromatic";
import { AcceptTermsForm } from "./AcceptTermsForm";

const meta: Meta<typeof AcceptTermsForm> = {
title: "Pages/Onboarding/AcceptTermsForm",
component: AcceptTermsForm,
parameters: {
...chromaticParams(["mobile", "legacy"]),
},
};

export default meta;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import type { Meta, StoryObj } from "@storybook/react";

import { chromaticParams } from "../../../.storybook/chromatic";
import { LegacyUpgradeNotice } from "./LegacyUpgradeNotice";

const meta: Meta<typeof LegacyUpgradeNotice> = {
title: "Pages/Onboarding/LegacyUpgradeNotice",
component: LegacyUpgradeNotice,
parameters: {
...chromaticParams(["mobile", "legacy"]),
},
};

export default meta;
Expand Down
Loading