Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
954741b
feat: added page url tracking for feedback link
paddy-hmcts Mar 16, 2026
37dc1c7
test: fix failing tests
paddy-hmcts Mar 17, 2026
cd8cd6b
Merge branch 'master' into HDPI-3519-unique-feedback-links
paddy-hmcts Mar 17, 2026
4a7fb86
fix: leading slash present, not required as per jira
paddy-hmcts Mar 17, 2026
b4ae927
Merge branch 'master' into HDPI-3519-unique-feedback-links
paddy-hmcts Mar 18, 2026
4448a5f
Merge branch 'master' into HDPI-3519-unique-feedback-links
PadmaDeenadayalan Mar 19, 2026
7b0540d
Merge branch 'master' into HDPI-3519-unique-feedback-links
paddy-hmcts Mar 20, 2026
e2cbcd3
Merge branch 'master' into HDPI-3519-unique-feedback-links
jessieharrigan Mar 23, 2026
d1303ff
HDPI-3519 -Automation Unique feedback Links
Mar 23, 2026
dff3d07
Merge branch 'master' into HDPI-3519-Automation-unique-feedback-links
PadmaDeenadayalan Mar 23, 2026
c986843
fixed lint fix
Mar 23, 2026
662c3c0
Merge branch 'master' into HDPI-3519-Automation-unique-feedback-links
PadmaDeenadayalan Mar 24, 2026
311cb1e
updated the files
Mar 24, 2026
88234bf
Merge branch 'master' into HDPI-3519-unique-feedback-links
Gautham059 Mar 24, 2026
103769b
updated start now pft file
Mar 24, 2026
a460f64
updated start now pft file
Mar 24, 2026
3814e25
Added support for feedback page validation
Gautham059 Mar 25, 2026
a28a609
updated the page data files and PFT files for feedback link validations
Mar 25, 2026
c2ebbe6
Merge branch 'HDPI-3519-unique-feedback-links' into HDPI-3519-Automat…
PadmaDeenadayalan Mar 25, 2026
4ec6350
Testing page navigation
Gautham059 Mar 25, 2026
c922e89
added debug
Gautham059 Mar 25, 2026
dd09b84
lint fix
Gautham059 Mar 25, 2026
0460326
Navigation fix - 2
Gautham059 Mar 25, 2026
6993a8e
lint fix
Gautham059 Mar 25, 2026
fb61729
Navigation fix - 3
Gautham059 Mar 25, 2026
36cdd1d
Merge branch 'master' into HDPI-3519-unique-feedback-links
Gautham059 Mar 25, 2026
845fed5
Merge branch 'HDPI-3519-unique-feedback-links' into HDPI-3519-Automat…
Gautham059 Mar 25, 2026
de72932
Navigation fix - 4
Gautham059 Mar 25, 2026
10e061f
title changed
Gautham059 Mar 25, 2026
f5caf6e
Relocated feedback link logic
Gautham059 Mar 25, 2026
6239f18
updated the page data files
Mar 25, 2026
337e866
Merge branch 'master' into HDPI-3519-unique-feedback-links
Gautham059 Mar 26, 2026
94f9b50
Merge remote-tracking branch 'origin/HDPI-3519-unique-feedback-links'…
Mar 26, 2026
b0b3130
resolved the conflicts and updated the feedback link validation for n…
Mar 26, 2026
4946212
removed feedbackParagraph key
Mar 26, 2026
000cc75
Merge branch 'master' into HDPI-3519-unique-feedback-links
PadmaDeenadayalan Mar 26, 2026
77bacae
Merge branch 'HDPI-3519-unique-feedback-links' into HDPI-3519-Automat…
PadmaDeenadayalan Mar 26, 2026
7af81cd
Merge pull request #981 from hmcts/HDPI-3519-Automation-unique-feedba…
PadmaDeenadayalan Mar 27, 2026
64293ec
fix: cve issues
paddy-hmcts Mar 27, 2026
45a822f
fix: resolve merge conflicts in date validation and error handling
paddy-hmcts Mar 27, 2026
a4ef03e
fix: cve issues
paddy-hmcts Mar 27, 2026
ffd5dbf
Merge branch 'master' into HDPI-3519-unique-feedback-links
PadmaDeenadayalan Mar 30, 2026
9290b0d
updated the changes as per the tenancyTypeDetails files
Mar 30, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/main/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { glob } from 'glob';
import favicon from 'serve-favicon';

