diff --git a/e2e/fixtures/pages/weather-health-alerts/weather-health-alerts-parent.fixture.ts b/e2e/fixtures/pages/weather-health-alerts/weather-health-alerts-parent.fixture.ts index 2e2efc941..0be28caf9 100644 --- a/e2e/fixtures/pages/weather-health-alerts/weather-health-alerts-parent.fixture.ts +++ b/e2e/fixtures/pages/weather-health-alerts/weather-health-alerts-parent.fixture.ts @@ -25,7 +25,7 @@ export class WeatherHealthAlertsParentPage { async hasMapLink() { await expect(this.page.getByRole('link', { name: 'View map of weather health alerts' })).toHaveAttribute( 'href', - '?v=map&type=heat' + '?v=map&type=cold' ) } diff --git a/public/locales/en/common.json b/public/locales/en/common.json index 6188476f1..6b0fbfb45 100644 --- a/public/locales/en/common.json +++ b/public/locales/en/common.json @@ -21,6 +21,7 @@ "welcome": "Welcome", "pageTitle": "{{title}}", "pageTitle_withArea": "{{title}} in {{- areaName}}", + "entryTitle": "<0>Entry title: <1>{{- value}}", "cms": { "blocks": { "headline": { diff --git a/src/api/models/cms/Page/FormFields.ts b/src/api/models/cms/Page/FormFields.ts index 8cf8e9f13..991b8e897 100644 --- a/src/api/models/cms/Page/FormFields.ts +++ b/src/api/models/cms/Page/FormFields.ts @@ -3,7 +3,7 @@ import { z } from 'zod' export const FormField = z.object({ id: z.number(), meta: z.object({ - type: z.literal('feedback.FormField'), + type: z.literal('forms.FormField'), }), clean_name: z.string(), label: z.string(), diff --git a/src/api/requests/cms/getPage.ts b/src/api/requests/cms/getPage.ts index bc33dc868..06311ff7c 100644 --- a/src/api/requests/cms/getPage.ts +++ b/src/api/requests/cms/getPage.ts @@ -54,7 +54,7 @@ const WithLandingData = SharedPageData.extend({ const withFeedbackData = SharedPageData.extend({ meta: Meta.extend({ - type: z.literal('feedback.FormPage'), + type: z.literal('forms.FormPage'), }), body: z.string(), form_fields: FormFields, diff --git a/src/api/requests/cms/getPages.ts b/src/api/requests/cms/getPages.ts index 700dbfc9c..f9ef076f4 100644 --- a/src/api/requests/cms/getPages.ts +++ b/src/api/requests/cms/getPages.ts @@ -31,7 +31,7 @@ import { logger } from '@/lib/logger' export enum PageType { Home = 'home.HomePage', Landing = 'home.LandingPage', - Feedback = 'feedback.FormPage', + Feedback = 'forms.FormPage', Common = 'common.CommonPage', Composite = 'composite.CompositePage', Topic = 'topic.TopicPage', diff --git a/src/api/requests/suggestions/postSuggestions.spec.ts b/src/api/requests/suggestions/postSuggestions.spec.ts index ebf88163c..7373eb8d3 100644 --- a/src/api/requests/suggestions/postSuggestions.spec.ts +++ b/src/api/requests/suggestions/postSuggestions.spec.ts @@ -8,10 +8,10 @@ test('Handles successful submission from the api', async () => { postSuggestion.mockResolvedValueOnce({ status: 200, data: {} }) const { success } = await postSuggestions({ - improve_experience: '', - did_you_find_everything: 'yes', - reason: '', - like_to_see: '', + what_was_your_reason_for_visiting_the_dashboard_today: '', + did_you_find_everything_you_were_looking_for: 'yes', + how_could_we_improve_your_experience_with_the_dashboard: '', + what_would_you_like_to_see_on_the_dashboard_in_the_future: '', }) expect(success).toBeTruthy() @@ -21,9 +21,9 @@ test('Handles non 200 response from the api', async () => { postSuggestion.mockResolvedValueOnce({ status: 500, data: {} }) const { success } = await postSuggestions({ - improve_experience: '', - reason: '', - like_to_see: '', + how_could_we_improve_your_experience_with_the_dashboard: '', + what_was_your_reason_for_visiting_the_dashboard_today: '', + what_would_you_like_to_see_on_the_dashboard_in_the_future: '', }) expect(success).toBeFalsy() diff --git a/src/api/requests/suggestions/postSuggestions.ts b/src/api/requests/suggestions/postSuggestions.ts index a23cff5cb..111f15236 100644 --- a/src/api/requests/suggestions/postSuggestions.ts +++ b/src/api/requests/suggestions/postSuggestions.ts @@ -12,10 +12,11 @@ export type RequestParams = z.infer export const postSuggestions = async (suggestions: RequestParams) => { try { - const { status } = await client('suggestions/v1', { + const { status } = await client('suggestions/v2', { body: suggestions, baseUrl: getFeedbackApiBaseUrl(), }) + if (status !== 200) { throw new Error('Failed to submit, invalid status code') } diff --git a/src/app/(pages)/feedback/confirmation/page.tsx b/src/app/(pages)/feedback/confirmation/page.tsx index b1fa6638d..c74686b01 100644 --- a/src/app/(pages)/feedback/confirmation/page.tsx +++ b/src/app/(pages)/feedback/confirmation/page.tsx @@ -25,7 +25,9 @@ export default async function FeedbackConfirmation() {

{panelTitle}

{panelText}
+ {body} + Return to home page diff --git a/src/app/(pages)/switchboard/(pages)/feature-flags/page.tsx b/src/app/(pages)/switchboard/(pages)/feature-flags/page.tsx index 24ea5c694..837fbf55d 100644 --- a/src/app/(pages)/switchboard/(pages)/feature-flags/page.tsx +++ b/src/app/(pages)/switchboard/(pages)/feature-flags/page.tsx @@ -10,11 +10,7 @@ export default function SwitchBoard() { const cookieStore = cookies() const { - flags: { - 'landing-page-hero': landingPageHero, - 'interactive-charts': interactiveCharts, - 'feedback-form': feedbackForm, - }, + flags: { 'landing-page-hero': landingPageHero, 'interactive-charts': interactiveCharts }, } = getSwitchBoardState(cookieStore.get(UKHSA_SWITCHBOARD_COOKIE_NAME)?.value) return ( @@ -28,7 +24,6 @@ export default function SwitchBoard() { { 'landing-page-hero': form.get('flags.landingPageHero') as string, 'interactive-charts': form.get('flags.interactiveCharts') as string, - 'feedback-form': form.get('flags.feedbackForm') as string, } ) }} @@ -109,42 +104,6 @@ export default function SwitchBoard() { - -
- -
- - -
- -
- - -
-