Skip to content

Commit

Permalink
GA-3 Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
helenbirdhmcts committed Feb 19, 2024
1 parent 8172806 commit e36a098
Show file tree
Hide file tree
Showing 20 changed files with 445 additions and 110 deletions.
49 changes: 12 additions & 37 deletions aat/src/aat/resources/features/F-109 AccessTypeRoles/F-109.feature
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
Feature: Import validations for CCD Definition with AccessTypeRoles tab

Background:
Given an appropriate test context as detailed in the test data source
#Given each Access Type grants appropriate access to organizations based on case types
#And a new tab 'AccessTypeRoles' is added to CCD Definition for configuration
Given an appropriate test context as detailed in the test data source,

@S-109.01
Scenario: Successfully import a definition file containing AccessTypeRoles
#Given a user with an active profile in CCD and with CCD-import role
Given a user with an active profile in CCD and with CCD-import role
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]
Expand All @@ -17,7 +15,7 @@ Feature: Import validations for CCD Definition with AccessTypeRoles tab

@S-109.02
Scenario: Fail to import a definition file with invalid CaseTypeID in AccessTypeRoles
#Given a user with an active profile in CCD and with CCD-import role
Given a user with an active profile in CCD and with CCD-import role
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]
Expand All @@ -27,7 +25,7 @@ Feature: Import validations for CCD Definition with AccessTypeRoles tab

@S-109.03
Scenario: Fail to import a definition file with invalid or duplicate AccessTypeID in AccessTypeRoles
#Given a user with an active profile in CCD and with CCD-import role
Given a user with an active profile in CCD and with CCD-import role
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]
Expand All @@ -37,7 +35,7 @@ Feature: Import validations for CCD Definition with AccessTypeRoles tab

@S-109.04
Scenario: Fail to import a definition file with missing OrganisationProfileID in AccessTypeRoles
#Given a user with an active profile in CCD and with CCD-import role
Given a user with an active profile in CCD and with CCD-import role
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]
Expand All @@ -47,81 +45,74 @@ Feature: Import validations for CCD Definition with AccessTypeRoles tab

@S-109.05
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 and with CCD-import role
Given a user with an active profile in CCD and with CCD-import role
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 the Import the CCD Definition file operation of CCD Definition Store API
Then a negative response is received
And the response has all other details as expected


@S-109.06
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 and with CCD-import role
Given a user with an active profile in CCD and with CCD-import role
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 the Import the CCD Definition file operation of CCD Definition Store API
Then a negative response is received
And the response has all other details as expected


@S-109.07
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 and with CCD-import role
Given a user with an active profile in CCD and with CCD-import role
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 the Import the CCD Definition file operation of CCD Definition Store API
Then a negative response is received
And the response has all other details as expected


@S-109.08
Scenario: Fail to import a definition file with DisplayOrder set to 0 in AccessTypeRoles
#Given a user with an active profile in CCD and with CCD-import role
Given a user with an active profile in CCD and with CCD-import role
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]
And it is submitted to the Import the CCD Definition file operation of CCD Definition Store API
Then a negative response is received
And the response has all other details as expected


@S-109.09
Scenario: Fail to import a definition file with DisplayOrder not being unique across CaseTypeId in AccessTypeRoles
#Given a user with an active profile in CCD and with CCD-import role
Given a user with an active profile in CCD and with CCD-import role
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 the Import the CCD Definition file operation of CCD Definition Store API
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 and with CCD-import role
Given a user with an active profile in CCD and with CCD-import role
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 the Import the CCD Definition file operation of CCD Definition Store API
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 with CaseAssignedRoleField null when GroupRoleName is not null in AccessTypeRoles
#Given a user with an active profile in CCD and with CCD-import role
Given a user with an active profile in CCD and with CCD-import role
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 null and GroupRoleName not null]
And it is submitted to the Import the CCD Definition file operation of CCD Definition Store API
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 with GroupAccessEnabled null when GroupRoleName is not null in AccessTypeRoles
#Given a user with an active profile in CCD and with CCD-import role
Expand All @@ -132,7 +123,6 @@ Feature: Import validations for CCD Definition with AccessTypeRoles tab
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 and with CCD-import role
Expand All @@ -143,7 +133,6 @@ Feature: Import validations for CCD Definition with AccessTypeRoles tab
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 and with CCD-import role
Expand All @@ -154,7 +143,6 @@ Feature: Import validations for CCD Definition with AccessTypeRoles tab
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 and with CCD-import role
Expand All @@ -165,7 +153,6 @@ Feature: Import validations for CCD Definition with AccessTypeRoles tab
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 and with CCD-import role
Expand All @@ -176,7 +163,6 @@ Feature: Import validations for CCD Definition with AccessTypeRoles tab
Then a negative response is received
And the response has all other details as expected


