Skip to content

Commit

Permalink
CIV-0000 Review tests (#4141)
Browse files Browse the repository at this point in the history
* functional tests

* lint fix

* added claimant resposne

* lint issues fix

* Update codecept.conf.js

* Update api_1v1_spec_cui_fulladmit_setdate_test.js

* Update api_1v1_spec_cui_mediation_test.js

* Update api_1v1_spec_cui_partadmit_installments_test.js

* Update api_1v1_spec_cui_test.js

* update api tests to use based on ea flag

* update

* update

* Nightly dev (#4146)

* Update Jenkinsfile_nightly

* Update package.json

* update the api tests to run some in ccd and carm

---------

Co-authored-by: jeswanth <[email protected]>
Co-authored-by: jeswanth-hmcts <[email protected]>
Co-authored-by: Raja Mani <[email protected]>
Co-authored-by: Mounika Ammineni <[email protected]>
  • Loading branch information
5 people authored Mar 14, 2024
1 parent cc9a4a2 commit fa3246f
Show file tree
Hide file tree
Showing 13 changed files with 14 additions and 13 deletions.
1 change: 1 addition & 0 deletions Jenkinsfile_nightly
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ withNightlyPipeline(type, product, component) {
env.WAIT_FOR_TIMEOUT_MS = params.WAIT_FOR_TIMEOUT_MS
env.URL_FOR_SECURITY_SCAN = params.CIVIL_SERVICE_URL
env.TESTS_FOR_ACCESSIBILITY = false
env.CCD_UI_TESTS = true
overrideVaultEnvironments([
'aat': params.ENVIRONMENT
])
Expand Down
1 change: 1 addition & 0 deletions codecept.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ exports.config = {
'./e2e/tests/api_tests/hearings/*_test.js',
'./e2e/tests/api_tests/bulkclaim/*_test.js',
'./e2e/tests/api_tests/lrspec/*_test.js',
'./e2e/tests/api_tests/lrspec_cui/*_test.js',
],
output: 'test-results/functional',
helpers: {
Expand Down
1 change: 0 additions & 1 deletion e2e/tests/api_tests/damages/api_1v1_test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/* eslint-disable no-unused-vars */

const config = require('../../../config.js');
const {setupTokens} = require('../../../api/apiRequest');
const mpScenario = 'ONE_V_ONE';

//This test runs in api_judgment_online_1v1_test - so running only in nightly
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const config = require('../../../config.js');
const mpScenario = 'ONE_V_TWO_TWO_LEGAL_REP';

// add @api-tests to run
Feature('CCD 1v2 Different Solicitor API test @api-unspec @api-multiparty @api-tests-1v2DS @api-prod @api-nonprod-unspec');
Feature('CCD 1v2 Different Solicitor API test @api-unspec @api-multiparty @api-tests-1v2DS @api-prod @api-nonprod-unspec @api-nightly-prod');

Scenario('Create claim', async ({I, api}) => {
await api.createClaimWithRepresentedRespondent(config.applicantSolicitorUser, mpScenario);
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/api_tests/damages/api_2v1_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const config = require('../../../config.js');
const mpScenario = 'TWO_V_ONE';

Feature('CCD 2v1 API test @api-unspec @api-multiparty @api-tests-2v1 @api-prod @api-nonprod-unspec');
Feature('CCD 2v1 API test @api-unspec @api-multiparty @api-tests-2v1 @api-prod @api-nightly-prod');

Scenario('Create claim', async ({I, api}) => {
await api.createClaimWithRepresentedRespondent(config.applicantSolicitorUser, mpScenario);
Expand Down
4 changes: 2 additions & 2 deletions e2e/tests/api_tests/damages/api_noc_unspec_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const {
} = require('../../../config');
const config = require('../../../config.js');

Feature('Unspecified Notice of Change on Unpecified Claim API test @api-noc @api-noc-unspec @api-prod @api-nonprod');
Feature('Unspecified Notice of Change on Unpecified Claim API test @api-noc @api-noc-unspec @api-prod @api-nightly-prod');

Scenario('notice of change - 1v1 - represented defendant', async ({api, noc}) => {
await api.createClaimWithRepresentedRespondent(applicantSolicitorUser);
Expand All @@ -23,7 +23,7 @@ Scenario('notice of change - 1v1 - represented defendant', async ({api, noc}) =>
await noc.requestNoticeOfChangeForRespondent1Solicitor(caseId, otherSolicitorUser1);
await api.checkUserCaseAccess(defendantSolicitorUser, false);
await api.checkUserCaseAccess(otherSolicitorUser1, true);
});
}).tag('@api-nonprod');

Scenario('notice of change - 1v1 - unrepresented defendant', async ({api, noc}) => {
await api.createClaimWithRespondentLitigantInPerson(applicantSolicitorUser, 'ONE_V_ONE');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const caseWorkerUser = config.testEarlyAdopterCourts ? config.hearingCenterAdmin
// const judgeUser = config.judgeUserWithRegionId1Local;
// const caseWorkerUser = config.tribunalCaseworkerWithRegionId1Local;

Feature('Record Judgment 1v1 API test spec @api-spec-1v1 @api-jo @api-nonprod');
Feature('Record Judgment 1v1 API test spec @api-spec-1v1 @api-jo @api-nightly-prod');

Scenario('Record Judgment Spec claim 1v1 with set aside (Judge Order - pay instalments)', async ({I, api_spec}) => {
if (['preview', 'demo'].includes(config.runningEnv)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const claimType = 'SmallClaims';
let carmEnabled = false;
let caseId;

Feature('CCD 1v1 API test @api-spec-cui @api-nonprod @non-prod-e2e-ft');
Feature('CCD 1v1 API test @api-spec-cui @non-prod-e2e-ft');
Before(async () => {
await createAccount(config.defendantCitizenUser2.email, config.defendantCitizenUser2.password);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ async function prepareClaim(api_spec_cui, carmEnabled) {
}

// set config.localMediationTests to true to run locally
Feature('Unsuccessful mediation for spec small claim with unrepresented defendant @cui-carm @api-nonprod @non-prod-e2e-ft');
Feature('Unsuccessful mediation for spec small claim with unrepresented defendant @cui-carm @api-nonprod');

Before(async () => {
await createAccount(config.defendantCitizenUser2.email, config.defendantCitizenUser2.password);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const claimType = 'SmallClaims';
let caseId;
let carmEnabled = false;

Feature('CCD 1v1 API test @api-spec-cui @api-nonprod @non-prod-e2e-ft');
Feature('CCD 1v1 API test @api-spec-cui @non-prod-e2e-ft');
Before(async () => {
await createAccount(config.defendantCitizenUser2.email, config.defendantCitizenUser2.password);
});
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/api_tests/lrspec_cui/api_1v1_spec_cui_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const {createAccount, deleteAccount} = require('../../../api/idamHelper');
const claimType = 'SmallClaims';
let caseId;

Feature('CCD 1v1 API test @api-spec-cui @api-nonprod @non-prod-e2e-ft');
Feature('CCD 1v1 API test @api-spec-cui @api-nonprod');

Before(async () => {
await createAccount(config.defendantCitizenUser2.email, config.defendantCitizenUser2.password);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ await api_spec_small.defendantResponse(config.defendantSolicitorUser, 'FULL_DEFE
await api_spec_small.claimantResponse(config.applicantSolicitorUser, true);
}

Feature('Request for reconsideration - 1v1 - spec @api-specified @api-nonprod');
Feature('Request for reconsideration - 1v1 - spec @api-specified @api-nightly-prod');

Scenario('1v1 spec request for reconsideration for uphold previous order', async ({api_spec_small}) => {
if (['preview', 'demo'].includes(config.runningEnv)) {
Expand Down Expand Up @@ -53,7 +53,7 @@ Scenario('1v2 spec request for reconsideration by defendant2 for create general
await api_spec_small.requestForReconsideration(config.secondDefendantSolicitorUser,'Respondent2');
await api_spec_small.judgeDecisionOnReconsiderationRequest(judgeUser, 'CREATE_GENERAL_ORDER');
}
});
}).tag('@api-nonprod');

Scenario('1v1 spec request for reconsideration when claim amount is greater than 1000', async ({api_spec}) => {
if (['preview', 'demo'].includes(config.runningEnv)) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"test:crossbrowser": "./e2e/run-crossbrowser-tests.sh",
"test:AATFunctional": "./e2e/run-prod-functional-tests.sh",
"test:DemoFunctional": "./e2e/run-features-flag-enabled-full-functional-tests",
"test:fullfunctional": "MOCHAWESOME_REPORTFILENAME=functional-unspec npx codeceptjs run-workers --suites 2 --grep '@e2e-nightly-prod' --reporter mocha-multi --verbose",
"test:fullfunctional": "yarn playwright install && MOCHAWESOME_REPORTFILENAME=functional-unspec npx codeceptjs run-workers --suites 2 --grep '@e2e-nightly-prod' --reporter mocha-multi --verbose",
"test:e2e-nightly-prod": "MOCHAWESOME_REPORTFILENAME=non-prod-e2e-ft npx codeceptjs run-workers --suites 2 --grep '@e2e-nightly-prod' --reporter mocha-multi --verbose",
"test:api-nightly-prod": "MOCHAWESOME_REPORTFILENAME=non-prod-e2e-ft npx codeceptjs run-workers --suites 8 --grep '@api-nightly-prod' --reporter mocha-multi --verbose",
"test:e2e-nightly-nonprod": "MOCHAWESOME_REPORTFILENAME=non-prod-e2e-ft npx codeceptjs run-workers --suites 2 --grep '@e2e-nightly-nonprod' --reporter mocha-multi --verbose",
Expand Down

0 comments on commit fa3246f

Please sign in to comment.