From e28f4c7656e4b2f6de3cf8c0ae4a441d8718f07a Mon Sep 17 00:00:00 2001 From: Josh-HMCTS <128602796+Josh-HMCTS@users.noreply.github.com> Date: Thu, 15 Aug 2024 09:47:26 +0100 Subject: [PATCH 1/6] EXUI-2100 - Nightly pipeline (#3811) * change nightly pipeline command * Update nightly jenkinsfile to include secrets * add logs, udpate jenkins nightly * Update step to install playwright * remove added logging * Change defTimeoutImport * revert timeout change * Add new ver of cucumber, update tests in old test folder to be used in crossbrowser tests * set correct commonlib ver --------- Co-authored-by: RiteshHMCTS <74713687+RiteshHMCTS@users.noreply.github.com> Co-authored-by: Dan Lysiak <50049163+danlysiak@users.noreply.github.com> --- Jenkinsfile_nightly | 25 +- package.json | 3 +- test/e2e/config/appTestConfig.js | 4 +- test/e2e/config/conf.js | 2 +- test/e2e/config/crossbrowser.conf.js | 56 +-- test/e2e/config/fullfunctional.conf.js | 2 +- test/e2e/config/functional.conf.js | 2 +- test/e2e/config/smoke.conf.js | 2 +- test/e2e/features/app/loginLogout.feature | 55 ++- test/e2e/features/pageObjects/caseEditPage.js | 2 +- .../pageObjects/loginLogoutObjects.js | 2 +- .../step_definitions/browser.steps.js | 5 +- .../specificAccess.steps.js | 5 +- .../step_definitions/caseDetails.steps.js | 5 +- .../step_definitions/caseDetailsPage.steps.js | 5 +- .../step_definitions/caseList.steps.js | 5 +- .../step_definitions/caseManager.steps.js | 5 +- .../checkFunctionalities.steps.js | 5 +- .../step_definitions/cookieBanner.steps.js | 5 +- .../step_definitions/createCase.steps.js | 5 +- .../step_definitions/errorPage.steps.js | 4 +- .../step_definitions/errorValidation.steps.js | 5 +- .../globalSearchPage.steps.js | 4 +- .../hearingRecordingsCase.steps.js | 5 +- .../step_definitions/ldService.steps.js | 6 +- .../step_definitions/loginLogout.steps.js | 43 +-- .../navigationHeader.steps.js | 5 +- .../step_definitions/referenceValues.steps.js | 5 +- .../step_definitions/refunds.steps.js | 4 +- .../step_definitions/searchCase.steps.js | 335 +++++++++--------- .../step_definitions/shareCase.steps.js | 161 +++++---- .../shareCaseCheckAndConfirm.steps.js | 5 +- .../step_definitions/support.steps.js | 5 +- .../step_definitions/testCaseType.steps.js | 5 +- .../step_definitions/timestamp.steps.js | 5 +- .../workAccessPage.steps.js | 2 +- .../workallocation/allocateRoles.steps.js | 5 +- .../workallocation/allworkPage.steps.js | 5 +- .../caseDetailsTasksTab.steps.js | 6 +- .../workallocation/caseRolesAccess.steps.js | 5 +- .../workallocation/checkYourAnswers.steps.js | 5 +- .../workallocation/common.steps.js | 5 +- .../workallocation/exclusion.steps.js | 5 +- .../workallocation/findPerson.steps.js | 5 +- .../workallocation/myCases.steps.js | 5 +- .../workallocation/selectRoleType.steps.js | 5 +- .../taskEventCompletion.steps.js | 5 +- .../workallocation/tasksCasesTable.steps.js | 5 +- .../workallocation/workFilter.steps.js | 5 +- .../workallocation/workallocation.steps.js | 5 +- .../workallocation/workallocation2.steps.js | 5 +- .../step_definitions/workflow.steps.js | 5 +- test/e2e/support/timeout.js | 2 +- test/e2e/support/world.js | 2 +- test/e2e/utils/ccdApi.js | 2 +- yarn-audit-known-issues | 2 +- yarn.lock | 263 +++++++++++++- 57 files changed, 664 insertions(+), 487 deletions(-) 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/package.json b/package.json index 3322826711..ed26820dcc 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,6 +91,7 @@ "@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/ccpay-web-component": "6.2.1", diff --git a/test/e2e/config/appTestConfig.js b/test/e2e/config/appTestConfig.js index a320df81ba..ee13c93242 100644 --- a/test/e2e/config/appTestConfig.js +++ b/test/e2e/config/appTestConfig.js @@ -20,7 +20,7 @@ const data = { aat: [ { idamId: '12b6a360-7f19-4985-b065-94320a891eaa', - email: 'lukesuperuserxui@mailnesia.com', + email: 'lukesuperuserxui_new@mailnesia.com', release: 'general', userIdentifier: 'PROD_LIKE', key: 'Monday01' }, @@ -121,7 +121,7 @@ const data = { }, { idamId: '12b6a360-7f19-4985-b065-94320a891eaa', - email: 'lukesuperuserxui@mailnesia.com', + email: 'lukesuperuserxui_new@mailnesia.com', release: 'general', userIdentifier: 'SOLICITOR' }, { diff --git a/test/e2e/config/conf.js b/test/e2e/config/conf.js index 029d9a82fa..8be83c71b9 100644 --- a/test/e2e/config/conf.js +++ b/test/e2e/config/conf.js @@ -47,7 +47,7 @@ const config = { params: { serverUrls: process.env.TEST_URL || 'http://localhost:3000/', targetEnv: argv.env || 'local', - username: 'lukesuperuserxui@mailnesia.com', + username: 'lukesuperuserxui_new@mailnesia.com', password: 'Monday01', caseworkerUser: 'mahesh_fr_courtadmn@mailinator.com', caseworkerPassword: 'London01', diff --git a/test/e2e/config/crossbrowser.conf.js b/test/e2e/config/crossbrowser.conf.js index 8280751e96..dcc0c3a26d 100644 --- a/test/e2e/config/crossbrowser.conf.js +++ b/test/e2e/config/crossbrowser.conf.js @@ -17,12 +17,12 @@ const config = { sauceRegion: 'eu', port: 80, sauceConnect: true, - specs: ['../features/**/*.feature'], + specs: ['../features/**/*.feature', '../features/app/loginLogout.feature'], - baseUrl: (process.env.TEST_URL || 'http://localhost:3000/').replace('https', 'http'), + baseUrl: 'https://manage-case.aat.platform.hmcts.net', params: { - serverUrls: process.env.TEST_URL || 'http://localhost:3000/', + serverUrls: 'https://manage-case.aat.platform.hmcts.net', targetEnv: argv.env || 'local' //username: process.env.TEST_EMAIL, //password: process.env.TEST_PASSWORD, @@ -47,33 +47,11 @@ const config = { maxInstances: 1 }, - { - browserName: 'firefox', - version: 'latest', - platform: 'Windows 10', - name: 'firefox-win-tests', - tunnelIdentifier: 'reformtunnel', - extendedDebugging: true, - sharedTestFiles: false, - maxInstances: 1 - }, - // { - // browserName: 'internet explorer', - // platform: 'Windows 10', + // browserName: 'firefox', // version: 'latest', - // name: 'IE-TEST', - // tunnelIdentifier: 'reformtunnel', - // extendedDebugging: true, - // sharedTestFiles: false, - // maxInstances: 1 - // }, - - // { - // browserName: 'safari', - // platform: 'macOS 10.15', - // version: '13.1', - // name: 'Safari-TEST', + // platform: 'Windows 10', + // name: 'firefox-win-tests', // tunnelIdentifier: 'reformtunnel', // extendedDebugging: true, // sharedTestFiles: false, @@ -100,27 +78,19 @@ const config = { extendedDebugging: true, sharedTestFiles: false, maxInstances: 1 - }, - - { - browserName: 'firefox', - version: 'latest', - platform: 'macOS 10.15', - name: 'ff-mac-tests', - tunnelIdentifier: 'reformtunnel', - extendedDebugging: true, - sharedTestFiles: false, - maxInstances: 1 } ], exclude: [], cucumberOpts: { - strict: true, - format: ['node_modules/cucumber-pretty', 'json:cb_reports/saucelab_results.json'], - require: ['../support/world.js', '../support/*.js', '../features/step_definitions/**/*.steps.js', '../features/step_definitions/**/*.steps.js'], - tags: ['@crossbrowser', 'not @Flaky'] + format: ['json:cb_reports/saucelab_results.json'], + require: [ + '../features/step_definitions/loginLogout.steps.js', + '../features/step_definitions/**/*.steps.js', + '../support/timeout.js' + ], + tags: ['@crossbrowser'] }, plugins: [ diff --git a/test/e2e/config/fullfunctional.conf.js b/test/e2e/config/fullfunctional.conf.js index cb30cdf630..045790dc66 100644 --- a/test/e2e/config/fullfunctional.conf.js +++ b/test/e2e/config/fullfunctional.conf.js @@ -51,7 +51,7 @@ const config = { params: { serverUrls: process.env.TEST_URL || 'http://localhost:3000/', targetEnv: argv.env || 'local', - username: 'lukesuperuserxui@mailnesia.com', + username: 'lukesuperuserxui_new@mailnesia.com', password: 'Monday01', caseworkerUser: 'mahesh_fr_courtadmn@mailinator.com', caseworkerPassword: 'London01', diff --git a/test/e2e/config/functional.conf.js b/test/e2e/config/functional.conf.js index 311c3e871d..617ddabf63 100644 --- a/test/e2e/config/functional.conf.js +++ b/test/e2e/config/functional.conf.js @@ -60,7 +60,7 @@ const config = { params: { serverUrls: process.env.TEST_URL || 'http://localhost:3000/', targetEnv: argv.env || 'local', - username: 'lukesuperuserxui@mailnesia.com', + username: 'lukesuperuserxui_new@mailnesia.com', password: 'Monday01', caseworkerUser: 'mahesh_fr_courtadmn@mailinator.com', caseworkerPassword: 'London01', diff --git a/test/e2e/config/smoke.conf.js b/test/e2e/config/smoke.conf.js index 9468dd754a..53cfc86bbb 100644 --- a/test/e2e/config/smoke.conf.js +++ b/test/e2e/config/smoke.conf.js @@ -44,7 +44,7 @@ const config = { params: { serverUrls: process.env.TEST_URL || 'http://localhost:3000/', targetEnv: argv.env || 'local', - username: 'lukesuperuserxui@mailnesia.com', + username: 'lukesuperuserxui_new@mailnesia.com', password: 'Monday01', caseworkerUser: 'mahesh_fr_courtadmn@mailinator.com', caseworkerPassword: 'London01', diff --git a/test/e2e/features/app/loginLogout.feature b/test/e2e/features/app/loginLogout.feature index 888cf80941..c87fa587f3 100644 --- a/test/e2e/features/app/loginLogout.feature +++ b/test/e2e/features/app/loginLogout.feature @@ -1,24 +1,23 @@ -@fullfunctional +@fullfunctional @crossbrowser Feature: Login - Background: - When I navigate to Expert UI Url - @all Scenario: un-authenticated user login + When I navigate to Expert UI Url Then I am on Idam login page When I enter an Invalid email-address and password to login Then I should be redirected to the Idam login page Then I should see failure error summary Scenario: login and log out from EUI with valid user + When I navigate to Expert UI Url Given I am logged into Expert UI with valid user details Then I should be redirected to EUI dashboard page When I select the sign out link Then I should be redirected to the Idam login page - @all @crossbrowser @aat @Flaky Scenario: login and log out from EUI as Probate user + When I navigate to Expert UI Url Given I am logged into Expert UI with Probate user details Then I should be redirected to EUI dashboard page When I select the sign out link @@ -26,26 +25,26 @@ Feature: Login - Scenario: Verify the direct link navigate to login page - Given I navigate to Expert UI Url direct link - Then I should be redirected back to Login page after direct link - - @iauserslogin @ignore - Scenario Outline: Login as IA "" - Given I am logged into Expert UI as IA "" - Then I should be redirected to EUI dashboard page - Then I see primary navigation tabs "" in main header - Then I should see the expected banner for IA "" - When I select the sign out link - Then I should be redirected to the Idam login page - - Examples: - | Usertype | mainHeaders | - | case_officer | My work,Case list, Create case | - | legal_rep | Case list, Create case | - | admin_officer | Case list, Create case | - | homeoffice_respondent | Case list, Create case | - | homeoffice_apc | Case list, Create case | - | homeoffice_larts | Case list, Create case | - | homeoffice_pou | Case list, Create case | - | judge | Case list | + # Scenario: Verify the direct link navigate to login page + # Given I navigate to Expert UI Url direct link + # Then I should be redirected back to Login page after direct link + + # @iauserslogin @ignore + # Scenario Outline: Login as IA "" + # Given I am logged into Expert UI as IA "" + # Then I should be redirected to EUI dashboard page + # Then I see primary navigation tabs "" in main header + # Then I should see the expected banner for IA "" + # When I select the sign out link + # Then I should be redirected to the Idam login page + + # Examples: + # | Usertype | mainHeaders | + # | case_officer | My work,Case list, Create case | + # | legal_rep | Case list, Create case | + # | admin_officer | Case list, Create case | + # | homeoffice_respondent | Case list, Create case | + # | homeoffice_apc | Case list, Create case | + # | homeoffice_larts | Case list, Create case | + # | homeoffice_pou | Case list, Create case | + # | judge | Case list | diff --git a/test/e2e/features/pageObjects/caseEditPage.js b/test/e2e/features/pageObjects/caseEditPage.js index 1625d0e87d..1d7f04f3a0 100644 --- a/test/e2e/features/pageObjects/caseEditPage.js +++ b/test/e2e/features/pageObjects/caseEditPage.js @@ -7,7 +7,7 @@ const CaseListPage = require('../pageObjects/CaseListPage'); const { LOG_LEVELS } = require('../../support/constants'); class caseEditPage { constructor() { - this.userName = 'lukesuperuserxui@mailnesia.com'; + this.userName = 'lukesuperuserxui_new@mailnesia.com'; this.password = 'Monday01'; this.searchResultsTopPagination = $('ccd-search-result .pagination-top'); this.ccdCaseEdit = $('ccd-case-edit'); diff --git a/test/e2e/features/pageObjects/loginLogoutObjects.js b/test/e2e/features/pageObjects/loginLogoutObjects.js index 95d5c4b360..5f99081db1 100644 --- a/test/e2e/features/pageObjects/loginLogoutObjects.js +++ b/test/e2e/features/pageObjects/loginLogoutObjects.js @@ -17,7 +17,7 @@ function loginLogoutObjects() { this.incorrectCredentialsErrorHeader = element(by.xpath('//h2[@id = "validation-error-summary-heading"][contains(text(),"Incorrect email or password")]')); this.givenIAmLoggedIn = async function (email, password) { - await BrowserWaits.waitForElement(this.signinTitle); ; + await BrowserWaits.waitForElement(this.signinTitle); await this.loginWithCredentials(email, password); }; diff --git a/test/e2e/features/step_definitions/browser.steps.js b/test/e2e/features/step_definitions/browser.steps.js index 805e6591a5..52934a92a8 100644 --- a/test/e2e/features/step_definitions/browser.steps.js +++ b/test/e2e/features/step_definitions/browser.steps.js @@ -1,7 +1,7 @@ const BrowserWaits = require('../../support/customWaits'); const ArrayUtil = require('../../utils/ArrayUtil'); -var { defineSupportCode } = require('cucumber'); +var { Then, When, Given } = require('@cucumber/cucumber'); const { browser } = require('protractor'); const minimist = require('minimist'); @@ -9,7 +9,7 @@ const argv = minimist(process.argv.slice(2)); const browserutil = require('../../../ngIntegration/util/browserUtil'); const headerPage = require('../../../e2e/features/pageObjects/headerPage'); -defineSupportCode(function ({ And, But, Given, Then, When }) { + Given('I save current window handle reference {string}', async function (windowReference) { global.scenarioData['window.' + windowReference] = await browser.driver.getWindowHandle(); }); @@ -75,4 +75,3 @@ defineSupportCode(function ({ And, But, Given, Then, When }) { expect(exuiRoot).to.equal(null); } }); -}); diff --git a/test/e2e/features/step_definitions/caseAccessManagement/specificAccess.steps.js b/test/e2e/features/step_definitions/caseAccessManagement/specificAccess.steps.js index 862f2e70d8..936f69025e 100644 --- a/test/e2e/features/step_definitions/caseAccessManagement/specificAccess.steps.js +++ b/test/e2e/features/step_definitions/caseAccessManagement/specificAccess.steps.js @@ -1,4 +1,4 @@ -var { defineSupportCode } = require('cucumber'); +var { Then, When, Given } = require('@cucumber/cucumber'); const reportLogger = require('../../../support/reportLogger'); const BrowserWaits = require('../../../support/customWaits'); const SoftAssert = require('../../../../ngIntegration/util/softAssert'); @@ -10,7 +10,7 @@ const ArrayUtil = require('../../../utils/ArrayUtil'); const workFlowPage = require('../../pageObjects/caseAccessManagement/SARWorkflow'); -defineSupportCode(function ({ And, But, Given, Then, When }) { + const reviewSARPage = workFlowPage.reviewRequestPage; const durationSelectionPage = workFlowPage.durationSelectionPage; @@ -155,5 +155,4 @@ defineSupportCode(function ({ And, But, Given, Then, When }) { When('I am in SAR request more information page, enter in text area {string}', async function (moreInfotext) { await workFlowPage.requestMoreInfoPage.enterInTextArea(moreInfotext); }); -}); diff --git a/test/e2e/features/step_definitions/caseDetails.steps.js b/test/e2e/features/step_definitions/caseDetails.steps.js index 959f5688c3..63ae24d502 100644 --- a/test/e2e/features/step_definitions/caseDetails.steps.js +++ b/test/e2e/features/step_definitions/caseDetails.steps.js @@ -1,13 +1,13 @@ const CucumberReportLogger = require('../../support/reportLogger'); -var { defineSupportCode } = require('cucumber'); +var { Then, When, Given } = require('@cucumber/cucumber'); const BrowserWaits = require('../../support/customWaits'); const caseDetailsPage = require('../pageObjects/caseDetailsPage'); const caseDetailsBasicViewPage = require('../pageObjects/caseAccessManagement/caseDetailsBasicView'); -defineSupportCode(function ({ And, But, Given, Then, When }) { + Then('I see case details tab label {string} is displayed is {string}', async function (tabLabel, boolString) { await BrowserWaits.retryWithActionCallback(async () => { expect(await caseDetailsPage.isTabWithLabelPresent(tabLabel)).to.equal(boolString.toLowerCase().includes('true')); @@ -84,4 +84,3 @@ defineSupportCode(function ({ And, But, Given, Then, When }) { When('I click request access button in case basic view page', async () => { await caseDetailsBasicViewPage.requestAccessButton.click(); }); -}); diff --git a/test/e2e/features/step_definitions/caseDetailsPage.steps.js b/test/e2e/features/step_definitions/caseDetailsPage.steps.js index f142db599d..cf3634da02 100644 --- a/test/e2e/features/step_definitions/caseDetailsPage.steps.js +++ b/test/e2e/features/step_definitions/caseDetailsPage.steps.js @@ -2,12 +2,12 @@ var CaseListPage = require('../pageObjects/CaseListPage'); const CucumberReportLogger = require('../../support/reportLogger'); -var { defineSupportCode } = require('cucumber'); +var { Then, When, Given } = require('@cucumber/cucumber'); const { browser } = require('protractor'); const BrowserWaits = require('../../support/customWaits'); const caseDetailsPage = require('../../../ngIntegration/tests/pageObjects/caseDetailsPage'); -defineSupportCode(function ({ And, But, Given, Then, When }) { + Then('I see case details challenged access request page', async function () { await BrowserWaits.retryWithActionCallback(async () => { await BrowserWaits.waitForElement(await caseDetailsPage.challengedAccessRequestContainer); @@ -21,4 +21,3 @@ defineSupportCode(function ({ And, But, Given, Then, When }) { expect(await caseDetailsPage.specificAccessRequestContainer.isDisplayed()).to.be.true; }); }); -}); diff --git a/test/e2e/features/step_definitions/caseList.steps.js b/test/e2e/features/step_definitions/caseList.steps.js index d3d3ff36ec..1909b96f28 100644 --- a/test/e2e/features/step_definitions/caseList.steps.js +++ b/test/e2e/features/step_definitions/caseList.steps.js @@ -2,14 +2,14 @@ var CaseListPage = require('../pageObjects/CaseListPage'); const CucumberReportLogger = require('../../support/reportLogger'); -var { defineSupportCode } = require('cucumber'); +var { Then, When, Given } = require('@cucumber/cucumber'); const { browser } = require('protractor'); const BrowserWaits = require('../../support/customWaits'); const headerPage = require('../pageObjects/headerPage'); const browserUtil = require('../../../ngIntegration/util/browserUtil'); const { LOG_LEVELS } = require('../../support/constants'); -defineSupportCode(function ({ And, But, Given, Then, When }) { + var caseListPage = new CaseListPage(); Then('I am on case list page', async function () { @@ -172,4 +172,3 @@ defineSupportCode(function ({ And, But, Given, Then, When }) { async function validateNoResultsDisplayed(){ expect(await caseListPage.hasCaseListAnyResults()).to.be.false; } -}); diff --git a/test/e2e/features/step_definitions/caseManager.steps.js b/test/e2e/features/step_definitions/caseManager.steps.js index 05f6fd0cf8..6e3106daa4 100644 --- a/test/e2e/features/step_definitions/caseManager.steps.js +++ b/test/e2e/features/step_definitions/caseManager.steps.js @@ -10,13 +10,13 @@ var BrowserWaits = require('../../support/customWaits'); var CaseManager = require('../pageObjects/common/CaseManager'); -var { defineSupportCode } = require('cucumber'); +var { Then, When, Given } = require('@cucumber/cucumber'); const CCDCaseDetails = require('../../../nodeMock/ccd/ccdCaseConfig/caseDetailsConfigGenerator'); const caseDetailsPage = require('../pageObjects/caseDetailsPage'); const creatCaseStepTimeout = 600*1000; -defineSupportCode(function ({ And, But, Given, Then, When }) { + var caseListPage = new CaseListPage(); let frCase = new FRCase(); let probateCase = new ProbateCase(); @@ -85,4 +85,3 @@ defineSupportCode(function ({ And, But, Given, Then, When }) { Then('I am on case form page', async function () { await caseManager.AmOnCCDCaseEditPage(); }); -}); diff --git a/test/e2e/features/step_definitions/checkFunctionalities.steps.js b/test/e2e/features/step_definitions/checkFunctionalities.steps.js index 260d518213..5f5f47ec7c 100644 --- a/test/e2e/features/step_definitions/checkFunctionalities.steps.js +++ b/test/e2e/features/step_definitions/checkFunctionalities.steps.js @@ -1,8 +1,8 @@ var IacCase = require('../pageObjects/iacCase'); -var { defineSupportCode } = require('cucumber'); +var { Then, When, Given } = require('@cucumber/cucumber'); + -defineSupportCode(function ({ And, But, Given, Then, When }) { let iacCase = new IacCase(); When('I check all fields IAC case', async function () { @@ -22,5 +22,4 @@ defineSupportCode(function ({ And, But, Given, Then, When }) { await iacCase.appealAgainstOtherDecisionsPage(); await iacCase.legalRepDetailsPage(); }); -}); diff --git a/test/e2e/features/step_definitions/cookieBanner.steps.js b/test/e2e/features/step_definitions/cookieBanner.steps.js index 10c21e4161..919753e250 100644 --- a/test/e2e/features/step_definitions/cookieBanner.steps.js +++ b/test/e2e/features/step_definitions/cookieBanner.steps.js @@ -1,8 +1,8 @@ var CookieBanner = require('../pageObjects/common/cookieBanner'); -var { defineSupportCode } = require('cucumber'); +var { Then, When, Given } = require('@cucumber/cucumber'); + -defineSupportCode(function ({ And, But, Given, Then, When }) { When('I click \'Accept additional cookies\'', async function () { await CookieBanner.acceptCookies(); }); @@ -20,4 +20,3 @@ defineSupportCode(function ({ And, But, Given, Then, When }) { expect(await CookieBanner.isCookiePresent('_ga')).to.be.false; expect(await CookieBanner.isCookiePresent('_gid')).to.be.false; }); -}); diff --git a/test/e2e/features/step_definitions/createCase.steps.js b/test/e2e/features/step_definitions/createCase.steps.js index d9729c8f2c..54baf123f1 100644 --- a/test/e2e/features/step_definitions/createCase.steps.js +++ b/test/e2e/features/step_definitions/createCase.steps.js @@ -19,9 +19,9 @@ var ProbateCase = require('../pageObjects/ProbateCase'); var CaseManager = require('../pageObjects/common/CaseManager'); -var { defineSupportCode } = require('cucumber'); +var { Then, When, Given } = require('@cucumber/cucumber'); + -defineSupportCode(function ({ And, But, Given, Then, When }) { let createCaseStartPage = new CreateCaseStartPage(); let createWizardPage = new CreateCaseWizardPage(); let appealCreatedPage = new AppealCreatedPage(); @@ -136,4 +136,3 @@ defineSupportCode(function ({ And, But, Given, Then, When }) { await createCaseStartPage.selectEvent('Consent Order Application'); await createCaseStartPage.clickStartButton(); }); -}); diff --git a/test/e2e/features/step_definitions/errorPage.steps.js b/test/e2e/features/step_definitions/errorPage.steps.js index 5f96e7da2b..d4162c6ab0 100644 --- a/test/e2e/features/step_definitions/errorPage.steps.js +++ b/test/e2e/features/step_definitions/errorPage.steps.js @@ -1,12 +1,11 @@ 'use strict'; -var { defineSupportCode } = require('cucumber'); +var { Then, When, Given } = require('@cucumber/cucumber'); const BrowserUtil = require('../../../ngIntegration/util/browserUtil'); const errorPage = require('../pageObjects/common/errorPage'); const validationError = require('../pageObjects/common/exuiErrorMessage'); -defineSupportCode(function ({ Given, When, Then }) { Then('I see error page with message {string}', async function (errorMessage) { const errorMessageDisplayed = await errorPage.getErrorMessage(); expect(errorMessageDisplayed).to.include(errorMessage); @@ -21,4 +20,3 @@ defineSupportCode(function ({ Given, When, Then }) { const actualMessage = await validationError.getFieldLevelErrorMessage(fieldText); expect(actualMessage).to.include(errorMessage); }); -}); diff --git a/test/e2e/features/step_definitions/errorValidation.steps.js b/test/e2e/features/step_definitions/errorValidation.steps.js index 0adb9c8750..9666399318 100644 --- a/test/e2e/features/step_definitions/errorValidation.steps.js +++ b/test/e2e/features/step_definitions/errorValidation.steps.js @@ -1,7 +1,7 @@ const CucumberReportLogger = require('../../support/reportLogger'); -var { defineSupportCode } = require('cucumber'); +var { Then, When, Given } = require('@cucumber/cucumber'); const ArrayUtil = require('../../utils/ArrayUtil'); const BrowserWaits = require('../../support/customWaits'); const SoftAssert = require('../../../ngIntegration/util/softAssert'); @@ -10,7 +10,7 @@ const MessageBanner = require('../pageObjects/messageBanner'); const exuiErrorMessage = require('../pageObjects/common/exuiErrorMessage'); const headerPage = require('../pageObjects/headerPage'); -defineSupportCode(function ({ And, But, Given, Then, When }) { + const messageBanner = new MessageBanner($('exui-root')); Then('I see error message of type {string} displayed with message {string}', async function(errorType, errorMessage){ const errorTypePage = errorType.toLowerCase(); @@ -47,5 +47,4 @@ defineSupportCode(function ({ And, But, Given, Then, When }) { } }); }); -}); diff --git a/test/e2e/features/step_definitions/globalSearchPage.steps.js b/test/e2e/features/step_definitions/globalSearchPage.steps.js index f6d7eec905..b890378f21 100644 --- a/test/e2e/features/step_definitions/globalSearchPage.steps.js +++ b/test/e2e/features/step_definitions/globalSearchPage.steps.js @@ -1,6 +1,6 @@ 'use strict'; -var { defineSupportCode } = require('cucumber'); +var { Then, When, Given } = require('@cucumber/cucumber'); const CucumberReportLogger = require('../../../e2e/support/reportLogger'); const BrowserUtil = require('../../../ngIntegration/util/browserUtil'); const errorPage = require('../pageObjects/common/errorPage'); @@ -12,7 +12,6 @@ const headerPage = require('../pageObjects/headerPage'); const SoftAssert = require('../../../ngIntegration/util/softAssert'); const CaseManager = require('../pageObjects/common/CaseManager'); -defineSupportCode(function ({ Given, When, Then }) { const caseManager = new CaseManager(); When('I input case reference in header search field {string}', async function(caseRef){ await headerPage.headerSearch.input.clear(); @@ -354,4 +353,3 @@ defineSupportCode(function ({ Given, When, Then }) { } softAssert.finally(); }); -}); diff --git a/test/e2e/features/step_definitions/hearingRecordingsCase.steps.js b/test/e2e/features/step_definitions/hearingRecordingsCase.steps.js index fa9276ef0c..59cab44680 100644 --- a/test/e2e/features/step_definitions/hearingRecordingsCase.steps.js +++ b/test/e2e/features/step_definitions/hearingRecordingsCase.steps.js @@ -3,9 +3,9 @@ var HearingRecordingsCase = require('../pageObjects/hearingRecordingsCase'); const headerPage = require('../pageObjects/headerPage'); const browserWaits = require('../../support/customWaits'); const cucumberReporter = require('../../support/reportLogger'); -var { defineSupportCode } = require('cucumber'); +var { Then, When, Given } = require('@cucumber/cucumber'); + -defineSupportCode(function ({ And, But, Given, Then, When }) { let hearingRecordingsCase = new HearingRecordingsCase(); When('I click on Case Hearing Files tab', async function () { @@ -50,4 +50,3 @@ defineSupportCode(function ({ And, But, Given, Then, When }) { await hearingRecordingsCase.checkFile(); }); }); -}); diff --git a/test/e2e/features/step_definitions/ldService.steps.js b/test/e2e/features/step_definitions/ldService.steps.js index ee4f237543..76f803fee7 100644 --- a/test/e2e/features/step_definitions/ldService.steps.js +++ b/test/e2e/features/step_definitions/ldService.steps.js @@ -2,11 +2,11 @@ var CaseListPage = require('../pageObjects/CaseListPage'); const CucumberReportLogger = require('../../support/reportLogger'); -var { defineSupportCode } = require('cucumber'); +var { Then, When, Given } = require('@cucumber/cucumber'); const BrowserWaits = require('../../support/customWaits'); const SoftAssert = require('../../../ngIntegration/util/softAssert'); const browserUtil = require('../../../ngIntegration/util/browserUtil'); -defineSupportCode(function ({ And, But, Given, Then, When }) { + Then('I validate launch darkly feature toggles response received', async function(){ expect(global.scenarioData['featureToggles']).to.not.be.a('null'); expect(global.scenarioData['featureToggles']).to.not.be.a('undefined'); @@ -57,4 +57,4 @@ defineSupportCode(function ({ And, But, Given, Then, When }) { browserUtil.onLDReceivedLogFeatureValue(toggleName); } }); -}); + diff --git a/test/e2e/features/step_definitions/loginLogout.steps.js b/test/e2e/features/step_definitions/loginLogout.steps.js index 180b6a4244..0b1cf45721 100644 --- a/test/e2e/features/step_definitions/loginLogout.steps.js +++ b/test/e2e/features/step_definitions/loginLogout.steps.js @@ -3,7 +3,7 @@ const loginPage = require('../pageObjects/loginLogoutObjects'); const headerPage = require('../pageObjects/headerPage'); -const { defineSupportCode } = require('cucumber'); +const { Then, When, Given } = require('@cucumber/cucumber'); const { AMAZING_DELAY, SHORT_DELAY, MID_DELAY, LONG_DELAY, LOG_LEVELS } = require('../../support/constants'); const config = require('../../config/conf.js'); const EC = protractor.ExpectedConditions; @@ -12,14 +12,12 @@ const CucumberReportLogger = require('../../support/reportLogger'); const BrowserUtil = require('../../../ngIntegration/util/browserUtil'); const testConfig = require('../../config/appTestConfig'); - async function waitForElement(el) { await browser.wait((result) => { return element(by.className(el)).isPresent(); }, 20000); } -defineSupportCode(function ({ Given, When, Then }) { let invalidCredentialsCounter = 0; let testCounter = 0; @@ -102,8 +100,6 @@ defineSupportCode(function ({ Given, When, Then }) { When('I navigate to Expert UI Url', async function () { await BrowserWaits.retryWithActionCallback(async function(){ - await browser.driver.manage() - .deleteAllCookies(); CucumberReportLogger.AddMessage('App base url : ' + config.config.baseUrl, LOG_LEVELS.Info); await browser.get(config.config.baseUrl); await BrowserWaits.waitForElement(loginPage.signinTitle); @@ -122,11 +118,9 @@ defineSupportCode(function ({ Given, When, Then }) { }); Then(/^I am on Idam login page$/, async function () { - await waitForElement('heading-large'); await expect(loginPage.signinTitle.isDisplayed()).to.eventually.be.true; - await expect(loginPage.signinTitle.getText()) + await expect(await loginPage.signinTitle.getText()) .to - .eventually .contains('Sign in'); await expect(loginPage.emailAddress.isDisplayed()).to.eventually.be.true; await expect(loginPage.password.isDisplayed()).to.eventually.be.true; @@ -173,12 +167,8 @@ defineSupportCode(function ({ Given, When, Then }) { }); Then('I should be redirected to EUI dashboard page', async function () { - const world = this; - await BrowserWaits.retryWithActionCallback(async () => { try{ - await BrowserUtil.waitForLD(); - await BrowserWaits.waitForElement($('exui-header .hmcts-primary-navigation__item')); await expect(loginPage.dashboard_header.isDisplayed()).to.eventually.be.true; await BrowserUtil.waitForLD(); @@ -187,55 +177,53 @@ defineSupportCode(function ({ Given, When, Then }) { throw new Error(err); } }); + console.log("step completed ....") }); Given('I am logged into Expert UI with valid user details', async function () { const matchingUsers = testConfig.users[testConfig.testEnv].filter((user) => user.userIdentifier === 'PROD_LIKE'); await loginPage.givenIAmLoggedIn(matchingUsers[0].email, matchingUsers[0].key); - const world = this; loginAttempts++; - await loginattemptCheckAndRelogin(matchingUsers[0].email, matchingUsers[0].key, this); + // await loginattemptCheckAndRelogin(matchingUsers[0].email, matchingUsers[0].key, this); await BrowserWaits.retryForPageLoad($('exui-app-header'), function (message) { - world.attach('Login success page load load attempt : ' + message); + console.log("Login success page load load attempt : " + message) }); }); Given('I am logged into Expert UI with valid Probate back office user credentials', async function () { await loginPage.givenIAmLoggedIn(config.config.params.usernameProbate, config.config.params.password); - const world = this; loginAttempts++; await loginattemptCheckAndRelogin(config.config.params.usernameProbate, config.config.params.password, this); await BrowserWaits.retryForPageLoad($('exui-app-header'), function (message) { - world.attach('Login success page load load attempt : ' + message); + console.log("Login success page load load attempt : " + message) + }); }); Given('I am logged into Expert UI with non professional user details', async function () { await loginPage.givenIAmLoggedIn(this.config.caseworkerUser, this.config.caseworkerPassword); - const world = this; loginAttempts++; await loginattemptCheckAndRelogin(this.config.caseworkerUser, this.config.caseworkerPassword, this); await BrowserWaits.retryForPageLoad($('exui-app-header'), function (message) { - world.attach('Login success page load load attempt : ' + message); + console.log("Login success page load load attempt : " + message) }); }); Given('I am logged into Expert UI with FPL user details', async function () { await loginPage.givenIAmLoggedIn('kurt@swansea.gov.uk', 'Password12'); - const world = this; loginAttempts++; await loginattemptCheckAndRelogin('kurt@swansea.gov.uk', 'Password12', this); await BrowserWaits.retryForPageLoad($('exui-app-header'), function (message) { - world.attach('Login success page load load attempt : ' + message); + console.log("Login success page load load attempt : " + message) }); }); @@ -281,30 +269,27 @@ defineSupportCode(function ({ Given, When, Then }) { Given('I am logged into Expert UI caseworker-ia-adm user details', async function () { await loginPage.givenIAmLoggedIn(config.config.params.caseworker_iac_adm_username, config.config.params.caseworker_iac_adm_password); - const world = this; loginAttempts++; await loginattemptCheckAndRelogin(config.config.params.caseworker_iac_adm_username, config.config.params.caseworker_iac_adm_password, this); await BrowserWaits.retryForPageLoad($('exui-app-header'), function (message) { - world.attach('Login success page load load attempt : ' + message); + console.log("Login success page load load attempt : " + message) }); }); Given('I am logged into Expert UI caseworker-ia-caseofficer user details', async function () { await loginPage.givenIAmLoggedIn(config.config.params.caseworker_iac_off_username, config.config.params.caseworker_iac_off_password); - const world = this; loginAttempts++; await loginattemptCheckAndRelogin(config.config.params.caseworker_iac_off_username, config.config.params.caseworker_iac_off_password, this); await BrowserWaits.retryForPageLoad($('exui-app-header'), function (message) { - world.attach('Login success page load load attempt : ' + message); + console.log("Login success page load load attempt : " + message) }); }); Given('I am logged into Expert UI with test user identified as {string}', async function (testUserIdentifier) { - const world = this; const matchingUsers = testConfig.users[testConfig.testEnv].filter((user) => user.userIdentifier === testUserIdentifier); if (matchingUsers.length === 0){ @@ -319,7 +304,7 @@ defineSupportCode(function ({ Given, When, Then }) { loginAttempts++; await loginattemptCheckAndRelogin(userEmail, key, this); await BrowserWaits.retryForPageLoad($('exui-app-header'), function (message) { - world.attach('Login success page load load attempt : ' + message); + console.log("Login success page load load attempt : " + message) }); await BrowserWaits.retryWithActionCallback(async () => { @@ -330,13 +315,12 @@ defineSupportCode(function ({ Given, When, Then }) { Given('I am logged into Expert UI with hrs testes user details', async function () { await loginPage.givenIAmLoggedIn(config.config.params.hrsTesterUser, config.config.params.hrsTesterPassword); - const world = this; loginAttempts++; await loginattemptCheckAndRelogin(config.config.params.hrsTesterUser, config.config.params.hrsTesterPassword, this); await BrowserWaits.retryForPageLoad($('exui-app-header'), function (message) { - world.attach('Login success page load load attempt : ' + message); + console.log("Login success page load load attempt : " + message) }); }); @@ -355,4 +339,3 @@ defineSupportCode(function ({ Given, When, Then }) { .contains('Sign in'); browser.sleep(LONG_DELAY); }); -}); diff --git a/test/e2e/features/step_definitions/navigationHeader.steps.js b/test/e2e/features/step_definitions/navigationHeader.steps.js index 27375f60f2..989ca8ebda 100644 --- a/test/e2e/features/step_definitions/navigationHeader.steps.js +++ b/test/e2e/features/step_definitions/navigationHeader.steps.js @@ -1,7 +1,7 @@ const headerPage = require('../pageObjects/headerPage'); const browserWaits = require('../../support/customWaits'); const cucumberReporter = require('../../support/reportLogger'); -var { defineSupportCode } = require('cucumber'); +var { Then, When, Given } = require('@cucumber/cucumber'); const SoftAssert = require('../../../ngIntegration/util/softAssert'); const constants = require('../../support/constants'); const featureToggleUtil = require('../../../ngIntegration/util/featureToggleUtil'); @@ -13,7 +13,7 @@ const { LOG_LEVELS } = require('../../support/constants'); const appTestData = require('../../config/appTestConfig'); -defineSupportCode(function ({ And, But, Given, Then, When }) { + Then('I see header tab Task list', async function () { expect(await headerPage.isTabPresent('Task list'), 'Task list tab is not present').to.be.true; }); @@ -219,4 +219,3 @@ defineSupportCode(function ({ And, But, Given, Then, When }) { await headerPage.headerCaseRefSearch.clickFind(); }); }); -}); diff --git a/test/e2e/features/step_definitions/referenceValues.steps.js b/test/e2e/features/step_definitions/referenceValues.steps.js index cb8dd5fa73..3ec0de979f 100644 --- a/test/e2e/features/step_definitions/referenceValues.steps.js +++ b/test/e2e/features/step_definitions/referenceValues.steps.js @@ -2,9 +2,9 @@ var CaseListPage = require('../pageObjects/CaseListPage'); const CucumberReportLogger = require('../../support/reportLogger'); -var { defineSupportCode } = require('cucumber'); +var { Then, When, Given } = require('@cucumber/cucumber'); + -defineSupportCode(function ({ And, But, Given, Then, When }) { Given('I update object values in reference {string}', async function (objectReference, datatable){ const objectAtReference = global.scenarioData[objectReference]; if (!objectAtReference){ @@ -17,4 +17,3 @@ defineSupportCode(function ({ And, But, Given, Then, When }) { objectAtReference[rowKey] = rowhash[rowKey]; } }); -}); diff --git a/test/e2e/features/step_definitions/refunds.steps.js b/test/e2e/features/step_definitions/refunds.steps.js index 03c9d2345f..17e255a7c2 100644 --- a/test/e2e/features/step_definitions/refunds.steps.js +++ b/test/e2e/features/step_definitions/refunds.steps.js @@ -1,8 +1,7 @@ const RefundsPage = require('../pageObjects/refundsPage.js'); const headerPage = require('../pageObjects/headerPage'); -const { defineSupportCode } = require('cucumber'); +const { Then, When, Given } = require('@cucumber/cucumber'); -defineSupportCode(function ({ Then, When }) { let refundsPage = new RefundsPage(); When(/^I click on Refunds button$/, async function () { @@ -85,4 +84,3 @@ defineSupportCode(function ({ Then, When }) { expect(reviewDetailsInfo[key]).to.include.all.members(reviewRefundPageFields[key]); }); }); -}); diff --git a/test/e2e/features/step_definitions/searchCase.steps.js b/test/e2e/features/step_definitions/searchCase.steps.js index 345e0b763e..8f561e47aa 100644 --- a/test/e2e/features/step_definitions/searchCase.steps.js +++ b/test/e2e/features/step_definitions/searchCase.steps.js @@ -10,207 +10,206 @@ const { AMAZING_DELAY, SHORT_DELAY, MID_DELAY, LONG_DELAY, LOG_LEVELS } = requir const CucumberReporter = require('../../support/reportLogger'); const BrowserWaits = require('../../support/customWaits'); const browserUtil = require('../../../ngIntegration/util/browserUtil'); -var { defineSupportCode } = require('cucumber'); +var { Then, When, Given } = require('@cucumber/cucumber'); const { browser } = require('protractor'); const config = require('../../utils/config/config.js'); const RuntimeTestData = require('../../support/runtimeTestData'); -defineSupportCode(function ({ And, But, Given, Then, When }) { - let searchPage= new SearchPage(); - let caseListPage = new CaseListPage(); - When(/^I click on search button$/, async function () { - await headerPage.clickFindCase(); + +let searchPage= new SearchPage(); +let caseListPage = new CaseListPage(); +When(/^I click on search button$/, async function () { + await headerPage.clickFindCase(); +}); + +When('I click on Case list', async function(){ + let attemptCounter = 0; + await BrowserWaits.retryWithActionCallback(async () => { + if (attemptCounter > 0){ + await headerPage.refreshBrowser(); + await browserUtil.waitForLD(); + } + attemptCounter++; + await BrowserWaits.waitForSpinnerToDissappear(); + await headerPage.clickCaseList(); + }); +}); + +Then(/^Search page should be displayed$/, async function () { + await BrowserWaits.retryWithActionCallback(async () => { + try{ + expect(await new SearchPage().amOnPage()).to.be.true; + }catch(err){ + await headerPage.clickFindCase(); + } }); +}); + +When(/^I enter mandatory fields jurisdiction,case type and click on apply button$/, async function () { + browser.sleep(AMAZING_DELAY); + await searchPage.selectJurisdiction(TestData.jurisdiction); + browser.sleep(AMAZING_DELAY); + await searchPage.selectCaseType(TestData.caseTypeIndex); + + await searchPage.clickApplyButton(); +}); - When('I click on Case list', async function(){ - let attemptCounter = 0; - await BrowserWaits.retryWithActionCallback(async () => { - if (attemptCounter > 0){ +When('I enter search fields jurisdiction {string} case type {string}', async function (jurisdiction, caseType) { + await BrowserWaits.retryWithActionCallback(async () => { + try{ + await searchPage.selectJurisdiction(jurisdiction); + await searchPage.selectCaseType(caseType); + }catch(err){ + await CucumberReporter.AddScreenshot(global.screenShotUtils); + await CucumberReporter.AddMessage('Retrying with page refresh', LOG_LEVELS.Info); + const currentUrl = await browser.getCurrentUrl(); + if (currentUrl.includes('service-down')){ + await CucumberReporter.AddMessage('Service error occured, clicking find case again', LOG_LEVELS.Error); + await headerPage.clickFindCase(); + }else{ + await CucumberReporter.AddMessage('Refreshing page', LOG_LEVELS.Info); await headerPage.refreshBrowser(); - await browserUtil.waitForLD(); } - attemptCounter++; - await BrowserWaits.waitForSpinnerToDissappear(); - await headerPage.clickCaseList(); - }); + throw new Error(err); + } }); +}); - Then(/^Search page should be displayed$/, async function () { - await BrowserWaits.retryWithActionCallback(async () => { - try{ - expect(await new SearchPage().amOnPage()).to.be.true; - }catch(err){ +When('I enter search fields jurisdiction {string} case type {string} and click apply', async function (jurisdiction, caseType) { + await BrowserWaits.retryWithActionCallback(async () => { + try { + await searchPage.selectJurisdiction(jurisdiction); + await searchPage.selectCaseType(caseType); + await BrowserWaits.waitForElementClickable(searchPage.applyButton); + await searchPage.clickApplyButton(); + } catch (err) { + await CucumberReporter.AddScreenshot(global.screenShotUtils); + await CucumberReporter.AddMessage('Retrying with page refresh', LOG_LEVELS.Info); + const currentUrl = await browser.getCurrentUrl(); + if (currentUrl.includes('service-down')) { + await CucumberReporter.AddMessage('Service error occured, clicking find case again', LOG_LEVELS.Warn); await headerPage.clickFindCase(); + } else { + await CucumberReporter.AddMessage('Refreshing page', LOG_LEVELS.Info); + await headerPage.refreshBrowser(); } - }); + throw new Error(err); + } }); +}); - When(/^I enter mandatory fields jurisdiction,case type and click on apply button$/, async function () { - browser.sleep(AMAZING_DELAY); - await searchPage.selectJurisdiction(TestData.jurisdiction); - browser.sleep(AMAZING_DELAY); - await searchPage.selectCaseType(TestData.caseTypeIndex); +When('I reset case search fields', async function(){ + await searchPage.clickResetButton(); +}); - await searchPage.clickApplyButton(); - }); +When('I click apply to perform case search', async function () { + const caseListContainer = $('exui-case-list'); + const searchCasesContainer = $('exui-search-case'); - When('I enter search fields jurisdiction {string} case type {string}', async function (jurisdiction, caseType) { - await BrowserWaits.retryWithActionCallback(async () => { - try{ - await searchPage.selectJurisdiction(jurisdiction); - await searchPage.selectCaseType(caseType); - }catch(err){ - await CucumberReporter.AddScreenshot(global.screenShotUtils); - await CucumberReporter.AddMessage('Retrying with page refresh', LOG_LEVELS.Info); - const currentUrl = await browser.getCurrentUrl(); - if (currentUrl.includes('service-down')){ - await CucumberReporter.AddMessage('Service error occured, clicking find case again', LOG_LEVELS.Error); - await headerPage.clickFindCase(); - }else{ - await CucumberReporter.AddMessage('Refreshing page', LOG_LEVELS.Info); - await headerPage.refreshBrowser(); - } - throw new Error(err); - } - }); - }); + let isCaseListPage = await caseListContainer.isPresent(); + let isSearchCasesPage = await searchCasesContainer.isPresent(); - When('I enter search fields jurisdiction {string} case type {string} and click apply', async function (jurisdiction, caseType) { - await BrowserWaits.retryWithActionCallback(async () => { - try { - await searchPage.selectJurisdiction(jurisdiction); - await searchPage.selectCaseType(caseType); - await BrowserWaits.waitForElementClickable(searchPage.applyButton); + await BrowserWaits.retryWithActionCallback(async () => { + try{ + if (isSearchCasesPage){ await searchPage.clickApplyButton(); - } catch (err) { - await CucumberReporter.AddScreenshot(global.screenShotUtils); - await CucumberReporter.AddMessage('Retrying with page refresh', LOG_LEVELS.Info); - const currentUrl = await browser.getCurrentUrl(); - if (currentUrl.includes('service-down')) { - await CucumberReporter.AddMessage('Service error occured, clicking find case again', LOG_LEVELS.Warn); - await headerPage.clickFindCase(); - } else { - await CucumberReporter.AddMessage('Refreshing page', LOG_LEVELS.Info); - await headerPage.refreshBrowser(); - } - throw new Error(err); + } else if (isCaseListPage){ + await caseListPage.clickApplyButton(); + }else{ + throw new Error('Not case list or search page to perform filter apply action on workbasket or search inputs.'); } - }); - }); - - When('I reset case search fields', async function(){ - await searchPage.clickResetButton(); - }); - - When('I click apply to perform case search', async function () { - const caseListContainer = $('exui-case-list'); - const searchCasesContainer = $('exui-search-case'); - - let isCaseListPage = await caseListContainer.isPresent(); - let isSearchCasesPage = await searchCasesContainer.isPresent(); - - await BrowserWaits.retryWithActionCallback(async () => { - try{ - if (isSearchCasesPage){ - await searchPage.clickApplyButton(); - } else if (isCaseListPage){ - await caseListPage.clickApplyButton(); - }else{ - throw new Error('Not case list or search page to perform filter apply action on workbasket or search inputs.'); - } - }catch(err){ - CucumberReporter.AddMessage('Retrying steps select inputs and click apply', LOG_LEVELS.Info); - - if (isSearchCasesPage) { - const caseTypeToSelect = RuntimeTestData.searchCasesInputs.casetype; - for (const caseType of RuntimeTestData.searchCasesInputs.casetypes) { - if (caseType !== caseTypeToSelect) { - await searchPage.selectCaseType(caseType); - break; - } + }catch(err){ + CucumberReporter.AddMessage('Retrying steps select inputs and click apply', LOG_LEVELS.Info); + + if (isSearchCasesPage) { + const caseTypeToSelect = RuntimeTestData.searchCasesInputs.casetype; + for (const caseType of RuntimeTestData.searchCasesInputs.casetypes) { + if (caseType !== caseTypeToSelect) { + await searchPage.selectCaseType(caseType); + break; } - await BrowserWaits.waitForSeconds(2); - await searchPage.selectCaseType(caseTypeToSelect); - } else if (isCaseListPage) { - const caseTypeToSelect = RuntimeTestData.workbasketInputs.casetype; - for (const caseType of RuntimeTestData.workbasketInputs.casetypes) { - if (caseType !== caseTypeToSelect) { - await caseListPage.selectCaseType(caseType); - break; - } + } + await BrowserWaits.waitForSeconds(2); + await searchPage.selectCaseType(caseTypeToSelect); + } else if (isCaseListPage) { + const caseTypeToSelect = RuntimeTestData.workbasketInputs.casetype; + for (const caseType of RuntimeTestData.workbasketInputs.casetypes) { + if (caseType !== caseTypeToSelect) { + await caseListPage.selectCaseType(caseType); + break; } - await BrowserWaits.waitForSeconds(2); - await caseListPage.selectCaseType(caseTypeToSelect); } - throw new Error(err); + await BrowserWaits.waitForSeconds(2); + await caseListPage.selectCaseType(caseTypeToSelect); } - }); + throw new Error(err); + } }); +}); - When('I open first case in search results', async function () { - await searchPage.openFirstCaseInResults(); - }); +When('I open first case in search results', async function () { + await searchPage.openFirstCaseInResults(); +}); - Then('I see results returned', async function () { - const caseListContainer = $('exui-case-list'); - const searchCasesContainer = $('exui-search-case'); - - let isCaseListPage = await caseListContainer.isPresent(); - let isSearchCasesPage = await searchCasesContainer.isPresent(); - - await BrowserWaits.retryWithActionCallback(async () => { - try{ - await searchPage.waitForAtleastOneSearchResult(); - await expect(await searchPage.hasSearchReturnedResults()).to.be.true; - }catch(err){ - CucumberReporter.AddMessage('Retrying steps select inputs and click apply', LOG_LEVELS.Warn); - - if (isSearchCasesPage){ - const caseTypeToSelect = RuntimeTestData.searchCasesInputs.casetype; - for (const caseType of RuntimeTestData.searchCasesInputs.casetypes) { - if (caseType !== caseTypeToSelect) { - await searchPage.selectCaseType(caseType); - break; - } - } - await BrowserWaits.waitForSeconds(2); - await searchPage.selectCaseType(caseTypeToSelect); - - await searchPage.clickApplyButton(); - } else if (isCaseListPage){ - const caseTypeToSelect = RuntimeTestData.workbasketInputs.casetype; - for (const caseType of RuntimeTestData.workbasketInputs.casetypes) { - if (caseType !== caseTypeToSelect) { - await caseListPage.selectCaseType(caseType); - break; - } +Then('I see results returned', async function () { + const caseListContainer = $('exui-case-list'); + const searchCasesContainer = $('exui-search-case'); + + let isCaseListPage = await caseListContainer.isPresent(); + let isSearchCasesPage = await searchCasesContainer.isPresent(); + + await BrowserWaits.retryWithActionCallback(async () => { + try{ + await searchPage.waitForAtleastOneSearchResult(); + await expect(await searchPage.hasSearchReturnedResults()).to.be.true; + }catch(err){ + CucumberReporter.AddMessage('Retrying steps select inputs and click apply', LOG_LEVELS.Warn); + + if (isSearchCasesPage){ + const caseTypeToSelect = RuntimeTestData.searchCasesInputs.casetype; + for (const caseType of RuntimeTestData.searchCasesInputs.casetypes) { + if (caseType !== caseTypeToSelect) { + await searchPage.selectCaseType(caseType); + break; } - await BrowserWaits.waitForSeconds(2); - await caseListPage.selectCaseType(caseTypeToSelect); + } + await BrowserWaits.waitForSeconds(2); + await searchPage.selectCaseType(caseTypeToSelect); - await caseListPage.clickSearchApplyBtn(); + await searchPage.clickApplyButton(); + } else if (isCaseListPage){ + const caseTypeToSelect = RuntimeTestData.workbasketInputs.casetype; + for (const caseType of RuntimeTestData.workbasketInputs.casetypes) { + if (caseType !== caseTypeToSelect) { + await caseListPage.selectCaseType(caseType); + break; + } } + await BrowserWaits.waitForSeconds(2); + await caseListPage.selectCaseType(caseTypeToSelect); - throw new Error(err); + await caseListPage.clickSearchApplyBtn(); } - }); - }); - Then(/^Case details should be displayed based on selected search criteria$/, async function () { - var searchPage = new SearchPage(); - expect(await searchPage.amOnPage()).to.be.true; - expect(await searchPage.hasSearchReturnedResults()).to.be.true; + throw new Error(err); + } }); +}); - When(/^I select the search criteria details and click on reset button$/, async function () { - await searchPage.selectJurisdiction(TestData.jurisdiction); - await searchPage.selectCaseType(TestData.caseTypeIndex); - await searchPage.clickResetButton(); - }); - Then(/^search criteria details should be reset$/, async function () { - expect(await new SearchPage().amOnPage()).to.be.true; - await searchPage.waitForSearchWithNoResults(); - expect(await searchPage.hasSearchReturnedResults()).to.be.false; - }); +Then(/^Case details should be displayed based on selected search criteria$/, async function () { + var searchPage = new SearchPage(); + expect(await searchPage.amOnPage()).to.be.true; + expect(await searchPage.hasSearchReturnedResults()).to.be.true; +}); + +When(/^I select the search criteria details and click on reset button$/, async function () { + await searchPage.selectJurisdiction(TestData.jurisdiction); + await searchPage.selectCaseType(TestData.caseTypeIndex); + await searchPage.clickResetButton(); +}); +Then(/^search criteria details should be reset$/, async function () { + expect(await new SearchPage().amOnPage()).to.be.true; + await searchPage.waitForSearchWithNoResults(); + expect(await searchPage.hasSearchReturnedResults()).to.be.false; }); diff --git a/test/e2e/features/step_definitions/shareCase.steps.js b/test/e2e/features/step_definitions/shareCase.steps.js index cdf746b2b7..136b544272 100644 --- a/test/e2e/features/step_definitions/shareCase.steps.js +++ b/test/e2e/features/step_definitions/shareCase.steps.js @@ -4,112 +4,111 @@ var ShareCaseCheckAndConfirmPage = require('../pageObjects/shareCaseCheckAndConf const BrowserWaits = require('../../support/customWaits'); -var { defineSupportCode } = require('cucumber'); +var { Then, When, Given } = require('@cucumber/cucumber'); const { browser } = require('protractor'); -defineSupportCode(function ({ And, But, Given, Then, When }) { - var shareCasePage = new ShareCasePage(); - var shareCaseCheckAndConfirmPage = new ShareCaseCheckAndConfirmPage(); - Then('I see Share Case page is displayed', async function () { - expect(await shareCasePage.amOnPage()).to.be.true; - }); +var shareCasePage = new ShareCasePage(); +var shareCaseCheckAndConfirmPage = new ShareCaseCheckAndConfirmPage(); - Then('I see Share case page has {int} cases listed', async function (selectedCasesCount) { - expect(await shareCasePage.casesCount(), 'Cases count listed does not match expected').to.be.equal(selectedCasesCount); - }); +Then('I see Share Case page is displayed', async function () { + expect(await shareCasePage.amOnPage()).to.be.true; +}); - Then('I see message {string} with all cases deselected', async function (message) { - expect(await shareCasePage.getMessageDisplayedInNoCasesDisplayed(), 'Message does not match with expected').to.be.equal(message); - }); +Then('I see Share case page has {int} cases listed', async function (selectedCasesCount) { + expect(await shareCasePage.casesCount(), 'Cases count listed does not match expected').to.be.equal(selectedCasesCount); +}); - When('I click deselect button for case {int} from share case page', async function (caseNumber) { - await shareCasePage.clickDeselectCase(caseNumber); - }); +Then('I see message {string} with all cases deselected', async function (message) { + expect(await shareCasePage.getMessageDisplayedInNoCasesDisplayed(), 'Message does not match with expected').to.be.equal(message); +}); - When('I click back link in share case page', async function () { - await shareCasePage.clickBackLink(); - }); +When('I click deselect button for case {int} from share case page', async function (caseNumber) { + await shareCasePage.clickDeselectCase(caseNumber); +}); - Then('I see share case page, case {int} has details collpased', async function (caseNum) { - await BrowserWaits.waitForCondition(async () => { - console.log('Retry Checking selected details collapsed'); - return !(await shareCasePage.isCaseContentDisplayed(caseNum)); - }); - expect(await shareCasePage.isCaseContentDisplayed(caseNum)).to.be.false; - }); +When('I click back link in share case page', async function () { + await shareCasePage.clickBackLink(); +}); - Then('I see share case page, case {int} has details expanded', async function (caseNum) { - await BrowserWaits.waitForCondition(async () => { - return (await shareCasePage.isCaseContentDisplayed(caseNum)); - }); - expect(await shareCasePage.isCaseContentDisplayed(caseNum)).to.be.true; +Then('I see share case page, case {int} has details collpased', async function (caseNum) { + await BrowserWaits.waitForCondition(async () => { + console.log('Retry Checking selected details collapsed'); + return !(await shareCasePage.isCaseContentDisplayed(caseNum)); }); + expect(await shareCasePage.isCaseContentDisplayed(caseNum)).to.be.false; +}); - When('I click case {int} expand/collapse icon in share case page', async function (caseNum) { - await shareCasePage.clickCaseDetailsExpandCollapseBtn(caseNum); +Then('I see share case page, case {int} has details expanded', async function (caseNum) { + await BrowserWaits.waitForCondition(async () => { + return (await shareCasePage.isCaseContentDisplayed(caseNum)); }); + expect(await shareCasePage.isCaseContentDisplayed(caseNum)).to.be.true; +}); - When('I click OpenAll/CloseAll in share case page', async function () { - await shareCasePage.clickOpenOrCloseAllLink(); - }); +When('I click case {int} expand/collapse icon in share case page', async function (caseNum) { + await shareCasePage.clickCaseDetailsExpandCollapseBtn(caseNum); +}); - Then('I see OpenAll/CloseAll text displayed as {string} in share case page', async function (linkText) { - expect(await shareCasePage.getLinkTextForOpenOrCloseAlllink()).to.include(linkText); - }); +When('I click OpenAll/CloseAll in share case page', async function () { + await shareCasePage.clickOpenOrCloseAllLink(); +}); - When('I enter text {string} in user email in share case page', async function (text) { - await shareCasePage.enterUserEmailToSelect(text); - }); +Then('I see OpenAll/CloseAll text displayed as {string} in share case page', async function (linkText) { + expect(await shareCasePage.getLinkTextForOpenOrCloseAlllink()).to.include(linkText); +}); - Then('I see users list filtered with containing text {string}', async function (text) { - let useremailsArr = await shareCasePage.getFilteredUserNameEmails(); - for(let i = 0; i < useremailsArr.length; i++){ - expect(useremailsArr[i]).to.include(text); - } - }); +When('I enter text {string} in user email in share case page', async function (text) { + await shareCasePage.enterUserEmailToSelect(text); +}); - Then('I see user Add button is enabled in share case page', async function () { - expect(await shareCasePage.isAddButtonEnabled()).to.be.true; - }); +Then('I see users list filtered with containing text {string}', async function (text) { + let useremailsArr = await shareCasePage.getFilteredUserNameEmails(); + for(let i = 0; i < useremailsArr.length; i++){ + expect(useremailsArr[i]).to.include(text); + } +}); - Then('I see user Add button is disabled in share case page', async function () { - expect(await shareCasePage.isAddButtonEnabled()).to.be.false; - }); +Then('I see user Add button is enabled in share case page', async function () { + expect(await shareCasePage.isAddButtonEnabled()).to.be.true; +}); - When('I select a user not shared with atleast one case listed in share case page', async function () { - await shareCasePage.selectUserWithEmail_Not_SharedWithAtLeastOneCase(); - }); +Then('I see user Add button is disabled in share case page', async function () { + expect(await shareCasePage.isAddButtonEnabled()).to.be.false; +}); - When('I select a user already shared with atleast one case listed in share case page', async function () { - await shareCasePage.selectUserWithEmail_SharedWithAtLeastOneCase(); - }); +When('I select a user not shared with atleast one case listed in share case page', async function () { + await shareCasePage.selectUserWithEmail_Not_SharedWithAtLeastOneCase(); +}); - When('I click Add user button in share case page', async function () { - await shareCasePage.clickAddUserbutton(); - }); +When('I select a user already shared with atleast one case listed in share case page', async function () { + await shareCasePage.selectUserWithEmail_SharedWithAtLeastOneCase(); +}); - Then('I see last added user is marked as to be added in cases', async function () { - expect(await shareCasePage.isLastAddedUserListedInAllCases(), 'case(s) in share case list does not have user in list').to.be.true; - expect(await shareCasePage.isLastAddedUserMarkedTobeAddedInAnyCase(), 'case(s) in share case list not marked to be . added').to.be.true; - }); +When('I click Add user button in share case page', async function () { + await shareCasePage.clickAddUserbutton(); +}); - When('I click Remove link for a user already shared a case', async function () { - await shareCasePage.clickRemoveForAUserInListedCases(); - }); +Then('I see last added user is marked as to be added in cases', async function () { + expect(await shareCasePage.isLastAddedUserListedInAllCases(), 'case(s) in share case list does not have user in list').to.be.true; + expect(await shareCasePage.isLastAddedUserMarkedTobeAddedInAnyCase(), 'case(s) in share case list not marked to be . added').to.be.true; +}); - Then('I see a user is marked to be removed in a listed case', async function () { - expect(await shareCasePage.isAnyUserMarkedToBeRemoved(), 'case(s) in share case list does not have a user marked to be removed').to.be.true; - }); +When('I click Remove link for a user already shared a case', async function () { + await shareCasePage.clickRemoveForAUserInListedCases(); +}); - Then('I see share case changes persisted in displayed in Share Case page', async function () { - let issuesList = await shareCasePage.validateShareCaseChangesPersisted(); - expect(issuesList.length, 'issues with changes persist : ' + JSON.stringify(issuesList)).to.equal(0); - }); +Then('I see a user is marked to be removed in a listed case', async function () { + expect(await shareCasePage.isAnyUserMarkedToBeRemoved(), 'case(s) in share case list does not have a user marked to be removed').to.be.true; +}); - When('I click continue in share case page', async function () { - await shareCasePage.clickContinueButton(); - }); +Then('I see share case changes persisted in displayed in Share Case page', async function () { + let issuesList = await shareCasePage.validateShareCaseChangesPersisted(); + expect(issuesList.length, 'issues with changes persist : ' + JSON.stringify(issuesList)).to.equal(0); +}); - //Share Case Confirm Selection Steps +When('I click continue in share case page', async function () { + await shareCasePage.clickContinueButton(); }); + +//Share Case Confirm Selection Steps diff --git a/test/e2e/features/step_definitions/shareCaseCheckAndConfirm.steps.js b/test/e2e/features/step_definitions/shareCaseCheckAndConfirm.steps.js index c6293604c4..5d9a26c653 100644 --- a/test/e2e/features/step_definitions/shareCaseCheckAndConfirm.steps.js +++ b/test/e2e/features/step_definitions/shareCaseCheckAndConfirm.steps.js @@ -2,10 +2,10 @@ var ShareCaseCheckAndConfirmPage = require('../pageObjects/shareCaseCheckAndConfirmPage'); const BrowserWaits = require('../../support/customWaits'); -var { defineSupportCode } = require('cucumber'); +var { Then, When, Given } = require('@cucumber/cucumber'); const { browser } = require('protractor'); -defineSupportCode(function ({ And, But, Given, Then, When }) { + var shareCaseCheckAndConfirmPage = new ShareCaseCheckAndConfirmPage(); //Share Case Confirm Selection Steps @@ -34,4 +34,3 @@ defineSupportCode(function ({ And, But, Given, Then, When }) { Then('I see success message for Share case changes', async function () { expect(await shareCaseCheckAndConfirmPage.isSubmissionSuccessful(), 'Share Case changes submission is not successful').to.be.true; }); -}); diff --git a/test/e2e/features/step_definitions/support.steps.js b/test/e2e/features/step_definitions/support.steps.js index 7e2c4c4dd6..d5f30711a7 100644 --- a/test/e2e/features/step_definitions/support.steps.js +++ b/test/e2e/features/step_definitions/support.steps.js @@ -1,12 +1,12 @@ const BrowserWaits = require('../../support/customWaits'); const ArrayUtil = require('../../utils/ArrayUtil'); -var { defineSupportCode } = require('cucumber'); +var { Then, When, Given } = require('@cucumber/cucumber'); const { browser } = require('protractor'); const BrowserLogs = require('../../support/browserLogs'); const cucumberReporter = require('../../support/reportLogger'); -defineSupportCode(function ({ And, But, Given, Then, When }) { + Given('I switch to new window opened', async function(){ let retryCounter = 1; await BrowserWaits.retryWithActionCallback(async () => { @@ -54,4 +54,3 @@ defineSupportCode(function ({ And, But, Given, Then, When }) { const unKnownWindowHandles = await ArrayUtil.filter(allWindowHandles, async (handle) => !knownWindowHandles.includes(handle)); return unKnownWindowHandles; } -}); diff --git a/test/e2e/features/step_definitions/testCaseType.steps.js b/test/e2e/features/step_definitions/testCaseType.steps.js index 97895d70c1..250dcf58de 100644 --- a/test/e2e/features/step_definitions/testCaseType.steps.js +++ b/test/e2e/features/step_definitions/testCaseType.steps.js @@ -3,9 +3,9 @@ const BrowserWaits = require('../../support/customWaits'); const CucumberReportLogger = require('../../support/reportLogger'); var CaseEditPage = require('../pageObjects/caseEditPage'); -var { defineSupportCode } = require('cucumber'); +var { Then, When, Given } = require('@cucumber/cucumber'); + -defineSupportCode(function ({ And, But, Given, Then, When }) { let caseEditPage = new CaseEditPage(); let caseManager = new CaseManager(); @@ -100,4 +100,3 @@ defineSupportCode(function ({ And, But, Given, Then, When }) { Then('Validate event pages display show condition logic', async function(){ await caseEditPage.eventPageDisplayShowCondition(); }); -}); diff --git a/test/e2e/features/step_definitions/timestamp.steps.js b/test/e2e/features/step_definitions/timestamp.steps.js index 07ffce40d8..23a1a723df 100644 --- a/test/e2e/features/step_definitions/timestamp.steps.js +++ b/test/e2e/features/step_definitions/timestamp.steps.js @@ -1,8 +1,8 @@ var CaseManager = require('../pageObjects/common/CaseManager'); -var { defineSupportCode } = require('cucumber'); +var { Then, When, Given } = require('@cucumber/cucumber'); + -defineSupportCode(function ({ And, But, Given, Then, When }) { let caseManager = new CaseManager(); When('I Add Comment to the case', async function () { @@ -14,5 +14,4 @@ defineSupportCode(function ({ And, But, Given, Then, When }) { let currentDate = new Date(); expect(await caseManager.getTimestampDisplayed()).to.be.contain(currentDate.toLocaleTimeString()); }); -}); diff --git a/test/e2e/features/step_definitions/workAccessBookingUI/workAccessPage.steps.js b/test/e2e/features/step_definitions/workAccessBookingUI/workAccessPage.steps.js index a7c32171d9..cf2c707d11 100644 --- a/test/e2e/features/step_definitions/workAccessBookingUI/workAccessPage.steps.js +++ b/test/e2e/features/step_definitions/workAccessBookingUI/workAccessPage.steps.js @@ -3,7 +3,7 @@ const CucumberReportLogger = require('../../../support/reportLogger'); const moment = require('moment-timezone'); -var { defineSupportCode } = require('cucumber'); +var { Then, When, Given } = require('@cucumber/cucumber'); const BrowserWaits = require('../../../support/customWaits'); const headerPage = require('../../pageObjects/headerPage'); const browserUtil = require('../../../../ngIntegration/util/browserUtil'); diff --git a/test/e2e/features/step_definitions/workallocation/allocateRoles.steps.js b/test/e2e/features/step_definitions/workallocation/allocateRoles.steps.js index d54fb1d3ed..735255db6d 100644 --- a/test/e2e/features/step_definitions/workallocation/allocateRoles.steps.js +++ b/test/e2e/features/step_definitions/workallocation/allocateRoles.steps.js @@ -1,4 +1,4 @@ -var { defineSupportCode } = require('cucumber'); +var { Then, When, Given } = require('@cucumber/cucumber'); const reportLogger = require('../../../support/reportLogger'); const BrowserWaits = require('../../../support/customWaits'); const SoftAssert = require('../../../../ngIntegration/util/softAssert'); @@ -10,7 +10,7 @@ const ArrayUtil = require('../../../utils/ArrayUtil'); const workFlowPage = require('../../pageObjects/workAllocation/workFlow'); -defineSupportCode(function ({ And, But, Given, Then, When }) { + Then('I see Allocate role work flow page {string} with caption {string} is displayed', async function (workFlowPageType, captionHeader) { let workFlowPageObject = getWorkflowPageObject(workFlowPageType); await BrowserWaits.retryWithActionCallback(async () => { @@ -145,5 +145,4 @@ defineSupportCode(function ({ And, But, Given, Then, When }) { const durationOptionInput = workFlowPage.durationOfRolePage.getRadioOptionInputElement(durationOption); expect(await durationOptionInput.isSelected()).to.be.true; }); -}); diff --git a/test/e2e/features/step_definitions/workallocation/allworkPage.steps.js b/test/e2e/features/step_definitions/workallocation/allworkPage.steps.js index 7c461eca1f..353fb83565 100644 --- a/test/e2e/features/step_definitions/workallocation/allworkPage.steps.js +++ b/test/e2e/features/step_definitions/workallocation/allworkPage.steps.js @@ -1,4 +1,4 @@ -var { defineSupportCode } = require('cucumber'); +var { Then, When, Given } = require('@cucumber/cucumber'); const reportLogger = require('../../../support/reportLogger'); const BrowserWaits = require('../../../support/customWaits'); const SoftAssert = require('../../../../ngIntegration/util/softAssert'); @@ -7,7 +7,7 @@ const allWorkPage = require('../../pageObjects/workAllocation/allWorkPage'); const ArrayUtil = require('../../../utils/ArrayUtil'); -defineSupportCode(function ({ And, But, Given, Then, When }) { + const filtersToIgnore = { 'Priority': 'Is out of scope and will be removed as part of https://tools.hmcts.net/jira/browse/EUI-4809', 'Task type': 'Is to be includes only in 2.1 till the it will be ignored in test', @@ -136,5 +136,4 @@ defineSupportCode(function ({ And, But, Given, Then, When }) { const inputValue = await allWorkPage.FILTER_ITEMS['Location search'].getAttribute('value'); expect(inputValue).to.includes(expectedValue); }); -}); diff --git a/test/e2e/features/step_definitions/workallocation/caseDetailsTasksTab.steps.js b/test/e2e/features/step_definitions/workallocation/caseDetailsTasksTab.steps.js index 9bac76e4f1..0ecf6fc901 100644 --- a/test/e2e/features/step_definitions/workallocation/caseDetailsTasksTab.steps.js +++ b/test/e2e/features/step_definitions/workallocation/caseDetailsTasksTab.steps.js @@ -1,4 +1,4 @@ -var { defineSupportCode } = require('cucumber'); +var { Then, When, Given } = require('@cucumber/cucumber'); const reportLogger = require('../../../support/reportLogger'); const BrowserWaits = require('../../../support/customWaits'); const SoftAssert = require('../../../../ngIntegration/util/softAssert'); @@ -7,7 +7,7 @@ const WorkAllocationDateUtil = require('../../pageObjects/workAllocation/common/ const caseDetailsPage = require('../../pageObjects/caseDetailsPage'); const caseRolesAndAccessPage = require('../../pageObjects/workAllocation/caseRolesAccessPage'); -defineSupportCode(function ({ And, But, Given, Then, When }) { + When('I click manage link {string} for task at position {int} in case details tasks tab', async function(manageLinkText, taskPos){ await BrowserWaits.retryWithActionCallback(async () => { await BrowserWaits.waitForSeconds(5); @@ -184,5 +184,3 @@ defineSupportCode(function ({ And, But, Given, Then, When }) { await caseDetailsTaskTabPage.clickTaskNextStepLink(taskName, linkText); }); }); -}); - diff --git a/test/e2e/features/step_definitions/workallocation/caseRolesAccess.steps.js b/test/e2e/features/step_definitions/workallocation/caseRolesAccess.steps.js index 4300ca826b..b29163b998 100644 --- a/test/e2e/features/step_definitions/workallocation/caseRolesAccess.steps.js +++ b/test/e2e/features/step_definitions/workallocation/caseRolesAccess.steps.js @@ -1,4 +1,4 @@ -var { defineSupportCode } = require('cucumber'); +var { Then, When, Given } = require('@cucumber/cucumber'); const reportLogger = require('../../../support/reportLogger'); const BrowserWaits = require('../../../support/customWaits'); const SoftAssert = require('../../../../ngIntegration/util/softAssert'); @@ -10,7 +10,7 @@ const ArrayUtil = require('../../../utils/ArrayUtil'); const checkYourAnswersPage = require('../../pageObjects/workAllocation/common/checkYourAnswersPage'); -defineSupportCode(function ({ And, But, Given, Then, When }) { + Then('I see Roles and access page is displayed', async function(){ expect(await caseRolesAndAccessPage.isPageDisplayed()).to.be.true; }); @@ -177,4 +177,3 @@ defineSupportCode(function ({ And, But, Given, Then, When }) { expect(actualCaption, 'Caption did not match').to.include(caption); }); }); -}); diff --git a/test/e2e/features/step_definitions/workallocation/checkYourAnswers.steps.js b/test/e2e/features/step_definitions/workallocation/checkYourAnswers.steps.js index f60d9f8891..c2de4ad3f2 100644 --- a/test/e2e/features/step_definitions/workallocation/checkYourAnswers.steps.js +++ b/test/e2e/features/step_definitions/workallocation/checkYourAnswers.steps.js @@ -1,4 +1,4 @@ -var { defineSupportCode } = require('cucumber'); +var { Then, When, Given } = require('@cucumber/cucumber'); const reportLogger = require('../../../support/reportLogger'); const BrowserWaits = require('../../../support/customWaits'); const SoftAssert = require('../../../../ngIntegration/util/softAssert'); @@ -14,7 +14,7 @@ const checkYourAnswersPage = require('../../pageObjects/workAllocation/common/ch const workAllocationDateUtil = require('../../pageObjects/workAllocation/common/workAllocationDateUtil'); -defineSupportCode(function ({ And, But, Given, Then, When }) { + Then('I see Check your answers page has total {int} questions', async function (expectedQuestionsCount) { await BrowserWaits.retryWithActionCallback(async () => { expect(await checkYourAnswersPage.getTotalQuestionsCount()).to.equal(expectedQuestionsCount); @@ -79,5 +79,4 @@ defineSupportCode(function ({ And, But, Given, Then, When }) { expect(await checkYourAnswersPage.isChangeLinkPresentForQuestion(question), `change link for ${question} visiblity does not match `).to.equal(isChangeLinkPresent); } } -}); diff --git a/test/e2e/features/step_definitions/workallocation/common.steps.js b/test/e2e/features/step_definitions/workallocation/common.steps.js index 1eda854598..7b8b72999f 100644 --- a/test/e2e/features/step_definitions/workallocation/common.steps.js +++ b/test/e2e/features/step_definitions/workallocation/common.steps.js @@ -1,5 +1,5 @@ -var { defineSupportCode } = require('cucumber'); +var { Then, When, Given } = require('@cucumber/cucumber'); const reportLogger = require('../../../support/reportLogger'); const BrowserWaits = require('../../../support/customWaits'); const SoftAssert = require('../../../../ngIntegration/util/softAssert'); @@ -26,7 +26,7 @@ const browserUtil = require('../../../../ngIntegration/util/browserUtil'); const taskAssignmentPersonNotAuthorisedPage = require('../../pageObjects/workAllocation/common/taskAssignmentPersonNotAuthorisedPage'); -defineSupportCode(function ({ And, But, Given, Then, When }) { + const taskListTable = new TaskListTable(); const waCaseListTable = new casesTable(); @@ -517,4 +517,3 @@ defineSupportCode(function ({ And, But, Given, Then, When }) { expect(await taskActionPage.isBannerMessageDisplayed()).to.be.true; } }); -}); diff --git a/test/e2e/features/step_definitions/workallocation/exclusion.steps.js b/test/e2e/features/step_definitions/workallocation/exclusion.steps.js index c330184a45..c0f17c6c1d 100644 --- a/test/e2e/features/step_definitions/workallocation/exclusion.steps.js +++ b/test/e2e/features/step_definitions/workallocation/exclusion.steps.js @@ -1,4 +1,4 @@ -var { defineSupportCode } = require('cucumber'); +var { Then, When, Given } = require('@cucumber/cucumber'); const reportLogger = require('../../../support/reportLogger'); const BrowserWaits = require('../../../support/customWaits'); const SoftAssert = require('../../../../ngIntegration/util/softAssert'); @@ -10,7 +10,7 @@ const ArrayUtil = require('../../../utils/ArrayUtil'); const exclusionWorkFlow = require('../../pageObjects/workAllocation/exclusionRolesWorkFlow'); -defineSupportCode(function ({ And, But, Given, Then, When }) { + Then('I see Add an exclusion work flow page {string} is displayed', async function (workFlowPage) { let workFlowPageObject = getWorkflowPageObject(workFlowPage); @@ -104,4 +104,3 @@ defineSupportCode(function ({ And, But, Given, Then, When }) { } return workFlowPageObject; } -}); diff --git a/test/e2e/features/step_definitions/workallocation/findPerson.steps.js b/test/e2e/features/step_definitions/workallocation/findPerson.steps.js index 0b789ea09b..f650519dd6 100644 --- a/test/e2e/features/step_definitions/workallocation/findPerson.steps.js +++ b/test/e2e/features/step_definitions/workallocation/findPerson.steps.js @@ -1,4 +1,4 @@ -var { defineSupportCode } = require('cucumber'); +var { Then, When, Given } = require('@cucumber/cucumber'); const reportLogger = require('../../../support/reportLogger'); const BrowserWaits = require('../../../support/customWaits'); const SoftAssert = require('../../../../ngIntegration/util/softAssert'); @@ -12,7 +12,7 @@ const workflowUtil = require('../../pageObjects/common/workflowUtil'); const exclusionWorkFlow = require('../../pageObjects/workAllocation/exclusionRolesWorkFlow'); const findPersonPage = require('../../pageObjects/workAllocation/common/findPersonComponent'); -defineSupportCode(function ({ And, But, Given, Then, When }) { + Then('In workflow {string}, I see find person page displayed with caption {string}', async function (workflow, findPersonCaption) { const workFlowPage = workflowUtil.getWorlflowPageObject(workflow); expect(await workFlowPage.findPersonPage.amOnPage()).to.be.true; @@ -70,4 +70,3 @@ defineSupportCode(function ({ And, But, Given, Then, When }) { const workFlowPage = workflowUtil.getWorlflowPageObject(workflow); expect(await workFlowPage.findPersonPage.isPersonSelected(caseworker.email), `${caseworker.email} is not selected`).to.be.true; }); -}); diff --git a/test/e2e/features/step_definitions/workallocation/myCases.steps.js b/test/e2e/features/step_definitions/workallocation/myCases.steps.js index bbbb4adaed..41b9cc81ce 100644 --- a/test/e2e/features/step_definitions/workallocation/myCases.steps.js +++ b/test/e2e/features/step_definitions/workallocation/myCases.steps.js @@ -1,5 +1,5 @@ -var { defineSupportCode } = require('cucumber'); +var { Then, When, Given } = require('@cucumber/cucumber'); const reportLogger = require('../../../support/reportLogger'); const BrowserWaits = require('../../../support/customWaits'); const SoftAssert = require('../../../../ngIntegration/util/softAssert'); @@ -10,7 +10,7 @@ const caseDetailsPage = require('../../pageObjects/caseDetailsPage'); const ArrayUtil = require('../../../utils/ArrayUtil'); -defineSupportCode(function ({ And, But, Given, Then, When }) { + const casesListTable = new WACasesListTable(); Then('I validate work allocation cases table columns displayed', async function (datatable) { @@ -62,5 +62,4 @@ defineSupportCode(function ({ And, But, Given, Then, When }) { await casesListTable.clickCaseColLink(colName, rowPos); }); }); -}); diff --git a/test/e2e/features/step_definitions/workallocation/selectRoleType.steps.js b/test/e2e/features/step_definitions/workallocation/selectRoleType.steps.js index cd7dd7582c..ac0f81566d 100644 --- a/test/e2e/features/step_definitions/workallocation/selectRoleType.steps.js +++ b/test/e2e/features/step_definitions/workallocation/selectRoleType.steps.js @@ -1,4 +1,4 @@ -var { defineSupportCode } = require('cucumber'); +var { Then, When, Given } = require('@cucumber/cucumber'); const reportLogger = require('../../../support/reportLogger'); const BrowserWaits = require('../../../support/customWaits'); const SoftAssert = require('../../../../ngIntegration/util/softAssert'); @@ -12,7 +12,7 @@ const workflowUtil = require('../../pageObjects/common/workflowUtil'); const exclusionWorkFlow = require('../../pageObjects/workAllocation/exclusionRolesWorkFlow'); const findPersonPage = require('../../pageObjects/workAllocation/common/findPersonComponent'); -defineSupportCode(function ({ And, But, Given, Then, When }) { + Then('In workflow {string}, I see select role type page displayed with caption {string}', async function (workflow, selctRoleTypeCaption) { const workFlowPage = workflowUtil.getWorlflowPageObject(workflow); expect(await workFlowPage.selectRoleTypePage.amOnPage()).to.be.true; @@ -42,4 +42,3 @@ defineSupportCode(function ({ And, But, Given, Then, When }) { const roleTypeElement = await await workFlowPage.selectRoleTypePage.getRoleTypeElement(roleType); await roleTypeElement.click(); }); -}); diff --git a/test/e2e/features/step_definitions/workallocation/taskEventCompletion.steps.js b/test/e2e/features/step_definitions/workallocation/taskEventCompletion.steps.js index 0b1bc9fd6d..151562b6b9 100644 --- a/test/e2e/features/step_definitions/workallocation/taskEventCompletion.steps.js +++ b/test/e2e/features/step_definitions/workallocation/taskEventCompletion.steps.js @@ -1,11 +1,11 @@ -var { defineSupportCode } = require('cucumber'); +var { Then, When, Given } = require('@cucumber/cucumber'); const reportLogger = require('../../../support/reportLogger'); const BrowserWaits = require('../../../support/customWaits'); const SoftAssert = require('../../../../ngIntegration/util/softAssert'); const taskForEventCompletionValidationPage = require('../../pageObjects/workAllocation/taskForEventValidatiosPage'); -defineSupportCode(function ({ And, But, Given, Then, When }) { + Then('I see task event validation error page', async function (datatable) { const rowshash = datatable.rowsHash(); @@ -46,4 +46,3 @@ defineSupportCode(function ({ And, But, Given, Then, When }) { When('I click cancel in task event validation message page', async function () { await taskForEventCompletionValidationPage.cancelButton.click(); }); -}); diff --git a/test/e2e/features/step_definitions/workallocation/tasksCasesTable.steps.js b/test/e2e/features/step_definitions/workallocation/tasksCasesTable.steps.js index 5901e25b5c..b2aea107e7 100644 --- a/test/e2e/features/step_definitions/workallocation/tasksCasesTable.steps.js +++ b/test/e2e/features/step_definitions/workallocation/tasksCasesTable.steps.js @@ -1,4 +1,4 @@ -var { defineSupportCode } = require('cucumber'); +var { Then, When, Given } = require('@cucumber/cucumber'); const reportLogger = require('../../../support/reportLogger'); const BrowserWaits = require('../../../support/customWaits'); const SoftAssert = require('../../../../ngIntegration/util/softAssert'); @@ -6,7 +6,7 @@ const SoftAssert = require('../../../../ngIntegration/util/softAssert'); const TaskListTable = require('../../pageObjects/workAllocation/taskListTable'); const CaseListTable = require('../../pageObjects/workAllocation/casesTable'); -defineSupportCode(function ({ And, But, Given, Then, When }) { + const taskListTable = new TaskListTable(); const caseListTable = new CaseListTable(); @@ -83,4 +83,3 @@ defineSupportCode(function ({ And, But, Given, Then, When }) { throw new Error(`${waTableFor} is not recognised WA table`); } } -}); diff --git a/test/e2e/features/step_definitions/workallocation/workFilter.steps.js b/test/e2e/features/step_definitions/workallocation/workFilter.steps.js index 40b31cde7d..b7dbe17448 100644 --- a/test/e2e/features/step_definitions/workallocation/workFilter.steps.js +++ b/test/e2e/features/step_definitions/workallocation/workFilter.steps.js @@ -1,5 +1,5 @@ -var { defineSupportCode } = require('cucumber'); +var { Then, When, Given } = require('@cucumber/cucumber'); const reportLogger = require('../../../support/reportLogger'); const BrowserWaits = require('../../../support/customWaits'); const SoftAssert = require('../../../../ngIntegration/util/softAssert'); @@ -10,7 +10,7 @@ const myWorkPage = require('../../pageObjects/workAllocation/myWorkPage'); const ArrayUtil = require('../../../utils/ArrayUtil'); -defineSupportCode(function ({ And, But, Given, Then, When }) { + Then('I see work filter of type {string} is displayed', async function(filterType){ await BrowserWaits.retryWithActionCallback(async () => { expect(await myWorkPage.isWorkFilterOfTypeDisplayed(filterType)).to.be.true; @@ -269,5 +269,4 @@ defineSupportCode(function ({ And, But, Given, Then, When }) { When('I remove all selected locations from my work filters', async function () { await myWorkPage.clearAllSelectedLocations(); }); -}); diff --git a/test/e2e/features/step_definitions/workallocation/workallocation.steps.js b/test/e2e/features/step_definitions/workallocation/workallocation.steps.js index 575aba2cce..49be316144 100644 --- a/test/e2e/features/step_definitions/workallocation/workallocation.steps.js +++ b/test/e2e/features/step_definitions/workallocation/workallocation.steps.js @@ -4,7 +4,7 @@ const taskAssignmentPage = require('../../pageObjects/workAllocation/taskAssignm const taskActionPage = require('../../pageObjects/workAllocation/taskActionPage'); const taskmanagerPage = require('../../pageObjects/workAllocation/taskManagerPage'); -var { defineSupportCode } = require('cucumber'); +var { Then, When, Given } = require('@cucumber/cucumber'); const reportLogger = require('../../../support/reportLogger'); const BrowserWaits = require('../../../support/customWaits'); @@ -12,7 +12,7 @@ const SoftAssert = require('../../../../ngIntegration/util/softAssert'); const taskManagerPage = require('../../pageObjects/workAllocation/taskManagerPage'); const featureToggleUtil = require('../../../../ngIntegration/util/featureToggleUtil'); -defineSupportCode(function ({ And, But, Given, Then, When }) { + Then('I see Task list sub navigation tabs', async function () { expect(await taskListPage.amOnPage(), 'Task list sub navigation tabs not present').to.be.true; }); @@ -278,5 +278,4 @@ defineSupportCode(function ({ And, But, Given, Then, When }) { const toggleVal = featureToggleUtil.getFeatureToggleValue(featureToggleName); expect(await taskListPage.paginationContainer.isDisplayed(), 'Pagination display is expected to be ' + toggleVal).to.equal(toggleVal); }); -}); diff --git a/test/e2e/features/step_definitions/workallocation/workallocation2.steps.js b/test/e2e/features/step_definitions/workallocation/workallocation2.steps.js index 6a00d0e049..a1247a5dc4 100644 --- a/test/e2e/features/step_definitions/workallocation/workallocation2.steps.js +++ b/test/e2e/features/step_definitions/workallocation/workallocation2.steps.js @@ -1,5 +1,5 @@ -var { defineSupportCode } = require('cucumber'); +var { Then, When, Given } = require('@cucumber/cucumber'); const headerPage = require('../../pageObjects/headerPage'); const myWorkPage = require('../../pageObjects/workAllocation/myWorkPage'); @@ -11,7 +11,7 @@ const taskCheckYourChangesPage = require('../../pageObjects/workAllocation/taskC const workflowUtil = require('../../pageObjects/common/workflowUtil'); -defineSupportCode(function ({ And, But, Given, Then, When }) { + When('I navigate to My work sub navigation tab {string}', async function (secondaryNavTab) { await BrowserWaits.retryWithActionCallback(async () => { try{ @@ -93,4 +93,3 @@ defineSupportCode(function ({ And, But, Given, Then, When }) { expect(await allWorkPage.allworkCasesMessage.getText()).to.contains(message); }); }); -}); diff --git a/test/e2e/features/step_definitions/workflow.steps.js b/test/e2e/features/step_definitions/workflow.steps.js index ecca8956e9..36235c8d6e 100644 --- a/test/e2e/features/step_definitions/workflow.steps.js +++ b/test/e2e/features/step_definitions/workflow.steps.js @@ -1,16 +1,15 @@ const BrowserWaits = require('../../support/customWaits'); const ArrayUtil = require('../../utils/ArrayUtil'); -var { defineSupportCode } = require('cucumber'); +var { Then, When, Given } = require('@cucumber/cucumber'); const reassignTaskWorkFlow = require('../pageObjects/workAllocation/reassignTaskWorkflow'); const workflowUtil = require('../pageObjects/common/workflowUtil'); -defineSupportCode(function ({ And, But, Given, Then, When }) { + Then('I am in workflow page {string}', async function(workFlowPage){ await BrowserWaits.retryWithActionCallback(async () => { await workflowUtil.waitForWorkflowPage(workFlowPage); global.scenarioData['workflow'] = workFlowPage; }); }); -}); diff --git a/test/e2e/support/timeout.js b/test/e2e/support/timeout.js index 6a021bd427..75b6b6f913 100644 --- a/test/e2e/support/timeout.js +++ b/test/e2e/support/timeout.js @@ -1,5 +1,5 @@ // timeout.js -var { setDefaultTimeout } = require('cucumber'); +var { setDefaultTimeout } = require('@cucumber/cucumber'); setDefaultTimeout(600 * 1000); // this timeout value is global setting impact all step definition function, diff --git a/test/e2e/support/world.js b/test/e2e/support/world.js index ce52c97cbf..9457d33a90 100644 --- a/test/e2e/support/world.js +++ b/test/e2e/support/world.js @@ -4,7 +4,7 @@ const { setWorldConstructor } = require('cucumber'); const minimist = require('minimist'); const argv = minimist(process.argv.slice(2)); -const { setDefaultTimeout } = require('cucumber'); +const { setDefaultTimeout } = require('@cucumber/cucumber'); setDefaultTimeout(180 * 1000); diff --git a/test/e2e/utils/ccdApi.js b/test/e2e/utils/ccdApi.js index 2821d639a6..bf6c893819 100644 --- a/test/e2e/utils/ccdApi.js +++ b/test/e2e/utils/ccdApi.js @@ -5,7 +5,7 @@ Button = require('../features/pageObjects/webdriver-components/button.js'); class CcdApi { constructor() { - this.userName = 'lukesuperuserxui@mailnesia.com'; + this.userName = 'lukesuperuserxui_new@mailnesia.com'; this.password = 'Monday01'; } diff --git a/yarn-audit-known-issues b/yarn-audit-known-issues index 81c7573f7c..b0adc49188 100644 --- a/yarn-audit-known-issues +++ b/yarn-audit-known-issues @@ -1 +1 @@ -{"actions":[],"advisories":{"1088948":{"findings":[{"version":"9.6.0","paths":["@hmcts/rpx-xui-node-lib>openid-client>got"]}],"metadata":null,"vulnerable_versions":"<11.8.5","module_name":"got","severity":"moderate","github_advisory_id":"GHSA-pfrx-2q88-qq97","cves":["CVE-2022-33987"],"access":"public","patched_versions":">=11.8.5","cvss":{"score":5.3,"vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N"},"updated":"2023-01-27T05:05:01.000Z","recommendation":"Upgrade to version 11.8.5 or later","cwe":[],"found_by":null,"deleted":null,"id":1088948,"references":"- https://nvd.nist.gov/vuln/detail/CVE-2022-33987\n- https://github.com/sindresorhus/got/pull/2047\n- https://github.com/sindresorhus/got/compare/v12.0.3...v12.1.0\n- https://github.com/sindresorhus/got/commit/861ccd9ac2237df762a9e2beed7edd88c60782dc\n- https://github.com/sindresorhus/got/releases/tag/v11.8.5\n- https://github.com/sindresorhus/got/releases/tag/v12.1.0\n- https://github.com/advisories/GHSA-pfrx-2q88-qq97","created":"2022-06-19T00:00:21.000Z","reported_by":null,"title":"Got allows a redirect to a UNIX socket","npm_advisory_id":null,"overview":"The got package before 11.8.5 and 12.1.0 for Node.js allows a redirect to a UNIX socket.","url":"https://github.com/advisories/GHSA-pfrx-2q88-qq97"},"1093639":{"findings":[{"version":"0.4.1","paths":["@hmcts/rpx-xui-node-lib>passport"]}],"metadata":null,"vulnerable_versions":"<0.6.0","module_name":"passport","severity":"moderate","github_advisory_id":"GHSA-v923-w3x8-wh69","cves":["CVE-2022-25896"],"access":"public","patched_versions":">=0.6.0","cvss":{"score":4.8,"vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:L"},"updated":"2023-09-11T16:22:18.000Z","recommendation":"Upgrade to version 0.6.0 or later","cwe":["CWE-384"],"found_by":null,"deleted":null,"id":1093639,"references":"- https://nvd.nist.gov/vuln/detail/CVE-2022-25896\n- https://github.com/jaredhanson/passport/pull/900\n- https://github.com/jaredhanson/passport/commit/7e9b9cf4d7be02428e963fc729496a45baeea608\n- https://snyk.io/vuln/SNYK-JS-PASSPORT-2840631\n- https://github.com/advisories/GHSA-v923-w3x8-wh69","created":"2022-07-02T00:00:19.000Z","reported_by":null,"title":"Passport vulnerable to session regeneration when a users logs in or out","npm_advisory_id":null,"overview":"This affects the package passport before 0.6.0. When a user logs in or logs out, the session is regenerated instead of being closed.","url":"https://github.com/advisories/GHSA-v923-w3x8-wh69"},"1094544":{"findings":[{"version":"8.4.29","paths":["@angular/ssr>critters>postcss"]}],"metadata":null,"vulnerable_versions":"<8.4.31","module_name":"postcss","severity":"moderate","github_advisory_id":"GHSA-7fh5-64p2-3v2j","cves":["CVE-2023-44270"],"access":"public","patched_versions":">=8.4.31","cvss":{"score":5.3,"vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N"},"updated":"2023-11-05T05:05:37.000Z","recommendation":"Upgrade to version 8.4.31 or later","cwe":["CWE-74","CWE-144"],"found_by":null,"deleted":null,"id":1094544,"references":"- https://nvd.nist.gov/vuln/detail/CVE-2023-44270\n- https://github.com/postcss/postcss/commit/58cc860b4c1707510c9cd1bc1fa30b423a9ad6c5\n- https://github.com/postcss/postcss/blob/main/lib/tokenize.js#L25\n- https://github.com/postcss/postcss/releases/tag/8.4.31\n- https://github.com/github/advisory-database/issues/2820\n- https://github.com/advisories/GHSA-7fh5-64p2-3v2j","created":"2023-09-30T00:31:10.000Z","reported_by":null,"title":"PostCSS line return parsing error","npm_advisory_id":null,"overview":"An issue was discovered in PostCSS before 8.4.31. It affects linters using PostCSS to parse external Cascading Style Sheets (CSS). There may be `\\r` discrepancies, as demonstrated by `@font-face{ font:(\\r/*);}` in a rule.\n\nThis vulnerability affects linters using PostCSS to parse external untrusted CSS. An attacker can prepare CSS in such a way that it will contains parts parsed by PostCSS as a CSS comment. After processing by PostCSS, it will be included in the PostCSS output in CSS nodes (rules, properties) despite being originally included in a comment.","url":"https://github.com/advisories/GHSA-7fh5-64p2-3v2j"},"1094902":{"findings":[{"version":"116.0.0","paths":["accessibility-checker>chromedriver"]}],"metadata":null,"vulnerable_versions":"<119.0.1","module_name":"chromedriver","severity":"moderate","github_advisory_id":"GHSA-hm92-vgmw-qfmx","cves":["CVE-2023-26156"],"access":"public","patched_versions":">=119.0.1","cvss":{"score":5.6,"vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L"},"updated":"2023-11-17T22:12:01.000Z","recommendation":"Upgrade to version 119.0.1 or later","cwe":["CWE-78"],"found_by":null,"deleted":null,"id":1094902,"references":"- https://nvd.nist.gov/vuln/detail/CVE-2023-26156\n- https://github.com/giggio/node-chromedriver/commit/de961e34e023afcf4fa5c0faeeec69aaa6c3c815\n- https://gist.github.com/mcoimbra/47b1da554a80795c45126d51e41b2b18\n- https://security.snyk.io/vuln/SNYK-JS-CHROMEDRIVER-6049539\n- https://github.com/advisories/GHSA-hm92-vgmw-qfmx","created":"2023-11-09T06:30:28.000Z","reported_by":null,"title":"chromedriver Command Injection vulnerability","npm_advisory_id":null,"overview":"Versions of the package chromedriver before 119.0.1 are vulnerable to Command Injection when setting the chromedriver.path to an arbitrary system binary. This could lead to unauthorized access and potentially malicious actions on the host system.\n\n**Note:**\n\nAn attacker must have access to the system running the vulnerable chromedriver library to exploit it. The success of exploitation also depends on the permissions and privileges of the process running chromedriver. ","url":"https://github.com/advisories/GHSA-hm92-vgmw-qfmx"},"1096353":{"findings":[{"version":"1.15.3","paths":["axios>follow-redirects","@hmcts/rpx-xui-node-lib>axios>follow-redirects","accessibility-checker>chromedriver>axios>follow-redirects"]}],"metadata":null,"vulnerable_versions":"<1.15.4","module_name":"follow-redirects","severity":"moderate","github_advisory_id":"GHSA-jchw-25xp-jwwc","cves":["CVE-2023-26159"],"access":"public","patched_versions":">=1.15.4","cvss":{"score":6.1,"vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"},"updated":"2024-01-31T05:07:10.000Z","recommendation":"Upgrade to version 1.15.4 or later","cwe":["CWE-20","CWE-601"],"found_by":null,"deleted":null,"id":1096353,"references":"- https://nvd.nist.gov/vuln/detail/CVE-2023-26159\n- https://github.com/follow-redirects/follow-redirects/issues/235\n- https://github.com/follow-redirects/follow-redirects/pull/236\n- https://security.snyk.io/vuln/SNYK-JS-FOLLOWREDIRECTS-6141137\n- https://github.com/follow-redirects/follow-redirects/commit/7a6567e16dfa9ad18a70bfe91784c28653fbf19d\n- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZZ425BFKNBQ6AK7I5SAM56TWON5OF2XM/\n- https://github.com/advisories/GHSA-jchw-25xp-jwwc","created":"2024-01-02T06:30:30.000Z","reported_by":null,"title":"Follow Redirects improperly handles URLs in the url.parse() function","npm_advisory_id":null,"overview":"Versions of the package follow-redirects before 1.15.4 are vulnerable to Improper Input Validation due to the improper handling of URLs by the url.parse() function. When new URL() throws an error, it can be manipulated to misinterpret the hostname. An attacker could exploit this weakness to redirect traffic to a malicious site, potentially leading to information disclosure, phishing attacks, or other security breaches.","url":"https://github.com/advisories/GHSA-jchw-25xp-jwwc"},"1096693":{"findings":[{"version":"0.4.23","paths":["protractor-screenshot-utils>protractor>selenium-webdriver>xml2js","protractor-screenshot-utils>protractor>webdriver-js-extender>selenium-webdriver>xml2js"]}],"metadata":null,"vulnerable_versions":"<0.5.0","module_name":"xml2js","severity":"moderate","github_advisory_id":"GHSA-776f-qx25-q3cc","cves":["CVE-2023-0842"],"access":"public","patched_versions":">=0.5.0","cvss":{"score":5.3,"vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N"},"updated":"2024-03-14T21:47:27.000Z","recommendation":"Upgrade to version 0.5.0 or later","cwe":["CWE-1321"],"found_by":null,"deleted":null,"id":1096693,"references":"- https://nvd.nist.gov/vuln/detail/CVE-2023-0842\n- https://github.com/Leonidas-from-XIV/node-xml2js/issues/663\n- https://github.com/Leonidas-from-XIV/node-xml2js/pull/603/commits/581b19a62d88f8a3c068b5a45f4542c2d6a495a5\n- https://fluidattacks.com/advisories/myers\n- https://github.com/Leonidas-from-XIV/node-xml2js\n- https://lists.debian.org/debian-lts-announce/2024/03/msg00013.html\n- https://github.com/advisories/GHSA-776f-qx25-q3cc","created":"2023-04-05T21:30:24.000Z","reported_by":null,"title":"xml2js is vulnerable to prototype pollution","npm_advisory_id":null,"overview":"xml2js versions before 0.5.0 allows an external attacker to edit or add new properties to an object. This is possible because the application does not properly validate incoming JSON keys, thus allowing the `__proto__` property to be edited.","url":"https://github.com/advisories/GHSA-776f-qx25-q3cc"},"1096727":{"findings":[{"version":"2.88.2","paths":["protractor-screenshot-utils>protractor>webdriver-manager>request"]}],"metadata":null,"vulnerable_versions":"<=2.88.2","module_name":"request","severity":"moderate","github_advisory_id":"GHSA-p8p7-x288-28g6","cves":["CVE-2023-28155"],"access":"public","patched_versions":"<0.0.0","cvss":{"score":6.1,"vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"},"updated":"2024-03-21T17:47:21.000Z","recommendation":"None","cwe":["CWE-918"],"found_by":null,"deleted":null,"id":1096727,"references":"- https://nvd.nist.gov/vuln/detail/CVE-2023-28155\n- https://github.com/request/request/issues/3442\n- https://github.com/request/request/pull/3444\n- https://doyensec.com/resources/Doyensec_Advisory_RequestSSRF_Q12023.pdf\n- https://github.com/github/advisory-database/pull/2500\n- https://github.com/cypress-io/request/blob/master/lib/redirect.js#L116\n- https://github.com/request/request/blob/master/lib/redirect.js#L111\n- https://github.com/cypress-io/request/pull/28\n- https://github.com/cypress-io/request/commit/c5bcf21d40fb61feaff21a0e5a2b3934a440024f\n- https://github.com/cypress-io/request/releases/tag/v3.0.0\n- https://security.netapp.com/advisory/ntap-20230413-0007\n- https://github.com/advisories/GHSA-p8p7-x288-28g6","created":"2023-03-16T15:30:19.000Z","reported_by":null,"title":"Server-Side Request Forgery in Request","npm_advisory_id":null,"overview":"The `request` package through 2.88.2 for Node.js and the `@cypress/request` package prior to 3.0.0 allow a bypass of SSRF mitigations via an attacker-controller server that does a cross-protocol redirect (HTTP to HTTPS, or HTTPS to HTTP).\n\nNOTE: The `request` package is no longer supported by the maintainer.","url":"https://github.com/advisories/GHSA-p8p7-x288-28g6"},"1096820":{"findings":[{"version":"4.18.2","paths":["@hmcts/rpx-xui-node-lib>express"]}],"metadata":null,"vulnerable_versions":"<4.19.2","module_name":"express","severity":"moderate","github_advisory_id":"GHSA-rv95-896h-c2vc","cves":["CVE-2024-29041"],"access":"public","patched_versions":">=4.19.2","cvss":{"score":6.1,"vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"},"updated":"2024-03-27T21:47:29.000Z","recommendation":"Upgrade to version 4.19.2 or later","cwe":["CWE-601","CWE-1286"],"found_by":null,"deleted":null,"id":1096820,"references":"- https://github.com/expressjs/express/security/advisories/GHSA-rv95-896h-c2vc\n- https://github.com/koajs/koa/issues/1800\n- https://github.com/expressjs/express/pull/5539\n- https://github.com/expressjs/express/commit/0867302ddbde0e9463d0564fea5861feb708c2dd\n- https://github.com/expressjs/express/commit/0b746953c4bd8e377123527db11f9cd866e39f94\n- https://expressjs.com/en/4x/api.html#res.location\n- https://nvd.nist.gov/vuln/detail/CVE-2024-29041\n- https://github.com/advisories/GHSA-rv95-896h-c2vc","created":"2024-03-25T19:40:26.000Z","reported_by":null,"title":"Express.js Open Redirect in malformed URLs","npm_advisory_id":null,"overview":"### Impact\n\nVersions of Express.js prior to 4.19.2 and pre-release alpha and beta versions before 5.0.0-beta.3 are affected by an open redirect vulnerability using malformed URLs.\n\nWhen a user of Express performs a redirect using a user-provided URL Express performs an encode [using `encodeurl`](https://github.com/pillarjs/encodeurl) on the contents before passing it to the `location` header. This can cause malformed URLs to be evaluated in unexpected ways by common redirect allow list implementations in Express applications, leading to an Open Redirect via bypass of a properly implemented allow list.\n\nThe main method impacted is `res.location()` but this is also called from within `res.redirect()`.\n\n### Patches\n\nhttps://github.com/expressjs/express/commit/0867302ddbde0e9463d0564fea5861feb708c2dd\nhttps://github.com/expressjs/express/commit/0b746953c4bd8e377123527db11f9cd866e39f94\n\nAn initial fix went out with `express@4.19.0`, we then patched a feature regression in `4.19.1` and added improved handling for the bypass in `4.19.2`.\n\n### Workarounds\n\nThe fix for this involves pre-parsing the url string with either `require('node:url').parse` or `new URL`. These are steps you can take on your own before passing the user input string to `res.location` or `res.redirect`.\n\n### References\n\nhttps://github.com/expressjs/express/pull/5539\nhttps://github.com/koajs/koa/issues/1800\nhttps://expressjs.com/en/4x/api.html#res.location","url":"https://github.com/advisories/GHSA-rv95-896h-c2vc"},"1096832":{"findings":[{"version":"1.28.2","paths":["@hmcts/rpx-xui-node-lib>openid-client>jose"]}],"metadata":null,"vulnerable_versions":"<2.0.7","module_name":"jose","severity":"moderate","github_advisory_id":"GHSA-hhhv-q57g-882q","cves":["CVE-2024-28176"],"access":"public","patched_versions":">=2.0.7","cvss":{"score":5.3,"vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"},"updated":"2024-03-30T06:30:42.000Z","recommendation":"Upgrade to version 2.0.7 or later","cwe":["CWE-400"],"found_by":null,"deleted":null,"id":1096832,"references":"- https://github.com/panva/jose/security/advisories/GHSA-hhhv-q57g-882q\n- https://github.com/panva/jose/commit/02a65794f7873cdaf12e81e80ad076fcdc4a9314\n- https://github.com/panva/jose/commit/1b91d88d2f8233f3477a5f4579aa5f8057b2ee8b\n- https://nvd.nist.gov/vuln/detail/CVE-2024-28176\n- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XJDO5VSIAOGT2WP63AXAAWNRSVJCNCRH\n- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/KXKGNCRU7OTM5AHC7YIYBNOWI742PRMY\n- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/I6MMWFBOXJA6ZCXNVPDFJ4XMK5PVG5RG\n- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/UJO2U5ACZVACNQXJ5EBRFLFW6DP5BROY\n- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/UG5FSEYJ3GP27FZXC5YAAMMEC5XWKJHG\n- https://github.com/advisories/GHSA-hhhv-q57g-882q","created":"2024-03-07T17:40:57.000Z","reported_by":null,"title":"jose vulnerable to resource exhaustion via specifically crafted JWE with compressed plaintext","npm_advisory_id":null,"overview":"A vulnerability has been identified in the JSON Web Encryption (JWE) decryption interfaces, specifically related to the [support for decompressing plaintext after its decryption](https://www.rfc-editor.org/rfc/rfc7516.html#section-4.1.3). This allows an adversary to exploit specific scenarios where the compression ratio becomes exceptionally high. As a result, the length of the JWE token, which is determined by the compressed content's size, can land below application-defined limits. In such cases, other existing application level mechanisms for preventing resource exhaustion may be rendered ineffective.\n\nNote that as per [RFC 8725](https://www.rfc-editor.org/rfc/rfc8725.html#name-avoid-compression-of-encryp) compression of data SHOULD NOT be done before encryption, because such compressed data often reveals information about the plaintext. For this reason the v5.x major version of `jose` removed support for compressed payloads entirely and is therefore NOT affected by this advisory.\n\n### Impact\n\nUnder certain conditions it is possible to have the user's environment consume unreasonable amount of CPU time or memory during JWE Decryption operations.\n\n### Affected users\n\nThe impact is limited only to Node.js users utilizing the JWE decryption APIs to decrypt JWEs from untrusted sources.\n\nYou are NOT affected if any of the following applies to you\n\n- Your code uses jose version v5.x where JWE Compression is not supported anymore\n- Your code runs in an environment other than Node.js (e.g. Deno, CF Workers), which is the only runtime where JWE Compression is implemented out of the box\n- Your code does not use the JWE decryption APIs\n- Your code only accepts JWEs produced by trusted sources\n\n### Patches\n\n`v2.0.7` and `v4.15.5` releases limit the decompression routine to only allow decompressing up to 250 kB of plaintext. In v4.x it is possible to further adjust this limit via the `inflateRaw` decryption option implementation. In v2.x it is possible to further adjust this limit via the `inflateRawSyncLimit` decryption option.\n\n### Workarounds\n\nIf you cannot upgrade and do not want to support compressed JWEs you may detect and reject these tokens early by checking the token's protected header\n\n```js\nconst { zip } = jose.decodeProtectedHeader(token)\nif (zip !== undefined) {\n throw new Error('JWE Compression is not supported')\n}\n```\n\nIf you wish to continue supporting JWEs with compressed payloads in these legacy release lines you must upgrade (v1.x and v2.x to version v2.0.7, v3.x and v4.x to version v4.15.5) and review the limits put forth by the patched releases.\n\n### For more information\nIf you have any questions or comments about this advisory please open a discussion in the project's [repository](https://github.com/panva/jose/discussions/new?category=q-a&title=GHSA-hhhv-q57g-882q%20advisory%20question)","url":"https://github.com/advisories/GHSA-hhhv-q57g-882q"},"1096856":{"findings":[{"version":"1.15.3","paths":["axios>follow-redirects","@hmcts/rpx-xui-node-lib>axios>follow-redirects","accessibility-checker>chromedriver>axios>follow-redirects"]}],"metadata":null,"vulnerable_versions":"<=1.15.5","module_name":"follow-redirects","severity":"moderate","github_advisory_id":"GHSA-cxjh-pqwp-8mfp","cves":["CVE-2024-28849"],"access":"public","patched_versions":">=1.15.6","cvss":{"score":6.5,"vectorString":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N"},"updated":"2024-04-02T17:54:22.000Z","recommendation":"Upgrade to version 1.15.6 or later","cwe":["CWE-200"],"found_by":null,"deleted":null,"id":1096856,"references":"- https://github.com/follow-redirects/follow-redirects/security/advisories/GHSA-cxjh-pqwp-8mfp\n- https://github.com/follow-redirects/follow-redirects/commit/c4f847f85176991f95ab9c88af63b1294de8649b\n- https://fetch.spec.whatwg.org/#authentication-entries\n- https://nvd.nist.gov/vuln/detail/CVE-2024-28849\n- https://github.com/psf/requests/issues/1885\n- https://hackerone.com/reports/2390009\n- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/VOIF4EPQUCKDBEVTGRQDZ3CGTYQHPO7Z\n- https://github.com/advisories/GHSA-cxjh-pqwp-8mfp","created":"2024-03-14T17:19:42.000Z","reported_by":null,"title":"follow-redirects' Proxy-Authorization header kept across hosts","npm_advisory_id":null,"overview":"When using [axios](https://github.com/axios/axios), its dependency follow-redirects only clears authorization header during cross-domain redirect, but allows the proxy-authentication header which contains credentials too.\n\n## Steps To Reproduce & PoC\n\nTest code:\n\n```js\nconst axios = require('axios');\n\naxios.get('http://127.0.0.1:10081/', {\n headers: {\n 'AuThorization': 'Rear Test',\n 'ProXy-AuthoriZation': 'Rear Test',\n 'coOkie': 't=1'\n }\n})\n .then((response) => {\n console.log(response);\n })\n```\n\nWhen I meet the cross-domain redirect, the sensitive headers like authorization and cookie are cleared, but proxy-authentication header is kept.\n\n## Impact\n\nThis vulnerability may lead to credentials leak.\n\n## Recommendations\n\nRemove proxy-authentication header during cross-domain redirect\n\n### Recommended Patch\n\n[follow-redirects/index.js:464](https://github.com/follow-redirects/follow-redirects/commit/c4f847f85176991f95ab9c88af63b1294de8649b)\n\n```diff\n- removeMatchingHeaders(/^(?:authorization|cookie)$/i, this._options.headers);\n+ removeMatchingHeaders(/^(?:authorization|proxy-authorization|cookie)$/i, this._options.headers);\n```","url":"https://github.com/advisories/GHSA-cxjh-pqwp-8mfp"},"1097504":{"findings":[{"version":"2.5.207","paths":["@hmcts/media-viewer>pdfjs-dist"]}],"metadata":null,"vulnerable_versions":"<=4.1.392","module_name":"pdfjs-dist","severity":"high","github_advisory_id":"GHSA-wgrm-67xf-hhpq","cves":["CVE-2024-4367"],"access":"public","patched_versions":">=4.2.67","cvss":{"score":0,"vectorString":null},"updated":"2024-06-10T20:18:19.000Z","recommendation":"Upgrade to version 4.2.67 or later","cwe":[],"found_by":null,"deleted":null,"id":1097504,"references":"- https://github.com/mozilla/pdf.js/security/advisories/GHSA-wgrm-67xf-hhpq\n- https://github.com/mozilla/pdf.js/pull/18015\n- https://github.com/mozilla/pdf.js/commit/85e64b5c16c9aaef738f421733c12911a441cec6\n- https://bugzilla.mozilla.org/show_bug.cgi?id=1893645\n- https://nvd.nist.gov/vuln/detail/CVE-2024-4367\n- https://lists.debian.org/debian-lts-announce/2024/05/msg00010.html\n- https://lists.debian.org/debian-lts-announce/2024/05/msg00012.html\n- https://www.mozilla.org/security/advisories/mfsa2024-21\n- https://www.mozilla.org/security/advisories/mfsa2024-22\n- https://www.mozilla.org/security/advisories/mfsa2024-23\n- https://github.com/advisories/GHSA-wgrm-67xf-hhpq","created":"2024-05-07T10:25:08.000Z","reported_by":null,"title":"PDF.js vulnerable to arbitrary JavaScript execution upon opening a malicious PDF","npm_advisory_id":null,"overview":"### Impact\nIf pdf.js is used to load a malicious PDF, and PDF.js is configured with `isEvalSupported` set to `true` (which is the default value), unrestricted attacker-controlled JavaScript will be executed in the context of the hosting domain.\n\n### Patches\nThe patch removes the use of `eval`:\nhttps://github.com/mozilla/pdf.js/pull/18015\n\n### Workarounds\nSet the option `isEvalSupported` to `false`. \n\n### References\nhttps://bugzilla.mozilla.org/show_bug.cgi?id=1893645","url":"https://github.com/advisories/GHSA-wgrm-67xf-hhpq"},"1097679":{"findings":[{"version":"0.26.1","paths":["axios","@hmcts/rpx-xui-node-lib>axios","accessibility-checker>chromedriver>axios"]}],"metadata":null,"vulnerable_versions":">=0.8.1 <0.28.0","module_name":"axios","severity":"moderate","github_advisory_id":"GHSA-wf5p-g6vw-rhxx","cves":["CVE-2023-45857"],"access":"public","patched_versions":">=0.28.0","cvss":{"score":6.5,"vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N"},"updated":"2024-06-21T21:33:58.000Z","recommendation":"Upgrade to version 0.28.0 or later","cwe":["CWE-352"],"found_by":null,"deleted":null,"id":1097679,"references":"- https://nvd.nist.gov/vuln/detail/CVE-2023-45857\n- https://github.com/axios/axios/issues/6006\n- https://github.com/axios/axios/issues/6022\n- https://github.com/axios/axios/pull/6028\n- https://github.com/axios/axios/commit/96ee232bd3ee4de2e657333d4d2191cd389e14d0\n- https://github.com/axios/axios/releases/tag/v1.6.0\n- https://security.snyk.io/vuln/SNYK-JS-AXIOS-6032459\n- https://github.com/axios/axios/pull/6091\n- https://github.com/axios/axios/commit/2755df562b9c194fba6d8b609a383443f6a6e967\n- https://github.com/axios/axios/releases/tag/v0.28.0\n- https://security.netapp.com/advisory/ntap-20240621-0006\n- https://github.com/advisories/GHSA-wf5p-g6vw-rhxx","created":"2023-11-08T21:30:37.000Z","reported_by":null,"title":"Axios Cross-Site Request Forgery Vulnerability","npm_advisory_id":null,"overview":"An issue discovered in Axios 0.8.1 through 1.5.1 inadvertently reveals the confidential XSRF-TOKEN stored in cookies by including it in the HTTP header X-XSRF-TOKEN for every request made to any host allowing attackers to view sensitive information.","url":"https://github.com/advisories/GHSA-wf5p-g6vw-rhxx"},"1097682":{"findings":[{"version":"2.5.0","paths":["rx-polling-hmcts>jest-environment-jsdom>jsdom>tough-cookie","protractor-screenshot-utils>protractor>webdriver-manager>request>tough-cookie"]}],"metadata":null,"vulnerable_versions":"<4.1.3","module_name":"tough-cookie","severity":"moderate","github_advisory_id":"GHSA-72xf-g2v4-qvf3","cves":["CVE-2023-26136"],"access":"public","patched_versions":">=4.1.3","cvss":{"score":6.5,"vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N"},"updated":"2024-06-21T21:33:53.000Z","recommendation":"Upgrade to version 4.1.3 or later","cwe":["CWE-1321"],"found_by":null,"deleted":null,"id":1097682,"references":"- https://nvd.nist.gov/vuln/detail/CVE-2023-26136\n- https://github.com/salesforce/tough-cookie/issues/282\n- https://github.com/salesforce/tough-cookie/commit/12d474791bb856004e858fdb1c47b7608d09cf6e\n- https://github.com/salesforce/tough-cookie/releases/tag/v4.1.3\n- https://security.snyk.io/vuln/SNYK-JS-TOUGHCOOKIE-5672873\n- https://lists.debian.org/debian-lts-announce/2023/07/msg00010.html\n- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/3HUE6ZR5SL73KHL7XUPAOEL6SB7HUDT2\n- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/6PVVPNSAGSDS63HQ74PJ7MZ3MU5IYNVZ\n- https://security.netapp.com/advisory/ntap-20240621-0006\n- https://github.com/advisories/GHSA-72xf-g2v4-qvf3","created":"2023-07-01T06:30:16.000Z","reported_by":null,"title":"tough-cookie Prototype Pollution vulnerability","npm_advisory_id":null,"overview":"Versions of the package tough-cookie before 4.1.3 are vulnerable to Prototype Pollution due to improper handling of Cookies when using CookieJar in `rejectPublicSuffixes=false` mode. This issue arises from the manner in which the objects are initialized.","url":"https://github.com/advisories/GHSA-72xf-g2v4-qvf3"}},"muted":[],"metadata":{"vulnerabilities":{"info":0,"low":0,"moderate":20,"high":1,"critical":0},"dependencies":1024,"devDependencies":1,"optionalDependencies":0,"totalDependencies":1025}} +{"actions":[],"advisories":{"1088948":{"findings":[{"version":"9.6.0","paths":["@hmcts/rpx-xui-node-lib>openid-client>got"]}],"metadata":null,"vulnerable_versions":"<11.8.5","module_name":"got","severity":"moderate","github_advisory_id":"GHSA-pfrx-2q88-qq97","cves":["CVE-2022-33987"],"access":"public","patched_versions":">=11.8.5","cvss":{"score":5.3,"vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N"},"updated":"2023-01-27T05:05:01.000Z","recommendation":"Upgrade to version 11.8.5 or later","cwe":[],"found_by":null,"deleted":null,"id":1088948,"references":"- https://nvd.nist.gov/vuln/detail/CVE-2022-33987\n- https://github.com/sindresorhus/got/pull/2047\n- https://github.com/sindresorhus/got/compare/v12.0.3...v12.1.0\n- https://github.com/sindresorhus/got/commit/861ccd9ac2237df762a9e2beed7edd88c60782dc\n- https://github.com/sindresorhus/got/releases/tag/v11.8.5\n- https://github.com/sindresorhus/got/releases/tag/v12.1.0\n- https://github.com/advisories/GHSA-pfrx-2q88-qq97","created":"2022-06-19T00:00:21.000Z","reported_by":null,"title":"Got allows a redirect to a UNIX socket","npm_advisory_id":null,"overview":"The got package before 11.8.5 and 12.1.0 for Node.js allows a redirect to a UNIX socket.","url":"https://github.com/advisories/GHSA-pfrx-2q88-qq97"},"1093639":{"findings":[{"version":"0.4.1","paths":["@hmcts/rpx-xui-node-lib>passport"]}],"metadata":null,"vulnerable_versions":"<0.6.0","module_name":"passport","severity":"moderate","github_advisory_id":"GHSA-v923-w3x8-wh69","cves":["CVE-2022-25896"],"access":"public","patched_versions":">=0.6.0","cvss":{"score":4.8,"vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:L"},"updated":"2023-09-11T16:22:18.000Z","recommendation":"Upgrade to version 0.6.0 or later","cwe":["CWE-384"],"found_by":null,"deleted":null,"id":1093639,"references":"- https://nvd.nist.gov/vuln/detail/CVE-2022-25896\n- https://github.com/jaredhanson/passport/pull/900\n- https://github.com/jaredhanson/passport/commit/7e9b9cf4d7be02428e963fc729496a45baeea608\n- https://snyk.io/vuln/SNYK-JS-PASSPORT-2840631\n- https://github.com/advisories/GHSA-v923-w3x8-wh69","created":"2022-07-02T00:00:19.000Z","reported_by":null,"title":"Passport vulnerable to session regeneration when a users logs in or out","npm_advisory_id":null,"overview":"This affects the package passport before 0.6.0. When a user logs in or logs out, the session is regenerated instead of being closed.","url":"https://github.com/advisories/GHSA-v923-w3x8-wh69"},"1094544":{"findings":[{"version":"8.4.29","paths":["@angular/ssr>critters>postcss"]}],"metadata":null,"vulnerable_versions":"<8.4.31","module_name":"postcss","severity":"moderate","github_advisory_id":"GHSA-7fh5-64p2-3v2j","cves":["CVE-2023-44270"],"access":"public","patched_versions":">=8.4.31","cvss":{"score":5.3,"vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N"},"updated":"2023-11-05T05:05:37.000Z","recommendation":"Upgrade to version 8.4.31 or later","cwe":["CWE-74","CWE-144"],"found_by":null,"deleted":null,"id":1094544,"references":"- https://nvd.nist.gov/vuln/detail/CVE-2023-44270\n- https://github.com/postcss/postcss/commit/58cc860b4c1707510c9cd1bc1fa30b423a9ad6c5\n- https://github.com/postcss/postcss/blob/main/lib/tokenize.js#L25\n- https://github.com/postcss/postcss/releases/tag/8.4.31\n- https://github.com/github/advisory-database/issues/2820\n- https://github.com/advisories/GHSA-7fh5-64p2-3v2j","created":"2023-09-30T00:31:10.000Z","reported_by":null,"title":"PostCSS line return parsing error","npm_advisory_id":null,"overview":"An issue was discovered in PostCSS before 8.4.31. It affects linters using PostCSS to parse external Cascading Style Sheets (CSS). There may be `\\r` discrepancies, as demonstrated by `@font-face{ font:(\\r/*);}` in a rule.\n\nThis vulnerability affects linters using PostCSS to parse external untrusted CSS. An attacker can prepare CSS in such a way that it will contains parts parsed by PostCSS as a CSS comment. After processing by PostCSS, it will be included in the PostCSS output in CSS nodes (rules, properties) despite being originally included in a comment.","url":"https://github.com/advisories/GHSA-7fh5-64p2-3v2j"},"1094902":{"findings":[{"version":"116.0.0","paths":["accessibility-checker>chromedriver"]}],"metadata":null,"vulnerable_versions":"<119.0.1","module_name":"chromedriver","severity":"moderate","github_advisory_id":"GHSA-hm92-vgmw-qfmx","cves":["CVE-2023-26156"],"access":"public","patched_versions":">=119.0.1","cvss":{"score":5.6,"vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L"},"updated":"2023-11-17T22:12:01.000Z","recommendation":"Upgrade to version 119.0.1 or later","cwe":["CWE-78"],"found_by":null,"deleted":null,"id":1094902,"references":"- https://nvd.nist.gov/vuln/detail/CVE-2023-26156\n- https://github.com/giggio/node-chromedriver/commit/de961e34e023afcf4fa5c0faeeec69aaa6c3c815\n- https://gist.github.com/mcoimbra/47b1da554a80795c45126d51e41b2b18\n- https://security.snyk.io/vuln/SNYK-JS-CHROMEDRIVER-6049539\n- https://github.com/advisories/GHSA-hm92-vgmw-qfmx","created":"2023-11-09T06:30:28.000Z","reported_by":null,"title":"chromedriver Command Injection vulnerability","npm_advisory_id":null,"overview":"Versions of the package chromedriver before 119.0.1 are vulnerable to Command Injection when setting the chromedriver.path to an arbitrary system binary. This could lead to unauthorized access and potentially malicious actions on the host system.\n\n**Note:**\n\nAn attacker must have access to the system running the vulnerable chromedriver library to exploit it. The success of exploitation also depends on the permissions and privileges of the process running chromedriver. ","url":"https://github.com/advisories/GHSA-hm92-vgmw-qfmx"},"1096353":{"findings":[{"version":"1.15.3","paths":["axios>follow-redirects","@hmcts/rpx-xui-node-lib>axios>follow-redirects","accessibility-checker>chromedriver>axios>follow-redirects"]}],"metadata":null,"vulnerable_versions":"<1.15.4","module_name":"follow-redirects","severity":"moderate","github_advisory_id":"GHSA-jchw-25xp-jwwc","cves":["CVE-2023-26159"],"access":"public","patched_versions":">=1.15.4","cvss":{"score":6.1,"vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"},"updated":"2024-01-31T05:07:10.000Z","recommendation":"Upgrade to version 1.15.4 or later","cwe":["CWE-20","CWE-601"],"found_by":null,"deleted":null,"id":1096353,"references":"- https://nvd.nist.gov/vuln/detail/CVE-2023-26159\n- https://github.com/follow-redirects/follow-redirects/issues/235\n- https://github.com/follow-redirects/follow-redirects/pull/236\n- https://security.snyk.io/vuln/SNYK-JS-FOLLOWREDIRECTS-6141137\n- https://github.com/follow-redirects/follow-redirects/commit/7a6567e16dfa9ad18a70bfe91784c28653fbf19d\n- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZZ425BFKNBQ6AK7I5SAM56TWON5OF2XM/\n- https://github.com/advisories/GHSA-jchw-25xp-jwwc","created":"2024-01-02T06:30:30.000Z","reported_by":null,"title":"Follow Redirects improperly handles URLs in the url.parse() function","npm_advisory_id":null,"overview":"Versions of the package follow-redirects before 1.15.4 are vulnerable to Improper Input Validation due to the improper handling of URLs by the url.parse() function. When new URL() throws an error, it can be manipulated to misinterpret the hostname. An attacker could exploit this weakness to redirect traffic to a malicious site, potentially leading to information disclosure, phishing attacks, or other security breaches.","url":"https://github.com/advisories/GHSA-jchw-25xp-jwwc"},"1096693":{"findings":[{"version":"0.4.23","paths":["protractor-screenshot-utils>protractor>selenium-webdriver>xml2js","protractor-screenshot-utils>protractor>webdriver-js-extender>selenium-webdriver>xml2js"]}],"metadata":null,"vulnerable_versions":"<0.5.0","module_name":"xml2js","severity":"moderate","github_advisory_id":"GHSA-776f-qx25-q3cc","cves":["CVE-2023-0842"],"access":"public","patched_versions":">=0.5.0","cvss":{"score":5.3,"vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N"},"updated":"2024-03-14T21:47:27.000Z","recommendation":"Upgrade to version 0.5.0 or later","cwe":["CWE-1321"],"found_by":null,"deleted":null,"id":1096693,"references":"- https://nvd.nist.gov/vuln/detail/CVE-2023-0842\n- https://github.com/Leonidas-from-XIV/node-xml2js/issues/663\n- https://github.com/Leonidas-from-XIV/node-xml2js/pull/603/commits/581b19a62d88f8a3c068b5a45f4542c2d6a495a5\n- https://fluidattacks.com/advisories/myers\n- https://github.com/Leonidas-from-XIV/node-xml2js\n- https://lists.debian.org/debian-lts-announce/2024/03/msg00013.html\n- https://github.com/advisories/GHSA-776f-qx25-q3cc","created":"2023-04-05T21:30:24.000Z","reported_by":null,"title":"xml2js is vulnerable to prototype pollution","npm_advisory_id":null,"overview":"xml2js versions before 0.5.0 allows an external attacker to edit or add new properties to an object. This is possible because the application does not properly validate incoming JSON keys, thus allowing the `__proto__` property to be edited.","url":"https://github.com/advisories/GHSA-776f-qx25-q3cc"},"1096727":{"findings":[{"version":"2.88.2","paths":["protractor-screenshot-utils>protractor>webdriver-manager>request"]}],"metadata":null,"vulnerable_versions":"<=2.88.2","module_name":"request","severity":"moderate","github_advisory_id":"GHSA-p8p7-x288-28g6","cves":["CVE-2023-28155"],"access":"public","patched_versions":"<0.0.0","cvss":{"score":6.1,"vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"},"updated":"2024-03-21T17:47:21.000Z","recommendation":"None","cwe":["CWE-918"],"found_by":null,"deleted":null,"id":1096727,"references":"- https://nvd.nist.gov/vuln/detail/CVE-2023-28155\n- https://github.com/request/request/issues/3442\n- https://github.com/request/request/pull/3444\n- https://doyensec.com/resources/Doyensec_Advisory_RequestSSRF_Q12023.pdf\n- https://github.com/github/advisory-database/pull/2500\n- https://github.com/cypress-io/request/blob/master/lib/redirect.js#L116\n- https://github.com/request/request/blob/master/lib/redirect.js#L111\n- https://github.com/cypress-io/request/pull/28\n- https://github.com/cypress-io/request/commit/c5bcf21d40fb61feaff21a0e5a2b3934a440024f\n- https://github.com/cypress-io/request/releases/tag/v3.0.0\n- https://security.netapp.com/advisory/ntap-20230413-0007\n- https://github.com/advisories/GHSA-p8p7-x288-28g6","created":"2023-03-16T15:30:19.000Z","reported_by":null,"title":"Server-Side Request Forgery in Request","npm_advisory_id":null,"overview":"The `request` package through 2.88.2 for Node.js and the `@cypress/request` package prior to 3.0.0 allow a bypass of SSRF mitigations via an attacker-controller server that does a cross-protocol redirect (HTTP to HTTPS, or HTTPS to HTTP).\n\nNOTE: The `request` package is no longer supported by the maintainer.","url":"https://github.com/advisories/GHSA-p8p7-x288-28g6"},"1096820":{"findings":[{"version":"4.18.2","paths":["@hmcts/rpx-xui-node-lib>express"]}],"metadata":null,"vulnerable_versions":"<4.19.2","module_name":"express","severity":"moderate","github_advisory_id":"GHSA-rv95-896h-c2vc","cves":["CVE-2024-29041"],"access":"public","patched_versions":">=4.19.2","cvss":{"score":6.1,"vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"},"updated":"2024-03-27T21:47:29.000Z","recommendation":"Upgrade to version 4.19.2 or later","cwe":["CWE-601","CWE-1286"],"found_by":null,"deleted":null,"id":1096820,"references":"- https://github.com/expressjs/express/security/advisories/GHSA-rv95-896h-c2vc\n- https://github.com/koajs/koa/issues/1800\n- https://github.com/expressjs/express/pull/5539\n- https://github.com/expressjs/express/commit/0867302ddbde0e9463d0564fea5861feb708c2dd\n- https://github.com/expressjs/express/commit/0b746953c4bd8e377123527db11f9cd866e39f94\n- https://expressjs.com/en/4x/api.html#res.location\n- https://nvd.nist.gov/vuln/detail/CVE-2024-29041\n- https://github.com/advisories/GHSA-rv95-896h-c2vc","created":"2024-03-25T19:40:26.000Z","reported_by":null,"title":"Express.js Open Redirect in malformed URLs","npm_advisory_id":null,"overview":"### Impact\n\nVersions of Express.js prior to 4.19.2 and pre-release alpha and beta versions before 5.0.0-beta.3 are affected by an open redirect vulnerability using malformed URLs.\n\nWhen a user of Express performs a redirect using a user-provided URL Express performs an encode [using `encodeurl`](https://github.com/pillarjs/encodeurl) on the contents before passing it to the `location` header. This can cause malformed URLs to be evaluated in unexpected ways by common redirect allow list implementations in Express applications, leading to an Open Redirect via bypass of a properly implemented allow list.\n\nThe main method impacted is `res.location()` but this is also called from within `res.redirect()`.\n\n### Patches\n\nhttps://github.com/expressjs/express/commit/0867302ddbde0e9463d0564fea5861feb708c2dd\nhttps://github.com/expressjs/express/commit/0b746953c4bd8e377123527db11f9cd866e39f94\n\nAn initial fix went out with `express@4.19.0`, we then patched a feature regression in `4.19.1` and added improved handling for the bypass in `4.19.2`.\n\n### Workarounds\n\nThe fix for this involves pre-parsing the url string with either `require('node:url').parse` or `new URL`. These are steps you can take on your own before passing the user input string to `res.location` or `res.redirect`.\n\n### References\n\nhttps://github.com/expressjs/express/pull/5539\nhttps://github.com/koajs/koa/issues/1800\nhttps://expressjs.com/en/4x/api.html#res.location","url":"https://github.com/advisories/GHSA-rv95-896h-c2vc"},"1096832":{"findings":[{"version":"1.28.2","paths":["@hmcts/rpx-xui-node-lib>openid-client>jose"]}],"metadata":null,"vulnerable_versions":"<2.0.7","module_name":"jose","severity":"moderate","github_advisory_id":"GHSA-hhhv-q57g-882q","cves":["CVE-2024-28176"],"access":"public","patched_versions":">=2.0.7","cvss":{"score":5.3,"vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"},"updated":"2024-03-30T06:30:42.000Z","recommendation":"Upgrade to version 2.0.7 or later","cwe":["CWE-400"],"found_by":null,"deleted":null,"id":1096832,"references":"- https://github.com/panva/jose/security/advisories/GHSA-hhhv-q57g-882q\n- https://github.com/panva/jose/commit/02a65794f7873cdaf12e81e80ad076fcdc4a9314\n- https://github.com/panva/jose/commit/1b91d88d2f8233f3477a5f4579aa5f8057b2ee8b\n- https://nvd.nist.gov/vuln/detail/CVE-2024-28176\n- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XJDO5VSIAOGT2WP63AXAAWNRSVJCNCRH\n- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/KXKGNCRU7OTM5AHC7YIYBNOWI742PRMY\n- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/I6MMWFBOXJA6ZCXNVPDFJ4XMK5PVG5RG\n- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/UJO2U5ACZVACNQXJ5EBRFLFW6DP5BROY\n- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/UG5FSEYJ3GP27FZXC5YAAMMEC5XWKJHG\n- https://github.com/advisories/GHSA-hhhv-q57g-882q","created":"2024-03-07T17:40:57.000Z","reported_by":null,"title":"jose vulnerable to resource exhaustion via specifically crafted JWE with compressed plaintext","npm_advisory_id":null,"overview":"A vulnerability has been identified in the JSON Web Encryption (JWE) decryption interfaces, specifically related to the [support for decompressing plaintext after its decryption](https://www.rfc-editor.org/rfc/rfc7516.html#section-4.1.3). This allows an adversary to exploit specific scenarios where the compression ratio becomes exceptionally high. As a result, the length of the JWE token, which is determined by the compressed content's size, can land below application-defined limits. In such cases, other existing application level mechanisms for preventing resource exhaustion may be rendered ineffective.\n\nNote that as per [RFC 8725](https://www.rfc-editor.org/rfc/rfc8725.html#name-avoid-compression-of-encryp) compression of data SHOULD NOT be done before encryption, because such compressed data often reveals information about the plaintext. For this reason the v5.x major version of `jose` removed support for compressed payloads entirely and is therefore NOT affected by this advisory.\n\n### Impact\n\nUnder certain conditions it is possible to have the user's environment consume unreasonable amount of CPU time or memory during JWE Decryption operations.\n\n### Affected users\n\nThe impact is limited only to Node.js users utilizing the JWE decryption APIs to decrypt JWEs from untrusted sources.\n\nYou are NOT affected if any of the following applies to you\n\n- Your code uses jose version v5.x where JWE Compression is not supported anymore\n- Your code runs in an environment other than Node.js (e.g. Deno, CF Workers), which is the only runtime where JWE Compression is implemented out of the box\n- Your code does not use the JWE decryption APIs\n- Your code only accepts JWEs produced by trusted sources\n\n### Patches\n\n`v2.0.7` and `v4.15.5` releases limit the decompression routine to only allow decompressing up to 250 kB of plaintext. In v4.x it is possible to further adjust this limit via the `inflateRaw` decryption option implementation. In v2.x it is possible to further adjust this limit via the `inflateRawSyncLimit` decryption option.\n\n### Workarounds\n\nIf you cannot upgrade and do not want to support compressed JWEs you may detect and reject these tokens early by checking the token's protected header\n\n```js\nconst { zip } = jose.decodeProtectedHeader(token)\nif (zip !== undefined) {\n throw new Error('JWE Compression is not supported')\n}\n```\n\nIf you wish to continue supporting JWEs with compressed payloads in these legacy release lines you must upgrade (v1.x and v2.x to version v2.0.7, v3.x and v4.x to version v4.15.5) and review the limits put forth by the patched releases.\n\n### For more information\nIf you have any questions or comments about this advisory please open a discussion in the project's [repository](https://github.com/panva/jose/discussions/new?category=q-a&title=GHSA-hhhv-q57g-882q%20advisory%20question)","url":"https://github.com/advisories/GHSA-hhhv-q57g-882q"},"1096856":{"findings":[{"version":"1.15.3","paths":["axios>follow-redirects","@hmcts/rpx-xui-node-lib>axios>follow-redirects","accessibility-checker>chromedriver>axios>follow-redirects"]}],"metadata":null,"vulnerable_versions":"<=1.15.5","module_name":"follow-redirects","severity":"moderate","github_advisory_id":"GHSA-cxjh-pqwp-8mfp","cves":["CVE-2024-28849"],"access":"public","patched_versions":">=1.15.6","cvss":{"score":6.5,"vectorString":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N"},"updated":"2024-04-02T17:54:22.000Z","recommendation":"Upgrade to version 1.15.6 or later","cwe":["CWE-200"],"found_by":null,"deleted":null,"id":1096856,"references":"- https://github.com/follow-redirects/follow-redirects/security/advisories/GHSA-cxjh-pqwp-8mfp\n- https://github.com/follow-redirects/follow-redirects/commit/c4f847f85176991f95ab9c88af63b1294de8649b\n- https://fetch.spec.whatwg.org/#authentication-entries\n- https://nvd.nist.gov/vuln/detail/CVE-2024-28849\n- https://github.com/psf/requests/issues/1885\n- https://hackerone.com/reports/2390009\n- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/VOIF4EPQUCKDBEVTGRQDZ3CGTYQHPO7Z\n- https://github.com/advisories/GHSA-cxjh-pqwp-8mfp","created":"2024-03-14T17:19:42.000Z","reported_by":null,"title":"follow-redirects' Proxy-Authorization header kept across hosts","npm_advisory_id":null,"overview":"When using [axios](https://github.com/axios/axios), its dependency follow-redirects only clears authorization header during cross-domain redirect, but allows the proxy-authentication header which contains credentials too.\n\n## Steps To Reproduce & PoC\n\nTest code:\n\n```js\nconst axios = require('axios');\n\naxios.get('http://127.0.0.1:10081/', {\n headers: {\n 'AuThorization': 'Rear Test',\n 'ProXy-AuthoriZation': 'Rear Test',\n 'coOkie': 't=1'\n }\n})\n .then((response) => {\n console.log(response);\n })\n```\n\nWhen I meet the cross-domain redirect, the sensitive headers like authorization and cookie are cleared, but proxy-authentication header is kept.\n\n## Impact\n\nThis vulnerability may lead to credentials leak.\n\n## Recommendations\n\nRemove proxy-authentication header during cross-domain redirect\n\n### Recommended Patch\n\n[follow-redirects/index.js:464](https://github.com/follow-redirects/follow-redirects/commit/c4f847f85176991f95ab9c88af63b1294de8649b)\n\n```diff\n- removeMatchingHeaders(/^(?:authorization|cookie)$/i, this._options.headers);\n+ removeMatchingHeaders(/^(?:authorization|proxy-authorization|cookie)$/i, this._options.headers);\n```","url":"https://github.com/advisories/GHSA-cxjh-pqwp-8mfp"},"1097504":{"findings":[{"version":"2.5.207","paths":["@hmcts/media-viewer>pdfjs-dist"]}],"metadata":null,"vulnerable_versions":"<=4.1.392","module_name":"pdfjs-dist","severity":"high","github_advisory_id":"GHSA-wgrm-67xf-hhpq","cves":["CVE-2024-4367"],"access":"public","patched_versions":">=4.2.67","cvss":{"score":0,"vectorString":null},"updated":"2024-06-10T20:18:19.000Z","recommendation":"Upgrade to version 4.2.67 or later","cwe":[],"found_by":null,"deleted":null,"id":1097504,"references":"- https://github.com/mozilla/pdf.js/security/advisories/GHSA-wgrm-67xf-hhpq\n- https://github.com/mozilla/pdf.js/pull/18015\n- https://github.com/mozilla/pdf.js/commit/85e64b5c16c9aaef738f421733c12911a441cec6\n- https://bugzilla.mozilla.org/show_bug.cgi?id=1893645\n- https://nvd.nist.gov/vuln/detail/CVE-2024-4367\n- https://lists.debian.org/debian-lts-announce/2024/05/msg00010.html\n- https://lists.debian.org/debian-lts-announce/2024/05/msg00012.html\n- https://www.mozilla.org/security/advisories/mfsa2024-21\n- https://www.mozilla.org/security/advisories/mfsa2024-22\n- https://www.mozilla.org/security/advisories/mfsa2024-23\n- https://github.com/advisories/GHSA-wgrm-67xf-hhpq","created":"2024-05-07T10:25:08.000Z","reported_by":null,"title":"PDF.js vulnerable to arbitrary JavaScript execution upon opening a malicious PDF","npm_advisory_id":null,"overview":"### Impact\nIf pdf.js is used to load a malicious PDF, and PDF.js is configured with `isEvalSupported` set to `true` (which is the default value), unrestricted attacker-controlled JavaScript will be executed in the context of the hosting domain.\n\n### Patches\nThe patch removes the use of `eval`:\nhttps://github.com/mozilla/pdf.js/pull/18015\n\n### Workarounds\nSet the option `isEvalSupported` to `false`. \n\n### References\nhttps://bugzilla.mozilla.org/show_bug.cgi?id=1893645","url":"https://github.com/advisories/GHSA-wgrm-67xf-hhpq"},"1097679":{"findings":[{"version":"0.26.1","paths":["axios","@hmcts/rpx-xui-node-lib>axios","accessibility-checker>chromedriver>axios"]}],"metadata":null,"vulnerable_versions":">=0.8.1 <0.28.0","module_name":"axios","severity":"moderate","github_advisory_id":"GHSA-wf5p-g6vw-rhxx","cves":["CVE-2023-45857"],"access":"public","patched_versions":">=0.28.0","cvss":{"score":6.5,"vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N"},"updated":"2024-06-21T21:33:58.000Z","recommendation":"Upgrade to version 0.28.0 or later","cwe":["CWE-352"],"found_by":null,"deleted":null,"id":1097679,"references":"- https://nvd.nist.gov/vuln/detail/CVE-2023-45857\n- https://github.com/axios/axios/issues/6006\n- https://github.com/axios/axios/issues/6022\n- https://github.com/axios/axios/pull/6028\n- https://github.com/axios/axios/commit/96ee232bd3ee4de2e657333d4d2191cd389e14d0\n- https://github.com/axios/axios/releases/tag/v1.6.0\n- https://security.snyk.io/vuln/SNYK-JS-AXIOS-6032459\n- https://github.com/axios/axios/pull/6091\n- https://github.com/axios/axios/commit/2755df562b9c194fba6d8b609a383443f6a6e967\n- https://github.com/axios/axios/releases/tag/v0.28.0\n- https://security.netapp.com/advisory/ntap-20240621-0006\n- https://github.com/advisories/GHSA-wf5p-g6vw-rhxx","created":"2023-11-08T21:30:37.000Z","reported_by":null,"title":"Axios Cross-Site Request Forgery Vulnerability","npm_advisory_id":null,"overview":"An issue discovered in Axios 0.8.1 through 1.5.1 inadvertently reveals the confidential XSRF-TOKEN stored in cookies by including it in the HTTP header X-XSRF-TOKEN for every request made to any host allowing attackers to view sensitive information.","url":"https://github.com/advisories/GHSA-wf5p-g6vw-rhxx"},"1097682":{"findings":[{"version":"2.5.0","paths":["rx-polling-hmcts>jest-environment-jsdom>jsdom>tough-cookie","protractor-screenshot-utils>protractor>webdriver-manager>request>tough-cookie"]}],"metadata":null,"vulnerable_versions":"<4.1.3","module_name":"tough-cookie","severity":"moderate","github_advisory_id":"GHSA-72xf-g2v4-qvf3","cves":["CVE-2023-26136"],"access":"public","patched_versions":">=4.1.3","cvss":{"score":6.5,"vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N"},"updated":"2024-06-21T21:33:53.000Z","recommendation":"Upgrade to version 4.1.3 or later","cwe":["CWE-1321"],"found_by":null,"deleted":null,"id":1097682,"references":"- https://nvd.nist.gov/vuln/detail/CVE-2023-26136\n- https://github.com/salesforce/tough-cookie/issues/282\n- https://github.com/salesforce/tough-cookie/commit/12d474791bb856004e858fdb1c47b7608d09cf6e\n- https://github.com/salesforce/tough-cookie/releases/tag/v4.1.3\n- https://security.snyk.io/vuln/SNYK-JS-TOUGHCOOKIE-5672873\n- https://lists.debian.org/debian-lts-announce/2023/07/msg00010.html\n- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/3HUE6ZR5SL73KHL7XUPAOEL6SB7HUDT2\n- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/6PVVPNSAGSDS63HQ74PJ7MZ3MU5IYNVZ\n- https://security.netapp.com/advisory/ntap-20240621-0006\n- https://github.com/advisories/GHSA-72xf-g2v4-qvf3","created":"2023-07-01T06:30:16.000Z","reported_by":null,"title":"tough-cookie Prototype Pollution vulnerability","npm_advisory_id":null,"overview":"Versions of the package tough-cookie before 4.1.3 are vulnerable to Prototype Pollution due to improper handling of Cookies when using CookieJar in `rejectPublicSuffixes=false` mode. This issue arises from the manner in which the objects are initialized.","url":"https://github.com/advisories/GHSA-72xf-g2v4-qvf3"}},"muted":[],"metadata":{"vulnerabilities":{"info":0,"low":0,"moderate":20,"high":1,"critical":0},"dependencies":977,"devDependencies":97,"optionalDependencies":0,"totalDependencies":1074}} diff --git a/yarn.lock b/yarn.lock index 788dd1af80..075e95f247 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2574,6 +2574,13 @@ __metadata: languageName: node linkType: hard +"@cucumber/ci-environment@npm:10.0.1": + version: 10.0.1 + resolution: "@cucumber/ci-environment@npm:10.0.1" + checksum: c864b815f7c2d653b3f99f9d45ab5fa3580584eb48a4a0ffe8991eab0eec3ca568639fc2e8efed3c356f3471dc5ff5fba8e734e210a459f8f5f4a42c601383db + languageName: node + linkType: hard + "@cucumber/ci-environment@npm:9.1.0": version: 9.1.0 resolution: "@cucumber/ci-environment@npm:9.1.0" @@ -2599,6 +2606,15 @@ __metadata: languageName: node linkType: hard +"@cucumber/cucumber-expressions@npm:17.1.0": + version: 17.1.0 + resolution: "@cucumber/cucumber-expressions@npm:17.1.0" + dependencies: + regexp-match-indices: 1.0.2 + checksum: 1dcb70330893d0bc9ae851015845437b4ba56d980728bf9ac01356ad3f82e0fcba07b152ce009a1645dab54bd346f4a2f664b3b64c4426190c4638bbf64ad2e0 + languageName: node + linkType: hard + "@cucumber/cucumber@npm:9.1.2": version: 9.1.2 resolution: "@cucumber/cucumber@npm:9.1.2" @@ -2649,6 +2665,57 @@ __metadata: languageName: node linkType: hard +"@cucumber/cucumber@npm:^10.8.0": + version: 10.8.0 + resolution: "@cucumber/cucumber@npm:10.8.0" + dependencies: + "@cucumber/ci-environment": 10.0.1 + "@cucumber/cucumber-expressions": 17.1.0 + "@cucumber/gherkin": 28.0.0 + "@cucumber/gherkin-streams": 5.0.1 + "@cucumber/gherkin-utils": 9.0.0 + "@cucumber/html-formatter": 21.3.1 + "@cucumber/message-streams": 4.0.1 + "@cucumber/messages": 24.1.0 + "@cucumber/tag-expressions": 6.1.0 + assertion-error-formatter: ^3.0.0 + capital-case: ^1.0.4 + chalk: ^4.1.2 + cli-table3: 0.6.3 + commander: ^10.0.0 + debug: ^4.3.4 + error-stack-parser: ^2.1.4 + figures: ^3.2.0 + glob: ^10.3.10 + has-ansi: ^4.0.1 + indent-string: ^4.0.0 + is-installed-globally: ^0.4.0 + is-stream: ^2.0.0 + knuth-shuffle-seeded: ^1.0.6 + lodash.merge: ^4.6.2 + lodash.mergewith: ^4.6.2 + luxon: 3.2.1 + mkdirp: ^2.1.5 + mz: ^2.7.0 + progress: ^2.0.3 + read-pkg-up: ^7.0.1 + resolve-pkg: ^2.0.0 + semver: 7.5.3 + string-argv: 0.3.1 + strip-ansi: 6.0.1 + supports-color: ^8.1.1 + tmp: 0.2.3 + type-fest: ^4.8.3 + util-arity: ^1.1.0 + xmlbuilder: ^15.1.1 + yaml: ^2.2.2 + yup: 1.2.0 + bin: + cucumber-js: bin/cucumber.js + checksum: 970112e541cd57d4cb627ff592e7d23b03f29b668b1d73bd331d44b4f08068caa42064eb2c29ab8a82e696a902048f11a1badc4856cf186e4deb8175cefcbeb6 + languageName: node + linkType: hard + "@cucumber/gherkin-streams@npm:5.0.1": version: 5.0.1 resolution: "@cucumber/gherkin-streams@npm:5.0.1" @@ -2680,6 +2747,21 @@ __metadata: languageName: node linkType: hard +"@cucumber/gherkin-utils@npm:9.0.0": + version: 9.0.0 + resolution: "@cucumber/gherkin-utils@npm:9.0.0" + dependencies: + "@cucumber/gherkin": ^28.0.0 + "@cucumber/messages": ^24.0.0 + "@teppeis/multimaps": 3.0.0 + commander: 12.0.0 + source-map-support: ^0.5.21 + bin: + gherkin-utils: bin/gherkin-utils + checksum: f23a830622f1a426b288108d499593e757de0f49cd23d121d8c9d16f064f2121fe5bfc37591f06fb31e648947f5294a8b69b5d3b68e3e851cb872b6a536b91b4 + languageName: node + linkType: hard + "@cucumber/gherkin@npm:26": version: 26.2.0 resolution: "@cucumber/gherkin@npm:26.2.0" @@ -2698,6 +2780,15 @@ __metadata: languageName: node linkType: hard +"@cucumber/gherkin@npm:28.0.0, @cucumber/gherkin@npm:^28.0.0": + version: 28.0.0 + resolution: "@cucumber/gherkin@npm:28.0.0" + dependencies: + "@cucumber/messages": ">=19.1.4 <=24" + checksum: de0681fbbf4532b7529cd037d2c91faa2490d2b973c5bddad0f07bedc1b3130006b7e551286034cf21a4fa74072354bd49bbe59a2bdf7206bc7a357ab43fbd69 + languageName: node + linkType: hard + "@cucumber/gherkin@npm:^25.0.0": version: 25.0.2 resolution: "@cucumber/gherkin@npm:25.0.2" @@ -2716,6 +2807,15 @@ __metadata: languageName: node linkType: hard +"@cucumber/html-formatter@npm:21.3.1": + version: 21.3.1 + resolution: "@cucumber/html-formatter@npm:21.3.1" + peerDependencies: + "@cucumber/messages": ">=18" + checksum: d8524a5c1f2da616e48790642bf29e1c97c14e348fd9f127f6b81e20bd417e37539d937864de4ec3825d6e8a619c2bc1cd3f155e80aa9618f51eadbbd7e041e9 + languageName: node + linkType: hard + "@cucumber/message-streams@npm:4.0.1": version: 4.0.1 resolution: "@cucumber/message-streams@npm:4.0.1" @@ -2749,6 +2849,18 @@ __metadata: languageName: node linkType: hard +"@cucumber/messages@npm:24.1.0, @cucumber/messages@npm:>=19.1.4 <=24, @cucumber/messages@npm:^24.0.0": + version: 24.1.0 + resolution: "@cucumber/messages@npm:24.1.0" + dependencies: + "@types/uuid": 9.0.8 + class-transformer: 0.5.1 + reflect-metadata: 0.2.1 + uuid: 9.0.1 + checksum: 9c82968394f7ff046a0d389dd4b90e5bef78b9b1045504de45abcdc9b53ca6143211c9bf92a86034ea63dccb1476cab892eebdfe6d4eecfc6731a82e2f7dea8d + languageName: node + linkType: hard + "@cucumber/messages@npm:^19.1.4": version: 19.1.4 resolution: "@cucumber/messages@npm:19.1.4" @@ -2768,6 +2880,13 @@ __metadata: languageName: node linkType: hard +"@cucumber/tag-expressions@npm:6.1.0": + version: 6.1.0 + resolution: "@cucumber/tag-expressions@npm:6.1.0" + checksum: 99f5dc032b78c00ba79dec48bcfb2f423797121fef72072cd0ac070b39c78584ae47649637a00390a19bc0e20332137bbeb17f6ec9ab87b6fd4d0c5cfd301c4d + languageName: node + linkType: hard + "@discoveryjs/json-ext@npm:0.5.7, @discoveryjs/json-ext@npm:^0.5.0": version: 0.5.7 resolution: "@discoveryjs/json-ext@npm:0.5.7" @@ -5854,6 +5973,13 @@ __metadata: languageName: node linkType: hard +"@teppeis/multimaps@npm:3.0.0": + version: 3.0.0 + resolution: "@teppeis/multimaps@npm:3.0.0" + checksum: 77ce74a3190d425738240261969205422c140db2e60afd7eb40641ab8b2244a3470c7d491a29d43acba03b6502cae0cf6c1a2094a8d8f1b50bd5b0912abed40d + languageName: node + linkType: hard + "@testim/chrome-version@npm:^1.1.3": version: 1.1.4 resolution: "@testim/chrome-version@npm:1.1.4" @@ -6387,6 +6513,13 @@ __metadata: languageName: node linkType: hard +"@types/normalize-package-data@npm:^2.4.0": + version: 2.4.4 + resolution: "@types/normalize-package-data@npm:2.4.4" + checksum: 65dff72b543997b7be8b0265eca7ace0e34b75c3e5fee31de11179d08fa7124a7a5587265d53d0409532ecb7f7fba662c2012807963e1f9b059653ec2c83ee05 + languageName: node + linkType: hard + "@types/pino-pretty@npm:*": version: 4.7.5 resolution: "@types/pino-pretty@npm:4.7.5" @@ -6576,6 +6709,13 @@ __metadata: languageName: node linkType: hard +"@types/uuid@npm:9.0.8": + version: 9.0.8 + resolution: "@types/uuid@npm:9.0.8" + checksum: b8c60b7ba8250356b5088302583d1704a4e1a13558d143c549c408bf8920535602ffc12394ede77f8a8083511b023704bc66d1345792714002bfa261b17c5275 + languageName: node + linkType: hard + "@types/ws@npm:^8.5.5": version: 8.5.11 resolution: "@types/ws@npm:8.5.11" @@ -9493,6 +9633,13 @@ __metadata: languageName: node linkType: hard +"commander@npm:12.0.0, commander@npm:~12.0.0": + version: 12.0.0 + resolution: "commander@npm:12.0.0" + checksum: bce9e243dc008baba6b8d923f95b251ad115e6e7551a15838d7568abebcca0fc832da1800cf37caf37852f35ce4b7fb794ba7a4824b88c5adb1395f9268642df + languageName: node + linkType: hard + "commander@npm:7, commander@npm:^7.0.0": version: 7.2.0 resolution: "commander@npm:7.2.0" @@ -9535,13 +9682,6 @@ __metadata: languageName: node linkType: hard -"commander@npm:~12.0.0": - version: 12.0.0 - resolution: "commander@npm:12.0.0" - checksum: bce9e243dc008baba6b8d923f95b251ad115e6e7551a15838d7568abebcca0fc832da1800cf37caf37852f35ce4b7fb794ba7a4824b88c5adb1395f9268642df - languageName: node - linkType: hard - "commander@npm:~3.0.2": version: 3.0.2 resolution: "commander@npm:3.0.2" @@ -18992,7 +19132,7 @@ __metadata: languageName: node linkType: hard -"normalize-package-data@npm:^2.3.2, normalize-package-data@npm:^2.3.4": +"normalize-package-data@npm:^2.3.2, normalize-package-data@npm:^2.3.4, normalize-package-data@npm:^2.5.0": version: 2.5.0 resolution: "normalize-package-data@npm:2.5.0" dependencies: @@ -19931,7 +20071,7 @@ __metadata: languageName: node linkType: hard -"parse-json@npm:^5.2.0": +"parse-json@npm:^5.0.0, parse-json@npm:^5.2.0": version: 5.2.0 resolution: "parse-json@npm:5.2.0" dependencies: @@ -20697,6 +20837,13 @@ __metadata: languageName: node linkType: hard +"property-expr@npm:^2.0.5": + version: 2.0.6 + resolution: "property-expr@npm:2.0.6" + checksum: 89977f4bb230736c1876f460dd7ca9328034502fd92e738deb40516d16564b850c0bbc4e052c3df88b5b8cd58e51c93b46a94bea049a3f23f4a022c038864cab + languageName: node + linkType: hard + "proto-list@npm:~1.2.1": version: 1.2.4 resolution: "proto-list@npm:1.2.4" @@ -21114,6 +21261,17 @@ __metadata: languageName: node linkType: hard +"read-pkg-up@npm:^7.0.1": + version: 7.0.1 + resolution: "read-pkg-up@npm:7.0.1" + dependencies: + find-up: ^4.1.0 + read-pkg: ^5.2.0 + type-fest: ^0.8.1 + checksum: e4e93ce70e5905b490ca8f883eb9e48b5d3cebc6cd4527c25a0d8f3ae2903bd4121c5ab9c5a3e217ada0141098eeb661313c86fa008524b089b8ed0b7f165e44 + languageName: node + linkType: hard + "read-pkg@npm:^1.0.0": version: 1.1.0 resolution: "read-pkg@npm:1.1.0" @@ -21136,6 +21294,18 @@ __metadata: languageName: node linkType: hard +"read-pkg@npm:^5.2.0": + version: 5.2.0 + resolution: "read-pkg@npm:5.2.0" + dependencies: + "@types/normalize-package-data": ^2.4.0 + normalize-package-data: ^2.5.0 + parse-json: ^5.0.0 + type-fest: ^0.6.0 + checksum: eb696e60528b29aebe10e499ba93f44991908c57d70f2d26f369e46b8b9afc208ef11b4ba64f67630f31df8b6872129e0a8933c8c53b7b4daf0eace536901222 + languageName: node + linkType: hard + "readable-stream@npm:^2.0.0, readable-stream@npm:^2.0.1, readable-stream@npm:^2.0.2, readable-stream@npm:^2.0.5, readable-stream@npm:^2.2.2, readable-stream@npm:~2.3.6": version: 2.3.8 resolution: "readable-stream@npm:2.3.8" @@ -21266,6 +21436,13 @@ __metadata: languageName: node linkType: hard +"reflect-metadata@npm:0.2.1": + version: 0.2.1 + resolution: "reflect-metadata@npm:0.2.1" + checksum: 772f552a544e04b999c1bf2c868225fef10032274e9d9e315bc3e7a687a504b8b115fa71966665b9619acfd323123a941f892b593250140da809330d41564181 + languageName: node + linkType: hard + "reflect-metadata@npm:^0.2.0": version: 0.2.2 resolution: "reflect-metadata@npm:0.2.2" @@ -21807,6 +21984,7 @@ __metadata: "@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/ccpay-web-component": 6.2.1 @@ -22296,6 +22474,17 @@ __metadata: languageName: node linkType: hard +"semver@npm:7.5.3": + version: 7.5.3 + resolution: "semver@npm:7.5.3" + dependencies: + lru-cache: ^6.0.0 + bin: + semver: bin/semver.js + checksum: 9d58db16525e9f749ad0a696a1f27deabaa51f66e91d2fa2b0db3de3e9644e8677de3b7d7a03f4c15bc81521e0c3916d7369e0572dbde250d9bedf5194e2a8a7 + languageName: node + linkType: hard + "semver@npm:7.6.0": version: 7.6.0 resolution: "semver@npm:7.6.0" @@ -23264,6 +23453,13 @@ __metadata: languageName: node linkType: hard +"string-argv@npm:0.3.1": + version: 0.3.1 + resolution: "string-argv@npm:0.3.1" + checksum: efbd0289b599bee808ce80820dfe49c9635610715429c6b7cc50750f0437e3c2f697c81e5c390208c13b5d5d12d904a1546172a88579f6ee5cbaaaa4dc9ec5cf + languageName: node + linkType: hard + "string-argv@npm:^0.3.1": version: 0.3.2 resolution: "string-argv@npm:0.3.2" @@ -23920,6 +24116,13 @@ __metadata: languageName: node linkType: hard +"tiny-case@npm:^1.0.3": + version: 1.0.3 + resolution: "tiny-case@npm:1.0.3" + checksum: 3f7a30c39d5b0e1bc097b0b271bec14eb5b836093db034f35a0de26c14422380b50dc12bfd37498cf35b192f5df06f28a710712c87ead68872a9e37ad6f6049d + languageName: node + linkType: hard + "tiny-emitter@npm:^2.0.0": version: 2.1.0 resolution: "tiny-emitter@npm:2.1.0" @@ -24353,6 +24556,34 @@ __metadata: languageName: node linkType: hard +"type-fest@npm:^0.6.0": + version: 0.6.0 + resolution: "type-fest@npm:0.6.0" + checksum: b2188e6e4b21557f6e92960ec496d28a51d68658018cba8b597bd3ef757721d1db309f120ae987abeeda874511d14b776157ff809f23c6d1ce8f83b9b2b7d60f + languageName: node + linkType: hard + +"type-fest@npm:^0.8.1": + version: 0.8.1 + resolution: "type-fest@npm:0.8.1" + checksum: d61c4b2eba24009033ae4500d7d818a94fd6d1b481a8111612ee141400d5f1db46f199c014766b9fa9b31a6a7374d96fc748c6d688a78a3ce5a33123839becb7 + languageName: node + linkType: hard + +"type-fest@npm:^2.19.0": + version: 2.19.0 + resolution: "type-fest@npm:2.19.0" + checksum: a4ef07ece297c9fba78fc1bd6d85dff4472fe043ede98bd4710d2615d15776902b595abf62bd78339ed6278f021235fb28a96361f8be86ed754f778973a0d278 + languageName: node + linkType: hard + +"type-fest@npm:^4.8.3": + version: 4.23.0 + resolution: "type-fest@npm:4.23.0" + checksum: 75466563be2d3d116a0b70ffe76a7f72947e3350ceacbc8509a7d841670dddc2fbb008109f0307888137794cf25681fd50f65bf8873bcdc17bc7ac8912c70114 + languageName: node + linkType: hard + "type-is@npm:~1.6.18": version: 1.6.18 resolution: "type-is@npm:1.6.18" @@ -24821,7 +25052,7 @@ __metadata: languageName: node linkType: hard -"uuid@npm:9.0, uuid@npm:^9.0.0": +"uuid@npm:9.0, uuid@npm:9.0.1, uuid@npm:^9.0.0": version: 9.0.1 resolution: "uuid@npm:9.0.1" bin: @@ -25909,6 +26140,18 @@ __metadata: languageName: node linkType: hard +"yup@npm:1.2.0": + version: 1.2.0 + resolution: "yup@npm:1.2.0" + dependencies: + property-expr: ^2.0.5 + tiny-case: ^1.0.3 + toposort: ^2.0.2 + type-fest: ^2.19.0 + checksum: f0cdceb144e358c6155670f3e27404b65b090cc12594fde6db2699523661e13542aaf87ebe8e542b67f29a5f3f9bc5f23a3a3bb09e17f10d125353d35b841fac + languageName: node + linkType: hard + "yup@npm:^0.32.11": version: 0.32.11 resolution: "yup@npm:0.32.11" From 1478fda8d3580c8fa1ce0868df02e098f1f924a4 Mon Sep 17 00:00:00 2001 From: Anthony Dummer <149377306+anthonydummer@users.noreply.github.com> Date: Thu, 15 Aug 2024 11:40:22 +0100 Subject: [PATCH 2/6] EXUI-1730 - remove confirm for new participant (#3832) * EXUI-1730 - initial commit for user added * EXUI-1730 - rename update links to change * EXUI-1730 - removing the text change to be included in other ticket --------- Co-authored-by: RiteshHMCTS <74713687+RiteshHMCTS@users.noreply.github.com> --- ...ng-actuals-add-edit-summary.component.html | 2 +- ...actuals-add-edit-summary.component.spec.ts | 43 ++++++++++++++++++- ...ring-actuals-add-edit-summary.component.ts | 5 +++ 3 files changed, 48 insertions(+), 2 deletions(-) diff --git a/src/hearings/containers/hearing-actuals/hearing-actuals-add-edit-summary/hearing-actuals-add-edit-summary.component.html b/src/hearings/containers/hearing-actuals/hearing-actuals-add-edit-summary/hearing-actuals-add-edit-summary.component.html index 4ce47f8fed..e45e993ca1 100644 --- a/src/hearings/containers/hearing-actuals/hearing-actuals-add-edit-summary/hearing-actuals-add-edit-summary.component.html +++ b/src/hearings/containers/hearing-actuals/hearing-actuals-add-edit-summary/hearing-actuals-add-edit-summary.component.html @@ -148,7 +148,7 @@

{{ '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; + } } From d53e059631129b2e05f758153581281eca524e4a Mon Sep 17 00:00:00 2001 From: RiteshHMCTS <74713687+RiteshHMCTS@users.noreply.github.com> Date: Mon, 19 Aug 2024 14:06:07 +0100 Subject: [PATCH 3/6] exui-2235-add event name in app insight log while task completion (#3838) * add event name in app insight log while task completion * lint error * toolkit version updated * toolkit version updated --- api/workAllocation/index.ts | 7 ++++++- package.json | 2 +- yarn.lock | 10 +++++----- 3 files changed, 12 insertions(+), 7 deletions(-) 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/package.json b/package.json index ed26820dcc..8b3312b8e7 100644 --- a/package.json +++ b/package.json @@ -93,7 +93,7 @@ "@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.58", "@hmcts/ccpay-web-component": "6.2.1", "@hmcts/frontend": "0.0.50-alpha", "@hmcts/media-viewer": "4.0.7", diff --git a/yarn.lock b/yarn.lock index 075e95f247..8a001b3c16 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3363,12 +3363,12 @@ __metadata: languageName: node linkType: hard -"@hmcts/ccd-case-ui-toolkit@npm:7.0.57": - version: 7.0.57 - resolution: "@hmcts/ccd-case-ui-toolkit@npm:7.0.57" +"@hmcts/ccd-case-ui-toolkit@npm:7.0.58": + version: 7.0.58 + resolution: "@hmcts/ccd-case-ui-toolkit@npm:7.0.58" dependencies: tslib: ^2.3.0 - checksum: a994ae9568b64df2b8f96df8b78b31c3b85a70686373b3c5d83ebaa4325719020c219a0b635f12953f7ce8a0f0d0f6eb02b8e09bd248ff7390899f72a5ffe6cc + checksum: c0540842121a8def7785fa712065b7211a49711543f43fa3b44ccd5c0f94b886c163ceb41d9a406419c5c41fb50e18b2ebbbef9d66cb02b5d62cb12c3ded3722 languageName: node linkType: hard @@ -21986,7 +21986,7 @@ __metadata: "@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.58 "@hmcts/ccpay-web-component": 6.2.1 "@hmcts/frontend": 0.0.50-alpha "@hmcts/media-viewer": 4.0.7 From b04b482e5dd495921a5326440007700d84651cf9 Mon Sep 17 00:00:00 2001 From: Richard Ash <147605192+richardhenryash@users.noreply.github.com> Date: Tue, 20 Aug 2024 09:57:02 +0100 Subject: [PATCH 4/6] Fix typo in environment variable SERVICES_HEARINGS_CASETYPES_IAC (#3402) --- config/custom-environment-variables.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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", From 4fb19d20de6d47acdf07aefe755d69e239d0dd09 Mon Sep 17 00:00:00 2001 From: Andy Wilkins <49269487+andywilkinshmcts@users.noreply.github.com> Date: Tue, 20 Aug 2024 11:43:17 +0100 Subject: [PATCH 5/6] allow appInsights tracking URl (#3840) Co-authored-by: RiteshHMCTS <74713687+RiteshHMCTS@users.noreply.github.com> --- api/application.ts | 4 +++- config/default.json | 3 ++- src/web.config | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) 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/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/src/web.config b/src/web.config index b91102d150..c4fa6c7eaf 100644 --- a/src/web.config +++ b/src/web.config @@ -14,7 +14,7 @@ - + From 639c0efedd04de10a0f098b1e986bddefc7c56f1 Mon Sep 17 00:00:00 2001 From: OgunyemiO <142920130+OgunyemiO@users.noreply.github.com> Date: Tue, 20 Aug 2024 12:48:10 +0100 Subject: [PATCH 6/6] Ex UI 1270 accessibility bug (#3584) * arial label added * skip link color contrast fix * aria no text fix * empty header change * Aria accesibility fixes * PR comments fix * unit test failure fix * unit test fix * lint error fix * console log * reporterlogger * removed empty entity * console logs * function adjustment * filter of hearders * empty rows * corrections * console logging * yarn audit * yarn audit * zero space filter * removed lowercase * removed refactored code * Zero width on html * extra column header filter * yarn audit * columnheader filter * header filter * html filtering * testing length * column header length check * reverse filter * functional test clean up * query refactoring * commented out expected * accessibility fix * yarn audit * version number changed for toolkit and commonlib * version number change * toolkit version updated --------- Co-authored-by: RiteshHMCTS <74713687+RiteshHMCTS@users.noreply.github.com> Co-authored-by: Ritesh Dsouza --- package.json | 4 +- .../case-reference-search-box.component.html | 2 +- .../components/header/header.component.html | 2 +- .../available-tasks.component.spec.ts | 4 +- .../my-tasks/my-tasks.component.spec.ts | 2 +- .../task-list/task-list.component.html | 2 +- .../work-case-list.component.html | 4 +- .../workallocation/common.steps.js | 829 +++++++++--------- .../workallocation/myCases.steps.js | 4 +- .../myTasks/myWork_MyTasks.feature | 2 +- yarn.lock | 20 +- 11 files changed, 437 insertions(+), 438 deletions(-) diff --git a/package.json b/package.json index 8b3312b8e7..78e17e1eaa 100644 --- a/package.json +++ b/package.json @@ -93,13 +93,13 @@ "@angular/ssr": "^17.3.6", "@cucumber/cucumber": "^10.8.0", "@edium/fsm": "^2.1.2", - "@hmcts/ccd-case-ui-toolkit": "7.0.58", + "@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}} { 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}}

-   + ​

+ *cdkHeaderCellDef>​