Group public and logged-in stories

This commit is contained in:
Vincent 2024-03-08 12:38:05 +01:00 коммит произвёл Vincent
Родитель 211a401a48
Коммит b34426ffa9
14 изменённых файлов: 40 добавлений и 35 удалений

Просмотреть файл

@ -64,20 +64,20 @@ const preview: Preview = {
action("nextNavigation.push")(path, ...otherArgs);
if (path === "/") {
linkTo("Pages/Public landing page", "US visitors")();
linkTo("Pages/Public/Landing page", "US visitors")();
}
if (path === "/breaches") {
linkTo("Pages/Public breach index")();
linkTo("Pages/Public/Breach index")();
}
if (path.startsWith("/breach-details/")) {
linkTo("Pages/Public breach listing")();
linkTo("Pages/Public/Breach listing")();
}
if (path === "/user/dashboard") {
linkTo(
"Pages/Dashboard",
"Pages/Logged in/Dashboard",
"US user, without Premium, with unresolved scan results, with unresolved breaches",
)();
}
@ -85,7 +85,7 @@ const preview: Preview = {
if (
path === "/user/dashboard/fix/data-broker-profiles/start-free-scan"
) {
linkTo("Pages/Guided resolution/1a. Free scan")();
linkTo("Pages/Logged in/Guided resolution/1a. Free scan")();
}
if (
@ -93,7 +93,7 @@ const preview: Preview = {
"/user/dashboard/fix/data-broker-profiles/view-data-brokers"
) {
linkTo(
"Pages/Guided resolution/1b. Scan results",
"Pages/Logged in/Guided resolution/1b. Scan results",
"With a few unresolved scan results (free)",
)();
}
@ -101,14 +101,16 @@ const preview: Preview = {
if (
path === "/user/dashboard/fix/data-broker-profiles/manual-remove"
) {
linkTo("Pages/Guided resolution/1c. Manually resolve brokers")();
linkTo(
"Pages/Logged in/Guided resolution/1c. Manually resolve brokers",
)();
}
if (
path === "/user/dashboard/fix/data-broker-profiles/automatic-remove"
) {
linkTo(
"Pages/Guided resolution/1d. Automatically resolve brokers",
"Pages/Logged in/Guided resolution/1d. Automatically resolve brokers",
)();
}
@ -117,7 +119,7 @@ const preview: Preview = {
"/user/dashboard/fix/high-risk-data-breaches/social-security-number"
) {
linkTo(
"Pages/Guided resolution/2. High-risk data breaches",
"Pages/Logged in/Guided resolution/2. High-risk data breaches",
"2a. Social Security Number",
)();
}
@ -126,7 +128,7 @@ const preview: Preview = {
path === "/user/dashboard/fix/high-risk-data-breaches/credit-card"
) {
linkTo(
"Pages/Guided resolution/2. High-risk data breaches",
"Pages/Logged in/Guided resolution/2. High-risk data breaches",
"2b. Credit card",
)();
}
@ -135,28 +137,28 @@ const preview: Preview = {
path === "/user/dashboard/fix/high-risk-data-breaches/bank-account"
) {
linkTo(
"Pages/Guided resolution/2. High-risk data breaches",
"Pages/Logged in/Guided resolution/2. High-risk data breaches",
"2c. Bank account",
)();
}
if (path === "/user/dashboard/fix/high-risk-data-breaches/pin") {
linkTo(
"Pages/Guided resolution/2. High-risk data breaches",
"Pages/Logged in/Guided resolution/2. High-risk data breaches",
"2d. PIN",
)();
}
if (path === "/user/dashboard/fix/high-risk-data-breaches/done") {
linkTo(
"Pages/Guided resolution/2. High-risk data breaches",
"Pages/Logged in/Guided resolution/2. High-risk data breaches",
"2e. Done",
)();
}
if (path === "/user/dashboard/fix/leaked-passwords/passwords") {
linkTo(
"Pages/Guided resolution/3. Leaked passwords",
"Pages/Logged in/Guided resolution/3. Leaked passwords",
"3a. Passwords",
)();
}
@ -165,7 +167,7 @@ const preview: Preview = {
path === "/user/dashboard/fix/leaked-passwords/security-questions"
) {
linkTo(
"Pages/Guided resolution/3. Leaked passwords",
"Pages/Logged in/Guided resolution/3. Leaked passwords",
"3b. Security questions",
)();
}
@ -175,33 +177,36 @@ const preview: Preview = {
path ===
"/user/dashboard/fix/leaked-passwords/security-questions-done"
) {
linkTo("Pages/Guided resolution/3. Leaked passwords", "3c. Done")();
linkTo(
"Pages/Logged in/Guided resolution/3. Leaked passwords",
"3c. Done",
)();
}
if (path === "/user/dashboard/fix/security-recommendations/phone") {
linkTo(
"Pages/Guided resolution/4. Security recommendations",
"Pages/Logged in/Guided resolution/4. Security recommendations",
"4a. Phone number",
)();
}
if (path === "/user/dashboard/fix/security-recommendations/email") {
linkTo(
"Pages/Guided resolution/4. Security recommendations",
"Pages/Logged in/Guided resolution/4. Security recommendations",
"4b. Email address",
)();
}
if (path === "/user/dashboard/fix/security-recommendations/ip") {
linkTo(
"Pages/Guided resolution/4. Security recommendations",
"Pages/Logged in/Guided resolution/4. Security recommendations",
"4c. IP address",
)();
}
if (path === "/user/dashboard/fix/security-recommendations/done") {
linkTo(
"Pages/Guided resolution/4. Security recommendations",
"Pages/Logged in/Guided resolution/4. Security recommendations",
"4d. Done",
)();
}

Просмотреть файл

@ -201,7 +201,7 @@ const DashboardWrapper = (props: DashboardWrapperProps) => {
};
const meta: Meta<typeof DashboardWrapper> = {
title: "Pages/Dashboard",
title: "Pages/Logged in/Dashboard",
component: DashboardWrapper,
argTypes: {
brokers: {

Просмотреть файл

@ -40,7 +40,7 @@ const mockedSession = {
};
const meta: Meta<typeof AutomaticRemoveView> = {
title: "Pages/Guided resolution/1d. Automatically resolve brokers",
title: "Pages/Logged in/Guided resolution/1d. Automatically resolve brokers",
component: AutomaticRemoveView,
};
export default meta;

Просмотреть файл

@ -41,7 +41,7 @@ const mockedSession = {
};
const meta: Meta<typeof ManualRemoveView> = {
title: "Pages/Guided resolution/1c. Manually resolve brokers",
title: "Pages/Logged in/Guided resolution/1c. Manually resolve brokers",
component: ManualRemoveView,
};
export default meta;

Просмотреть файл

@ -40,7 +40,7 @@ const mockedSession = {
};
const meta: Meta<typeof StartFreeScanView> = {
title: "Pages/Guided resolution/1a. Free scan",
title: "Pages/Logged in/Guided resolution/1a. Free scan",
component: StartFreeScanView,
};
export default meta;

Просмотреть файл

@ -110,7 +110,7 @@ const ViewWrapper = (props: ViewWrapperProps) => {
};
const meta: Meta<typeof ViewWrapper> = {
title: "Pages/Guided resolution/1b. Scan results",
title: "Pages/Logged in/Guided resolution/1b. Scan results",
component: ViewWrapper,
argTypes: {
brokers: {

Просмотреть файл

@ -61,7 +61,7 @@ const WelcomeToPlusViewWrapper = (props: { brokerScanCount: number }) => {
};
const meta: Meta<typeof WelcomeToPlusViewWrapper> = {
title: "Pages/Guided resolution/1e. Welcome to Plus",
title: "Pages/Logged in/Guided resolution/1e. Welcome to Plus",
component: WelcomeToPlusViewWrapper,
argTypes: {
brokerScanCount: {

Просмотреть файл

@ -114,7 +114,7 @@ const HighRiskBreachWrapper = (props: {
};
const meta: Meta<typeof HighRiskBreachWrapper> = {
title: "Pages/Guided resolution/2. High-risk data breaches",
title: "Pages/Logged in/Guided resolution/2. High-risk data breaches",
component: HighRiskBreachWrapper,
argTypes: {
type: {

Просмотреть файл

@ -81,7 +81,7 @@ const LeakedPasswordsWrapper = (props: {
};
const meta: Meta<typeof LeakedPasswordsWrapper> = {
title: "Pages/Guided resolution/3. Leaked passwords",
title: "Pages/Logged in/Guided resolution/3. Leaked passwords",
component: LeakedPasswordsWrapper,
argTypes: {
type: {

Просмотреть файл

@ -59,7 +59,7 @@ const SecurityRecommendationsWrapper = (props: {
};
const meta: Meta<typeof SecurityRecommendationsWrapper> = {
title: "Pages/Guided resolution/4. Security recommendations",
title: "Pages/Logged in/Guided resolution/4. Security recommendations",
component: SecurityRecommendationsWrapper,
argTypes: {
type: {

Просмотреть файл

@ -7,7 +7,7 @@ import type { Meta, StoryObj } from "@storybook/react";
import { View as OnboardingEl } from "./View";
const meta: Meta<typeof OnboardingEl> = {
title: "Pages/Onboarding",
title: "Pages/Logged in/Onboarding",
component: OnboardingEl,
};
export default meta;

Просмотреть файл

@ -8,7 +8,7 @@ import { getOneL10nSync } from "../../../functions/server/mockL10n";
import { PublicShell } from "./PublicShell";
const meta: Meta<typeof View> = {
title: "Pages/Public landing page",
title: "Pages/Public/Landing page",
component: (props: ViewProps) => (
<PublicShell l10n={getOneL10nSync("en")}>
<View {...props} />

Просмотреть файл

@ -9,7 +9,7 @@ import { PublicShell } from "../../PublicShell";
import { createRandomHibpListing } from "../../../../../../apiMocks/mockData";
const meta: Meta<typeof BreachDetailsView> = {
title: "Pages/Public breach listing",
title: "Pages/Public/Breach listing",
component: (props: ViewProps) => (
<PublicShell l10n={getOneL10nSync("en")}>
<BreachDetailsView {...props} />
@ -24,7 +24,7 @@ export default meta;
type Story = StoryObj<typeof BreachDetailsView>;
export const LandingUs: Story = {
name: "Public breach listing",
name: "Breach listing",
args: {
breach: createRandomHibpListing(),
},

Просмотреть файл

@ -10,7 +10,7 @@ import { PublicShell } from "../PublicShell";
import { createRandomHibpListing } from "../../../../../apiMocks/mockData";
const meta: Meta<typeof BreachIndexView> = {
title: "Pages/Public breach index",
title: "Pages/Public/Breach index",
component: (props: ViewProps) => (
<PublicShell l10n={getOneL10nSync("en")}>
<BreachIndexView {...props} />
@ -25,7 +25,7 @@ export default meta;
type Story = StoryObj<typeof BreachIndexView>;
export const LandingUs: Story = {
name: "Public breach index",
name: "Breach index",
args: {
allBreaches: faker.helpers.multiple(createRandomHibpListing, {
count: { min: 7, max: 20 },