import { setupDev } from './development';
import { caseReferenceParamMiddleware } from './middleware';
import { caseReferenceParamMiddleware, pageTrackingUrlMiddleware } from './middleware';
import * as modules from './modules';
import { setupErrorHandlers } from './modules/error-handler';
import { registerAllJourneys } from './routes/registerSteps';
Expand Down Expand Up @@ -38,6 +38,8 @@ app.use((req, res, next) => {
next();
});

app.use(pageTrackingUrlMiddleware);

// param middleware for caseReference
app.param('caseReference', caseReferenceParamMiddleware);

Expand Down
2 changes: 1 addition & 1 deletion src/main/assets/locales/cy/common.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"serviceName": "cyRespond to a property possession claim",
"phase": "cyALPHA",
"feedback": "cyThis is a new service – your <a href=\"#\" class=\"govuk-link\">feedback</a> will help us to improve it.",
"feedback": "cyThis is a new service – your <a href=\"https://www.smartsurvey.co.uk/s/Poss_feedback/?pageurl={{pageTrackingUrl}}\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"govuk-link\">feedback (opens in new tab)</a> will help us to improve it.",
"languageToggle": "<a href=\"?lang=en\" class=\"govuk-link language\">English</a>",
"logout": "cySign out",
"navigationLabel": "cyService navigation",
Expand Down
2 changes: 1 addition & 1 deletion src/main/assets/locales/en/common.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"serviceName": "Respond to a property possession claim",
"phase": "ALPHA",
"feedback": "This is a new service – your <a href=\"#\" class=\"govuk-link\">feedback</a> will help us to improve it.",
"feedback": "This is a new service – your <a href=\"https://www.smartsurvey.co.uk/s/Poss_feedback/?pageurl={{pageTrackingUrl}}\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"govuk-link\">feedback (opens in new tab)</a> will help us to improve it.",
"languageToggle": "<a href=\"?lang=cy\" class=\"govuk-link language\">Cymraeg</a>",
"logout": "Sign out",
"navigationLabel": "Service navigation",
Expand Down
1 change: 1 addition & 0 deletions src/main/middleware/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export * from './oidc';
export * from './caseReference';
export * from './pageTrackingUrl';
21 changes: 21 additions & 0 deletions src/main/middleware/pageTrackingUrl.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { NextFunction, Request, Response } from 'express';

const getPageTrackingUrl = (path: string): string => {
const segments = path.split('/').filter(Boolean);

if (segments[0] === 'dashboard') {
return 'dashboard';
}

if (segments[0] === 'case' && segments.length > 2) {
return `${segments.slice(2).join('/')}`;
}

return path;
};

