Skip to content

Commit

Permalink
[MDS-5972] Update CORE homepage links (#3126)
Browse files Browse the repository at this point in the history
update links, PDFs, and create a snap test for the HomePage which wasn't created before
  • Loading branch information
taraepp authored May 28, 2024
1 parent 0b155bc commit 503c4d8
Show file tree
Hide file tree
Showing 8 changed files with 559 additions and 6 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
8 changes: 4 additions & 4 deletions services/core-web/src/components/homepage/HomeSidePanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,21 +90,21 @@ const DocumentsSection = () => {
const links = [
{
title: "Health, Safety and Reclamation Code",
url: HSRC_PDF,
url: HSRC_PDF, //new code
},
{
title: "Chief Inspector's Annual Reports",
url:
"https://www2.gov.bc.ca/gov/content/industry/mineral-exploration-mining/further-information/reports-publications/chief-inspector-s-annual-reports",
"https://www2.gov.bc.ca/gov/content/industry/mineral-exploration-mining/health-safety/chief-inspector-s-annual-reports",
},
{
title: "Chief Inspector's Directives",
url:
"https://www2.gov.bc.ca/gov/content/industry/mineral-exploration-mining/further-information/directives-alerts-incident-information/chief-inspector-directives",
"https://www2.gov.bc.ca/gov/content/industry/mineral-exploration-mining/health-safety/chief-inspector-directives",
},
{
title: "Mine Emergency Management Plan",
url: MEMP_PDF,
url: MEMP_PDF, // new PDF
},
];
return linkWidget("Documents", links);
Expand Down
4 changes: 2 additions & 2 deletions services/core-web/src/constants/assets.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ export { default as UNSUBSCRIBE } from "../assets/images/unsubscribe.svg";
export { default as YELLOW_HAZARD } from "../assets/images/Hazard.svg";
export { default as BACKGROUND } from "../assets/images/Background.jpg";
export { default as TRASHCAN } from "../assets/images/TrashCan.svg";
export { default as HSRC_PDF } from "../assets/downloads/health_safety_and_reclamation_code_nov2022.pdf";
export { default as MEMP_PDF } from "../assets/downloads/7810_Mine_Emergency_Management_Plan_V4_DJ edits_20221031.pdf";
export { default as HSRC_PDF } from "../assets/downloads/minescode_april_2024_web.pdf";
export { default as MEMP_PDF } from "../assets/downloads/2024_Mine_Emergency_Management_Plan.pdf";
export { default as FLUSH_SOUND } from "../assets/downloads/flush.mp3";
export { default as WATER_SOUND } from "../assets/downloads/water.mp3";
export { default as MINESPACE_ICON } from "../assets/images/minespaceIcon.svg";
Expand Down
27 changes: 27 additions & 0 deletions services/core-web/src/tests/components/HomePage.spec.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import React from "react";
import { render } from "@testing-library/react";
import HomePage from "@/components/homepage/HomePage";
import { ReduxWrapper } from "../utils/ReduxWrapper";
import { ACTIVITIES } from "@mds/common/constants/reducerTypes";
import * as MOCK from "@mds/common/tests/mocks/dataMocks";
import { BrowserRouter } from "react-router-dom";

const initialState = {
[ACTIVITIES]: {
activities: MOCK.ACTIVITIES.data.records,
totalActivities: MOCK.ACTIVITIES.data.records.length,
},
};

describe("HomePage", () => {
it("renders properly", () => {
const { container } = render(
<ReduxWrapper initialState={initialState}>
<BrowserRouter>
<HomePage />
</BrowserRouter>
</ReduxWrapper>
);
expect(container).toMatchSnapshot();
});
});
Loading

0 comments on commit 503c4d8

Please sign in to comment.