-
Notifications
You must be signed in to change notification settings - Fork 2
HDPI-6501-Caseworker-Review-Dates-Automation #2219
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
PadmaDeenadayalan
merged 16 commits into
HDPI-6501-caseworker-review-dates
from
HDPI-6501-Caseworker-Review-Dates-Automation
Jul 22, 2026
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
8895275
HDPI-6501-Automation-EXUI-CaseWorker-ReviewDates
bd50702
Merge branch 'HDPI-6501-caseworker-review-dates' into HDPI-6501-Casew…
PadmaDeenadayalan e668b66
updated the error validations
ccc1d2f
Merge remote-tracking branch 'origin/HDPI-6501-Caseworker-Review-Date…
6fe58d1
updated the error validations
bf95adf
Merge branch 'HDPI-6501-caseworker-review-dates' into HDPI-6501-Casew…
PadmaDeenadayalan 375e977
updated the error validations
5d058a6
Merge remote-tracking branch 'origin/HDPI-6501-Caseworker-Review-Date…
ad12103
updated the error validations
91b657a
Updated the files for validations
86ca831
Merge branch 'HDPI-6501-caseworker-review-dates' into HDPI-6501-Casew…
PadmaDeenadayalan d1a9779
Updated the files for validations
50d6196
Merge branch 'HDPI-6501-caseworker-review-dates' into HDPI-6501-Casew…
PadmaDeenadayalan 5103606
Merge branch 'HDPI-6501-caseworker-review-dates' into HDPI-6501-Casew…
PadmaDeenadayalan fcaae5a
Merge branch 'HDPI-6501-caseworker-review-dates' into HDPI-6501-Casew…
PadmaDeenadayalan 06f312e
Merge branch 'HDPI-6501-caseworker-review-dates' into HDPI-6501-Casew…
PadmaDeenadayalan 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
46 changes: 46 additions & 0 deletions
46
src/e2eTest/data/page-data-figma/page-data-caseManagement-figma/addReviewDates.page.data.ts
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,46 @@ | ||
| export const addReviewDates = { | ||
| mainHeader: `Review dates`, | ||
| addReviewDateHintText: `Add review date`, | ||
| reviewDateSubHeader: `Review date`, | ||
| addNewButton:`Add new`, | ||
| dateOfReviewHiddenLabel: `Date of review`, | ||
| dayHiddenTextLabel: `Day`, | ||
| monthHiddenTextLabel: `Month`, | ||
| yearHiddenTextLabel: `Year`, | ||
| reasonHiddenLabel: `Reason`, | ||
| unlessOrderHiddenRadioOption:`Unless order`, | ||
| StayCaseHiddenRadioOption: `Stay a case`, | ||
| liftStayHiddenRadioOption: `Lift a stay`, | ||
| dismissCaseHiddenRadioOption: `Dismiss case`, | ||
| generalOrderHiddenRadioOption: `General order`, | ||
| OtherHiddenRadioOption: `Other`, | ||
| descriptionHiddenTextLabel: `Description of review`, | ||
| youCanEnterUpToHiddenHintText: `You can enter up to 500 characters`, | ||
| removeHiddenButton:`Remove`, | ||
| continueButton: `Continue`, | ||
| previousButton: `Previous`, | ||
| cancelLink: `Cancel`, | ||
| dayInputText :`20`, | ||
| monthInputText :`12`, | ||
| yearInputText :`2030`, | ||
| descriptionTextInput:`50`, | ||
| errorValidation: `YES`, | ||
| eventCouldNotBeCreatedErrorMessageHeader: `The event could not be created`, | ||
| thereIsProbErrorMessageHeader: `There is a problem`, | ||
| errorValidationType: { one: `textField`, two: `radioOptions`, three: `checkBox`, four: `dropDown`, five: `dateField`, six: `dateRadioOption` }, | ||
| errorValidationField: { | ||
| errorDateField: [ | ||
| { type: `empty`, input: `empty`, errMessage: `Date of review is required`,errInlineMessage: `Date of review is required`}, | ||
| { type: `invalid`, input: `invalid`, errMessage: `Date of review is not valid`, errInlineMessage: `The data entered is not valid for Date of review`}, | ||
| ], | ||
| errorRadioOption: [ | ||
| { type: `none`, input: ``, errMessage: `Reason is required`,errInlineMessage: `Reason is required` } | ||
| ], | ||
| errorTextField: [ | ||
| { type: `none`, input: ``, errMessage: `Description of review is required` }, | ||
| ], | ||
| errorDateRadioOption: [ | ||
| {type: `Max`, input: `510`, errMessage: `In ‘Description of review’, you have entered more than the maximum number of characters (500)`} | ||
| ] | ||
| }, | ||
| }; |
7 changes: 7 additions & 0 deletions
7
...age-data-figma/page-data-caseManagement-figma/checkYourAnswersAddReviewDates.page.data.ts
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,7 @@ | ||
| export const checkYourAnswersAddReviewDates = { | ||
| mainHeader: `Add review date`, | ||
| cyaHeader: `Check your answers`, | ||
| submitButton: `Submit`, | ||
| previousButton: `Previous`, | ||
| cancelLink: `Cancel`, | ||
| }; |
7 changes: 7 additions & 0 deletions
7
.../data/page-data-figma/page-data-caseManagement-figma/confirmReviewDatesAdded.page.data.ts
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,7 @@ | ||
| export const confirmReviewDatesAdded = { | ||
| mainHeader: `Add review date`, | ||
| reviewDatesAdded: `Review dates added`, | ||
| whatHappensNextHeader: `What happens next`, | ||
| theCaseWillParagraph: `Work allocation tasks will be created for court staff to complete on the review dates.`, | ||
| closeAndReturnToCaseOverviewButton: `Close and Return to case details`, | ||
| }; |
5 changes: 4 additions & 1 deletion
5
src/e2eTest/data/page-data-figma/page-data-caseManagement-figma/index.ts
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,5 +1,8 @@ | ||
| export * from './selectDocument.page.data'; | ||
| export * from './amendDocumentDetails.page.data'; | ||
| export * from './addReviewDates.page.data'; | ||
| export * from './checkYourAnswersAddReviewDates.page.data' | ||
| export * from './confirmReviewDatesAdded.page.data' | ||
| export * from './changeCaseState.page.data'; | ||
| export * from './checkYourAnswersChangeState.page.data'; | ||
| export * from './confirmCaseStateChange.page.data'; | ||
| export * from './confirmCaseStateChange.page.data'; |
5 changes: 4 additions & 1 deletion
5
src/e2eTest/data/page-data-figma/page-data-caseManagement-figma/urlToFileMappingCM.ts
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,5 +1,8 @@ | ||
| export default { | ||
| 'amendDocumentsselectDocument': 'selectDocument', | ||
| 'addCaseReviewDateaddCaseReviewDate': 'addReviewDates', | ||
| 'addCaseReviewDate/submit' : 'checkYourAnswersAddReviewDates', | ||
| 'addCaseReviewDate/confirm': 'confirmReviewDatesAdded', | ||
| 'changeCaseStatechangeCaseStatePage': 'changeCaseState', | ||
| 'changeCaseState/confirm': 'confirmCaseStateChange' | ||
| }; | ||
| }; |
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
56 changes: 56 additions & 0 deletions
56
src/e2eTest/tests/test-caseManagement/caseManagement.addReviewDates.spec.ts
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,56 @@ | ||
| import { createCaseApiData, submitCaseApiData } from '@data/api-data'; | ||
| import {initializeExecutor, performValidation} from '@utils/controller'; | ||
| import test from '@playwright/test'; | ||
| import { caseInfo } from '@utils/actions/custom-actions'; | ||
| import { PageContentValidation } from '@utils/validations/element-validations/pageContent.validation'; | ||
| import { caseSummary, user } from '@data/page-data'; | ||
| import { dismissCookieBanner } from '@config/cookie-banner'; | ||
| import { initializeCMExecutor, performAction } from '@utils/controller-caseManagement'; | ||
| import {addReviewDates, checkYourAnswersAddReviewDates} from "@data/page-data-figma/page-data-caseManagement-figma"; | ||
|
|
||
|
|
||
| test.use({ storageState: undefined }) | ||
|
|
||
| test.beforeEach(async ({ page, context }) => { | ||
| await context.clearCookies(); | ||
| initializeExecutor(page); | ||
| initializeCMExecutor(page); | ||
| await performAction('createCaseAPI', { data: createCaseApiData.createCasePayload }); | ||
| await performAction('submitCaseAPI', { data: submitCaseApiData.submitCasePayloadCaseFileView }); | ||
| console.log(`Case created with case number: ${process.env.CASE_NUMBER}`); | ||
| await performAction('updatePaymentAPI'); | ||
| await performAction('getCaseAPI', 'Link Solicitor'); | ||
| await performAction('navigateToUrl', process.env.MANAGE_CASE_BASE_URL); | ||
| await dismissCookieBanner(page, 'additional'); | ||
| await performAction('login', user.staffAdmin); | ||
| await dismissCookieBanner(page, 'analytics'); | ||
| await performAction('navigateToSummaryPage'); | ||
| }); | ||
|
|
||
| test.afterEach(async () => { | ||
| if (caseInfo.id) { | ||
| await performAction('deleteCaseRole', '[CLAIMANTSOLICITOR]'); | ||
| } | ||
| PageContentValidation.finaliseTest(); | ||
|
|
||
| }); | ||
|
|
||
| test.describe('Case management - Case Worker Add Review date @nightly', async () => { | ||
| test('Case management - Case Worker Add Review Date @CM @regression', async () => { | ||
| await performAction('selectAnEvent', { eventType: caseSummary.addReviewDates }); | ||
| await performValidation('mainHeader', addReviewDates.mainHeader); | ||
| await performAction('clickButton', addReviewDates.addNewButton); | ||
| await performAction('errorValidationAddReviewDatesPage', addReviewDates.errorValidation); | ||
| await performAction('addReviewDates', { | ||
| day: addReviewDates.dayHiddenTextLabel, | ||
| month: addReviewDates.monthHiddenTextLabel, | ||
| year: addReviewDates.yearHiddenTextLabel, | ||
| question: addReviewDates.reasonHiddenLabel, option: addReviewDates.dismissCaseHiddenRadioOption, | ||
| label: addReviewDates.descriptionHiddenTextLabel, userInput: addReviewDates.descriptionTextInput, | ||
| nextPage: checkYourAnswersAddReviewDates.mainHeader | ||
| }); | ||
| await performAction('clickButton', checkYourAnswersAddReviewDates.submitButton); | ||
| await performAction('confirmReviewDatesAdded'); | ||
| await performValidation('bannerAlert', 'Case #.* has been updated with event: Add review date'); | ||
| }); | ||
| }); |
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.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need these manual validations since we have auto content validation?