-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fc2576f
commit 70ad601
Showing
22 changed files
with
791 additions
and
1 deletion.
There are no files selected for viewing
178 changes: 178 additions & 0 deletions
178
aat/src/aat/resources/features/F-109 AccessTypeRoles/F-109.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,178 @@ | ||
@F-109 | ||
Feature: F-109 Import validations for CCD Definition with AccessTypeRoles tab | ||
|
||
Background: | ||
Given an appropriate test context as detailed in the test data source | ||
|
||
@S-109.2 | ||
Scenario: Fail to import a definition file with invalid CaseTypeID in AccessTypeRoles | ||
Given a user with [an active profile in CCD] | ||
When a request is prepared with appropriate values | ||
And the request [contains a definition file with new tab AccessTypeRoles with invalid CaseTypeId] | ||
And it is submitted to call the [Import definition file] operation of [CCD Definition Store] | ||
Then a negative response is received | ||
And the response has all other details as expected | ||
|
||
@S-109.3 | ||
Scenario: Fail to import a definition file invalid or duplicate AccessTypeID in AccessTypeRoles | ||
Given a user with [an active profile in CCD] | ||
When a request is prepared with appropriate values | ||
And the request [contains a definition file with new tab AccessTypeRoles with an invalid or duplicate AccessTypeID] | ||
And it is submitted to call the [Import definition file] operation of [CCD Definition Store] | ||
Then a negative response is received | ||
And the response has all other details as expected | ||
|
||
@S-109.4 | ||
Scenario: Fail to import a definition file with missing OrganisationProfileID in AccessTypeRoles | ||
Given a user with [an active profile in CCD] | ||
When a request is prepared with appropriate values | ||
And the request [contains a definition file with new tab AccessTypeRoles missing OrganisationProfileID] | ||
And it is submitted to call the [Import definition file] operation of [CCD Definition Store] | ||
Then a negative response is received | ||
And the response has all other details as expected | ||
|
||
@S-109.5 | ||
Scenario: Fail to import a definition file with missing Description in AccessTypeRoles when Display is set to True | ||
Given a user with [an active profile in CCD] | ||
When a request is prepared with appropriate values | ||
And the request [contains a definition file with new tab AccessTypeRoles with missing Description when Display is set to True] | ||
And it is submitted to call the [Import definition file] operation of [CCD Definition Store] | ||
Then a negative response is received | ||
And the response has all other details as expected | ||
|
||
@S-109.6 | ||
Scenario: Fail to import a definition file with missing Hint in AccessTypeRoles when Display is set to True | ||
Given a user with [an active profile in CCD] | ||
When a request is prepared with appropriate values | ||
And the request [contains a definition file with new tab AccessTypeRoles with missing Hint when Display is set to True] | ||
And it is submitted to call the [Import definition file] operation of [CCD Definition Store] | ||
Then a negative response is received | ||
And the response has all other details as expected | ||
|
||
@S-109.7 | ||
Scenario: Fail to import a definition file with missing DisplayOrder in AccessTypeRoles when Display is set to True | ||
Given a user with [an active profile in CCD] | ||
When a request is prepared with appropriate values | ||
And the request [contains a definition file with new tab AccessTypeRoles missing DisplayOrder when Display is set to True] | ||
And it is submitted to call the [Import definition file] operation of [CCD Definition Store] | ||
Then a negative response is received | ||
And the response has all other details as expected | ||
|
||
@S-109.8 | ||
Scenario: Fail to import a definition file with DisplayOrder set to 0 in AccessTypeRoles when Display is set to True | ||
Given a user with [an active profile in CCD] | ||
When a request is prepared with appropriate values | ||
And the request [contains a definition file with new tab AccessTypeRoles with DisplayOrder set to 0 when Display is set to True] | ||
And it is submitted to call the [Import definition file] operation of [CCD Definition Store] | ||
Then a negative response is received | ||
And the response has all other details as expected | ||
|
||
@S-109.9 | ||
Scenario: Fail to import a definition file with DisplayOrder not being unique across CaseTypeId for a Jurisdiction in AccessTypeRoles | ||
Given a user with [an active profile in CCD] | ||
When a request is prepared with appropriate values | ||
And the request [contains a definition file with new tab AccessTypeRoles where DisplayOrder is not unique across CaseTypeId for a Jurisdiction] | ||
And it is submitted to call the [Import definition file] operation of [CCD Definition Store] | ||
Then a negative response is received | ||
And the response has all other details as expected | ||
|
||
@S-109.10 | ||
Scenario: Fail to import a definition file with OrganisationalRoleName and GroupRoleName both null in AccessTypeRoles | ||
Given a user with [an active profile in CCD] | ||
When a request is prepared with appropriate values | ||
And the request [contains a definition file with new tab AccessTypeRoles where both OrganisationalRoleName and GroupRoleName are null] | ||
And it is submitted to call the [Import definition file] operation of [CCD Definition Store] | ||
Then a negative response is received | ||
And the response has all other details as expected | ||
|
||
@S-109.11 | ||
Scenario: Fail to import a definition file containing new Tab AccessTypeRoles with CaseAssignedRoleField is null in AccessTypeRoles | ||
Given a user with [an active profile in CCD] | ||
When a request is prepared with appropriate values | ||
And the request [contains a definition file with new tab AccessTypeRoles with CaseAssignedRoleField is null when GroupRoleName is not null] | ||
And it is submitted to call the [Import definition file] operation of [CCD Definition Store] | ||
Then a negative response is received | ||
And the response has all other details as expected | ||
|
||
@S-109.12 | ||
Scenario: Fail to import a definition file containing new Tab AccessTypeRoles with GroupAccessEnabled is null in AccessTypeRoles | ||
Given a user with [an active profile in CCD] | ||
When a request is prepared with appropriate values | ||
And the request [contains a definition file with new tab AccessTypeRoles with GroupAccessEnabled is null when GroupRoleName is not null] | ||
And it is submitted to call the [Import definition file] operation of [CCD Definition Store] | ||
Then a negative response is received | ||
And the response has all other details as expected | ||
|
||
@S-109.13 | ||
Scenario: Fail to import a definition file with AccessMandatory set to an invalid value in AccessTypeRoles | ||
Given a user with [an active profile in CCD] | ||
When a request is prepared with appropriate values | ||
And the request [contains a definition file with new tab AccessTypeRoles with AccessMandatory set to an invalid value] | ||
And it is submitted to call the [Import definition file] operation of [CCD Definition Store] | ||
Then a negative response is received | ||
And the response has all other details as expected | ||
|
||
@S-109.14 | ||
Scenario: Fail to import a definition file with AccessDefault set to an invalid value in AccessTypeRoles | ||
Given a user with [an active profile in CCD] | ||
When a request is prepared with appropriate values | ||
And the request [contains a definition file with new tab AccessTypeRoles with AccessDefault set to an invalid value] | ||
And it is submitted to call the [Import definition file] operation of [CCD Definition Store] | ||
Then a negative response is received | ||
And the response has all other details as expected | ||
|
||
@S-109.15 | ||
Scenario: Fail to import a definition file with Display set to an invalid value in AccessTypeRoles | ||
Given a user with [an active profile in CCD] | ||
When a request is prepared with appropriate values | ||
And the request [contains a definition file with new tab AccessTypeRoles with Display set to an invalid value] | ||
And it is submitted to call the [Import definition file] operation of [CCD Definition Store] | ||
Then a negative response is received | ||
And the response has all other details as expected | ||
|
||
@S-109.16 | ||
Scenario: Fail to import a definition file with GroupAccessEnabled set to an invalid value in AccessTypeRoles | ||
Given a user with [an active profile in CCD] | ||
When a request is prepared with appropriate values | ||
And the request [contains a definition file with new tab AccessTypeRoles with GroupAccessEnabled set to an invalid value] | ||
And it is submitted to call the [Import definition file] operation of [CCD Definition Store] | ||
Then a negative response is received | ||
And the response has all other details as expected | ||
|
||
@S-109.17 | ||
Scenario: Fail to import a definition file with with AccessMandatory set to a valid value in AccessTypeRoles | ||
Given a user with [an active profile in CCD] | ||
When a request is prepared with appropriate values | ||
And the request [contains a definition file with new tab AccessTypeRoles with AccessMandatory set to a valid value] | ||
And it is submitted to call the [Import definition file] operation of [CCD Definition Store] | ||
Then a negative response is received | ||
And the response has all other details as expected | ||
|
||
@S-109.18 | ||
Scenario: Fail to import a definition file with AccessDefault set to a valid value in AccessTypeRoles | ||
Given a user with [an active profile in CCD] | ||
When a request is prepared with appropriate values | ||
And the request [contains a definition file with new tab AccessTypeRoles with AccessDefault set to a valid value] | ||
And it is submitted to call the [Import definition file] operation of [CCD Definition Store] | ||
Then a negative response is received | ||
And the response has all other details as expected | ||
|
||
@S-109.22 | ||
Scenario: Fail to import a definition file containing new Tab AccessTypeRoles with CaseAccessGroupIDTemplate has invalid format when value present | ||
Given a user with [an active profile in CCD] | ||
When a request is prepared with appropriate values | ||
And the request [contains a definition file with new tab AccessTypeRoles with CaseAccessGroupIDTemplate has value of the format that does not match <service>[:<id1>[:<Id2...]]]] | ||
And it is submitted to call the [Import definition file] operation of [CCD Definition Store] | ||
Then a negative response is received | ||
And the response has all other details as expected | ||
@S-109.23 | ||
Scenario: Fail to import a definition file containing new Tab AccessTypeRoles with CaseAssignedRoleField has non matching value in RoleToAccessProfiles present | ||
Given a user with [an active profile in CCD] | ||
When a request is prepared with appropriate values | ||
And the request [contains a definition file with new tab AccessTypeRoles with CaseAssignedRoleField has value that does not match a value in RoleToAccessProfiles] | ||
And it is submitted to call the [Import definition file] operation of [CCD Definition Store] | ||
Then a negative response is received | ||
And the response has all other details as expected | ||
23 changes: 23 additions & 0 deletions
23
...t/resources/features/F-109 AccessTypeRoles/F-109_Definition_Import_Test_Base_data.td.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"_guid_": "F-109_Definition_Import_Test_Base_data", | ||
"productName": "CCD Definition Store", | ||
"operationName": "Import definition file", | ||
"specs": [ | ||
"an active profile in CCD" | ||
], | ||
"method": "POST", | ||
"uri": "/import", | ||
"users": { | ||
"invokingUser": { | ||
"username": "[[$DEFINITION_IMPORTER_USERNAME]]", | ||
"password": "[[$DEFINITION_IMPORTER_PASSWORD]]" | ||
} | ||
}, | ||
"request": { | ||
"headers": { | ||
"Authorization": "[[DEFAULT_AUTO_VALUE]]", | ||
"ServiceAuthorization": "[[DEFAULT_AUTO_VALUE]]", | ||
"Content-Type": "multipart/form-data" | ||
} | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
aat/src/aat/resources/features/F-109 AccessTypeRoles/S-109.10.td.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"_guid_": "S-109.10", | ||
"_extends_": "F-109_Definition_Import_Test_Base_data", | ||
"title": "Fail to import a definition file with OrganisationalRoleName and GroupRoleName both null in AccessTypeRoles", | ||
"specs": [ | ||
"an active profile in CCD", | ||
"contains a definition file with new tab AccessTypeRoles where both OrganisationalRoleName and GroupRoleName are null" | ||
], | ||
"request": { | ||
"body": { | ||
"arrayInMap": [ | ||
{ | ||
"key": "file", | ||
"filePath": "uk/gov/hmcts/ccd/test_definitions/invalid/accesstyperoles/BEFTA_Master_Definition_AccessTypeRole_OrgRoleNameAndGroupRoleNameAreNull.xlsx" | ||
} | ||
] | ||
} | ||
}, | ||
"expectedResponse": { | ||
"responseCode": 422, | ||
"responseMessage": "Unprocessable Entity", | ||
"headers": { | ||
"Content-Encoding": "[[ANYTHING_PRESENT]]", | ||
"Content-Type": "text/plain", | ||
"Content-Length": "[[ANYTHING_PRESENT]]" | ||
}, | ||
"body": { | ||
"__plainTextValue__": "Validation errors occurred importing the spreadsheet.- Either 'OrganisationalRoleName' or 'GroupRoleName' must be set in the sheet 'AccessTypeRoles'" | ||
} | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
aat/src/aat/resources/features/F-109 AccessTypeRoles/S-109.11.td.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"_guid_": "S-109.11", | ||
"_extends_": "F-109_Definition_Import_Test_Base_data", | ||
"title": "Fail to import a definition file containing new Tab AccessTypeRoles with CaseAssignedRoleField is null in AccessTypeRoles", | ||
"specs": [ | ||
"an active profile in CCD", | ||
"contains a definition file with new tab AccessTypeRoles with CaseAssignedRoleField is null when GroupRoleName is not null" | ||
], | ||
"request": { | ||
"body": { | ||
"arrayInMap": [ | ||
{ | ||
"key": "file", | ||
"filePath": "uk/gov/hmcts/ccd/test_definitions/invalid/accesstyperoles/BEFTA_Master_Definition_AccessTypeRole_CaseAssignedRoleFieldIsNull.xlsx" | ||
} | ||
] | ||
} | ||
}, | ||
"expectedResponse": { | ||
"responseCode": 422, | ||
"responseMessage": "Unprocessable Entity", | ||
"headers": { | ||
"Content-Encoding": "[[ANYTHING_PRESENT]]", | ||
"Content-Type": "text/plain", | ||
"Content-Length": "[[ANYTHING_PRESENT]]" | ||
}, | ||
"body": { | ||
"__plainTextValue__": "Validation errors occurred importing the spreadsheet.- 'CaseAssignedRoleField' must be set if 'GroupRoleName' is not null in the sheet 'AccessTypeRoles'" | ||
} | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
aat/src/aat/resources/features/F-109 AccessTypeRoles/S-109.12.td.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"_guid_": "S-109.12", | ||
"_extends_": "F-109_Definition_Import_Test_Base_data", | ||
"title": "Fail to import a definition file containing new Tab AccessTypeRoles with GroupAccessEnabled is null in AccessTypeRoles", | ||
"specs": [ | ||
"an active profile in CCD", | ||
"contains a definition file with new tab AccessTypeRoles with GroupAccessEnabled is null when GroupRoleName is not null" | ||
], | ||
"request": { | ||
"body": { | ||
"arrayInMap": [ | ||
{ | ||
"key": "file", | ||
"filePath": "uk/gov/hmcts/ccd/test_definitions/invalid/accesstyperoles/BEFTA_Master_Definition_AccessTypeRole_GroupAccessEnabledIsNull.xlsx" | ||
} | ||
] | ||
} | ||
}, | ||
"expectedResponse": { | ||
"responseCode": 422, | ||
"responseMessage": "Unprocessable Entity", | ||
"headers": { | ||
"Content-Encoding": "[[ANYTHING_PRESENT]]", | ||
"Content-Type": "text/plain", | ||
"Content-Length": "[[ANYTHING_PRESENT]]" | ||
}, | ||
"body": { | ||
"__plainTextValue__": "Validation errors occurred importing the spreadsheet.- 'GroupAccessEnabled' must be enabled if 'GroupRoleName' is set in the sheet 'AccessTypeRoles'" | ||
} | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
aat/src/aat/resources/features/F-109 AccessTypeRoles/S-109.13.td.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"_guid_": "S-109.13", | ||
"_extends_": "F-109_Definition_Import_Test_Base_data", | ||
"title": "Fail to import a definition file with AccessMandatory set to an invalid value in AccessTypeRoles", | ||
"specs": [ | ||
"an active profile in CCD", | ||
"contains a definition file with new tab AccessTypeRoles with AccessMandatory set to an invalid value" | ||
], | ||
"request": { | ||
"body": { | ||
"arrayInMap": [ | ||
{ | ||
"key": "file", | ||
"filePath": "uk/gov/hmcts/ccd/test_definitions/invalid/accesstypes/BEFTA_Master_Definition_AccessType_AccessManditoryIsInvalid.xlsx" | ||
} | ||
] | ||
} | ||
}, | ||
"expectedResponse": { | ||
"responseCode": 400, | ||
"responseMessage": "Unprocessable Entity", | ||
"headers": { | ||
"Content-Encoding": "[[ANYTHING_PRESENT]]", | ||
"Content-Type": "text/plain", | ||
"Content-Length": "[[ANYTHING_PRESENT]]" | ||
}, | ||
"body": { | ||
"__plainTextValue__": "Invalid value 'Yess' is found in column 'AccessMandatory' in the sheet 'AccessTypeRoles'" | ||
} | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
aat/src/aat/resources/features/F-109 AccessTypeRoles/S-109.14.td.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"_guid_": "S-109.14", | ||
"_extends_": "F-109_Definition_Import_Test_Base_data", | ||
"title": "Fail to import a definition file with AccessDefault set to an invalid value in AccessTypeRoles", | ||
"specs": [ | ||
"an active profile in CCD", | ||
"contains a definition file with new tab AccessTypeRoles with AccessDefault set to an invalid value" | ||
], | ||
"request": { | ||
"body": { | ||
"arrayInMap": [ | ||
{ | ||
"key": "file", | ||
"filePath": "uk/gov/hmcts/ccd/test_definitions/invalid/accesstypes/BEFTA_Master_Definition_AccessType_AccessDefaultIsInvalid.xlsx" | ||
} | ||
] | ||
} | ||
}, | ||
"expectedResponse": { | ||
"responseCode": 400, | ||
"responseMessage": "Unprocessable Entity", | ||
"headers": { | ||
"Content-Encoding": "[[ANYTHING_PRESENT]]", | ||
"Content-Type": "text/plain", | ||
"Content-Length": "[[ANYTHING_PRESENT]]" | ||
}, | ||
"body": { | ||
"__plainTextValue__": "Invalid value 'YYes' is found in column 'AccessDefault' in the sheet 'AccessTypeRoles'" | ||
} | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
aat/src/aat/resources/features/F-109 AccessTypeRoles/S-109.15.td.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"_guid_": "S-109.15", | ||
"_extends_": "F-109_Definition_Import_Test_Base_data", | ||
"title": "Fail to import a definition file with Display set to an invalid value in AccessTypeRoles", | ||
"specs": [ | ||
"an active profile in CCD", | ||
"contains a definition file with new tab AccessTypeRoles with Display set to an invalid value" | ||
], | ||
"request": { | ||
"body": { | ||
"arrayInMap": [ | ||
{ | ||
"key": "file", | ||
"filePath": "uk/gov/hmcts/ccd/test_definitions/invalid/accesstypes/BEFTA_Master_Definition_AccessType_DisplayIsInvalid.xlsx" | ||
} | ||
] | ||
} | ||
}, | ||
"expectedResponse": { | ||
"responseCode": 400, | ||
"responseMessage": "Unprocessable Entity", | ||
"headers": { | ||
"Content-Encoding": "[[ANYTHING_PRESENT]]", | ||
"Content-Type": "text/plain", | ||
"Content-Length": "[[ANYTHING_PRESENT]]" | ||
}, | ||
"body": { | ||
"__plainTextValue__": "Invalid value 'u' is found in column 'Display' in the sheet 'AccessTypeRoles'" | ||
} | ||
} | ||
} |
Oops, something went wrong.