@S-109.17
Scenario: Successfully import a definition file with AccessMandatory set to a valid value in AccessTypeRoles
Given a user with [an active profile in CCD]
Expand All @@ -185,7 +171,6 @@ Feature: Import validations for CCD Definition with AccessTypeRoles tab
And it is submitted to the Import the CCD Definition file operation of CCD Definition Store API
Then a positive response is received
And the response has all other details as expected


@S-109.18
Scenario: Successfully import a definition file with AccessDefault set to a valid value in AccessTypeRoles
Expand All @@ -196,7 +181,6 @@ Feature: Import validations for CCD Definition with AccessTypeRoles tab
Then a positive response is received
And the response has all other details as expected


@S-109.19
Scenario: Successfully import a definition file with Display set to a valid value in AccessTypeRoles
Given a user with [an active profile in CCD]
Expand All @@ -206,7 +190,6 @@ Feature: Import validations for CCD Definition with AccessTypeRoles tab
Then a positive response is received
And the response has all other details as expected


@S-109.20
Scenario: Successfully import a definition file with GroupAccessEnabled set to a valid value in AccessTypeRoles
Given a user with [an active profile in CCD]
Expand All @@ -216,7 +199,6 @@ Feature: Import validations for CCD Definition with AccessTypeRoles tab
Then a positive response is received
And the response has all other details as expected


@S-109.21
Scenario: Successfully import a definition file with CaseAccessGroupIDTemplate having a valid format in AccessTypeRoles
Given a user with [an active profile in CCD]
Expand All @@ -226,7 +208,6 @@ Feature: Import validations for CCD Definition with AccessTypeRoles tab
Then a positive response is received
And the response has all other details as expected


