diff --git a/src/aat/resources/features/F-151 - Get Banners V2 Internal/F-151.feature b/src/aat/resources/features/F-151 - Get Banners V2 Internal/F-151.feature new file mode 100644 index 0000000000..5e35599d4c --- /dev/null +++ b/src/aat/resources/features/F-151 - Get Banners V2 Internal/F-151.feature @@ -0,0 +1,36 @@ +#===================================================================== +@F-151 +Feature: F-151: Retrieve Banner Information for Dynamic Display +#===================================================================== + +Background: Load test data for the scenario + Given an appropriate test context as detailed in the test data source + +#------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +@S-151.1 +Scenario: must retrieve banner information for the jurisdictions successfully + + Given a user with [an active profile in CCD], + + When a request is prepared with appropriate values, + And it is submitted to call the [retrieve banner information for the jurisdictions] operation of [CCD Data Store], + + Then a positive response is received, + And the response [code is HTTP-200 OK], + And the response has all other details as expected. + +#------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +@S-151.2 @Ignore # Response code mismatch, expected: 401, actual: 403 +Scenario: must return 401 when request does not provide valid authentication credentials + + Given a user with [an active profile in CCD], + + When a request is prepared with appropriate values, + And the request [does not provide valid authentication credentials], + And it is submitted to call the [retrieve banner information for the jurisdictions] operation of [CCD Data Store], + + Then a negative response is received, + And the response [code is HTTP-401 Unauthorised], + And the response has all other details as expected. + +#------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- diff --git a/src/aat/resources/features/F-151 - Get Banners V2 Internal/F-151_Test_Data_Base.td.json b/src/aat/resources/features/F-151 - Get Banners V2 Internal/F-151_Test_Data_Base.td.json new file mode 100644 index 0000000000..7fa11f358b --- /dev/null +++ b/src/aat/resources/features/F-151 - Get Banners V2 Internal/F-151_Test_Data_Base.td.json @@ -0,0 +1,31 @@ +{ + "_guid_": "F-151_Test_Data_Base", + + "productName": "CCD Data Store", + "operationName": "retrieve banner information for the jurisdictions", + + "method": "GET", + "uri": "/internal/banners", + + "user": { + "_extends_": "Common_User_For_Request" + }, + + "request": { + "headers": { + "_extends_": "Common_Request_Headers", + "experimental": true + }, + "queryParams": { + "ids": "AUTOTEST1" + } + }, + + "expectedResponse": { + "headers": { + "Content-Type": "[[ANYTHING_PRESENT]]", + "Content-Length": "[[ANYTHING_PRESENT]]", + "Strict-Transport-Security": "[[ANYTHING_PRESENT]]" + } + } +} diff --git a/src/aat/resources/features/F-151 - Get Banners V2 Internal/S-151.1.td.json b/src/aat/resources/features/F-151 - Get Banners V2 Internal/S-151.1.td.json new file mode 100644 index 0000000000..c8def8dc7e --- /dev/null +++ b/src/aat/resources/features/F-151 - Get Banners V2 Internal/S-151.1.td.json @@ -0,0 +1,29 @@ +{ + "_guid_": "S-151.1", + "_extends_": "F-151_Test_Data_Base", + "title": "must retrieve banner information for the jurisdictions successfully", + + "specs": [ + "an active profile in CCD", + "code is HTTP-200 OK" + ], + + "expectedResponse": { + "_extends_": "Common_200_Response", + "headers": { + "Content-Type": "application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-banners.v2+json;charset=UTF-8" + }, + "body": { + "banners": [ + { + "id": "[[ANY_STRING_NOT_NULLABLE]]", + "bannerEnabled": true, + "bannerDescription": "Test Jurisdiction Description", + "bannerUrlText": "Click here to see it.>>>", + "bannerUrl": "http://localhost:3451/testjurisdiction", + "jurisdictionDefinition": null + } + ] + } + } +} diff --git a/src/aat/resources/features/F-151 - Get Banners V2 Internal/S-151.2.td.json b/src/aat/resources/features/F-151 - Get Banners V2 Internal/S-151.2.td.json new file mode 100644 index 0000000000..5cdd1bbc4f --- /dev/null +++ b/src/aat/resources/features/F-151 - Get Banners V2 Internal/S-151.2.td.json @@ -0,0 +1,27 @@ +{ + "_guid_": "S-151.2", + "_extends_": "F-151_Test_Data_Base", + "title": "must return 401 when request does not provide valid authentication credentials", + + "specs": [ + "an active profile in CCD", + "does not provide valid authentication credentials", + "code is HTTP-401 Unauthorised" + ], + + "request": { + "headers": { + "Authorization": "eyJhbGciOiJIUzI1NiJ9" + } + }, + + "expectedResponse": { + "_extends_": "Common_401_Response", + "headers": { + "Content-Encoding": "gzip" + }, + "body": { + "message": "Access Denied" + } + } +} diff --git a/src/aat/resources/features/F-152 - Get Jurisdiction UI Configs V2 Internal/F-152.feature b/src/aat/resources/features/F-152 - Get Jurisdiction UI Configs V2 Internal/F-152.feature new file mode 100644 index 0000000000..47f1674322 --- /dev/null +++ b/src/aat/resources/features/F-152 - Get Jurisdiction UI Configs V2 Internal/F-152.feature @@ -0,0 +1,36 @@ +#===================================================================== +@F-152 +Feature: F-152: Retrieve Jurisdiction UI Config Information for Dynamic Display +#===================================================================== + +Background: Load test data for the scenario + Given an appropriate test context as detailed in the test data source + +#------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +@S-152.1 +Scenario: must retrieve jurisdiction UI config information for the jurisdictions successfully + + Given a user with [an active profile in CCD], + + When a request is prepared with appropriate values, + And it is submitted to call the [retrieve jurisdiction ui config information for the jurisdictions] operation of [CCD Data Store], + + Then a positive response is received, + And the response [code is HTTP-200 OK], + And the response has all other details as expected. + +#------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +@S-152.2 @Ignore # Response code mismatch, expected: 401, actual: 403 +Scenario: must return 401 when request does not provide valid authentication credentials + + Given a user with [an active profile in CCD], + + When a request is prepared with appropriate values, + And the request [does not provide valid authentication credentials], + And it is submitted to call the [retrieve jurisdiction ui config information for the jurisdictions] operation of [CCD Data Store], + + Then a negative response is received, + And the response [code is HTTP-401 Unauthorised], + And the response has all other details as expected. + +#------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- diff --git a/src/aat/resources/features/F-152 - Get Jurisdiction UI Configs V2 Internal/F-152_Test_Data_Base.td.json b/src/aat/resources/features/F-152 - Get Jurisdiction UI Configs V2 Internal/F-152_Test_Data_Base.td.json new file mode 100644 index 0000000000..a6052c374c --- /dev/null +++ b/src/aat/resources/features/F-152 - Get Jurisdiction UI Configs V2 Internal/F-152_Test_Data_Base.td.json @@ -0,0 +1,31 @@ +{ + "_guid_": "F-152_Test_Data_Base", + + "productName": "CCD Data Store", + "operationName": "retrieve jurisdiction ui config information for the jurisdictions", + + "method": "GET", + "uri": "/internal/jurisdiction-ui-configs", + + "user": { + "_extends_": "Common_User_For_Request" + }, + + "request": { + "headers": { + "_extends_": "Common_Request_Headers", + "experimental": true + }, + "queryParams": { + "ids": "AUTOTEST1" + } + }, + + "expectedResponse": { + "headers": { + "Content-Type": "[[ANYTHING_PRESENT]]", + "Content-Length": "[[ANYTHING_PRESENT]]", + "Strict-Transport-Security": "[[ANYTHING_PRESENT]]" + } + } +} diff --git a/src/aat/resources/features/F-152 - Get Jurisdiction UI Configs V2 Internal/S-152.1.td.json b/src/aat/resources/features/F-152 - Get Jurisdiction UI Configs V2 Internal/S-152.1.td.json new file mode 100644 index 0000000000..5109a6de4c --- /dev/null +++ b/src/aat/resources/features/F-152 - Get Jurisdiction UI Configs V2 Internal/S-152.1.td.json @@ -0,0 +1,26 @@ +{ + "_guid_": "S-152.1", + "_extends_": "F-152_Test_Data_Base", + "title": "must retrieve jurisdiction UI config information for the jurisdictions successfully", + + "specs": [ + "an active profile in CCD", + "code is HTTP-200 OK" + ], + + "expectedResponse": { + "_extends_": "Common_200_Response", + "headers": { + "Content-Type": "application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-jurisdiction-configs.v2+json;charset=UTF-8" + }, + "body": { + "configs": [ + { + "id": "AUTOTEST1", + "name": "Auto Test 1", + "shuttered": false + } + ] + } + } +} diff --git a/src/aat/resources/features/F-152 - Get Jurisdiction UI Configs V2 Internal/S-152.2.td.json b/src/aat/resources/features/F-152 - Get Jurisdiction UI Configs V2 Internal/S-152.2.td.json new file mode 100644 index 0000000000..1baf0fd5fa --- /dev/null +++ b/src/aat/resources/features/F-152 - Get Jurisdiction UI Configs V2 Internal/S-152.2.td.json @@ -0,0 +1,27 @@ +{ + "_guid_": "S-152.2", + "_extends_": "F-152_Test_Data_Base", + "title": "must return 401 when request does not provide valid authentication credentials", + + "specs": [ + "an active profile in CCD", + "does not provide valid authentication credentials", + "code is HTTP-401 Unauthorised" + ], + + "request": { + "headers": { + "Authorization": "eyJhbGciOiJIUzI1NiJ9" + } + }, + + "expectedResponse": { + "_extends_": "Common_401_Response", + "headers": { + "Content-Encoding": "gzip" + }, + "body": { + "message": "Access Denied" + } + } +}