diff --git a/editor.planx.uk/src/pages/FlowEditor/components/Settings/Submissions/SubmissionsTable.test.tsx b/editor.planx.uk/src/pages/FlowEditor/components/Settings/Submissions/SubmissionsTable.test.tsx index 5d3ffa6274..90852b7098 100644 --- a/editor.planx.uk/src/pages/FlowEditor/components/Settings/Submissions/SubmissionsTable.test.tsx +++ b/editor.planx.uk/src/pages/FlowEditor/components/Settings/Submissions/SubmissionsTable.test.tsx @@ -18,6 +18,62 @@ describe("SubmissionsTable renders as expected", () => { expect(getByText("Email Applications")).toBeInTheDocument(); }); + test("renders the session ids", () => { + const { getByText } = setup( + , + ); + + mockApplications.forEach((app) => { + expect(getByText(app.sessionId)).toBeInTheDocument(); + }); + }); + + test("renders payment request ids when available", () => { + const { getByText } = setup( + , + ); + + expect(getByText(/test-payment-request-2/)).toBeInTheDocument(); + expect(getByText(/test-payment-request-1/)).toBeInTheDocument(); + }); + + test("renders the latest payment status for each session", () => { + const { getAllByText } = setup( + , + ); + + expect(getAllByText(/Status: created/)).toHaveLength(3); + expect(getAllByText(/Status: error/)).toHaveLength(1); + expect(getAllByText(/Status: success/)).toHaveLength(2); + }); + + test("renders bops application ids when available", () => { + const { getByText } = setup( + , + ); + + expect(getByText(/test-bops-1/)).toBeInTheDocument(); + }); + + test("renders uniform application ids when available", () => { + const { getByText } = setup( + , + ); + + expect(getByText(/test-uniform-1/)).toBeInTheDocument(); + expect(getByText(/test-uniform-2/)).toBeInTheDocument(); + }); + + test("renders email application recipients when available", () => { + const { getByText } = setup( + , + ); + + expect(getByText(/test-user-1@opensystemslab.io/)).toBeInTheDocument(); + expect(getByText(/test-user-2@opensystemslab.io/)).toBeInTheDocument(); + expect(getByText(/test-user-3@opensystemslab.io/)).toBeInTheDocument(); + }); + test("renders with no accessibility violations", async () => { const { container } = setup( ,