From d276d53729aabade2d96ca2f66040a2f55dd5541 Mon Sep 17 00:00:00 2001 From: mounikahmcts <43175082+mounikahmcts@users.noreply.github.com> Date: Fri, 10 Feb 2023 15:13:33 +0000 Subject: [PATCH] CIV-7109 Fix tests on the pipeline (#2194) * Update tests * Update * Update --------- Co-authored-by: Mounika Ammineni --- .../ui_tests/damages/1v1CreateClaim_test.js | 4 --- .../damages/1v2CreateClaim_SameSol_test.js | 1 - .../ui_tests/damages/2v1CreateClaim_test.js | 1 - .../ui_tests/damages/crossBrowser_test.js | 36 +------------------ .../lrspec/1v1CreateClaim-LRspec_test.js | 12 +++---- package.json | 14 ++++---- 6 files changed, 13 insertions(+), 55 deletions(-) diff --git a/e2e/tests/ui_tests/damages/1v1CreateClaim_test.js b/e2e/tests/ui_tests/damages/1v1CreateClaim_test.js index fb33665a0a..ff459a2c75 100644 --- a/e2e/tests/ui_tests/damages/1v1CreateClaim_test.js +++ b/e2e/tests/ui_tests/damages/1v1CreateClaim_test.js @@ -58,25 +58,21 @@ Scenario('Defendant solicitor acknowledges claim', async ({I}) => { await I.acknowledgeClaim('fullDefence'); // Reinstate the line below when https://tools.hmcts.net/jira/browse/EUI-6286 is fixed //await I.see(caseEventMessage('Acknowledge claim')); - await I.click('Sign out'); }).retry(3); Scenario('Defendant solicitor requests deadline extension', async ({I}) => { - await I.login(config.defendantSolicitorUser); await I.informAgreedExtensionDate(1); // Reinstate the line below when https://tools.hmcts.net/jira/browse/EUI-6286 is fixed //await I.see(caseEventMessage('Inform agreed extension date')); }).retry(3); Scenario('Defendant solicitor adds defendant litigation friend', async ({I}) => { - await I.login(config.defendantSolicitorUser); await I.addDefendantLitigationFriend(); // Reinstate the line below when https://tools.hmcts.net/jira/browse/EUI-6286 is fixed //await I.see(caseEventMessage('Add litigation friend')); }); Scenario('Defendant solicitor responds to claim', async ({I}) => { - await I.login(config.defendantSolicitorUser); await I.respondToClaim({defendant1Response: 'fullDefence'}); // Reinstate the line below when https://tools.hmcts.net/jira/browse/EUI-6286 is fixed //await I.see(caseEventMessage('Respond to claim')); diff --git a/e2e/tests/ui_tests/damages/1v2CreateClaim_SameSol_test.js b/e2e/tests/ui_tests/damages/1v2CreateClaim_SameSol_test.js index e70b48c534..d8a4735d00 100644 --- a/e2e/tests/ui_tests/damages/1v2CreateClaim_SameSol_test.js +++ b/e2e/tests/ui_tests/damages/1v2CreateClaim_SameSol_test.js @@ -65,7 +65,6 @@ Scenario('Defendant solicitor acknowledges claim', async ({I}) => { await I.acknowledgeClaim('fullDefence', 'fullDefence', null, true); // Reinstate the line below when https://tools.hmcts.net/jira/browse/EUI-6286 is fixed //await I.see(caseEventMessage('Acknowledge claim')); - await I.click('Sign out'); }).retry(3); Scenario('Defendant solicitor requests deadline extension', async ({I}) => { diff --git a/e2e/tests/ui_tests/damages/2v1CreateClaim_test.js b/e2e/tests/ui_tests/damages/2v1CreateClaim_test.js index f625aab913..6fe74cb3b1 100644 --- a/e2e/tests/ui_tests/damages/2v1CreateClaim_test.js +++ b/e2e/tests/ui_tests/damages/2v1CreateClaim_test.js @@ -62,7 +62,6 @@ Scenario('Defendant solicitor acknowledges claim', async ({I}) => { await I.acknowledgeClaim('fullDefence', null, 'fullDefence'); // Reinstate the line below when https://tools.hmcts.net/jira/browse/EUI-6286 is fixed //await I.see(caseEventMessage('Acknowledge claim')); - await I.click('Sign out'); }).retry(3); Scenario('Defendant solicitor requests deadline extension', async ({I}) => { diff --git a/e2e/tests/ui_tests/damages/crossBrowser_test.js b/e2e/tests/ui_tests/damages/crossBrowser_test.js index 0b7355f8e9..d6668f4c66 100644 --- a/e2e/tests/ui_tests/damages/crossBrowser_test.js +++ b/e2e/tests/ui_tests/damages/crossBrowser_test.js @@ -1,5 +1,5 @@ const config = require('../../../config.js'); -const {waitForFinishedBusinessProcess, assignCaseToDefendant, checkToggleEnabled} = require('../../../api/testingSupport'); +const {assignCaseToDefendant, checkToggleEnabled} = require('../../../api/testingSupport'); const {PBAv3} = require('../../../fixtures/featureKeys'); const serviceRequest = require('../../../pages/createClaim/serviceRequest.page'); @@ -49,38 +49,4 @@ Scenario('Full end-to-end journey', async ({I}) => { console.log('Applicant solicitor notified defendant solicitor of claim details'); // Reinstate the line below when https://tools.hmcts.net/jira/browse/EUI-6286 is fixed //await I.see(caseEventMessage('Notify claim details')); - - await I.login(config.defendantSolicitorUser); - await I.navigateToCaseDetails(caseNumber); - await I.acknowledgeClaim('fullDefence'); - console.log('Defendant solicitor acknowledged claim'); - // Reinstate the line below when https://tools.hmcts.net/jira/browse/EUI-6286 is fixed - //await I.see(caseEventMessage('Acknowledge claim')); - - await I.informAgreedExtensionDate(); - console.log('Defendant solicitor requested deadline extension'); - // Reinstate the line below when https://tools.hmcts.net/jira/browse/EUI-6286 is fixed - //await I.see(caseEventMessage('Inform agreed extension date')); - - await I.login(config.defendantSolicitorUser); - await I.navigateToCaseDetails(caseNumber); - await I.addDefendantLitigationFriend(); - console.log('Defendant solicitor added defendant litigation friend'); - // Reinstate the line below when https://tools.hmcts.net/jira/browse/EUI-6286 is fixed - //await I.see(caseEventMessage('Add litigation friend')); - - await I.login(config.defendantSolicitorUser); - await I.navigateToCaseDetails(caseNumber); - await I.respondToClaim({defendant1Response: 'fullDefence'}); - console.log('Defendant solicitor responded to claim'); - // Reinstate the line below when https://tools.hmcts.net/jira/browse/EUI-6286 is fixed - //await I.see(caseEventMessage('Respond to claim')); - - await I.login(config.applicantSolicitorUser); - await I.navigateToCaseDetails(caseNumber); - await I.respondToDefence(); - console.log('Applicant solicitor responded to defence'); - // Reinstate the line below when https://tools.hmcts.net/jira/browse/EUI-6286 is fixed - //await I.see(caseEventMessage('View and respond to defence')); - await waitForFinishedBusinessProcess(caseId()); }).retry(2); diff --git a/e2e/tests/ui_tests/lrspec/1v1CreateClaim-LRspec_test.js b/e2e/tests/ui_tests/lrspec/1v1CreateClaim-LRspec_test.js index 3ff5c052eb..0fa2a2051a 100644 --- a/e2e/tests/ui_tests/lrspec/1v1CreateClaim-LRspec_test.js +++ b/e2e/tests/ui_tests/lrspec/1v1CreateClaim-LRspec_test.js @@ -33,9 +33,13 @@ Scenario('1v1 Applicant solicitor creates specified claim for fast track @create Scenario('1v1 Claimant solicitor Enter Breathing Space', async ({LRspec}) => { await LRspec.login(config.applicantSolicitorUser); await LRspec.enterBreathingSpace(); - await LRspec.click('Sign out'); }).retry(3); +Scenario('1v1 Claimant solicitor Lift Breathing Space', async ({LRspec}) => { + await LRspec.login(config.applicantSolicitorUser); + await LRspec.liftBreathingSpace(); + await LRspec.click('Sign out'); +}).retry(3); Scenario.skip('1v1 Defendant solicitor perform Inform Agreed Extension', async ({LRspec}) => { console.log('1v1 Defendant solicitor Inform Agreed Extension claim-spec: ' + caseId()); @@ -60,12 +64,6 @@ Scenario('1v1 Respond To Claim - Defendants solicitor rejects claim for defendan await LRspec.click('Sign out'); }).retry(3); -Scenario('1v1 Claimant solicitor Lift Breathing Space', async ({LRspec}) => { - await LRspec.login(config.applicantSolicitorUser); - await LRspec.liftBreathingSpace(); - await LRspec.click('Sign out'); -}).retry(3); - Scenario('1v1 Claimant solicitor responds to defence - claimant Intention to proceed', async ({LRspec}) => { await LRspec.login(config.applicantSolicitorUser); await LRspec.respondToDefence({mpScenario: 'ONE_V_ONE', claimType: 'fast'}); diff --git a/package.json b/package.json index 8a868cc47c..45258b5ada 100644 --- a/package.json +++ b/package.json @@ -12,11 +12,11 @@ "test:smoke": "MOCHAWESOME_REPORTFILENAME=smoke REPORT_DIR=test-results/smokeTest REPORT_FILE=test-results/smokeTest/results.xml npx codeceptjs run --grep @smoke-tests-unspec --reporter mocha-multi --verbose", "test:smoke-spec": "MOCHAWESOME_REPORTFILENAME=smoke npx codeceptjs run --grep @smoke-tests-spec --reporter mocha-multi --verbose", "test:api-unspec": "MOCHAWESOME_REPORTFILENAME=api-unspec npx codeceptjs run-workers --suites 4 --grep @api-unspec --reporter mocha-multi --verbose", - "test:e2e-unspec": "MOCHAWESOME_REPORTFILENAME=e2e-unspec npx codeceptjs run --grep @e2e-unspec --reporter mocha-multi --verbose", - "test:api-sdo": "MOCHAWESOME_REPORTFILENAME=api-sdo npx codeceptjs run --grep @api-sdo --reporter mocha-multi --verbose", - "test:e2e-sdo": "MOCHAWESOME_REPORTFILENAME=e2e-sdo npx codeceptjs run --grep @e2e-sdo --reporter mocha-multi --verbose", + "test:e2e-unspec": "MOCHAWESOME_REPORTFILENAME=e2e-unspec npx codeceptjs run-workers --suites 2 --grep @e2e-unspec --reporter mocha-multi --verbose", + "test:api-sdo": "MOCHAWESOME_REPORTFILENAME=api-sdo npx codeceptjs run-workers --suites 4 --grep @api-sdo --reporter mocha-multi --verbose", + "test:e2e-sdo": "MOCHAWESOME_REPORTFILENAME=e2e-sdo npx codeceptjs run-workers --suites 2 --grep @e2e-sdo --reporter mocha-multi --verbose", "test:api-dj": "MOCHAWESOME_REPORTFILENAME=api-dj npx codeceptjs run-workers --suites 4 --grep @api-dj --reporter mocha-multi --verbose", - "test:e2e-dj": "MOCHAWESOME_REPORTFILENAME=e2e-dj NODE_TLS_REJECT_UNAUTHORIZED=0 npx codeceptjs run --grep @e2e-1v1-dj --reporter mocha-multi --verbose", + "test:e2e-dj": "MOCHAWESOME_REPORTFILENAME=e2e-dj NODE_TLS_REJECT_UNAUTHORIZED=0 npx codeceptjs run-workers --suites 2 --grep @e2e-1v1-dj --reporter mocha-multi --verbose", "test:api": "MOCHAWESOME_REPORTFILENAME=api-multiparty npx codeceptjs run --grep @api-multiparty --reporter mocha-multi --verbose", "test:e2e-wa": "MOCHAWESOME_REPORTFILENAME=api-1v1 npx codeceptjs run --grep @e2e-wa --reporter mocha-multi --verbose", "test:dmn-tasks": "MOCHAWESOME_REPORTFILENAME=api-1v1 npx codeceptjs run --grep @dmn-task --reporter mocha-multi --verbose", @@ -34,11 +34,11 @@ "test:api-spec-1v2": "MOCHAWESOME_REPORTFILENAME=api-spec npx codeceptjs run --grep @api-spec-1v2 --reporter mocha-multi --verbose", "test:api-spec-1v1": "MOCHAWESOME_REPORTFILENAME=api-spec npx codeceptjs run --grep @api-spec-1v1 --reporter mocha-multi --verbose", "test:api-spec-small": "MOCHAWESOME_REPORTFILENAME=api-spec npx codeceptjs run --grep @api-spec-small --reporter mocha-multi --verbose", - "test:e2e-spec": "MOCHAWESOME_REPORTFILENAME=e2e-spec npx codeceptjs run --grep @e2e-spec-1v2DS --reporter mocha-multi --verbose", + "test:e2e-spec": "MOCHAWESOME_REPORTFILENAME=e2e-spec npx codeceptjs run-workers --suites 2 --grep @e2e-spec-1v2DS --reporter mocha-multi --verbose", "test:e2e-spec-1v2DS": "MOCHAWESOME_REPORTFILENAME=e2e-spec npx codeceptjs run --grep @e2e-spec-1v2DS --reporter mocha-multi --verbose", "test:functional-unspec": "MOCHAWESOME_REPORTFILENAME=functional-unspec npx codeceptjs run --grep '@e2e-unspec-1v2DS' --reporter mocha-multi --verbose", - "test:e2e-cos": "MOCHAWESOME_REPORTFILENAME=functional-cos npx codeceptjs run --grep @e2e-cos --reporter mocha-multi --verbose", - "test:api-cos": "MOCHAWESOME_REPORTFILENAME=api-cos npx codeceptjs run --grep @api-cos --reporter mocha-multi --verbose", + "test:e2e-cos": "MOCHAWESOME_REPORTFILENAME=functional-cos npx codeceptjs run-workers --suites 2 --grep @e2e-cos --reporter mocha-multi --verbose", + "test:api-cos": "MOCHAWESOME_REPORTFILENAME=api-cos npx codeceptjs run-workers --suites 4 --grep @api-cos --reporter mocha-multi --verbose", "test:functional-dj": "MOCHAWESOME_REPORTFILENAME=functional-unspec npx codeceptjs run --grep @e2e-dj --reporter mocha-multi --verbose", "test:nightly-multiparty": "MOCHAWESOME_REPORTFILENAME=nightly-multiparty npx codeceptjs run --grep '@e2e-nightly' --reporter mocha-multi --verbose", "test:rpa": "MOCHAWESOME_REPORTFILENAME=rpa npx codeceptjs run --grep @rpa-handoff-tests --reporter mocha-multi --verbose",