You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/e2e_automation/features/APITests/search.feature
+37-25Lines changed: 37 additions & 25 deletions
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ Feature: Search the immunization of a patient
4
4
@Delete_cleanUp@supplier_name_TPP
5
5
Scenario Outline: Verify that the GET method of Search API will be successful with all the valid parameters
6
6
Given Valid vaccination record is created with Patient '<Patient>' and vaccine_type '<Vaccine_type>'
7
-
When Send a search request with GET method for Immunization event created
7
+
When Send a search request with 'GET' method for Immunization event created
8
8
Then The request will be successful with the status code '200'
9
9
And The Search Response JSONs should contain the detail of the immunization events created above
10
10
And The Search Response JSONs field values should match with the input JSONs field values for resourceType Immunization
@@ -28,7 +28,7 @@ Feature: Search the immunization of a patient
28
28
@Delete_cleanUp@supplier_name_EMIS
29
29
Scenario Outline: Verify that the POST method of Search API will be successful with all the valid parameters
30
30
Given Valid vaccination record is created with Patient '<Patient>' and vaccine_type '<Vaccine_type>'
31
-
When Send a search request with POST method for Immunization event created
31
+
When Send a search request with 'POST' method for Immunization event created
32
32
Then The request will be successful with the status code '200'
33
33
And The Search Response JSONs should contain the detail of the immunization events created above
34
34
And The Search Response JSONs field values should match with the input JSONs field values for resourceType Immunization
@@ -49,10 +49,10 @@ Feature: Search the immunization of a patient
49
49
@Delete_cleanUp@supplier_name_Postman_Auth
50
50
Scenario Outline: Verify that the immunization events retrieved in the response of Search API should be within Date From and Date To range
51
51
Given Valid vaccination record is created for '<NHSNumber>' and Disease Type '<vaccine_type>' with recorded date as '<DateFrom>'
52
-
When Send a search request with GET method with valid NHS Number '<NHSNumber>' and Disease Type '<vaccine_type>' and Date From '<DateFrom>' and Date To '<DateTo>'
52
+
When Send a search request with 'GET' method with valid NHS Number '<NHSNumber>' and Disease Type '<vaccine_type>' and Date From '<DateFrom>' and Date To '<DateTo>'
53
53
Then The request will be successful with the status code '200'
54
54
And The occurrenceDateTime of the immunization events should be within the Date From and Date To range
55
-
When Send a search request with POST method with valid NHS Number '<NHSNumber>' and Disease Type '<vaccine_type>' and Date From '<DateFrom>' and Date To '<DateTo>'
55
+
When Send a search request with 'POST' method with valid NHS Number '<NHSNumber>' and Disease Type '<vaccine_type>' and Date From '<DateFrom>' and Date To '<DateTo>'
56
56
Then The request will be successful with the status code '200'
57
57
And The occurrenceDateTime of the immunization events should be within the Date From and Date To range
58
58
Examples:
@@ -62,10 +62,10 @@ Feature: Search the immunization of a patient
62
62
# Negative Scenarios
63
63
@supplier_name_Postman_Auth
64
64
Scenario Outline: Verify that Search API will throw error if NHS Number is invalid
65
-
When Send a search request with GET method with invalid NHS Number '<NHSNumber>' and valid Disease Type '<DiseaseType>'
65
+
When Send a search request with 'GET' method with invalid NHS Number '<NHSNumber>' and valid Disease Type '<DiseaseType>'
66
66
Then The request will be unsuccessful with the status code '400'
67
67
And The Search Response JSONs should contain correct error message for invalid NHS Number
68
-
When Send a search request with POST method with invalid NHS Number '<NHSNumber>' and valid Disease Type '<DiseaseType>'
68
+
When Send a search request with 'POST' method with invalid NHS Number '<NHSNumber>' and valid Disease Type '<DiseaseType>'
69
69
Then The request will be unsuccessful with the status code '400'
70
70
And The Search Response JSONs should contain correct error message for invalid NHS Number
71
71
Examples:
@@ -78,10 +78,10 @@ Feature: Search the immunization of a patient
78
78
@smoke
79
79
@supplier_name_Postman_Auth
80
80
Scenario Outline: Verify that Search API will throw error if include is invalid
81
-
When Send a search request with GET method with valid NHS Number '<NHSNumber>' and valid Disease Type '<vaccine_type>' and invalid include '<include>'
81
+
When Send a search request with 'GET' method with valid NHS Number '<NHSNumber>' and valid Disease Type '<vaccine_type>' and invalid include '<include>'
82
82
Then The request will be unsuccessful with the status code '400'
83
83
And The Search Response JSONs should contain correct error message for invalid include
84
-
When Send a search request with POST method with valid NHS Number '<NHSNumber>' and valid Disease Type '<vaccine_type>' and invalid include '<include>'
84
+
When Send a search request with 'POST' method with valid NHS Number '<NHSNumber>' and valid Disease Type '<vaccine_type>' and invalid include '<include>'
85
85
Then The request will be unsuccessful with the status code '400'
86
86
And The Search Response JSONs should contain correct error message for invalid include
87
87
Examples:
@@ -91,10 +91,10 @@ Feature: Search the immunization of a patient
91
91
@smoke
92
92
@supplier_name_Postman_Auth
93
93
Scenario Outline: Verify that Search API will throw error if both different combination of dates and include is invalid
94
-
When Send a search request with GET method with valid NHS Number '<NHSNumber>' and valid Disease Type '<vaccine_type>' and Date From '<DateFrom>' and Date To '<DateTo>' and include '<include>'
94
+
When Send a search request with 'GET' method with valid NHS Number '<NHSNumber>' and valid Disease Type '<vaccine_type>' and Date From '<DateFrom>' and Date To '<DateTo>' and include '<include>'
95
95
Then The request will be unsuccessful with the status code '400'
96
96
And The Search Response JSONs should contain correct error message for invalid Date From, Date To and include
97
-
When Send a search request with POST method with valid NHS Number '<NHSNumber>' and valid Disease Type '<vaccine_type>' and Date From '<DateFrom>' and Date To '<DateTo>' and include '<include>'
97
+
When Send a search request with 'POST' method with valid NHS Number '<NHSNumber>' and valid Disease Type '<vaccine_type>' and Date From '<DateFrom>' and Date To '<DateTo>' and include '<include>'
98
98
Then The request will be unsuccessful with the status code '400'
99
99
And The Search Response JSONs should contain correct error message for invalid Date From, Date To and include
100
100
Examples:
@@ -107,10 +107,10 @@ Feature: Search the immunization of a patient
107
107
@smoke
108
108
@supplier_name_Postman_Auth
109
109
Scenario Outline: Verify that Search API will throw error if Disease Type is invalid
110
-
When Send a search request with GET method with valid NHS Number '<NHSNumber>' and invalid Disease Type '<DiseaseType>'
110
+
When Send a search request with 'GET' method with valid NHS Number '<NHSNumber>' and invalid Disease Type '<DiseaseType>'
111
111
Then The request will be unsuccessful with the status code '400'
112
112
And The Search Response JSONs should contain correct error message for invalid Disease Type
113
-
When Send a search request with POST method with valid NHS Number '<NHSNumber>' and invalid Disease Type '<DiseaseType>'
113
+
When Send a search request with 'POST' method with valid NHS Number '<NHSNumber>' and invalid Disease Type '<DiseaseType>'
114
114
Then The request will be unsuccessful with the status code '400'
115
115
And The Search Response JSONs should contain correct error message for invalid Disease Type
116
116
Examples:
@@ -121,10 +121,10 @@ Feature: Search the immunization of a patient
121
121
122
122
@supplier_name_Postman_Auth
123
123
Scenario Outline: Verify that Search API will throw error if both NHS Number and Disease Type are invalid
124
-
When Send a search request with GET method with invalid NHS Number '<NHSNumber>' and invalid Disease Type '<DiseaseType>'
124
+
When Send a search request with 'GET' method with invalid NHS Number '<NHSNumber>' and invalid Disease Type '<DiseaseType>'
125
125
Then The request will be unsuccessful with the status code '400'
126
126
And The Search Response JSONs should contain correct error message for invalid NHS Number as higher priority
127
-
When Send a search request with POST method with invalid NHS Number '<NHSNumber>' and invalid Disease Type '<DiseaseType>'
127
+
When Send a search request with 'POST' method with invalid NHS Number '<NHSNumber>' and invalid Disease Type '<DiseaseType>'
128
128
Then The request will be unsuccessful with the status code '400'
129
129
And The Search Response JSONs should contain correct error message for invalid NHS Number as higher priority
130
130
Examples:
@@ -136,19 +136,31 @@ Feature: Search the immunization of a patient
136
136
@Delete_cleanUp@supplier_name_Postman_Auth
137
137
Scenario: Verify that Search API returns 200 with results and OperationOutcome when both valid and invalid Disease Type are provided
138
138
Given Valid vaccination record is created with Patient 'Random' and vaccine_type 'COVID'
139
-
When Send a search request with GET method with valid NHS Number and mixed valid and invalid Disease Type
139
+
When Send a search request with 'GET' method with valid NHS Number and mixed valid and invalid Disease Type
140
140
Then The request will be successful with the status code '200'
141
141
And The Search Response should contain search results and OperationOutcome for invalid immunization targets
142
-
When Send a search request with POST method with valid NHS Number and mixed valid and invalid Disease Type
142
+
When Send a search request with 'POST' method with valid NHS Number and mixed valid and invalid Disease Type
143
143
Then The request will be successful with the status code '200'
144
144
And The Search Response should contain search results and OperationOutcome for invalid immunization targets
145
145
146
+
@smoke
147
+
@Delete_cleanUp@supplier_name_MAVIS
148
+
Scenario: Verify that Search API returns 200 with results and OperationOutcome with authorized and unauthorized Disease Type for the supplier
149
+
Given Valid vaccination record is created with Patient 'Random' and vaccine_type 'FLU'
150
+
When Send a search request with 'GET' method with valid NHS Number and multiple Disease Type
151
+
Then The request will be successful with the status code '200'
152
+
And The Search Response should contain search results and OperationOutcome for unauthorized immunization targets
153
+
When Send a search request with 'POST' method with valid NHS Number and multiple Disease Type
154
+
Then The request will be successful with the status code '200'
155
+
And The Search Response should contain search results and OperationOutcome for unauthorized immunization targets
156
+
157
+
146
158
@supplier_name_MAVIS@vaccine_type_RSV
147
159
Scenario Outline: Verify that Search API will throw error if date from is invalid
148
-
When Send a search request with GET method with invalid Date From '<DateFrom>' and valid Date To '<DateTo>'
160
+
When Send a search request with 'GET' method with invalid Date From '<DateFrom>' and valid Date To '<DateTo>'
149
161
Then The request will be unsuccessful with the status code '400'
150
162
And The Search Response JSONs should contain correct error message for invalid Date From
151
-
When Send a search request with POST method with invalid Date From '<DateFrom>' and valid Date To '<DateTo>'
163
+
When Send a search request with 'POST' method with invalid Date From '<DateFrom>' and valid Date To '<DateTo>'
152
164
Then The request will be unsuccessful with the status code '400'
153
165
And The Search Response JSONs should contain correct error message for invalid Date From
154
166
Examples:
@@ -159,10 +171,10 @@ Feature: Search the immunization of a patient
159
171
160
172
@supplier_name_RAVS@vaccine_type_RSV
161
173
Scenario Outline: Verify that Search API will throw error if date to is invalid
162
-
When Send a search request with GET method with valid Date From '<DateFrom>' and invalid Date To '<DateTo>'
174
+
When Send a search request with 'GET' method with valid Date From '<DateFrom>' and invalid Date To '<DateTo>'
163
175
Then The request will be unsuccessful with the status code '400'
164
176
And The Search Response JSONs should contain correct error message for invalid Date To
165
-
When Send a search request with POST method with valid Date From '<DateFrom>' and invalid Date To '<DateTo>'
177
+
When Send a search request with 'POST' method with valid Date From '<DateFrom>' and invalid Date To '<DateTo>'
166
178
Then The request will be unsuccessful with the status code '400'
167
179
And The Search Response JSONs should contain correct error message for invalid Date To
168
180
Examples:
@@ -173,10 +185,10 @@ Feature: Search the immunization of a patient
173
185
174
186
@supplier_name_MAVIS@vaccine_type_RSV
175
187
Scenario Outline: Verify that Search API will throw error if both date from and date to are invalid
176
-
When Send a search request with GET method with invalid Date From '<DateFrom>' and invalid Date To '<DateTo>'
188
+
When Send a search request with 'GET' method with invalid Date From '<DateFrom>' and invalid Date To '<DateTo>'
177
189
Then The request will be unsuccessful with the status code '400'
178
190
And The Search Response JSONs should contain correct error message for invalid Date From
179
-
When Send a search request with POST method with invalid Date From '<DateFrom>' and invalid Date To '<DateTo>'
191
+
When Send a search request with 'POST' method with invalid Date From '<DateFrom>' and invalid Date To '<DateTo>'
180
192
Then The request will be unsuccessful with the status code '400'
181
193
And The Search Response JSONs should contain correct error message for invalid Date From
182
194
Examples:
@@ -188,10 +200,10 @@ Feature: Search the immunization of a patient
188
200
@smoke
189
201
@supplier_name_SONAR
190
202
Scenario Outline: Verify that Search API will throw error supplier is not authorized to make Search
191
-
When Send a search request with GET method with invalid NHS Number '<NHSNumber>' and valid Disease Type '<DiseaseType>'
203
+
When Send a search request with 'GET' method with invalid NHS Number '<NHSNumber>' and valid Disease Type '<DiseaseType>'
192
204
Then The request will be unsuccessful with the status code '403'
193
205
And The Response JSONs should contain correct error message for 'unauthorized_access' access
194
-
When Send a search request with POST method with invalid NHS Number '<NHSNumber>' and valid Disease Type '<DiseaseType>'
206
+
When Send a search request with 'POST' method with invalid NHS Number '<NHSNumber>' and valid Disease Type '<DiseaseType>'
195
207
Then The request will be unsuccessful with the status code '403'
196
208
And The Response JSONs should contain correct error message for 'unauthorized_access' access
197
209
Examples:
@@ -203,7 +215,7 @@ Feature: Search the immunization of a patient
203
215
Scenario: Flu event is created and updated twice and search request fetch the latest meta version and Etag
204
216
Given I have created a valid vaccination record
205
217
And created event is being updated twice
206
-
When Send a search request with GET method for Immunization event created
218
+
When Send a search request with 'GET' method for Immunization event created
207
219
Then The request will be successful with the status code '200'
208
220
And The Search Response JSONs should contain the detail of the immunization events created above
209
221
And The Search Response JSONs field values should match with the input JSONs field values for resourceType Immunization
0 commit comments