From 77fdac7a198a95b90802a8513c133e9ff184f5ee Mon Sep 17 00:00:00 2001 From: Visalakshi Date: Tue, 15 Jul 2025 12:05:28 +0100 Subject: [PATCH 1/4] created 9774 rule 8 test1 --- tests/playwright-tests/package.json | 3 +- ...rule8-transformation-testsuite-migrated.ts | 27 +++++++++ ...D_9774_-_CAAS_BREAST_SCREENING_COHORT.json | 60 +++++++++++++++++++ ...D_9774_-_CAAS_BREAST_SCREENING_COHORT.json | 60 +++++++++++++++++++ .../tests/runner/runner-workflow-add.spec.ts | 3 +- .../runner/runner-workflow-amend.spec.ts | 3 +- 6 files changed, 153 insertions(+), 3 deletions(-) create mode 100644 tests/playwright-tests/src/tests/e2e/epic4d-validation-tests/epic4d-9774-rule8-transformation-testsuite-migrated.ts create mode 100644 tests/playwright-tests/src/tests/e2e/testFiles/@DTOSS-9774-01/ADD_9774_-_CAAS_BREAST_SCREENING_COHORT.json create mode 100644 tests/playwright-tests/src/tests/e2e/testFiles/@DTOSS-9774-01/AMENDED_9774_-_CAAS_BREAST_SCREENING_COHORT.json diff --git a/tests/playwright-tests/package.json b/tests/playwright-tests/package.json index f7f65257c3..9f3b612a01 100644 --- a/tests/playwright-tests/package.json +++ b/tests/playwright-tests/package.json @@ -14,7 +14,8 @@ "test:regression_e2e_epic3": "cross-env TEST_TYPE=RegressionEpic3 npx playwright test --project=dev --config=src/config/playwright.config.ts --grep=@epic3-high", "test:regression_e2e_epic3Med": "cross-env TEST_TYPE=RegressionEpic3Med npx playwright test --project=dev --config=src/config/playwright.config.ts --grep=@epic3-med", "test:regression_e2e_epic4d": "cross-env TEST_TYPE=RegressionEpic4d npx playwright test --project=dev --config=src/config/playwright.config.ts --grep=@epic4d-", - "test:smoke_e2e": "cross-env TEST_TYPE=SMOKE npx playwright test --project=dev --config=src/config/playwright.config.ts --grep=\"@smoke @e2e\"", + "test:smoke_e2e": "cross-env TEST_TYPE=RegressionEpic4d npx playwright test --project=dev --config=src/config/playwright.config.ts --grep=@epic4d-", + "test:smoke_e2e1": "cross-env TEST_TYPE=SMOKE npx playwright test --project=dev --config=src/config/playwright.config.ts --grep=\"@smoke @e2e\"", "test": "npx playwright test --project=dev --config=src/config/playwright.config.ts --grep=\"@smoke @e2e\"", "test:dummy": "npx playwright test --project=dev --config=src/config/playwright.config.ts --grep=\"@dummy \"", "test:ut": "npx playwright test --project=dev --config=src/config/playwright.config.ts --grep=\"@ut\"", diff --git a/tests/playwright-tests/src/tests/e2e/epic4d-validation-tests/epic4d-9774-rule8-transformation-testsuite-migrated.ts b/tests/playwright-tests/src/tests/e2e/epic4d-validation-tests/epic4d-9774-rule8-transformation-testsuite-migrated.ts new file mode 100644 index 0000000000..4bd39a6761 --- /dev/null +++ b/tests/playwright-tests/src/tests/e2e/epic4d-validation-tests/epic4d-9774-rule8-transformation-testsuite-migrated.ts @@ -0,0 +1,27 @@ +// For Future Epic 4d validation Tests + +// Note: +// These tests have been fully migrated to the new and improved test execution orchestration: +// +// - Add: +// tests/runner/runner-workflow-add +// - Add followed by Amend: +// tests/runner/runner-workflow-amend +// +// This approach allows bulk loading of test data for all tests before proceeding with validation, instead of loading test data for each test individually. +// +// Guidance: +// +// - First, try adding new tests using the runner. +// - If custom calls are needed, use new file for test addition. - tests\playwright-tests\src\tests\e2e\epic4d-6045-validation-tests\epic4d-6045-validation-tests.spec.ts +// +// Test Tags: +// There is no impact to the test tags. The same tags can be used to trigger these tests. +// For example, to run regression tests, use: +// +// npm run test:regression_e2e_epic4d +// +// This equates to "@epic4d-" tags, configured in the package.json at the playwright-tests root location. + +export const runnerBasedEpic4dTestScenariosAdd = "@DTOSS-9774-01"; +export const runnerBasedEpic4dTestScenariosAmend = "@DTOSS-9774-01"; diff --git a/tests/playwright-tests/src/tests/e2e/testFiles/@DTOSS-9774-01/ADD_9774_-_CAAS_BREAST_SCREENING_COHORT.json b/tests/playwright-tests/src/tests/e2e/testFiles/@DTOSS-9774-01/ADD_9774_-_CAAS_BREAST_SCREENING_COHORT.json new file mode 100644 index 0000000000..06df567976 --- /dev/null +++ b/tests/playwright-tests/src/tests/e2e/testFiles/@DTOSS-9774-01/ADD_9774_-_CAAS_BREAST_SCREENING_COHORT.json @@ -0,0 +1,60 @@ +{ + "validations": [ + { + "validations": { + "apiEndpoint": "api/CohortDistributionDataService", + "NHSNumber":9999111270 + }, + "meta": { + "testJiraId": "@DTOSS-9983-01", + "requirementJiraId": "DTOSS-9774", + "additionalTags": "@regression @e2e @epic4d-validation-tests - Verify that Transformation is applied and set PCP = Null, RfR Code = ORR and RfR BED = Current Date - Rule 8" + } + } + ], + "inputParticipantRecord": [ + { + "record_type": "ADD", + "change_time_stamp": null, + "serial_change_number": null, + "nhs_number": "9999111270", + "superseded_by_nhs_number": null, + "primary_care_provider": "B86019", + "primary_care_effective_from_date": "20030318", + "current_posting": "DMS", + "current_posting_effective_from_date": "20130319", + "name_prefix": "Mrs", + "given_name": "9496 test", + "other_given_name": "OtherGivenName", + "family_name": "FamiliyName", + "previous_family_name": "PreviousFamilyName", + "date_of_birth": "19700101", + "gender": 1, + "address_line_1": "98 Spaight Road", + "address_line_2": "Eastbourne", + "address_line_3": "Test", + "address_line_4": "Brighton", + "address_line_5": "United Kingdom", + "postcode": "BT1 1NN", + "paf_key": "Z3S4Q5X9", + "address_effective_from_date": "20130319", + "reason_for_removal": null, + "reason_for_removal_effective_from_date": null, + "date_of_death": null, + "death_status": null, + "home_telephone_number": "01619999999", + "home_telephone_effective_from_date": "20200818", + "mobile_telephone_number": "07888888888", + "mobile_telephone_effective_from_date": "20200818", + "email_address": "bturneux0@soup.io", + "email_address_effective_from_date": "20200818", + "preferred_language": "en", + "is_interpreter_required": false, + "invalid_flag": false, + "eligibility": true + } + ], + "nhsNumbers": [ + "9999111270" + ] +} diff --git a/tests/playwright-tests/src/tests/e2e/testFiles/@DTOSS-9774-01/AMENDED_9774_-_CAAS_BREAST_SCREENING_COHORT.json b/tests/playwright-tests/src/tests/e2e/testFiles/@DTOSS-9774-01/AMENDED_9774_-_CAAS_BREAST_SCREENING_COHORT.json new file mode 100644 index 0000000000..906c781d9e --- /dev/null +++ b/tests/playwright-tests/src/tests/e2e/testFiles/@DTOSS-9774-01/AMENDED_9774_-_CAAS_BREAST_SCREENING_COHORT.json @@ -0,0 +1,60 @@ +{ + "validations": [ + { + "validations": { + "apiEndpoint": "api/CohortDistributionDataService", + "NHSNumber":9999111270 + }, + "meta": { + "testJiraId": "@DTOSS-9983-01", + "requirementJiraId": "DTOSS-9774", + "additionalTags": "@regression @e2e @epic4d-validation-tests - Verify that Transformation is applied and set PCP = Null, RfR Code = ORR and RfR BED = Current Date - Rule 8" + } + } + ], + "inputParticipantRecord": [ + { + "record_type": "AMENDED", + "change_time_stamp": null, + "serial_change_number": null, + "nhs_number": "9999111270", + "superseded_by_nhs_number": null, + "primary_care_provider": "A91200", + "primary_care_effective_from_date": "20030318", + "current_posting": "DMS", + "current_posting_effective_from_date": "20130319", + "name_prefix": "Mrs", + "given_name": "9496 test", + "other_given_name": "OtherGivenName", + "family_name": "FamiliyName", + "previous_family_name": "PreviousFamilyName", + "date_of_birth": "19700101", + "gender": 1, + "address_line_1": "98 Spaight Road", + "address_line_2": "Eastbourne", + "address_line_3": "Test", + "address_line_4": "Brighton", + "address_line_5": "United Kingdom", + "postcode": "BT1 1NN", + "paf_key": "Z3S4Q5X9", + "address_effective_from_date": "20130319", + "reason_for_removal": null, + "reason_for_removal_effective_from_date": null, + "date_of_death": null, + "death_status": null, + "home_telephone_number": "01619999999", + "home_telephone_effective_from_date": "20200818", + "mobile_telephone_number": "07888888888", + "mobile_telephone_effective_from_date": "20200818", + "email_address": "bturneux0@soup.io", + "email_address_effective_from_date": "20200818", + "preferred_language": "en", + "is_interpreter_required": false, + "invalid_flag": false, + "eligibility": true + } + ], + "nhsNumbers": [ + "9999111270" + ] +} diff --git a/tests/playwright-tests/src/tests/runner/runner-workflow-add.spec.ts b/tests/playwright-tests/src/tests/runner/runner-workflow-add.spec.ts index bbd89cf7a5..006c655bb6 100644 --- a/tests/playwright-tests/src/tests/runner/runner-workflow-add.spec.ts +++ b/tests/playwright-tests/src/tests/runner/runner-workflow-add.spec.ts @@ -9,7 +9,8 @@ import { runnerBasedEpic2MedTestScenariosAdd } from '../e2e/epic2-medpriority-te import { runnerBasedEpic3TestScenariosAdd } from '../e2e/epic3-highpriority-tests/epic3-high-priority-testsuite-migrated'; import { runnerBasedEpic3MedTestScenariosAdd } from '../e2e/epic3-medpriority-tests/epic3-med-priority-testsuite-migrated'; import { generateDynamicDateMap, replaceDynamicDatesInJson } from '../../../src/json/json-updater'; -import { runnerBasedEpic4dTestScenariosAdd } from '../e2e/epic4d-validation-tests/epic4d-6045-validation-testsuite-migrated'; +//import { runnerBasedEpic4dTestScenariosAdd } from '../e2e/epic4d-validation-tests/epic4d-6045-validation-testsuite-migrated'; +import { runnerBasedEpic4dTestScenariosAdd } from '../e2e/epic4d-validation-tests/epic4d-9774-rule8-transformation-testsuite-migrated'; // Tests to run based on TEST_TYPE environment variable diff --git a/tests/playwright-tests/src/tests/runner/runner-workflow-amend.spec.ts b/tests/playwright-tests/src/tests/runner/runner-workflow-amend.spec.ts index cd52f13af8..84a0995f9c 100644 --- a/tests/playwright-tests/src/tests/runner/runner-workflow-amend.spec.ts +++ b/tests/playwright-tests/src/tests/runner/runner-workflow-amend.spec.ts @@ -7,7 +7,8 @@ import { runnerBasedEpic2TestScenariosAmend } from '../e2e/epic2-highpriority-te import { runnerBasedEpic2MedTestScenariosAmend } from '../e2e/epic2-medpriority-tests/epic2-med-priority-testsuite-migrated'; import { runnerBasedEpic3TestScenariosAmend } from '../e2e/epic3-highpriority-tests/epic3-high-priority-testsuite-migrated'; import { runnerBasedEpic3MedTestScenariosAmend } from '../e2e/epic3-medpriority-tests/epic3-med-priority-testsuite-migrated'; -import { runnerBasedEpic4dTestScenariosAmend } from '../e2e/epic4d-validation-tests/epic4d-6045-validation-testsuite-migrated'; +//import { runnerBasedEpic4dTestScenariosAmend } from '../e2e/epic4d-validation-tests/epic4d-6045-validation-testsuite-migrated'; +import { runnerBasedEpic4dTestScenariosAmend } from '../e2e/epic4d-validation-tests/epic4d-9774-rule8-transformation-testsuite-migrated'; import { generateDynamicDateMap, replaceDynamicDatesInJson } from '../../../src/json/json-updater'; From 76260fce83e410d13d1d27c687faefcef8c74125 Mon Sep 17 00:00:00 2001 From: Visalakshi Date: Tue, 15 Jul 2025 12:09:04 +0100 Subject: [PATCH 2/4] commented tests not to run --- ...ic4d-6045-validation-testsuite-migrated.ts | 50 +++++++++---------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/tests/playwright-tests/src/tests/e2e/epic4d-validation-tests/epic4d-6045-validation-testsuite-migrated.ts b/tests/playwright-tests/src/tests/e2e/epic4d-validation-tests/epic4d-6045-validation-testsuite-migrated.ts index de467cdc97..294432f1ac 100644 --- a/tests/playwright-tests/src/tests/e2e/epic4d-validation-tests/epic4d-6045-validation-testsuite-migrated.ts +++ b/tests/playwright-tests/src/tests/e2e/epic4d-validation-tests/epic4d-6045-validation-testsuite-migrated.ts @@ -1,28 +1,28 @@ -// For Future Epic 4d validation Tests +// // For Future Epic 4d validation Tests -// Note: -// These tests have been fully migrated to the new and improved test execution orchestration: -// -// - Add: -// tests/runner/runner-workflow-add -// - Add followed by Amend: -// tests/runner/runner-workflow-amend -// -// This approach allows bulk loading of test data for all tests before proceeding with validation, instead of loading test data for each test individually. -// -// Guidance: -// -// - First, try adding new tests using the runner. -// - If custom calls are needed, use new file for test addition. - tests\playwright-tests\src\tests\e2e\epic4d-6045-validation-tests\epic4d-6045-validation-tests.spec.ts -// -// Test Tags: -// There is no impact to the test tags. The same tags can be used to trigger these tests. -// For example, to run regression tests, use: -// -// npm run test:regression_e2e_epic4d -// -// This equates to "@epic4d-" tags, configured in the package.json at the playwright-tests root location. +// // Note: +// // These tests have been fully migrated to the new and improved test execution orchestration: +// // +// // - Add: +// // tests/runner/runner-workflow-add +// // - Add followed by Amend: +// // tests/runner/runner-workflow-amend +// // +// // This approach allows bulk loading of test data for all tests before proceeding with validation, instead of loading test data for each test individually. +// // +// // Guidance: +// // +// // - First, try adding new tests using the runner. +// // - If custom calls are needed, use new file for test addition. - tests\playwright-tests\src\tests\e2e\epic4d-6045-validation-tests\epic4d-6045-validation-tests.spec.ts +// // +// // Test Tags: +// // There is no impact to the test tags. The same tags can be used to trigger these tests. +// // For example, to run regression tests, use: +// // +// // npm run test:regression_e2e_epic4d +// // +// // This equates to "@epic4d-" tags, configured in the package.json at the playwright-tests root location. - export const runnerBasedEpic4dTestScenariosAdd = "@DTOSS-9492-01|@DTOSS-9494-01|@DTOSS-9496-01|@DTOSS-9498-01"; - export const runnerBasedEpic4dTestScenariosAmend = "@DTOSS-9493-01|@DTOSS-9495-01|@DTOSS-9497-01|@DTOSS-9499-01"; +// export const runnerBasedEpic4dTestScenariosAdd = "@DTOSS-9492-01|@DTOSS-9494-01|@DTOSS-9496-01|@DTOSS-9498-01"; +// export const runnerBasedEpic4dTestScenariosAmend = "@DTOSS-9493-01|@DTOSS-9495-01|@DTOSS-9497-01|@DTOSS-9499-01"; From 24d6e6a37caed6ab16ca88c687934de1385e98c7 Mon Sep 17 00:00:00 2001 From: Visalakshi Date: Tue, 15 Jul 2025 13:50:28 +0100 Subject: [PATCH 3/4] update pcpc --- .../AMENDED_9774_-_CAAS_BREAST_SCREENING_COHORT.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/playwright-tests/src/tests/e2e/testFiles/@DTOSS-9774-01/AMENDED_9774_-_CAAS_BREAST_SCREENING_COHORT.json b/tests/playwright-tests/src/tests/e2e/testFiles/@DTOSS-9774-01/AMENDED_9774_-_CAAS_BREAST_SCREENING_COHORT.json index 906c781d9e..e04697c997 100644 --- a/tests/playwright-tests/src/tests/e2e/testFiles/@DTOSS-9774-01/AMENDED_9774_-_CAAS_BREAST_SCREENING_COHORT.json +++ b/tests/playwright-tests/src/tests/e2e/testFiles/@DTOSS-9774-01/AMENDED_9774_-_CAAS_BREAST_SCREENING_COHORT.json @@ -19,7 +19,7 @@ "serial_change_number": null, "nhs_number": "9999111270", "superseded_by_nhs_number": null, - "primary_care_provider": "A91200", + "primary_care_provider": "D82032", "primary_care_effective_from_date": "20030318", "current_posting": "DMS", "current_posting_effective_from_date": "20130319", @@ -35,7 +35,7 @@ "address_line_3": "Test", "address_line_4": "Brighton", "address_line_5": "United Kingdom", - "postcode": "BT1 1NN", + "postcode": "NR13 5PF", "paf_key": "Z3S4Q5X9", "address_effective_from_date": "20130319", "reason_for_removal": null, From e23946eedd9a1bbd29e09fb7800ed918b6149edd Mon Sep 17 00:00:00 2001 From: Visalakshi Date: Tue, 15 Jul 2025 14:14:34 +0100 Subject: [PATCH 4/4] update pcpc --- .../ADD_9774_-_CAAS_BREAST_SCREENING_COHORT.json | 2 +- .../AMENDED_9774_-_CAAS_BREAST_SCREENING_COHORT.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/playwright-tests/src/tests/e2e/testFiles/@DTOSS-9774-01/ADD_9774_-_CAAS_BREAST_SCREENING_COHORT.json b/tests/playwright-tests/src/tests/e2e/testFiles/@DTOSS-9774-01/ADD_9774_-_CAAS_BREAST_SCREENING_COHORT.json index 06df567976..e27a926cd3 100644 --- a/tests/playwright-tests/src/tests/e2e/testFiles/@DTOSS-9774-01/ADD_9774_-_CAAS_BREAST_SCREENING_COHORT.json +++ b/tests/playwright-tests/src/tests/e2e/testFiles/@DTOSS-9774-01/ADD_9774_-_CAAS_BREAST_SCREENING_COHORT.json @@ -24,7 +24,7 @@ "current_posting": "DMS", "current_posting_effective_from_date": "20130319", "name_prefix": "Mrs", - "given_name": "9496 test", + "given_name": "9774 test", "other_given_name": "OtherGivenName", "family_name": "FamiliyName", "previous_family_name": "PreviousFamilyName", diff --git a/tests/playwright-tests/src/tests/e2e/testFiles/@DTOSS-9774-01/AMENDED_9774_-_CAAS_BREAST_SCREENING_COHORT.json b/tests/playwright-tests/src/tests/e2e/testFiles/@DTOSS-9774-01/AMENDED_9774_-_CAAS_BREAST_SCREENING_COHORT.json index e04697c997..a9ff5c041d 100644 --- a/tests/playwright-tests/src/tests/e2e/testFiles/@DTOSS-9774-01/AMENDED_9774_-_CAAS_BREAST_SCREENING_COHORT.json +++ b/tests/playwright-tests/src/tests/e2e/testFiles/@DTOSS-9774-01/AMENDED_9774_-_CAAS_BREAST_SCREENING_COHORT.json @@ -19,12 +19,12 @@ "serial_change_number": null, "nhs_number": "9999111270", "superseded_by_nhs_number": null, - "primary_care_provider": "D82032", + "primary_care_provider": "A91151", "primary_care_effective_from_date": "20030318", "current_posting": "DMS", "current_posting_effective_from_date": "20130319", "name_prefix": "Mrs", - "given_name": "9496 test", + "given_name": "9774 test", "other_given_name": "OtherGivenName", "family_name": "FamiliyName", "previous_family_name": "PreviousFamilyName",