Skip to content

Commit f649b0f

Browse files
VIA-306 MD: Rename the component VaccinesForPregnant to more intuitive VaccinesDuringPregnancy
1 parent 27635e1 commit f649b0f

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/app/vaccines-during-pregnancy/page.test.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import VaccinesForPregnant from "@src/app/vaccines-during-pregnancy/page";
1+
import VaccinesDuringPregnancy from "@src/app/vaccines-during-pregnancy/page";
22
import { assertBackLinkIsPresent } from "@test-data/utils/back-link-helpers";
33
import { render, screen } from "@testing-library/react";
44

55
jest.mock("@src/app/_components/nhs-frontend/BackLink", () => jest.fn(() => <div data-testid="back-link"></div>));
66

7-
describe("VaccinesForPregnantPeople", () => {
7+
describe("VaccinesDuringPregnancy", () => {
88
const vaccines = [
99
{
1010
name: "Whooping cough (Pertussis)",
@@ -15,21 +15,21 @@ describe("VaccinesForPregnantPeople", () => {
1515
];
1616

1717
it("should render heading", () => {
18-
render(<VaccinesForPregnant />);
18+
render(<VaccinesDuringPregnancy />);
1919

2020
const heading: HTMLElement = screen.getByRole("heading", { name: "Vaccines during pregnancy", level: 1 });
2121

2222
expect(heading).toBeVisible();
2323
});
2424

2525
it("should render back link", () => {
26-
render(<VaccinesForPregnant />);
26+
render(<VaccinesDuringPregnancy />);
2727

2828
assertBackLinkIsPresent(screen);
2929
});
3030

3131
it.each(vaccines)(`should render card link with description for $name`, ({ name, description, link }) => {
32-
render(<VaccinesForPregnant />);
32+
render(<VaccinesDuringPregnancy />);
3333

3434
const cardLink: HTMLElement = screen.getByRole("link", { name });
3535
const cardDescription: HTMLElement = screen.getByText(description);
@@ -40,7 +40,7 @@ describe("VaccinesForPregnantPeople", () => {
4040
});
4141

4242
it("renders vaccines for all ages button", async () => {
43-
render(<VaccinesForPregnant />);
43+
render(<VaccinesDuringPregnancy />);
4444
expectLinkToBeRendered("View vaccines for all ages", "/vaccines-for-all-ages");
4545
});
4646
});

src/app/vaccines-during-pregnancy/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { NHS_TITLE_SUFFIX, VACCINES_FOR_PREGNANT_PAGE } from "@src/app/constants
55
import Link from "next/link";
66
import React, { JSX } from "react";
77

8-
const VaccinesForPregnant = (): JSX.Element => {
8+
const VaccinesDuringPregnancy = (): JSX.Element => {
99
return (
1010
<>
1111
<title>{`${VACCINES_FOR_PREGNANT_PAGE} - ${NHS_TITLE_SUFFIX}`}</title>
@@ -32,4 +32,4 @@ const VaccinesForPregnant = (): JSX.Element => {
3232
);
3333
};
3434

35-
export default VaccinesForPregnant;
35+
export default VaccinesDuringPregnancy;

0 commit comments

Comments
 (0)