-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
933 additions
and
258 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 0 additions & 32 deletions
32
services/core-web/src/tests/components/mine/Projects/ProjectOverviewTab.spec.js
This file was deleted.
Oops, something went wrong.
30 changes: 30 additions & 0 deletions
30
services/core-web/src/tests/components/mine/Projects/ProjectOverviewTab.spec.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import React from "react"; | ||
import { render } from "@testing-library/react"; | ||
import { ProjectOverviewTab } from "@/components/mine/Projects/ProjectOverviewTab"; | ||
import * as MOCK from "@/tests/mocks/dataMocks"; | ||
import { PROJECTS, STATIC_CONTENT } from "@mds/common/constants/reducerTypes"; | ||
import { BrowserRouter } from "react-router-dom"; | ||
import { ReduxWrapper } from "@/tests/utils/ReduxWrapper"; | ||
|
||
const initialState = { | ||
[PROJECTS]: { | ||
projects: MOCK.PROJECTS.records, | ||
project: MOCK.PROJECT, | ||
projectSummary: MOCK.PROJECT_SUMMARY, | ||
informationRequirementsTable: MOCK.INFORMATION_REQUIREMENTS_TABLE, | ||
}, | ||
[STATIC_CONTENT]: MOCK.BULK_STATIC_CONTENT_RESPONSE, | ||
}; | ||
|
||
describe("ProjectOverviewTab", () => { | ||
it("renders properly", () => { | ||
const { container } = render( | ||
<BrowserRouter> | ||
<ReduxWrapper initialState={initialState}> | ||
<ProjectOverviewTab /> | ||
</ReduxWrapper> | ||
</BrowserRouter> | ||
); | ||
expect(container).toMatchSnapshot(); | ||
}); | ||
}); |
30 changes: 0 additions & 30 deletions
30
services/core-web/src/tests/components/mine/Projects/ProjectStagesTable.spec.js
This file was deleted.
Oops, something went wrong.
71 changes: 71 additions & 0 deletions
71
services/core-web/src/tests/components/mine/Projects/ProjectStagesTable.spec.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
import React from "react"; | ||
import { render } from "@testing-library/react"; | ||
import { ProjectStagesTable } from "@/components/mine/Projects/ProjectStagesTable"; | ||
import * as MOCK from "@/tests/mocks/dataMocks"; | ||
import { ReduxWrapper } from "@/tests/utils/ReduxWrapper"; | ||
|
||
const projectStages = [ | ||
{ | ||
title: "REQUIRED STAGES", | ||
key: "req-stages-id", | ||
status: "STATUS", | ||
isTitle: true, | ||
}, | ||
{ | ||
key: "ps-519", | ||
link: <div>link 1</div>, | ||
status: "DFT", | ||
statusHash: { | ||
WDN: "Withdrawn", | ||
UNR: "Under review", | ||
SUB: "Submitted", | ||
OHD: "On Hold", | ||
DFT: "Draft", | ||
COM: "Complete", | ||
CHR: "Change Requested", | ||
ASG: "Assigned", | ||
}, | ||
title: "Project description", | ||
}, | ||
{ | ||
key: "ps-null", | ||
link: <div>link 2</div>, | ||
status: null, | ||
statusHash: { | ||
UNR: "Under review", | ||
SUB: "Submitted", | ||
DFT: "Draft", | ||
CHR: "Change Requested", | ||
APV: "Approved", | ||
}, | ||
title: "Final Application", | ||
}, | ||
{ | ||
title: "OPTIONAL STAGES", | ||
key: "opt-stages-id", | ||
status: "STATUS", | ||
isOptional: true, | ||
isTitle: true, | ||
}, | ||
{ | ||
isOptional: true, | ||
key: "irt-0", | ||
link: <div>link 3</div>, | ||
status: null, | ||
statusHash: { | ||
UNR: "Under review", | ||
SUB: "Submitted", | ||
DFT: "Draft", | ||
CHR: "Change Requested", | ||
APV: "Approved", | ||
}, | ||
title: "Final IRT", | ||
}, | ||
]; | ||
|
||
describe("ProjectStagesTable", () => { | ||
it("renders properly", () => { | ||
const { container } = render(<ProjectStagesTable projectStages={projectStages} />); | ||
expect(container).toMatchSnapshot(); | ||
}); | ||
}); |
99 changes: 0 additions & 99 deletions
99
...core-web/src/tests/components/mine/Projects/__snapshots__/ProjectOverviewTab.spec.js.snap
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.