export const pageTrackingUrlMiddleware = (req: Request, res: Response, next: NextFunction): void => {
const pageTrackingUrl = getPageTrackingUrl(req.path);
res.locals.pageTrackingUrl = pageTrackingUrl;
next();
};
1 change: 0 additions & 1 deletion src/main/modules/i18n/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ export type AllowedLang = (typeof allowedLanguages)[number];
export const COMMON_TRANSLATION_KEYS = [
'serviceName',
'phase',
'feedback',
'back',
'languageToggle',
'contactUsForHelp',
Expand Down
1 change: 0 additions & 1 deletion src/main/modules/steps/formBuilder/formContent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ export function buildFormContent(
errorSummary,
serviceName: t('serviceName'),
phase: t('phase'),
feedback: t('feedback'),
back: t('back'),
contactUsForHelp: t('contactUsForHelp'),
contactUsForHelpText: t('contactUsForHelpText'),
Expand Down
2 changes: 1 addition & 1 deletion src/main/views/journeyTemplate.njk
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<div class="govuk-width-container">
{{ govukPhaseBanner({
tag: { text: t('phase', 'Alpha') },
html: (t('feedback') | safe)
html: (t('feedback', { pageTrackingUrl: pageTrackingUrl }) | safe)
}) }}

</div>
Expand Down
2 changes: 1 addition & 1 deletion src/main/views/stepsTemplate.njk
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
tag: {
text: (phase or t('phase') or 'ALPHA') | safe
},
html: ((feedback or t('feedback') or '')) | safe
html: ((feedback or t('feedback', { pageTrackingUrl: pageTrackingUrl }) or '')) | safe
}) }}
</div>
{% if backUrl %}
Expand Down
2 changes: 1 addition & 1 deletion src/main/views/template.njk
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
tag: {
text: (phase or t('phase') or 'ALPHA') | safe
},
html: ((feedback or t('feedback') or '')) | safe
html: ((feedback or t('feedback', { pageTrackingUrl: pageTrackingUrl }) or '')) | safe
}) }}
</div>
{% if backUrl %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ export const confirmationOfNoticeGiven = {
selectIfNoticeOfIntentionGivenErrorMessage(claimantName: string): string {
return `Select if ${claimantName} gave you notice of their intention to begin possession proceedings`;
},
feedbackLink: `feedback (opens in new tab)`,
pageSlug: `confirmation-of-notice-given`,
};
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,6 @@ export const contactPreferenceEmailOrPost = {
selectHowYouWantToReceiveUpdatesErrorMessage: `Select how you want to receive updates`,
enterEmailAddressErrorMessage: `Enter your email address`,
invalidEmailAddressErrorMessage: `Enter an email address in the correct format, like name@example.com`,
feedbackLink: `feedback (opens in new tab)`,
pageSlug: `contact-preferences-email-or-post`,
};
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,6 @@ export const contactPreferencesTelephone = {
selectWhetherHappyToBeContactedByTelephoneErrorMessage: `Select whether you’re happy to be contacted by telephone`,
enterUKPhoneNumberErrorMessage: `Enter a UK phone number`,
enterUKPhoneNumberFormatErrorMessage: `Enter a phone number, like 01632 960 001 or 07700 900 982`,
feedbackLink: `feedback (opens in new tab)`,
pageSlug: `contact-preferences-telephone`,
};
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@ export const contactPreferencesTextMessage = {
backLink: `Back`,
thereIsAProblemErrorMessageHeader: `There is a problem`,
selectIfYouWantErrorMessage: `Select if you want to be contacted by text message.`,
feedbackLink: `feedback (opens in new tab)`,
pageSlug: `contact-preferences-text-message`,
};
2 changes: 2 additions & 0 deletions src/test/ui/data/page-data/dateOfBirth.page.data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,6 @@ export const dateOfBirth = {
backLink: `Back`,
saveAndContinueButton: `Save and continue`,
saveForLaterButton: `Save for later`,
feedbackLink: `feedback (opens in new tab)`,
pageSlug: `date-of-birth`,
};
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,6 @@ export const defendantNameCapture = {
enterYourLastNameErrorMessage: `Enter your last name`,
enterFirstNameMaxLengthErrorMessage: `First name must be 60 characters or less`,
enterLastNameMaxLengthErrorMessage: `Last name must be 60 characters or less`,
feedbackLink: `feedback (opens in new tab)`,
pageSlug: `defendant-name-capture`,
};
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,6 @@ export const defendantNameConfirmation = {
enterYourLastNameErrorMessage: `Enter your last name`,
enterFirstNameMaxLengthErrorMessage: `First name must be 60 characters or less`,
enterLastNameMaxLengthErrorMessage: `Last name must be 60 characters or less`,
feedbackLink: `feedback (opens in new tab)`,
pageSlug: `defendant-name-confirmation`,
};
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ export const disputeClaimInterstitial = {
cancelLink: `Cancel`,
cymraegLink: `Cymraeg`,
backLink: `Back`,
feedbackLink: `feedback (opens in new tab)`,
pageSlug: `dispute-claim-interstitial`,
};
9 changes: 9 additions & 0 deletions src/test/ui/data/page-data/feedback.page.data.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export const feedback = {
finishSurveyButton: `Finish Survey`,
tellUsWhatYouThinkParagraph: `Tell us what you think!`,
weReallyAppreciateYourFeedbackParagraph: `We'd really appreciate your feedback, but please note, you will not receive a reply to comments left here`,
ifYouHaveAProblemParagraph: `If you have a problem that needs a response, please contact us on;`,
telephoneNumberParagraph: `Phone: [telephone number tbc] (Opening times Monday to Friday, XXam to XXpm)`,
emailParagraph: `Email: [email TBC] (We aim to respond within 10 working days)`,
pleaseLeaveYourFeedbackHeader: `Please leave your feedback in the space below (make sure you do not include any personal or financial details).`,
};
2 changes: 2 additions & 0 deletions src/test/ui/data/page-data/freeLegalAdvice.page.data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,6 @@ export const freeLegalAdvice = {
backLink: `Back`,
youMustSayAboutFreeLegalAdviceErrorMessage: `You must say if you've had any free legal advice`,
thereIsAProblemErrorMessageHeader: `There is a problem`,
feedbackLink: `feedback (opens in new tab)`,
pageSlug: `free-legal-advice`,
};
1 change: 1 addition & 0 deletions src/test/ui/data/page-data/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ export * from './tenancyDateDetails.page.data';
export * from './dashboard.page.data';
export * from './landlordLicensed.page.data';
export * from './writtenTerms.page.data';
export * from './feedback.page.data';
2 changes: 2 additions & 0 deletions src/test/ui/data/page-data/landlordLicensed.page.data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ export const landlordLicensed = {
cymraegLink: `Cymraeg`,
thereIsAProblemErrorMessageHeader: `There is a problem`,
selectIfYouAgreeWithLandlordsClaimLicensedErrorMessage: `Select if you agree with the landlord’s claim to be licensed`,
feedbackLink: `feedback (opens in new tab)`,
pageSlug: `landlord-licensed`,
};
2 changes: 2 additions & 0 deletions src/test/ui/data/page-data/landlordRegistered.page.data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ export const landlordRegistered = {
cymraegLink: `Cymraeg`,
thereIsAProblemErrorMessageHeader: `There is a problem`,
selectIfYouAgreeWithLandlordsClaimRegisteredErrorMessage: `Select if you agree with the landlord’s claim to be registered`,
feedbackLink: `feedback (opens in new tab)`,
pageSlug: `landlord-registered`,
};
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,6 @@ export const noticeDateWhenNotProvided = {
signOutLink: `Sign out`,
thereIsAProblemErrorMessageHeader: `There is a problem`,
theDateYouReceiveNoticeErrorMessage: `The date you received notice must either be today’s date or in the past`,
feedbackLink: `feedback (opens in new tab)`,
pageSlug: `confirmation-of-notice-date-when-not-provided`,
};
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ export const noticeDateWhenProvided = {
signOutLink: `Sign out`,
thereIsAProblemErrorMessageHeader: `There is a problem`,
theDateYouReceiveNoticeErrorMessage: `The date you received notice must either be today’s date or in the past`,
feedbackLink: `feedback (opens in new tab)`,
pageSlug: `confirmation-of-notice-date-when-provided`,
};

export function convertDateFormat(dateString: string): string {
Expand Down
2 changes: 2 additions & 0 deletions src/test/ui/data/page-data/paymentInterstitial.page.data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@ export const paymentInterstitial = {
continueButton: `Continue`,
cancelLink: `Cancel`,
backLink: `Back`,
feedbackLink: `feedback (opens in new tab)`,
pageSlug: `payment-interstitial`,
};
2 changes: 2 additions & 0 deletions src/test/ui/data/page-data/repaymentsMade.page.data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,6 @@ export const repaymentsMade = {
mustBeUnderCharacterLimitErrorMessage: `Must be 500 characters or fewer`,
saveForLaterButton: `Save for later`,
backLink: `Back`,
feedbackLink: `feedback (opens in new tab)`,
pageSlug: `repayments-made`,
};
2 changes: 2 additions & 0 deletions src/test/ui/data/page-data/startNow.page.data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,6 @@ export const startNow = {
contactUsForHelpText: `Contact us for help`,
backLink: `Back`,
cymraegLink: `Cymraeg`,
feedbackLink: `feedback (opens in new tab)`,
pageSlug: `start-now`,
};
2 changes: 2 additions & 0 deletions src/test/ui/data/page-data/tenancyDateDetails.page.data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ export const tenancyDateDetails = {
monthMissingErrorMessage: `Your tenancy start date must include a month`,
yearMissingErrorMessage: `Your tenancy start date must include a year`,
futureDateErrorMessage: `Tenancy start date must be in the past`,
feedbackLink: `feedback (opens in new tab)`,
pageSlug: `tenancy-date-details`,
};

export function convertDateFormatTenancyDate(dateString: string): string {
Expand Down
2 changes: 2 additions & 0 deletions src/test/ui/data/page-data/tenancyDateUnknown.page.data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ export const tenancyDateUnknown = {
yearMissingErrorMessage: 'Your tenancy start date must include a year',
realDateErrorMessage: 'Tenancy start date must be a real date',
backLink: 'Back',
feedbackLink: `feedback (opens in new tab)`,
pageSlug: `tenancy-date-unknown`,
};
1 change: 1 addition & 0 deletions src/test/ui/e2eTest/respondToClaimWales.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const home_url = config.get('e2e.testUrl') as string;
test.beforeEach(async ({ page }) => {
initializeExecutor(page);
process.env.WALES_POSTCODE = 'YES';
process.env.CLAIMANT_NAME = submitCaseApiDataWales.submitCasePayload.claimantName;
await performAction('createCaseAPI', { data: createCaseApiWalesData.createCasePayload });
await performAction('submitCaseAPI', { data: submitCaseApiDataWales.submitCasePayload });
await performAction('fetchPINsAPI');
Expand Down
6 changes: 5 additions & 1 deletion src/test/ui/functional/confirmationOfNoticeGiven.pft.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { submitCaseApiData } from '../data/api-data';
import { confirmationOfNoticeGiven, dashboard, tenancyDateUnknown } from '../data/page-data';
import { confirmationOfNoticeGiven, dashboard, feedback, tenancyDateUnknown } from '../data/page-data';
import { performAction, performValidation } from '../utils/controller';

let claimantName = '';
Expand All @@ -19,6 +19,10 @@ export async function confirmationOfNoticeGivenErrorValidation(): Promise<void>
}

export async function confirmationOfNoticeGivenNavigationTests(): Promise<void> {
await performValidation('pageNavigation', confirmationOfNoticeGiven.feedbackLink, {
element: feedback.tellUsWhatYouThinkParagraph,
pageSlug: confirmationOfNoticeGiven.pageSlug,
});
await performValidation('pageNavigation', confirmationOfNoticeGiven.backLink, tenancyDateUnknown.mainHeader);
await performAction('clickRadioButton', confirmationOfNoticeGiven.yesRadioOption);
await performValidation('pageNavigation', confirmationOfNoticeGiven.saveForLaterButton, dashboard.mainHeader);
Expand Down
16 changes: 11 additions & 5 deletions src/test/ui/functional/contactPreferenceEmailOrPost.pft.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { contactPreferenceEmailOrPost } from '../data/page-data';
import { contactPreferenceEmailOrPost, feedback } from '../data/page-data';
import { performAction, performValidation } from '../utils/controller';

export async function contactPreferenceEmailOrPostErrorValidation(): Promise<void> {
Expand Down Expand Up @@ -85,9 +85,14 @@ export async function contactPreferenceEmailOrPostErrorValidation(): Promise<voi
message: contactPreferenceEmailOrPost.invalidEmailAddressErrorMessage,
});
}
//--The below method is commented out as we have an open bug - HDPI-5396
/*export async function contactPreferenceEmailOrPostNavigationTests(): Promise<void> {
if (process.env.CORRESPONDENCE_ADDRESS === 'UNKNOWN') {

export async function contactPreferenceEmailOrPostNavigationTests(): Promise<void> {
await performValidation('pageNavigation', contactPreferenceEmailOrPost.feedbackLink, {
element: feedback.tellUsWhatYouThinkParagraph,
pageSlug: contactPreferenceEmailOrPost.pageSlug,
});
//--The below line is commented out as we have an open bug - HDPI-5396
/*if (process.env.CORRESPONDENCE_ADDRESS === 'UNKNOWN') {
await performValidation(
'pageNavigation',
contactPreferenceEmailOrPost.backLink,
Expand All @@ -102,4 +107,5 @@ export async function contactPreferenceEmailOrPostErrorValidation(): Promise<voi
}
await performAction('clickRadioButton', contactPreferenceEmailOrPost.byPostRadioOption);
await performValidation('pageNavigation', contactPreferenceEmailOrPost.saveForLaterButton, dashboard.mainHeader);
}*/
*/
}
6 changes: 5 additions & 1 deletion src/test/ui/functional/contactPreferencesTelephone.pft.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { contactPreferenceEmailOrPost, contactPreferencesTelephone, dashboard } from '../data/page-data';
import { contactPreferenceEmailOrPost, contactPreferencesTelephone, dashboard, feedback } from '../data/page-data';
import { performAction, performValidation } from '../utils/controller';

export async function contactPreferencesTelephoneErrorValidation(): Promise<void> {
Expand Down Expand Up @@ -46,6 +46,10 @@ export async function contactPreferencesTelephoneErrorValidation(): Promise<void
}

export async function contactPreferencesTelephoneNavigationTests(): Promise<void> {
await performValidation('pageNavigation', contactPreferencesTelephone.feedbackLink, {
element: feedback.tellUsWhatYouThinkParagraph,
pageSlug: contactPreferencesTelephone.pageSlug,
});
await performValidation(
'pageNavigation',
contactPreferencesTelephone.backLink,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { contactPreferencesTelephone, contactPreferencesTextMessage, dashboard } from '../data/page-data';
import { contactPreferencesTelephone, contactPreferencesTextMessage, dashboard, feedback } from '../data/page-data';
import { performAction, performValidation } from '../utils/controller';

export async function contactPreferencesTextMessageErrorValidation(): Promise<void> {
Expand All @@ -10,6 +10,10 @@ export async function contactPreferencesTextMessageErrorValidation(): Promise<vo
}

export async function contactPreferencesTextMessageNavigationTests(): Promise<void> {
await performValidation('pageNavigation', contactPreferencesTextMessage.feedbackLink, {
element: feedback.tellUsWhatYouThinkParagraph,
pageSlug: contactPreferencesTextMessage.pageSlug,
});
await performValidation(
'pageNavigation',
contactPreferencesTextMessage.backLink,
Expand Down
6 changes: 5 additions & 1 deletion src/test/ui/functional/dateOfBirth.pft.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import { dashboard, dateOfBirth, defendantNameCapture } from '../data/page-data';
import { dashboard, dateOfBirth, defendantNameCapture, feedback } from '../data/page-data';
import { performValidation } from '../utils/controller';

export async function dateOfBirthNavigationTests(): Promise<void> {
await performValidation('pageNavigation', dateOfBirth.feedbackLink, {
element: feedback.tellUsWhatYouThinkParagraph,
pageSlug: dateOfBirth.pageSlug,
});
await performValidation('pageNavigation', dateOfBirth.backLink, defendantNameCapture.mainHeader);
await performValidation('pageNavigation', dateOfBirth.saveForLaterButton, dashboard.mainHeader);
}
6 changes: 5 additions & 1 deletion src/test/ui/functional/defendantNameCapture.pft.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { dashboard, defendantNameCapture, freeLegalAdvice } from '../data/page-data';
import { dashboard, defendantNameCapture, feedback, freeLegalAdvice } from '../data/page-data';
import { performAction, performValidation } from '../utils/controller';

const overMaxLengthString = 'A'.repeat(61);
Expand Down Expand Up @@ -33,6 +33,10 @@ export async function defendantNameCaptureErrorValidation(): Promise<void> {
});
}
export async function defendantNameCaptureNavigationTests(): Promise<void> {
await performValidation('pageNavigation', defendantNameCapture.feedbackLink, {
element: feedback.tellUsWhatYouThinkParagraph,
pageSlug: defendantNameCapture.pageSlug,
});
await performValidation('pageNavigation', defendantNameCapture.backLink, freeLegalAdvice.mainHeader);
await defendantNameCaptureInputValuesPrePopulated();
}
Expand Down
6 changes: 5 additions & 1 deletion src/test/ui/functional/defendantNameConfirmation.pft.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defendantNameConfirmation, freeLegalAdvice } from '../data/page-data';
import { defendantNameConfirmation, feedback, freeLegalAdvice } from '../data/page-data';
import { performAction, performValidation } from '../utils/controller';

import { defendantNameCaptureInputValuesPrePopulated } from './defendantNameCapture.pft';
Expand Down Expand Up @@ -46,6 +46,10 @@ export async function defendantNameConfirmationErrorValidation(): Promise<void>
});
}
export async function defendantNameConfirmationNavigationTests(): Promise<void> {
await performValidation('pageNavigation', defendantNameConfirmation.feedbackLink, {
element: feedback.tellUsWhatYouThinkParagraph,
pageSlug: defendantNameConfirmation.pageSlug,
});
await performValidation('pageNavigation', defendantNameConfirmation.backLink, freeLegalAdvice.mainHeader);
await performAction('clickRadioButton', {
question: defendantNameConfirmation.mainHeader,
Expand Down
Loading
Loading