@S-109.22
Scenario: Fail to import a definition file with CaseAccessGroupIDTemplate having an invalid format in AccessTypeRoles
Given a user with [an active profile in CCD]
Expand All @@ -236,10 +217,4 @@ Feature: Import validations for CCD Definition with AccessTypeRoles tab
Then a negative response is received
And the response has all other details as expected








Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"_guid_": "S-109.10",
"title": "must return a negative response in an attempt to import a definition file with OrganisationalRoleName and GroupRoleName both are null",
"specs": [
"an active profile in CCD",
"with CCD-import role",
"contains a definition file containing new Tab AccessTypeRoles with OrganisationalRoleName and GroupRoleName both are null"
],
"request": {
"body": {
"arrayInMap": [
{
"key": "file",
"localFilePath": "uk/gov/hmcts/ccd/test_definitions/invalid/accesstyperoles/BEFTA_Master_Definition_AccessTypeRole_OrgRoleNameAndGroupRoleNameAreNull.xlsx"
}
]
}
},
"expectedResponse": {
"_extends_": "Common_201_Response",
"headers": {
"Content-Encoding": "[[ANYTHING_PRESENT]]",
"Content-Type": "application/json",
"Content-Length": "[[ANYTHING_PRESENT]]"
},
"body": {
"__plainTextValue__": "Validation errors occurred importing the spreadsheet.- "
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"_guid_": "S-109.11",
"title": "must return a negative response in an attempt to import a definition file with CaseAssignedRoleField is null",
"specs": [
"an active profile in CCD",
"with CCD-import role",
"contains a definition file containing new Tab AccessTypeRoles with CaseAssignedRoleField is null"
],
"request": {
"body": {
"arrayInMap": [
{
"key": "file",
"localFilePath": "uk/gov/hmcts/ccd/test_definitions/invalid/accesstyperoles/BEFTA_Master_Definition_AccessTypeRole_CaseAssignedRoleFieldIsNull.xlsx"
}
]
}
},
"expectedResponse": {
"_extends_": "Common_201_Response",
"headers": {
"Content-Encoding": "[[ANYTHING_PRESENT]]",
"Content-Type": "application/json",
"Content-Length": "[[ANYTHING_PRESENT]]"
},
"body": {
"__plainTextValue__": "Validation errors occurred importing the spreadsheet.- "
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"_guid_": "S-109.12",
"title": "must return a negative response in an attempt to import a definition file with GroupAccessEnabled is null",
"specs": [
"an active profile in CCD",
"with CCD-import role",
"contains a definition file containing new Tab AccessTypeRoles with GroupAccessEnabled is null"
],
"request": {
"body": {
"arrayInMap": [
{
"key": "file",
"localFilePath": "uk/gov/hmcts/ccd/test_definitions/invalid/accesstyperoles/BEFTA_Master_Definition_AccessTypeRole_GroupAccessEnabledIsNull.xlsx"
}
]
}
},
"expectedResponse": {
"_extends_": "Common_201_Response",
"headers": {
"Content-Encoding": "[[ANYTHING_PRESENT]]",
"Content-Type": "application/json",
"Content-Length": "[[ANYTHING_PRESENT]]"
},
"body": {
"__plainTextValue__": "Validation errors occurred importing the spreadsheet.- "
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"_guid_": "S-109.13",
"title": "must return a negative response in an attempt to import a definition file with AccessMandatory is set to anything other than NULL/ Y/Yes/Y/True/N/No/F/False",
"specs": [
"an active profile in CCD",
"with CCD-import role",
"contains a definition file containing new Tab AccessTypeRoles with AccessMandatory is set to anything other than NULL/ Y/Yes/Y/True/N/No/F/False"
],
"request": {
"body": {
"arrayInMap": [
{
"key": "file",
"localFilePath": "uk/gov/hmcts/ccd/test_definitions/invalid/accesstyperoles/BEFTA_Master_Definition_AccessType_AccessManditoryIsInvalid.xlsx"
}
]
}
},
"expectedResponse": {
"_extends_": "Common_201_Response",
"headers": {
"Content-Encoding": "[[ANYTHING_PRESENT]]",
"Content-Type": "application/json",
"Content-Length": "[[ANYTHING_PRESENT]]"
},
"body": {
"__plainTextValue__": "Validation errors occurred importing the spreadsheet.- "
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"_guid_": "S-109.14",
"title": "must return a negative response in an attempt to import a definition file with AccessDefault is set to anything other than NULL/ Y/Yes/Y/True/N/No/F/False",
"specs": [
"an active profile in CCD",
"with CCD-import role",
"contains a definition file containing new Tab AccessTypeRoles with AccessDefault is set to anything other than NULL/ Y/Yes/Y/True/N/No/F/False"
],
"request": {
"body": {
"arrayInMap": [
{
"key": "file",
"localFilePath": "uk/gov/hmcts/ccd/test_definitions/invalid/accesstyperoles/BEFTA_Master_Definition_AccessType_AccessDefaultIsInvalid.xlsx"
}
]
}
},
"expectedResponse": {
"_extends_": "Common_201_Response",
"headers": {
"Content-Encoding": "[[ANYTHING_PRESENT]]",
"Content-Type": "application/json",
"Content-Length": "[[ANYTHING_PRESENT]]"
},
"body": {
"__plainTextValue__": "Validation errors occurred importing the spreadsheet.- "
}
}
}
Loading

0 comments on commit e36a098

Please sign in to comment.