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

Cleanup storybook files #7805

Merged
merged 1 commit into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { userEvent, within } from "@storybook/testing-library";
import ManageDevices from "./ManageDevices";

export default {
title: "App / Manage Facility / Manage Devices",
title: "App/Settings/Manage Facilities/Manage Devices",
component: ManageDevices,
argTypes: {},
} as Meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ComponentProps } from "react";
import { ManageSelfRegistrationLinks } from "./ManageSelfRegistrationLinks";

export default {
title: "Org Admin/Settings/Self-registration",
title: "App/Settings/Self-registration",
component: ManageSelfRegistrationLinks,
argTypes: {
isNewFeature: { control: "boolean" },
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/app/analytics/Analytics.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { Analytics } from "./Analytics";

const mockStore = createMockStore([]);
export default {
title: "App/Analytics/COVID-19 testing data",
title: "App/Dashboard/COVID-19 testing data",
component: Analytics,
argTypes: {},
parameters: {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/app/commonComponents/Card/Card.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { StoryFn, Meta } from "@storybook/react";
import { Card } from "./Card";

export default {
title: "Components/Card/Card",
title: "Components/Card",
component: Card,
argTypes: {
logo: { control: "boolean" },
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { StoryFn, Meta } from "@storybook/react";
import React, { useState } from "react";

import Checkboxes from "../app/commonComponents/Checkboxes";
import Checkboxes from "./Checkboxes";

export default {
title: "Components/Form controls/Checkbox",
title: "Components/Form controls/Checkboxes",
component: Checkboxes,
parameters: {
layout: "fullscreen",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { StoryFn, Meta } from "@storybook/react";
import { useState } from "react";

import Dropdown from "../app/commonComponents/Dropdown";
import Dropdown from "./Dropdown";

const fruits = ["Apple", "Orange", "Pear"];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { MultiSelectDropdownOption } from "./MultiSelectDropdown/MultiSelectDrop
import MultiSelect, { MultiSelectProps } from "./MultiSelect";

export default {
title: "MultiSelect",
title: "Components/Form controls/MultiSelect",
component: MultiSelect,
argTypes: {},
args: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import { StoryFn, Meta } from "@storybook/react";

import {
featureList,
NewFeatureTag,
} from "../app/commonComponents/NewFeatureTag";
import { featureList, NewFeatureTag } from "./NewFeatureTag";

export default {
title: "Components/NewFeatureTag",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { StoryFn, Meta } from "@storybook/react";

import Optional from "../app/commonComponents/Optional";
import Optional from "./Optional";

export default {
title: "Components/Form controls/Optional",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { StoryFn, Meta } from "@storybook/react";
import React, { useState } from "react";

import RadioGroup from "../app/commonComponents/RadioGroup";
import RadioGroup from "./RadioGroup";

export default {
title: "Components/Form controls/Radio buttons",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { StoryFn, Meta } from "@storybook/react";

import Required from "../app/commonComponents/Required";
import Required from "./Required";

export default {
title: "Components/Form controls/Required",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Meta } from "@storybook/react";

import RequiredMessage from "../app/commonComponents/RequiredMessage";
import RequiredMessage from "./RequiredMessage";

export default {
title: "Components/Form controls/Required message",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ComponentProps } from "react";
import SingleFileInput from "./SingleFileInput";

export default {
title: "Components/Single File Input",
title: "Components/Form controls/Single File Input",
component: SingleFileInput,
args: {
id: "mySingleFileInput",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { StoryFn, Meta } from "@storybook/react";

import StepIndicator from "../app/commonComponents/StepIndicator";
import StepIndicator from "./StepIndicator";

export default {
title: "Components/Step indicator",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { StoryFn, Meta } from "@storybook/react";

import { TextInput } from "../app/commonComponents/TextInput";
import { TextInput } from "./TextInput";

export default {
title: "Components/Form controls/Text input",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Meta } from "@storybook/react";

import USAGovBanner from "../app/commonComponents/USAGovBanner";
import USAGovBanner from "./USAGovBanner";

export default {
title: "Components/Banner",
title: "Components/USA Gov Banner",
component: USAGovBanner,
} as Meta;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { StoryFn, Meta } from "@storybook/react";
import YesNoNotSureRadioGroup from "./YesNoNotSureRadioGroup";

export default {
title: "Components/Yes, No, Not Sure Radio Group",
title: "Components/Form controls/Yes, No, Not Sure Radio Group",
component: YesNoNotSureRadioGroup,
argTypes: {},
args: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ import { Meta, StoryFn } from "@storybook/react";
import { Provider } from "react-redux";
import createMockStore from "redux-mock-store";

import FacilitySelect, {
FacilitySelectProps,
} from "../app/facilitySelect/FacilitySelect";
import FacilitySelect, { FacilitySelectProps } from "./FacilitySelect";

export default {
title: "App/Facility select",
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/app/patients/AddPatient.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const element = (
);

export default {
title: "App/Add Patient",
title: "App/Patients/Add Patient",
parameters: {
msw: getMocks("AddPatient", "PatientExists"),
},
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/app/testQueue/TestCard/TestCard.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { DevicesMap } from "../TestCardForm/types";
import { TestCard, TestCardProps } from "./TestCard";

export default {
title: "App/Test Queue/Test Card",
title: "App/Queue/Test Card",
component: TestCard,
argTypes: {},
args: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const RouterWithFacility: React.FC<RouterWithFacilityProps> = ({
}) => <MemoryRouter>{children}</MemoryRouter>;

export default {
title: "Search Results",
title: "App/Queue/Patient Search Results",
component: SearchResults,
argTypes: {},
} as Meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const store = mockStore({
});

export default {
title: "App/Test results/Submissions",
title: "App/Results/Upload history",
component: Submissions,
argTypes: {},
args: {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import TestResultPrintModal, {
} from "./TestResultPrintModal";

export default {
title: "Print test results",
title: "App/Results/Print modal",
component: TestResultPrintModal,
parameters: {
layout: "fullscreen",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,40 +1,42 @@
import { StoryFn, Meta } from "@storybook/react";
import { Meta } from "@storybook/react";
import { Provider } from "react-redux";
import { MemoryRouter as Router } from "react-router-dom";
import {
createMemoryRouter,
createRoutesFromElements,
Route,
RouterProvider,
} from "react-router-dom";
import createMockStore from "redux-mock-store";

import { getMocks } from "../../stories/storyMocks";
import React from "react";

import { SelfRegistration } from "./SelfRegistration";

const element = (
<Provider store={createMockStore()({})}>
<SelfRegistration />
</Provider>
);
export default {
title: "App/Self-Registration",
title: "App/PXP/Self-Registration",
component: SelfRegistration,
decorators: [
(Story) => (
<Provider store={createMockStore()({})}>
<Router initialEntries={["/register/shady-oaks"]}>
<Story />
</Router>
</Provider>
),
],
parameters: {
layout: "fullscreen",
},
argTypes: {},
} as Meta;

const Template: StoryFn = (args) => <SelfRegistration {...args} />;
const route = createRoutesFromElements(
<>
<Route element={element} path={"/register/shady-oaks"} />
</>
);

export const Default = Template.bind({});
Default.args = {};
Default.parameters = {
msw: getMocks("getEntityName", "uniqueRegistration", "register"),
};
const router = createMemoryRouter(route, {
initialEntries: [`/register/shady-oaks`],
});

export const Duplicate = Template.bind({});
Duplicate.args = {};
Duplicate.parameters = {
msw: getMocks("getEntityName", "duplicateRegistration"),
const Template = (): React.ReactElement => {
return <RouterProvider router={router} />;
};

export const Default = Template.bind({});
2 changes: 1 addition & 1 deletion frontend/src/patientApp/timeOfTest/DOB.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import DOB from "./DOB";

const mockStore = createMockStore([]);
export default {
title: "App/Test Results/Step 2: DOB",
title: "App/PXP/Step 2: DOB",
component: DOB,
argTypes: {},
} as Meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import TermsOfService from "./TermsOfService";

const mockStore = createMockStore([]);
export default {
title: "App/Test Results/Step 1: Terms of Service",
title: "App/PXP/Step 1: Terms of Service",
component: TermsOfService,
argTypes: {},
} as Meta;
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/patientApp/timeOfTest/TestResult.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import TestResult from "./TestResult";
const mockStore = createMockStore([]);

export default {
title: "Pxp Test Results",
title: "App/PXP/Step 3: Test Result",
component: TestResult,
parameters: {
layout: "fullscreen",
Expand Down
33 changes: 0 additions & 33 deletions frontend/src/stories/Tag.stories.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion frontend/src/stories/testResults/Submission.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const store = mockStore({
});

export default {
title: "Submission",
title: "App/Results/Upload history submission",
component: Submission,
argTypes: {},
args: {},
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/stories/testResults/UploadForm.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import DiseaseSpecificUploadContainer from "../../app/testResults/uploads/Diseas
import AgnosticUploadContainer from "../../app/testResults/uploads/AgnosticUploadContainer";

export default {
title: "App/Test results/Upload CSV",
title: "App/Results/Bulk upload form",
argTypes: {},
args: {},
decorators: [
Expand Down
Loading