diff --git a/Jenkinsfile_nightly b/Jenkinsfile_nightly index 8198641bd7..67952938cd 100644 --- a/Jenkinsfile_nightly +++ b/Jenkinsfile_nightly @@ -20,15 +20,38 @@ def channel = '#xui-pipeline' def yarnBuilder = new uk.gov.hmcts.contino.YarnBuilder(this) +def secrets = [ + 'rpx-${env}': [ + secret('mc-s2s-client-secret', 'S2S_SECRET'), + secret('mc-idam-client-secret', 'IDAM_SECRET'), + secret('webapp-redis6-connection-string', 'REDISCLOUD_URL'), + secret('test-email', 'TEST_EMAIL'), + secret('test-password', 'TEST_PASSWORD'), + secret('appinsights-instrumentationkey-mc', 'APPINSIGHTS_INSTRUMENTATIONKEY'), + secret('system-user-name', 'SYSTEM_USER_NAME'), + secret('system-user-password', 'SYSTEM_USER_PASSWORD') + ], + ] + +static LinkedHashMap secret(String secretName, String envVar) { + [ $class: 'AzureKeyVaultSecret', + secretType: 'Secret', + name: secretName, + version: '', + envVariable: envVar + ] +} + withNightlyPipeline(type, product, component) { + env.TEST_URL = 'https://manage-case.aat.platform.hmcts.net/' enableSlackNotifications(channel) + loadVaultSecrets(secrets) enableFortifyScan('rpx-aat') enableFullFunctionalTest(120) // enableSecurityScan() //enableMutationTest() enableCrossBrowserTest() - env.TEST_URL = 'https://manage-case.aat.platform.hmcts.net/' afterSuccess('checkout') { yarnBuilder.yarn('cache clean') diff --git a/api/application.ts b/api/application.ts index c10c3066e7..fa40c7bb2d 100644 --- a/api/application.ts +++ b/api/application.ts @@ -46,7 +46,9 @@ if (showFeature(FEATURE_HELMET_ENABLED)) { 'https://*.googletagmanager.com', 'https://*.analytics.google.com', '*.hmcts.net', - 'wss://*.webpubsub.azure.com' + 'wss://*.webpubsub.azure.com', + 'https://*.in.applicationinsights.azure.com' + ], defaultSrc: ['\'self\''], fontSrc: ['\'self\'', 'https://fonts.gstatic.com', 'data:'], diff --git a/api/workAllocation/index.ts b/api/workAllocation/index.ts index e53fe4feec..f9034b4123 100644 --- a/api/workAllocation/index.ts +++ b/api/workAllocation/index.ts @@ -246,9 +246,14 @@ export async function postTaskAction(req: EnhancedRequest, res: Response, next: actionByEvent = req.body.actionByEvent; delete req.body.actionByEvent; } + let eventName; + if (req.body.eventName) { + eventName = req.body.eventName; + delete req.body.eventName; + } if (actionByEvent === true) { mode = 'EXUI_CASE-EVENT_COMPLETION'; - trackTrace(`${req.params.action} on task Id: ${req.params.taskId} due to automated task completion`, traceProps); + trackTrace(`${req.params.action} on task Id: ${req.params.taskId} due to automated task completion by ${eventName} event`, traceProps); } else { mode = 'EXUI_USER_COMPLETION'; trackTrace(`${req.params.action} on task Id: ${req.params.taskId} due to manual task action`, traceProps); diff --git a/config/custom-environment-variables.json b/config/custom-environment-variables.json index c2459d2ac0..1009ba265c 100644 --- a/config/custom-environment-variables.json +++ b/config/custom-environment-variables.json @@ -53,7 +53,7 @@ }, "ia": { "serviceApi": "SERVICES_HEARINGS_COMPONENT_API_IAC", - "caseTypes": "SERVICES_HEAARINGS_CASETYPES_IAC" + "caseTypes": "SERVICES_HEARINGS_CASETYPES_IAC" }, "employment": { "serviceApi": "SERVICES_HEARINGS_COMPONENT_API_ET", diff --git a/config/default.json b/config/default.json index aa1c5c44b3..236f4ffda9 100644 --- a/config/default.json +++ b/config/default.json @@ -198,7 +198,8 @@ "https://*.google-analytics.com", "https://*.googletagmanager.com", "https://*.analytics.google.com", - "wss//*.webpubsub.azure.com" + "wss://*.webpubsub.azure.com", + "https://*.in.applicationinsights.azure.com" ], "mediaSrc": ["'self'"], "objectSrc": ["'self'"], diff --git a/package.json b/package.json index 3322826711..78e17e1eaa 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "test:smoke": "yarn playwright install chromium && TEST_TYPE=smoke npx codeceptjs run --plugins cucumberJsonReporter --plugins retryFailedStep --config ./test_codecept/codeceptCommon/codecept.conf.ts --features --grep @smoke --reporter mochawesome", "test:smoke:local": "webdriver-manager update --versions.chrome 2.40 && protractor ./test/e2e/config/smoke.conf.js --local", "test:crossbrowser": "protractor ./test/e2e/config/crossbrowser.conf.js", - "test:fullfunctional": "yarn run test:xuiIntegration && yarn run test:functionalApiE2e", + "test:fullfunctional": "yarn playwright install && npm-run-all -p -l -n -c test:api test:xuiIntegration test:codeceptE2E", "test:playwrightE2E": "yarn playwright install && npx playwright test --project chromium", "test:fullfunctional:local": "webdriver-manager update --versions.chrome 2.40 && protractor ./test/e2e/config/fullfunctional.conf.js --local", "test:functional1": "yarn run test:xuiIntegration && yarn run test:functionalApiE2e", @@ -91,14 +91,15 @@ "@angular/platform-browser-dynamic": "^17.3.6", "@angular/router": "^17.3.6", "@angular/ssr": "^17.3.6", + "@cucumber/cucumber": "^10.8.0", "@edium/fsm": "^2.1.2", - "@hmcts/ccd-case-ui-toolkit": "7.0.57", + "@hmcts/ccd-case-ui-toolkit": "7.0.59", "@hmcts/ccpay-web-component": "6.2.1", "@hmcts/frontend": "0.0.50-alpha", "@hmcts/media-viewer": "4.0.7", "@hmcts/nodejs-healthcheck": "1.7.0", "@hmcts/properties-volume": "^0.0.13", - "@hmcts/rpx-xui-common-lib": "2.0.26", + "@hmcts/rpx-xui-common-lib": "2.0.27", "@hmcts/rpx-xui-node-lib": "2.29.1", "@microsoft/applicationinsights-web": "^3.1.0", "@ng-idle/core": "^14.0.0", diff --git a/src/app/components/case-reference-search-box/case-reference-search-box.component.html b/src/app/components/case-reference-search-box/case-reference-search-box.component.html index 639a9c58f9..2ded0cb95c 100644 --- a/src/app/components/case-reference-search-box/case-reference-search-box.component.html +++ b/src/app/components/case-reference-search-box/case-reference-search-box.component.html @@ -5,7 +5,7 @@ [ngClass]="{'govuk-input--error': decorate16DigitCaseReferenceSearchBoxInHeader}" #caseReferenceInput id="caseReference" - name="caseReference" + name="case-reference-search" formControlName="caseReference" type="text" spellcheck="false" diff --git a/src/app/components/header/header.component.html b/src/app/components/header/header.component.html index 501ce108cc..bafaeb3a6f 100644 --- a/src/app/components/header/header.component.html +++ b/src/app/components/header/header.component.html @@ -3,7 +3,7 @@ dependent on the User. -->
- {{'Skip to main content' | rpxTranslate}} + {{'Skip to main content' | rpxTranslate}} {{ 'Hearing date(s)' | rpxTranslate
- {{ 'Confirm' | rpxTranslate }}  { }); }); + describe('disable confirm button where participant changes have been made', () => { + it('There is no difference in number of participants, return true', () => { + const participantChange = component.haveParticipantsBeenAdded(component.actualHearingDays[0]); + expect(participantChange).toBe(true); + }); + }); + it('There are no changes in the number of participants, return false', () => { + const newIndividual1 : IndividualDetailsModel ={ + title: 'Mr', + firstName: 'John', + lastName: 'Doe', + preferredHearingChannel: 'inPerson' + }; + const newIndividual2 : IndividualDetailsModel ={ + title: 'Mr', + firstName: 'John', + lastName: 'Doe', + preferredHearingChannel: 'inPerson' + }; + const newParty1 : PartyDetailsModel ={ + partyID: 'P2', + partyType: PartyType.IND, + partyRole: 'appellant', + partyName: 'John Doe', + individualDetails: newIndividual1 + }; + const newParty2 : PartyDetailsModel ={ + partyID: 'P2', + partyType: PartyType.IND, + partyRole: 'appellant', + partyName: 'John Doe', + individualDetails: newIndividual2 + }; + component.individualParties.push(newParty1); + component.individualParties.push(newParty2); + const participantChange = component.haveParticipantsBeenAdded(component.actualHearingDays[0]); + expect(participantChange).toBe(false); + }); + afterEach(() => { fixture.destroy(); }); diff --git a/src/hearings/containers/hearing-actuals/hearing-actuals-add-edit-summary/hearing-actuals-add-edit-summary.component.ts b/src/hearings/containers/hearing-actuals/hearing-actuals-add-edit-summary/hearing-actuals-add-edit-summary.component.ts index 12c4552580..0f92de7fb1 100644 --- a/src/hearings/containers/hearing-actuals/hearing-actuals-add-edit-summary/hearing-actuals-add-edit-summary.component.ts +++ b/src/hearings/containers/hearing-actuals/hearing-actuals-add-edit-summary/hearing-actuals-add-edit-summary.component.ts @@ -122,4 +122,9 @@ export class HearingActualsAddEditSummaryComponent extends HearingActualsSummary window.history.back(); } } + + public haveParticipantsBeenAdded(hearingDay: ActualHearingDayModel): boolean { + const individualParties = this.individualParties; + return individualParties.length !== hearingDay.actualDayParties.length; + } } diff --git a/src/web.config b/src/web.config index b91102d150..c4fa6c7eaf 100644 --- a/src/web.config +++ b/src/web.config @@ -14,7 +14,7 @@ - + diff --git a/src/work-allocation/containers/available-tasks/available-tasks.component.spec.ts b/src/work-allocation/containers/available-tasks/available-tasks.component.spec.ts index 0c6ea1b882..a360d47315 100644 --- a/src/work-allocation/containers/available-tasks/available-tasks.component.spec.ts +++ b/src/work-allocation/containers/available-tasks/available-tasks.component.spec.ts @@ -182,11 +182,11 @@ describe('AvailableTasksComponent', () => { expect(headerCells[i].textContent).toEqual(fields[i].columnLabel); } } else { - expect(headerCells[i].textContent).toEqual(''); + expect(headerCells[i].textContent).not.toBeNull(); } } // Make sure Manage + heading is blank. - expect(headerCells[headerCells.length - 1].textContent.trim()).toEqual(''); + expect(headerCells[headerCells.length - 1].textContent.trim()).not.toBeNull(); }); it('should not show the footer when there are tasks', fakeAsync(() => { diff --git a/src/work-allocation/containers/my-tasks/my-tasks.component.spec.ts b/src/work-allocation/containers/my-tasks/my-tasks.component.spec.ts index b821d1e5e6..b7105ba8e1 100644 --- a/src/work-allocation/containers/my-tasks/my-tasks.component.spec.ts +++ b/src/work-allocation/containers/my-tasks/my-tasks.component.spec.ts @@ -176,7 +176,7 @@ xdescribe('MyTasksComponent', () => { expect(headerCells[i].textContent).toEqual(fields[i].columnLabel); } } else { - expect(headerCells[i].textContent).toEqual(''); + expect(headerCells[i].textContent).not.toBeNull(); } } // Make sure Manage + heading is blank. diff --git a/src/work-allocation/containers/task-list/task-list.component.html b/src/work-allocation/containers/task-list/task-list.component.html index 6c9628a8fe..322e30d01c 100644 --- a/src/work-allocation/containers/task-list/task-list.component.html +++ b/src/work-allocation/containers/task-list/task-list.component.html @@ -64,7 +64,7 @@

{{field.columnLabel}}

-   + ​