From 2b8c421fc90ef27ccd76e4441b1fdcff1a383874 Mon Sep 17 00:00:00 2001 From: Jo Humphrey <31373245+jamdelion@users.noreply.github.com> Date: Tue, 10 Dec 2024 12:29:35 +0000 Subject: [PATCH] Move application summary and capitalise team name --- .../VerifySubmissionEmail.stories.tsx | 9 +++--- .../VerifySubmissionEmail.tsx | 30 +++++++++---------- .../tests/VerifySubmissionEmail.test.tsx | 4 ++- 3 files changed, 23 insertions(+), 20 deletions(-) diff --git a/editor.planx.uk/src/pages/SubmissionDownload/VerifySubmissionEmail.stories.tsx b/editor.planx.uk/src/pages/SubmissionDownload/VerifySubmissionEmail.stories.tsx index d5680ddb54..77993fd961 100644 --- a/editor.planx.uk/src/pages/SubmissionDownload/VerifySubmissionEmail.stories.tsx +++ b/editor.planx.uk/src/pages/SubmissionDownload/VerifySubmissionEmail.stories.tsx @@ -13,7 +13,8 @@ export default meta; type Story = StoryObj; export const Basic = { - render: () => ( - - ), -}; + args: { + params: { sessionId: "1", team: "barking and dagenham" }, + }, + render: (args) => , +} satisfies Story; diff --git a/editor.planx.uk/src/pages/SubmissionDownload/VerifySubmissionEmail.tsx b/editor.planx.uk/src/pages/SubmissionDownload/VerifySubmissionEmail.tsx index 42668ee1b7..58ec46febc 100644 --- a/editor.planx.uk/src/pages/SubmissionDownload/VerifySubmissionEmail.tsx +++ b/editor.planx.uk/src/pages/SubmissionDownload/VerifySubmissionEmail.tsx @@ -7,6 +7,7 @@ import { SummaryListTable } from "@planx/components/shared/Preview/SummaryList"; import axios, { isAxiosError } from "axios"; import DelayedLoadingIndicator from "components/DelayedLoadingIndicator/DelayedLoadingIndicator"; import { useFormik } from "formik"; +import startCase from "lodash/startCase.js"; import React, { useState } from "react"; import InputLabel from "ui/public/InputLabel"; import ErrorWrapper from "ui/shared/ErrorWrapper"; @@ -73,14 +74,27 @@ export const VerifySubmissionEmail = ({ ) : ( + + Application details + + + Session ID + {sessionId} + Local Authority + {startCase(team)} + <> + - + - - Application details - - - Session ID - {sessionId} - Local Authority - {team} - diff --git a/editor.planx.uk/src/pages/SubmissionDownload/tests/VerifySubmissionEmail.test.tsx b/editor.planx.uk/src/pages/SubmissionDownload/tests/VerifySubmissionEmail.test.tsx index 8095811d37..6ec9f62bf1 100644 --- a/editor.planx.uk/src/pages/SubmissionDownload/tests/VerifySubmissionEmail.test.tsx +++ b/editor.planx.uk/src/pages/SubmissionDownload/tests/VerifySubmissionEmail.test.tsx @@ -11,7 +11,9 @@ describe("when the VerifySubmissionEmail component renders", () => { expect( screen.queryByText("Verify your submission email address"), ).toBeInTheDocument(); - expect(screen.queryByLabelText("Email address")).toBeInTheDocument(); + expect( + screen.queryByLabelText("Submission email address"), + ).toBeInTheDocument(); }); it.todo("should not display an error message"); it.todo(