Skip to content

Commit e16d532

Browse files
authored
test: validations exception for non accepted characters (#1171)
* test: added med priority tests for epic3 * test:cosmetic changes
1 parent 5279073 commit e16d532

File tree

4 files changed

+94
-0
lines changed

4 files changed

+94
-0
lines changed

tests/playwright-tests/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"test:regression:e2e:epic1": "cross-env TEST_TYPE=RegressionEpic1 npx playwright test --project=dev --config=src/config/playwright.config.ts --grep=@epic1-",
1111
"test:regression:e2e:epic2": "cross-env TEST_TYPE=RegressionEpic2 npx playwright test --project=dev --config=src/config/playwright.config.ts --grep=@epic2-",
1212
"test:regression:e2e:epic3": "cross-env TEST_TYPE=RegressionEpic3 npx playwright test --project=dev --config=src/config/playwright.config.ts --grep=@epic3-",
13+
"test:regression:e2e:epic3Med": "cross-env TEST_TYPE=RegressionEpic3Med npx playwright test --project=dev --config=src/config/playwright.config.ts --grep=@epic3-",
1314
"test:smoke:e2e": "cross-env TEST_TYPE=SMOKE npx playwright test --project=dev --config=src/config/playwright.config.ts --grep=\"@smoke @e2e\"",
1415
"test": "npx playwright test --project=dev --config=src/config/playwright.config.ts --grep=\"@smoke @e2e\"",
1516
"test:dummy": "npx playwright test --project=dev --config=src/config/playwright.config.ts --grep=\"@dummy \"",
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// For Future Epic 3 Med Regression Tests
2+
3+
// Note:
4+
// These tests have been fully migrated to the new and improved test execution orchestration:
5+
//
6+
// - Add:
7+
// tests/runner/runner-workflow-add
8+
// - Add followed by Amend:
9+
// tests/runner/runner-workflow-amend
10+
//
11+
// This approach allows bulk loading of test data for all tests before proceeding with validation, instead of loading test data for each test individually.
12+
//
13+
// Guidance:
14+
//
15+
// - First, try adding new tests using the runner.
16+
// - If custom calls are needed, use new file for test addition. - tests\playwright-tests\src\tests\e2e\epic3-medpriority-tests\epic3-med-priority-testsuite.spec.ts
17+
//
18+
// Test Tags:
19+
// There is no impact to the test tags. The same tags can be used to trigger these tests.
20+
// For example, to run regression tests, use:
21+
//
22+
// npm run test:regression:e2e:epic3Med
23+
//
24+
// This equates to "@epic3-" tags, configured in the package.json at the playwright-tests root location.
25+
26+
27+
export const runnerBasedEpic3MedTestScenariosAdd = "@DTOSS-4967-01";
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{
2+
"validations": [
3+
{
4+
"validations": {
5+
"apiEndpoint": "api/ExceptionManagementDataService",
6+
"NhsNumber": "9994121057",
7+
"RuleId": -2147024809,
8+
"RuleDescription": "Participant contains illegal characters"
9+
},
10+
"meta": {
11+
"testJiraId": "@DTOSS-4967-01",
12+
"requirementJiraId": "DTOSS-3447",
13+
"additionalTags": "@regression @e2e @epic3-med-priority - Verify exception for illegal characters"
14+
}
15+
}
16+
],
17+
"inputParticipantRecord": [
18+
{
19+
"record_type": "ADD",
20+
"change_time_stamp": 20240524000000,
21+
"serial_change_number": 2,
22+
"nhs_number": 9994121057,
23+
"superseded_by_nhs_number": null,
24+
"primary_care_provider": "A81001",
25+
"primary_care_effective_from_date": "20230909",
26+
"current_posting": "BD",
27+
"current_posting_effective_from_date": "20230909",
28+
"name_prefix": "Mr",
29+
"given_name": "Romain€",
30+
"other_given_name": "Wilson€",
31+
"family_name": "Steve€",
32+
"previous_family_name": "Stevens€",
33+
"date_of_birth": "20230909",
34+
"gender": 1,
35+
"address_line_1": "123 Trent Road€",
36+
"address_line_2": "TRENT ROAD LANE€",
37+
"address_line_3": "TRENT CORNER ROAD€",
38+
"address_line_4": "Oliver ROAD€",
39+
"address_line_5": "OLIVER CORNER ROAD€",
40+
"postcode": "AB43 8FJ",
41+
"paf_key": "Z3S4Q5X8",
42+
"address_effective_from_date": "20230909",
43+
"reason_for_removal": "",
44+
"reason_for_removal_effective_from_date": "",
45+
"date_of_death": "",
46+
"death_status": null,
47+
"home_telephone_number": "7898908901€",
48+
"home_telephone_effective_from_date": "20230909",
49+
"mobile_telephone_number": "7898908901€",
50+
"mobile_telephone_effective_from_date": "20230909",
51+
"email_address": "[email protected]",
52+
"email_address_effective_from_date": "20230909",
53+
"preferred_language": "en",
54+
"is_interpreter_required": false,
55+
"invalid_flag": false,
56+
"eligibility": true
57+
}
58+
],
59+
"nhsNumbers": [
60+
"9994121057"
61+
]
62+
}

tests/playwright-tests/src/tests/runner/runner-workflow-add.spec.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { runnerBasedEpic123TestScenariosAdd } from '../e2e/epic123-smoke-tests/e
55
import { runnerBasedEpic1TestScenariosAdd } from '../e2e/epic1-highpriority-tests/epic1-high-priority-testsuite-migrated';
66
import { runnerBasedEpic2TestScenariosAdd } from '../e2e/epic2-highpriority-tests/epic2-high-priority-testsuite-migrated';
77
import { runnerBasedEpic3TestScenariosAdd } from '../e2e/epic3-highpriority-tests/epic3-high-priority-testsuite-migrated';
8+
import { runnerBasedEpic3MedTestScenariosAdd } from '../e2e/epic3-medpriority-tests/epic3-med-priority-testsuite';
89
import { createTempDirAndWriteJson, deleteTempDir } from '../../../src/json/file-utils';
910
import { generateDynamicDateMap, replaceDynamicDatesInJson } from '../../../src/json/json-updater';
1011

@@ -13,6 +14,7 @@ const smokeTestScenario = runnerBasedEpic123TestScenariosAdd;
1314
const regressionEpic1TestScenario = runnerBasedEpic1TestScenariosAdd;
1415
const regressionEpic2TestScenario = runnerBasedEpic2TestScenariosAdd;
1516
const regressionEpic3TestScenario = runnerBasedEpic3TestScenariosAdd;
17+
const regressionEpic3MedTestScenarios = runnerBasedEpic3MedTestScenariosAdd;
1618

1719
// Tests to run based on TEST_TYPE environment variable
1820
let scopedTestScenario = "";
@@ -24,6 +26,8 @@ if (TEST_TYPE == 'RegressionEpic1') {
2426
scopedTestScenario = regressionEpic2TestScenario;
2527
} else if (TEST_TYPE == 'RegressionEpic3') {
2628
scopedTestScenario = regressionEpic3TestScenario;
29+
} else if (TEST_TYPE == 'RegressionEpic3Med') {
30+
scopedTestScenario = runnerBasedEpic3MedTestScenariosAdd;
2731
} else {
2832
scopedTestScenario = smokeTestScenario;
2933
}

0 commit comments

Comments
 (0)