Skip to content

Commit

Permalink
Readd after merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
jamdelion committed Dec 2, 2024
1 parent 395e8d4 commit 9729bb6
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 42 deletions.
Original file line number Diff line number Diff line change
@@ -1,19 +1,36 @@
import { screen } from "@testing-library/react";
import React from "react";
import { setup } from "testUtils";
import { axe } from "vitest-axe";

import { VerifySubmissionEmail } from "../VerifySubmissionEmail";

describe("when the VerifySubmissionEmail component renders", () => {
it("displays the email address input", () => {
beforeEach(() => {
setup(<VerifySubmissionEmail params={{ sessionId: "1" }} />);
});

it("displays the email address input", () => {
expect(
screen.queryByText("Verify your submission email address"),
).toBeInTheDocument();
expect(screen.queryByLabelText("Email address")).toBeInTheDocument();
});
it.todo("should not display an error message");

it("should not display an error message", () => {
expect(
screen.queryByText("Sorry, something went wrong. Please try again."),
).not.toBeInTheDocument();

it("should not have any accessibility violations", async () => {

Check failure on line 25 in editor.planx.uk/src/pages/SubmissionDownload/tests/VerifySubmissionEmail.test.tsx

View workflow job for this annotation

GitHub Actions / Run React Tests

src/pages/SubmissionDownload/tests/VerifySubmissionEmail.test.tsx > when the VerifySubmissionEmail component renders > should not display an error message

Error: Calling the test function inside another test function is not allowed. Please put it inside "describe" or "suite" so it can be properly collected. ❯ src/pages/SubmissionDownload/tests/VerifySubmissionEmail.test.tsx:25:5
const { container } = setup(
<VerifySubmissionEmail params={{ sessionId: "1" }} />,
);

const results = await axe(container);
expect(results).toHaveNoViolations();
});
});
});

describe("when the user submits a correct email address", () => {
Expand Down
40 changes: 0 additions & 40 deletions editor.planx.uk/src/pages/VerifyEmail/tests/VerifyEmail.test.tsx

This file was deleted.

0 comments on commit 9729bb6

Please sign in to comment.