@@ -109,26 +109,28 @@ Scenario Outline: Verify that the POST Create API will fail if occurrenceDateTim
109109 Given Valid json payload is created where occurrenceDateTime has invalid '<Date>' date
110110 When Trigger the post create request
111111 Then The request will be unsuccessful with the status code '400'
112- And The Response JSONs should contain correct error message for 'invalid_OccurrenceDateTime '
112+ And The Response JSONs should contain correct error message for '<error_type> '
113113 Examples :
114- | Date |
115- | future_occurrence |
116- | invalid_format |
117- | nonexistent |
118- | empty |
114+ | Date | error_type |
115+ | future_occurrence | invalid_OccurrenceDateTime |
116+ | invalid_format | invalid_OccurrenceDateTime |
117+ | nonexistent | invalid_OccurrenceDateTime |
118+ | empty | invalid_OccurrenceDateTime |
119+ | none | empty_OccurrenceDateTime |
119120
120121@supplier_name_Postman_Auth @vaccine_type_RSV @patient_id_Random
121122Scenario Outline : Verify that the POST Create API will fail if recorded has future or invalid formatted date
122123 Given Valid json payload is created where recorded has invalid '<Date>' date
123124 When Trigger the post create request
124125 Then The request will be unsuccessful with the status code '400'
125- And The Response JSONs should contain correct error message for 'invalid_recorded '
126+ And The Response JSONs should contain correct error message for '<error_type> '
126127 Examples :
127- | Date |
128- | future_date |
129- | invalid_format |
130- | nonexistent |
131- | empty |
128+ | Date | error_type |
129+ | future_date | invalid_recorded |
130+ | invalid_format | invalid_recorded |
131+ | nonexistent | invalid_recorded |
132+ | empty | invalid_recorded |
133+ | none | empty_recorded |
132134
133135@supplier_name_Postman_Auth @vaccine_type_RSV @patient_id_Random
134136Scenario Outline : Verify that the POST Create API will fail if patient's data of birth has future or invalid formatted date
@@ -142,6 +144,7 @@ Scenario Outline: Verify that the POST Create API will fail if patient's data of
142144 | invalid_format | invalid_DateOfBirth |
143145 | nonexistent | invalid_DateOfBirth |
144146 | empty | invalid_DateOfBirth |
147+ | none | missing_DateOfBirth |
145148
146149@supplier_name_Postman_Auth @vaccine_type_RSV @patient_id_Random
147150Scenario Outline : Verify that the POST Create API will fail if expiration date has invalid formatted date
@@ -153,4 +156,66 @@ Scenario Outline: Verify that the POST Create API will fail if expiration date h
153156 | Date |
154157 | invalid_format |
155158 | nonexistent |
156- | empty |
159+ | empty |
160+
161+ @supplier_name_Postman_Auth @vaccine_type_RSV @patient_id_Random
162+ Scenario Outline : Verify that the POST Create API will fail if nhs number is invalid
163+ Given Valid json payload is created where Nhs number is invalid '<invalid_NhsNumber>'
164+ When Trigger the post create request
165+ Then The request will be unsuccessful with the status code '400'
166+ And The Response JSONs should contain correct error message for '<error_type>'
167+ Examples :
168+ |invalid_NhsNumber |error_type |
169+ |1234567890 |invalid_Mod11_NhsNumber |
170+ |12345678 |invalid_NHSNumber_length |
171+
172+ @supplier_name_Postman_Auth @vaccine_type_RSV @patient_id_Random
173+ Scenario Outline : Verify that the POST Create API will fail if patient forename is invalid
174+ Given Valid json payload is created where patient forename is '<forename>'
175+ When Trigger the post create request
176+ Then The request will be unsuccessful with the status code '400'
177+ And The Response JSONs should contain correct error message for '<error_type>'
178+ Examples :
179+ | forename | error_type |
180+ | empty | empty_forename |
181+ | missing | no_forename |
182+ | white_space_array | empty_forename |
183+ | single_value_max_len | max_len_forename |
184+ | max_len_array | max_item_forename |
185+
186+ @supplier_name_Postman_Auth @vaccine_type_RSV @patient_id_Random
187+ Scenario Outline : Verify that the POST Create API will fail if patient surname is invalid
188+ Given Valid json payload is created where patient surname is '<surname>'
189+ When Trigger the post create request
190+ Then The request will be unsuccessful with the status code '400'
191+ And The Response JSONs should contain correct error message for '<error_type>'
192+ Examples :
193+ | surname | error_type |
194+ | empty | empty_surname |
195+ | missing | no_surname |
196+ | white_space | empty_surname |
197+ | name_length_36 | max_len_surname |
198+
199+ @supplier_name_Postman_Auth @vaccine_type_RSV @patient_id_Random
200+ Scenario : Verify that the POST Create API will fail if patient name is empty
201+ Given Valid json payload is created where patient name is empty
202+ When Trigger the post create request
203+ Then The request will be unsuccessful with the status code '400'
204+ And The Response JSONs should contain correct error message for 'empty_forename_surname'
205+
206+ @supplier_name_Postman_Auth @vaccine_type_RSV @patient_id_Random
207+ Scenario Outline : Verify that the POST Create API will fail if patient gender is invalid
208+ Given Valid json payload is created where patient gender is '<gender>'
209+ When Trigger the post create request
210+ Then The request will be unsuccessful with the status code '400'
211+ And The Response JSONs should contain correct error message for '<error_type>'
212+ Examples :
213+ | gender | error_type |
214+ | random_text | invalid_gender |
215+ | empty | empty_gender |
216+ | number | should_be_string |
217+ | gender_code | invalid_gender |
218+ | missing | missing_gender |
219+
220+
221+
0 commit comments