Skip to content

Commit 8f13ac4

Browse files
test/adw-ELI-440&427 (#361)
* fixed failing tests by adding "Virtual": "Y" to elid_all_people cohorts * ELI-440 - adding first set of test scenarios 01-06 * ELI-440 - adding first set of test scenarios 01-06 * ELI-427 - added tests for multiple virtual cohorts * additional test case added and tc moved to the storytestfolder
1 parent d94670d commit 8f13ac4

36 files changed

+1846
-3
lines changed
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
{
2+
"CampaignConfig": {
3+
"ID": "AUTO_RSV_ELI-440-04-Campaign-ID",
4+
"Version": 1,
5+
"Name": "ELI-440-04-Iteration-Config-Name",
6+
"Type": "V",
7+
"Target": "RSV",
8+
"Manager": [
9+
10+
],
11+
"Approver": [
12+
13+
],
14+
"Reviewer": [
15+
16+
],
17+
"IterationFrequency": "X",
18+
"IterationType": "O",
19+
"IterationTime": "07:00:00",
20+
"StartDate": "20250717",
21+
"EndDate": "20350717",
22+
"ApprovalMinimum": 0,
23+
"ApprovalMaximum": 0,
24+
"DefaultCommsRouting": "BOOK_NBS",
25+
"Iterations": [
26+
{
27+
"ID": "AUTO_RSV_ELI-440-04-Iteration-ID",
28+
"DefaultCommsRouting": "TEST_ACTION",
29+
"DefaultNotActionableRouting": "TEST_NOT_ACTION",
30+
"DefaultNotEligibleRouting": "TEST_NOT_ELI",
31+
"Version": 1,
32+
"Name": "ELI-440-04-Iteration-Config-Name",
33+
"IterationDate": "20240808",
34+
"IterationNumber": 1,
35+
"CommsType": "I",
36+
"ApprovalMinimum": 0,
37+
"ApprovalMaximum": 0,
38+
"Type": "O",
39+
"IterationCohorts": [
40+
{
41+
"CohortLabel": "elid_virtual_cohort",
42+
"CohortGroup": "elid_virtual_cohort",
43+
"PositiveDescription": "In elid_virtual_cohort",
44+
"NegativeDescription": "Out elid_virtual_cohort",
45+
"Priority": 1,
46+
"Virtual": "Y"
47+
},
48+
{
49+
"CohortLabel": "rsv_eli_440_cohort_999",
50+
"CohortGroup": "rsv_eli_440_cohort_999",
51+
"PositiveDescription": "In rsv_eli_440_cohort_999",
52+
"NegativeDescription": "Out rsv_eli_440_cohort_999",
53+
"Priority": 2
54+
}
55+
],
56+
"IterationRules": [
57+
{
58+
"Type": "F",
59+
"Name": "Filter based on cohort membership",
60+
"Description": "Filter based on cohort membership",
61+
"Priority": 100,
62+
"AttributeLevel": "COHORT",
63+
"AttributeName": "COHORT_LABEL",
64+
"Operator": "in",
65+
"Comparator": "elid_virtual_cohort"
66+
}
67+
],
68+
"ActionsMapper": {
69+
"TEST_ACTION": {
70+
"ExternalRoutingCode": "TestAction",
71+
"ActionDescription": "TestAction Description",
72+
"ActionType": "ButtonWithAuthLink",
73+
"UrlLink": "http://www.nhs.uk/book-rsv",
74+
"UrlLabel": "Continue to booking"
75+
},
76+
"TEST_NOT_ACTION": {
77+
"ExternalRoutingCode": "TestNotAction",
78+
"ActionDescription": "TestNotAction Description",
79+
"ActionType": "ButtonWithAuthLink",
80+
"UrlLink": null,
81+
"UrlLabel": ""
82+
},
83+
"TEST_NOT_ELI": {
84+
"ExternalRoutingCode": "TestNotEli",
85+
"ActionDescription": "TestNotEli Description",
86+
"ActionType": "TestNotEliAction",
87+
"UrlLink": "https://www.noteligible.com/440",
88+
"UrlLabel": "not_eli_UrlLabel"
89+
}
90+
}
91+
}
92+
]
93+
}
94+
}

tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-222.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@
5656
"CohortGroup": "magic_cohort",
5757
"PositiveDescription": "",
5858
"NegativeDescription": "",
59-
"Priority": 20
59+
"Priority": 20,
60+
"Virtual": "Y"
6061
}
6162
],
6263
"IterationRules": [

tests/e2e/data/configs/storyTestConfigs/AUTO_RSV_ELI-365.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@
5656
"CohortGroup": "magic_cohort",
5757
"PositiveDescription": "",
5858
"NegativeDescription": "",
59-
"Priority": 20
59+
"Priority": 20,
60+
"Virtual": "Y"
6061
}
6162
],
6263
"IterationRules": [
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
{
2+
"CampaignConfig": {
3+
"ID": "AUTO_RSV_ELI-427-01-3-Campaign-ID",
4+
"Version": 1,
5+
"Name": "ELI-427-01-3-Iteration-Config-Name",
6+
"Type": "V",
7+
"Target": "RSV",
8+
"Manager": [
9+
10+
],
11+
"Approver": [
12+
13+
],
14+
"Reviewer": [
15+
16+
],
17+
"IterationFrequency": "X",
18+
"IterationType": "O",
19+
"IterationTime": "07:00:00",
20+
"StartDate": "20250717",
21+
"EndDate": "20350717",
22+
"ApprovalMinimum": 0,
23+
"ApprovalMaximum": 0,
24+
"DefaultCommsRouting": "TEST_ACTION",
25+
"Iterations": [
26+
{
27+
"ID": "AUTO_RSV_ELI-427-01-3-Iteration-ID",
28+
"DefaultCommsRouting": "TEST_ACTION",
29+
"DefaultNotActionableRouting": "TEST_NOT_ACTION",
30+
"DefaultNotEligibleRouting": "TEST_NOT_ELI",
31+
"Version": 1,
32+
"Name": "ELI-427-01-3-Iteration-Config-Name",
33+
"IterationDate": "20240808",
34+
"IterationNumber": 1,
35+
"CommsType": "I",
36+
"ApprovalMinimum": 0,
37+
"ApprovalMaximum": 0,
38+
"Type": "O",
39+
"StatusText": {
40+
"Actionable": "CUSTOM1 - You should have the RSV Vaccine and you have an appointment on [[TARGET.RSV.BOOKED_APPOINTMENT_DATE:DATE(%d %B %Y)]]",
41+
"NotActionable": "CUSTOM2 - You had the RSV Vaccine on [[TARGET.RSV.LAST_SUCCESSFUL_DATE:DATE(%d %B %Y)]]",
42+
"NotEligible": "CUSTOM3 - We do not believe you should have it as you were born on [[TARGET.PERSON.DATE_OF_BIRTH]] and your postcode is [[TARGET.PERSON.POSTCODE]]"
43+
},
44+
"IterationCohorts": [
45+
{
46+
"CohortLabel": "eli_427_cohort_1",
47+
"CohortGroup": "eli_427_cohort_group_1",
48+
"PositiveDescription": "In eli_427_cohort_1",
49+
"NegativeDescription": "Not in eli_427_cohort_1",
50+
"Priority": 1
51+
}
52+
],
53+
"IterationRules": [
54+
{
55+
"Type": "F",
56+
"Name": "Remove under 74 Years on day of execution",
57+
"Description": "Filter out anyone who is not 74 years old.",
58+
"Priority": 100,
59+
"AttributeLevel": "PERSON",
60+
"AttributeName": "DATE_OF_BIRTH",
61+
"Operator": "Y>",
62+
"Comparator": "-74"
63+
},
64+
{
65+
"Type": "F",
66+
"Name": "Remove under 75 Years on day of execution",
67+
"Description": "Filter out anyone who is not 74 years old.",
68+
"Priority": 101,
69+
"AttributeLevel": "PERSON",
70+
"AttributeName": "DATE_OF_BIRTH",
71+
"Operator": "Y<",
72+
"Comparator": "-74"
73+
},
74+
{
75+
"Type": "S",
76+
"Name": "AlreadyVaccinated",
77+
"Description": "## You've had your RSV vaccination.",
78+
"Priority": 200,
79+
"AttributeLevel": "TARGET",
80+
"AttributeTarget": "RSV",
81+
"AttributeName": "LAST_SUCCESSFUL_DATE",
82+
"Operator": "is_not_empty",
83+
"Comparator": ""
84+
}
85+
],
86+
"ActionsMapper": {
87+
"TEST_ACTION": {
88+
"ExternalRoutingCode": "TestAction",
89+
"ActionDescription": "TestAction Description",
90+
"ActionType": "ButtonWithAuthLink",
91+
"UrlLink": "http://www.nhs.uk/book-rsv",
92+
"UrlLabel": "Continue to booking"
93+
},
94+
"TEST_NOT_ACTION": {
95+
"ExternalRoutingCode": "TestNotAction",
96+
"ActionDescription": "TestNotAction Description",
97+
"ActionType": "ButtonWithAuthLink",
98+
"UrlLink": null,
99+
"UrlLabel": ""
100+
},
101+
"TEST_NOT_ELI": {
102+
"ExternalRoutingCode": "TestNotEli",
103+
"ActionDescription": "TestNotEli Description",
104+
"ActionType": "",
105+
"UrlLink": null,
106+
"UrlLabel": ""
107+
}
108+
}
109+
}
110+
]
111+
}
112+
}
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
{
2+
"CampaignConfig": {
3+
"ID": "AUTO_RSV_ELI-427-04-Campaign-ID",
4+
"Version": 1,
5+
"Name": "ELI-427-04-Iteration-Config-Name",
6+
"Type": "V",
7+
"Target": "FLU",
8+
"Manager": [
9+
10+
],
11+
"Approver": [
12+
13+
],
14+
"Reviewer": [
15+
16+
],
17+
"IterationFrequency": "X",
18+
"IterationType": "O",
19+
"IterationTime": "07:00:00",
20+
"StartDate": "20250717",
21+
"EndDate": "20350717",
22+
"ApprovalMinimum": 0,
23+
"ApprovalMaximum": 0,
24+
"DefaultCommsRouting": "TEST_ACTION",
25+
"Iterations": [
26+
{
27+
"ID": "AUTO_RSV_ELI-427-04-Iteration-ID",
28+
"DefaultCommsRouting": "TEST_ACTION",
29+
"DefaultNotActionableRouting": "TEST_NOT_ACTION",
30+
"DefaultNotEligibleRouting": "TEST_NOT_ELI",
31+
"Version": 1,
32+
"Name": "ELI-427-04-Iteration-Config-Name",
33+
"IterationDate": "20240808",
34+
"IterationNumber": 1,
35+
"CommsType": "I",
36+
"ApprovalMinimum": 0,
37+
"ApprovalMaximum": 0,
38+
"Type": "O",
39+
"StatusText": {
40+
"Actionable": ""
41+
},
42+
"IterationCohorts": [
43+
{
44+
"CohortLabel": "eli_427_cohort_1",
45+
"CohortGroup": "eli_427_cohort_group_1",
46+
"PositiveDescription": "In eli_427_cohort_1",
47+
"NegativeDescription": "Not in eli_427_cohort_1",
48+
"Priority": 1
49+
}
50+
],
51+
"IterationRules": [
52+
{
53+
"Type": "F",
54+
"Name": "Remove under 74 Years on day of execution",
55+
"Description": "Filter out anyone who is not 74 years old.",
56+
"Priority": 100,
57+
"AttributeLevel": "PERSON",
58+
"AttributeName": "DATE_OF_BIRTH",
59+
"Operator": "Y>",
60+
"Comparator": "-74"
61+
},
62+
{
63+
"Type": "F",
64+
"Name": "Remove under 75 Years on day of execution",
65+
"Description": "Filter out anyone who is not 74 years old.",
66+
"Priority": 101,
67+
"AttributeLevel": "PERSON",
68+
"AttributeName": "DATE_OF_BIRTH",
69+
"Operator": "Y<",
70+
"Comparator": "-74"
71+
},
72+
{
73+
"Type": "S",
74+
"Name": "AlreadyVaccinated",
75+
"Description": "## You've had your RSV vaccination.",
76+
"Priority": 200,
77+
"AttributeLevel": "TARGET",
78+
"AttributeTarget": "RSV",
79+
"AttributeName": "LAST_SUCCESSFUL_DATE",
80+
"Operator": "is_not_empty",
81+
"Comparator": ""
82+
}
83+
],
84+
"ActionsMapper": {
85+
"TEST_ACTION": {
86+
"ExternalRoutingCode": "TestAction",
87+
"ActionDescription": "TestAction Description",
88+
"ActionType": "ButtonWithAuthLink",
89+
"UrlLink": "http://www.nhs.uk/book-rsv",
90+
"UrlLabel": "Continue to booking"
91+
},
92+
"TEST_NOT_ACTION": {
93+
"ExternalRoutingCode": "TestNotAction",
94+
"ActionDescription": "TestNotAction Description",
95+
"ActionType": "ButtonWithAuthLink",
96+
"UrlLink": null,
97+
"UrlLabel": ""
98+
},
99+
"TEST_NOT_ELI": {
100+
"ExternalRoutingCode": "TestNotEli",
101+
"ActionDescription": "TestNotEli Description",
102+
"ActionType": "",
103+
"UrlLink": null,
104+
"UrlLabel": ""
105+
}
106+
}
107+
}
108+
]
109+
}
110+
}

0 commit comments

Comments
 (0)