Skip to content

Commit c932601

Browse files
test: dtoss-3881-fixed-test-retry (#1595)
* added-initial-test * added-config-to-test * test-name-updated * initial-test-added * test-3881-updated * test-updated-to-include-superseded-fix * fixed-review-comment * updated-nhs-number-to-999 * test-config-updated * subscriber-status-config-added * fixed-retry-failure
1 parent e9abb16 commit c932601

2 files changed

Lines changed: 24 additions & 5 deletions

File tree

tests/playwright-tests/src/tests/e2e/epic4c-add-participant-tests/epic4c-testsuite.spec.ts renamed to tests/playwright-tests/src/tests/e2e/epic4c-add-participant-tests/epic4c-10011-10012-testsuite.spec.ts

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,17 +58,36 @@ test.describe('@DTOSS-3881-01 @e2e @epic4c- Cohort Manger subscribed the Added r
5858
expect(response?.data?.[0]?.ReferralFlag).toBe(1);
5959
});
6060

61+
<<<<<<< HEAD:tests/playwright-tests/src/tests/e2e/epic4c-add-participant-tests/epic4c-10011-10012-testsuite.spec.ts
62+
await test.step('DTOSS-10012 DTOSS-10012 verify NemsSubscription_Id in NEMS_SUBSCRIPTION table', async () => {
63+
const nhsNumber = participantData['inputParticipantRecord'].u_case_variable_data.nhs_number;
64+
65+
const response = await retry(
66+
async () => {
67+
const res = await getRecordsFromNemsSubscription(request, nhsNumber);
68+
const validators = composeValidators(expectStatus(200));
69+
await validators(res);
70+
71+
return res;
72+
},
73+
(res) => {
74+
const subscriptionID = extractSubscriptionID(res);
75+
return subscriptionID !== null;
76+
},
77+
{ retries: 5, delayMs: 2000 }
78+
);
79+
=======
6180
await test.step('DTOSS-10012 ADD verify NemsSubscription in NEMS_SUBSCRIPTION table', async () => {
6281
const nhsNumber = participantData['inputParticipantRecord'].u_case_variable_data.nhs_number;
6382
const response = await getRecordsFromNemsSubscription(request, nhsNumber);
6483
const validators = composeValidators(
6584
expectStatus(200)
6685
);
6786
await validators(response);
87+
>>>>>>> e9abb1665a60258957de73ecf486b199808e514a:tests/playwright-tests/src/tests/e2e/epic4c-add-participant-tests/epic4c-testsuite.spec.ts
6888
const subscriptionID = extractSubscriptionID(response);
6989
expect(subscriptionID).not.toBeNull();
70-
71-
console.log(`Extracted Subscription ID: ${subscriptionID} for NHS number: ${nhsNumber}`);
90+
console.log(`Extracted Subscription ID: ${subscriptionID} for number: ${nhsNumber}`);
7291
});
7392
});
7493
});

tests/playwright-tests/src/tests/e2e/testFiles/@DTOSS-3881-02/AMENDMANUAL_1B8F53_-_CAAS_BREAST_SCREENING_COHORT.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"meta": {
1111
"testJiraId": "@DTOSS-3881-02",
1212
"requirementJiraId": "@DTOSS-3881-02",
13-
"additionalTags": "@epic4c- @e2e DTOSS-10013 1.Check updated telephone number record in (cohort distribution)"
13+
"additionalTags": "@epic4c- @e2e DTOSS-10013 1.Check updated telephone number record in cohort distribution"
1414
}
1515
},
1616
{
@@ -22,7 +22,7 @@
2222
"meta": {
2323
"testJiraId": "@DTOSS-3881-02",
2424
"requirementJiraId": "@DTOSS-3881-02",
25-
"additionalTags": "@epic4c- @e2e DTOSS-10013 2.verify data in record (participant demographic)"
25+
"additionalTags": "@epic4c- @e2e DTOSS-10013 2.verify data in record is available in participant demographic table"
2626
}
2727
},
2828
{
@@ -34,7 +34,7 @@
3434
"meta": {
3535
"testJiraId": "@DTOSS-3881-02",
3636
"requirementJiraId": "@DTOSS-3881-02",
37-
"additionalTags": "@epic4c- @e2e DTOSS-10013 3.check record (participant management)"
37+
"additionalTags": "@epic4c- @e2e DTOSS-10013 3.check record in available in participant management table"
3838
}
3939
}
4040
],

0 commit comments

Comments
 (0)