generated from hmcts/expressjs-template
-
Notifications
You must be signed in to change notification settings - Fork 2
HDPI-3519: added page url tracking for feedback link #959
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
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 37dc1c7
test: fix failing tests
paddy-hmcts cd8cd6b
Merge branch 'master' into HDPI-3519-unique-feedback-links
paddy-hmcts 4a7fb86
fix: leading slash present, not required as per jira
paddy-hmcts b4ae927
Merge branch 'master' into HDPI-3519-unique-feedback-links
paddy-hmcts 4448a5f
Merge branch 'master' into HDPI-3519-unique-feedback-links
PadmaDeenadayalan 7b0540d
Merge branch 'master' into HDPI-3519-unique-feedback-links
paddy-hmcts e2cbcd3
Merge branch 'master' into HDPI-3519-unique-feedback-links
jessieharrigan d1303ff
HDPI-3519 -Automation Unique feedback Links
dff3d07
Merge branch 'master' into HDPI-3519-Automation-unique-feedback-links
PadmaDeenadayalan c986843
fixed lint fix
662c3c0
Merge branch 'master' into HDPI-3519-Automation-unique-feedback-links
PadmaDeenadayalan 311cb1e
updated the files
88234bf
Merge branch 'master' into HDPI-3519-unique-feedback-links
Gautham059 103769b
updated start now pft file
a460f64
updated start now pft file
3814e25
Added support for feedback page validation
Gautham059 a28a609
updated the page data files and PFT files for feedback link validations
c2ebbe6
Merge branch 'HDPI-3519-unique-feedback-links' into HDPI-3519-Automat…
PadmaDeenadayalan 4ec6350
Testing page navigation
Gautham059 c922e89
added debug
Gautham059 dd09b84
lint fix
Gautham059 0460326
Navigation fix - 2
Gautham059 6993a8e
lint fix
Gautham059 fb61729
Navigation fix - 3
Gautham059 36cdd1d
Merge branch 'master' into HDPI-3519-unique-feedback-links
Gautham059 845fed5
Merge branch 'HDPI-3519-unique-feedback-links' into HDPI-3519-Automat…
Gautham059 de72932
Navigation fix - 4
Gautham059 10e061f
title changed
Gautham059 f5caf6e
Relocated feedback link logic
Gautham059 6239f18
updated the page data files
337e866
Merge branch 'master' into HDPI-3519-unique-feedback-links
Gautham059 94f9b50
Merge remote-tracking branch 'origin/HDPI-3519-unique-feedback-links'…
b0b3130
resolved the conflicts and updated the feedback link validation for n…
4946212
removed feedbackParagraph key
000cc75
Merge branch 'master' into HDPI-3519-unique-feedback-links
PadmaDeenadayalan 77bacae
Merge branch 'HDPI-3519-unique-feedback-links' into HDPI-3519-Automat…
PadmaDeenadayalan 7af81cd
Merge pull request #981 from hmcts/HDPI-3519-Automation-unique-feedba…
PadmaDeenadayalan 64293ec
fix: cve issues
paddy-hmcts 45a822f
fix: resolve merge conflicts in date validation and error handling
paddy-hmcts a4ef03e
fix: cve issues
paddy-hmcts ffd5dbf
Merge branch 'master' into HDPI-3519-unique-feedback-links
PadmaDeenadayalan 9290b0d
updated the changes as per the tenancyTypeDetails files
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,3 @@ | ||
| export * from './oidc'; | ||
| export * from './caseReference'; | ||
| export * from './pageTrackingUrl'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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; | ||
paddy-hmcts marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| next(); | ||
| }; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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).`, | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.