From da5643d288a4503078c91f648e0887cfc88dab37 Mon Sep 17 00:00:00 2001 From: patelila Date: Thu, 6 Feb 2025 09:24:18 +0000 Subject: [PATCH 01/38] CCD-5333 UC : Clear the new cases supplementary data for an organisation when user is assigned - "Acknowledge and Assign" --- .../caseaccess/CaseAccessOperation.java | 34 ++++++++++++++++--- ...moveCaseAssignedUserRolesControllerIT.java | 6 ++++ 2 files changed, 36 insertions(+), 4 deletions(-) diff --git a/src/main/java/uk/gov/hmcts/ccd/domain/service/caseaccess/CaseAccessOperation.java b/src/main/java/uk/gov/hmcts/ccd/domain/service/caseaccess/CaseAccessOperation.java index 4cbe00e5f6..9dd13c3308 100644 --- a/src/main/java/uk/gov/hmcts/ccd/domain/service/caseaccess/CaseAccessOperation.java +++ b/src/main/java/uk/gov/hmcts/ccd/domain/service/caseaccess/CaseAccessOperation.java @@ -1,8 +1,8 @@ package uk.gov.hmcts.ccd.domain.service.caseaccess; +import com.google.common.collect.Sets; import com.google.common.collect.Lists; import org.apache.commons.lang3.StringUtils; -import org.elasticsearch.common.util.set.Sets; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -20,12 +20,16 @@ import uk.gov.hmcts.ccd.domain.model.definition.CaseDetails; import uk.gov.hmcts.ccd.domain.model.std.CaseAssignedUserRole; import uk.gov.hmcts.ccd.domain.model.std.CaseAssignedUserRoleWithOrganisation; +import uk.gov.hmcts.ccd.domain.model.std.SupplementaryData; import uk.gov.hmcts.ccd.domain.service.casedataaccesscontrol.RoleAssignmentService; +import uk.gov.hmcts.ccd.domain.service.common.NewCaseUtils; import uk.gov.hmcts.ccd.domain.service.getcase.CaseNotFoundException; import uk.gov.hmcts.ccd.endpoint.exceptions.InvalidCaseRoleException; +import uk.gov.hmcts.ccd.endpoint.exceptions.ServiceException; import uk.gov.hmcts.ccd.v2.external.domain.CaseUser; import java.util.ArrayList; +import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -194,10 +198,11 @@ public void addCaseUserRoles(List caseUser ); newUserCounts.forEach((caseReference, orgNewUserCountMap) -> - orgNewUserCountMap.forEach((organisationId, newUserCount) -> + orgNewUserCountMap.forEach((organisationId, newUserCount) -> { supplementaryDataRepository.incrementSupplementaryData(caseReference, - ORGS_ASSIGNED_USERS_PATH + organisationId, newUserCount) - ) + ORGS_ASSIGNED_USERS_PATH + organisationId, newUserCount); + //clearUserAssignedNewCase(caseReference, organisationId); + }) ); } @@ -506,4 +511,25 @@ private void revokeRemovedCaseRoles(String userId, userId, currentRole)); } + + private void clearUserAssignedNewCase(String caseReference, String organisationId) { + // Set supplementary data new cases for organisationId to false if set to True + String orgNewCaseSupDataKey = NewCaseUtils.ORG_POLICY_NEW_CASE + "." + organisationId; + try { + SupplementaryData supplementaryData = supplementaryDataRepository.findSupplementaryData(caseReference, + Collections.singleton(orgNewCaseSupDataKey)); + + if (supplementaryData != null) { + Object newCaseOrgIdValue = supplementaryData.getResponse().getOrDefault(orgNewCaseSupDataKey, null); + boolean value = (Boolean) newCaseOrgIdValue; + if (value) { + supplementaryDataRepository.setSupplementaryData(caseReference, + NewCaseUtils.ORG_POLICY_NEW_CASE + organisationId, false); + } + } + } catch (ServiceException e) { + // do nothing + } + + } } diff --git a/src/test/java/uk/gov/hmcts/ccd/v2/external/controller/RemoveCaseAssignedUserRolesControllerIT.java b/src/test/java/uk/gov/hmcts/ccd/v2/external/controller/RemoveCaseAssignedUserRolesControllerIT.java index 867d16a38c..f645ec98f4 100644 --- a/src/test/java/uk/gov/hmcts/ccd/v2/external/controller/RemoveCaseAssignedUserRolesControllerIT.java +++ b/src/test/java/uk/gov/hmcts/ccd/v2/external/controller/RemoveCaseAssignedUserRolesControllerIT.java @@ -14,6 +14,7 @@ import uk.gov.hmcts.ccd.data.casedataaccesscontrol.RoleAssignmentResource; import uk.gov.hmcts.ccd.data.casedataaccesscontrol.RoleAssignmentResponse; import uk.gov.hmcts.ccd.domain.model.std.CaseAssignedUserRoleWithOrganisation; +import uk.gov.hmcts.ccd.domain.service.common.NewCaseUtils; import uk.gov.hmcts.ccd.v2.V2; import uk.gov.hmcts.ccd.v2.external.domain.CaseAssignedUserRolesRequest; import uk.gov.hmcts.ccd.v2.external.domain.CaseAssignedUserRolesResponse; @@ -772,6 +773,11 @@ void removeCaseUserRoles_shouldThrowExceptionWhenInvalidOrganisationIDPassed() t supplementaryDataRepository.setSupplementaryData(CASE_ID_EXTRA, getOrgUserCountSupDataKey(ORGANISATION_ID_2), 0L); + // set a default value of null for newcase any organisation + //String orgNewCaseSupDataKey = NewCaseUtils.ORG_POLICY_NEW_CASE + "." + ORGANISATION_ID_2; + //supplementaryDataRepository.setSupplementaryData(CASE_ID_EXTRA, orgNewCaseSupDataKey, + // null); + addCaseUserRoles(List.of(new CaseAssignedUserRoleWithOrganisation(CASE_ID_EXTRA, userId, CASE_ROLE_1, ORGANISATION_ID_2))); From a467cd2d8f91b658964bd61e2e60cb5d09980bc3 Mon Sep 17 00:00:00 2001 From: patelila Date: Thu, 6 Feb 2025 15:58:16 +0000 Subject: [PATCH 02/38] Test data and changes for unit tests --- .../domain/model/std/SupplementaryData.java | 7 +++- ...efaultSupplementaryDataRepositoryTest.java | 2 +- ...moveCaseAssignedUserRolesControllerIT.java | 6 --- .../sql/insert_cases_supplementary_data.sql | 39 +++++++++++++++++++ 4 files changed, 46 insertions(+), 8 deletions(-) diff --git a/src/main/java/uk/gov/hmcts/ccd/domain/model/std/SupplementaryData.java b/src/main/java/uk/gov/hmcts/ccd/domain/model/std/SupplementaryData.java index 5d8caf3b7a..1de902fa7f 100644 --- a/src/main/java/uk/gov/hmcts/ccd/domain/model/std/SupplementaryData.java +++ b/src/main/java/uk/gov/hmcts/ccd/domain/model/std/SupplementaryData.java @@ -16,6 +16,7 @@ import lombok.NoArgsConstructor; import lombok.ToString; import uk.gov.hmcts.ccd.config.JacksonUtils; +import uk.gov.hmcts.ccd.domain.service.common.NewCaseUtils; import uk.gov.hmcts.ccd.endpoint.exceptions.ServiceException; @ToString @@ -40,7 +41,11 @@ public SupplementaryData(JsonNode data, Set requestKeys) { Object value = context.read("$." + key, Object.class); this.response.put(key, value); } catch (PathNotFoundException e) { - throw new ServiceException(String.format("Path %s is not found", key)); + if (key.contains(NewCaseUtils.ORG_POLICY_NEW_CASE)) { + this.response.put(key, null); + } else { + throw new ServiceException(String.format("Path %s is not found", key)); + } } }); } diff --git a/src/test/java/uk/gov/hmcts/ccd/data/casedetails/supplementarydata/DefaultSupplementaryDataRepositoryTest.java b/src/test/java/uk/gov/hmcts/ccd/data/casedetails/supplementarydata/DefaultSupplementaryDataRepositoryTest.java index 3c86e7416a..b53659e0b1 100644 --- a/src/test/java/uk/gov/hmcts/ccd/data/casedetails/supplementarydata/DefaultSupplementaryDataRepositoryTest.java +++ b/src/test/java/uk/gov/hmcts/ccd/data/casedetails/supplementarydata/DefaultSupplementaryDataRepositoryTest.java @@ -22,7 +22,7 @@ class DefaultSupplementaryDataRepositoryTest extends WireMockBaseTest { - private static final int NUMBER_OF_CASES = 6; + private static final int NUMBER_OF_CASES = 7; private JdbcTemplate template; private final SupplementaryDataRepository supplementaryDataRepository; diff --git a/src/test/java/uk/gov/hmcts/ccd/v2/external/controller/RemoveCaseAssignedUserRolesControllerIT.java b/src/test/java/uk/gov/hmcts/ccd/v2/external/controller/RemoveCaseAssignedUserRolesControllerIT.java index f645ec98f4..867d16a38c 100644 --- a/src/test/java/uk/gov/hmcts/ccd/v2/external/controller/RemoveCaseAssignedUserRolesControllerIT.java +++ b/src/test/java/uk/gov/hmcts/ccd/v2/external/controller/RemoveCaseAssignedUserRolesControllerIT.java @@ -14,7 +14,6 @@ import uk.gov.hmcts.ccd.data.casedataaccesscontrol.RoleAssignmentResource; import uk.gov.hmcts.ccd.data.casedataaccesscontrol.RoleAssignmentResponse; import uk.gov.hmcts.ccd.domain.model.std.CaseAssignedUserRoleWithOrganisation; -import uk.gov.hmcts.ccd.domain.service.common.NewCaseUtils; import uk.gov.hmcts.ccd.v2.V2; import uk.gov.hmcts.ccd.v2.external.domain.CaseAssignedUserRolesRequest; import uk.gov.hmcts.ccd.v2.external.domain.CaseAssignedUserRolesResponse; @@ -773,11 +772,6 @@ void removeCaseUserRoles_shouldThrowExceptionWhenInvalidOrganisationIDPassed() t supplementaryDataRepository.setSupplementaryData(CASE_ID_EXTRA, getOrgUserCountSupDataKey(ORGANISATION_ID_2), 0L); - // set a default value of null for newcase any organisation - //String orgNewCaseSupDataKey = NewCaseUtils.ORG_POLICY_NEW_CASE + "." + ORGANISATION_ID_2; - //supplementaryDataRepository.setSupplementaryData(CASE_ID_EXTRA, orgNewCaseSupDataKey, - // null); - addCaseUserRoles(List.of(new CaseAssignedUserRoleWithOrganisation(CASE_ID_EXTRA, userId, CASE_ROLE_1, ORGANISATION_ID_2))); diff --git a/src/test/resources/sql/insert_cases_supplementary_data.sql b/src/test/resources/sql/insert_cases_supplementary_data.sql index fc8ef3c5bf..fdcd813648 100644 --- a/src/test/resources/sql/insert_cases_supplementary_data.sql +++ b/src/test/resources/sql/insert_cases_supplementary_data.sql @@ -230,3 +230,42 @@ VALUES (1006, 'TestAddressBookCase', 'PROBATE', 'CaseCreated', 'PUBLIC', } }' ); + +INSERT INTO case_data (id, case_type_id, jurisdiction, state, security_classification, data, data_classification, reference, created_date, last_modified, last_state_modified_date, supplementary_data) +VALUES (1007, 'TestAddressBookCase', 'PROBATE', 'CaseCreated', 'PUBLIC', + '{ + "PersonFirstName": "Peter", + "PersonLastName": "Pullen", + "PersonAddress": { + "AddressLine1": "Governer House", + "AddressLine2": "1 Puddle Lane", + "AddressLine3": "London", + "Country": "England", + "Postcode": "SE1 4EE" + } + }', + '{ + "PersonFirstName": "PUBLIC", + "PersonLastName": "PUBLIC", + "PersonAddress": { + "classification" : "PUBLIC", + "value" : { + "AddressLine1": "PUBLIC", + "AddressLine2": "PUBLIC", + "AddressLine3": "PUBLIC", + "Country": "PUBLIC", + "Postcode": "PUBLIC" + } + } + }', + '1504259907333333', + '2025-02-06 20:44:53.824', + '2025-02-06 20:44:53.824', + '2025-02-06 20:44:53.824', + '{ + "new_case": { + "organisationA": true, + "organisationB": true + } + }' +); From c1ca993c59f77f3abfe93aeeb7df01fd8c238d2b Mon Sep 17 00:00:00 2001 From: patelila Date: Fri, 7 Feb 2025 15:44:29 +0000 Subject: [PATCH 03/38] unit test --- .../caseaccess/CaseAccessOperation.java | 9 +- .../caseaccess/CaseAccessOperationTest.java | 111 ++++++++++++++++++ 2 files changed, 116 insertions(+), 4 deletions(-) diff --git a/src/main/java/uk/gov/hmcts/ccd/domain/service/caseaccess/CaseAccessOperation.java b/src/main/java/uk/gov/hmcts/ccd/domain/service/caseaccess/CaseAccessOperation.java index 9dd13c3308..a5a8d55589 100644 --- a/src/main/java/uk/gov/hmcts/ccd/domain/service/caseaccess/CaseAccessOperation.java +++ b/src/main/java/uk/gov/hmcts/ccd/domain/service/caseaccess/CaseAccessOperation.java @@ -44,6 +44,7 @@ public class CaseAccessOperation { public static final String ORGS_ASSIGNED_USERS_PATH = "orgs_assigned_users."; + public static final String NEW_CASE_ORG_PATH = NewCaseUtils.ORG_POLICY_NEW_CASE + "."; private final CaseUserRepository caseUserRepository; private final CaseDetailsRepository caseDetailsRepository; @@ -201,7 +202,7 @@ public void addCaseUserRoles(List caseUser orgNewUserCountMap.forEach((organisationId, newUserCount) -> { supplementaryDataRepository.incrementSupplementaryData(caseReference, ORGS_ASSIGNED_USERS_PATH + organisationId, newUserCount); - //clearUserAssignedNewCase(caseReference, organisationId); + clearUserAssignedNewCase(caseReference, organisationId); }) ); } @@ -514,17 +515,17 @@ private void revokeRemovedCaseRoles(String userId, private void clearUserAssignedNewCase(String caseReference, String organisationId) { // Set supplementary data new cases for organisationId to false if set to True - String orgNewCaseSupDataKey = NewCaseUtils.ORG_POLICY_NEW_CASE + "." + organisationId; + String orgNewCaseSupDataKey = NEW_CASE_ORG_PATH + organisationId; try { SupplementaryData supplementaryData = supplementaryDataRepository.findSupplementaryData(caseReference, Collections.singleton(orgNewCaseSupDataKey)); if (supplementaryData != null) { Object newCaseOrgIdValue = supplementaryData.getResponse().getOrDefault(orgNewCaseSupDataKey, null); - boolean value = (Boolean) newCaseOrgIdValue; + boolean value = Boolean.valueOf(newCaseOrgIdValue.toString()); if (value) { supplementaryDataRepository.setSupplementaryData(caseReference, - NewCaseUtils.ORG_POLICY_NEW_CASE + organisationId, false); + orgNewCaseSupDataKey, false); } } } catch (ServiceException e) { diff --git a/src/test/java/uk/gov/hmcts/ccd/domain/service/caseaccess/CaseAccessOperationTest.java b/src/test/java/uk/gov/hmcts/ccd/domain/service/caseaccess/CaseAccessOperationTest.java index 1f8b6bc4a2..4a3e97f4bf 100644 --- a/src/test/java/uk/gov/hmcts/ccd/domain/service/caseaccess/CaseAccessOperationTest.java +++ b/src/test/java/uk/gov/hmcts/ccd/domain/service/caseaccess/CaseAccessOperationTest.java @@ -26,8 +26,10 @@ import uk.gov.hmcts.ccd.domain.model.definition.CaseDetails; import uk.gov.hmcts.ccd.domain.model.std.CaseAssignedUserRole; import uk.gov.hmcts.ccd.domain.model.std.CaseAssignedUserRoleWithOrganisation; +import uk.gov.hmcts.ccd.domain.model.std.SupplementaryData; import uk.gov.hmcts.ccd.domain.service.casedataaccesscontrol.RoleAssignmentCategoryService; import uk.gov.hmcts.ccd.domain.service.casedataaccesscontrol.RoleAssignmentService; +import uk.gov.hmcts.ccd.domain.service.common.NewCaseUtils; import uk.gov.hmcts.ccd.domain.service.getcase.CaseNotFoundException; import uk.gov.hmcts.ccd.endpoint.exceptions.InvalidCaseRoleException; import uk.gov.hmcts.ccd.v2.external.domain.CaseUser; @@ -1407,6 +1409,101 @@ void shouldNotIncrementOrganisationUserCountForNewCreatorRoleWithExistingRelatio verify(supplementaryDataRepository, never()).incrementSupplementaryData(anyString(), anyString(), any()); } + @Test + @DisplayName("should clear organisation user new_case for single new case-user relationship") + void shouldClearNewCaseOrganisationForSingleNewRelationship() { + + // ARRANGE + when(applicationParams.getEnableAttributeBasedAccessControl()).thenReturn(false); + + Map responseExpected = new HashMap<>(); + responseExpected.put(getOrgUserNewCaseSupDataKey(ORGANISATION), Boolean.TRUE.toString()); + + SupplementaryData supplementaryData = new SupplementaryData(responseExpected); + + List caseUserRoles = Lists.newArrayList( + new CaseAssignedUserRoleWithOrganisation(CASE_REFERENCE.toString(), USER_ID, CASE_ROLE, ORGANISATION) + ); + // behave as no existing case roles + mockExistingCaseUserRoles(new ArrayList<>()); + + mockNewCaseForOrgUser(supplementaryData); + + // ACT + caseAccessOperation.addCaseUserRoles(caseUserRoles); + + // ASSERT + verify(supplementaryDataRepository, times(1)) + .findSupplementaryData(CASE_REFERENCE.toString(), Collections.singleton(getOrgUserNewCaseSupDataKey(ORGANISATION))); + verify(supplementaryDataRepository, times(1)) + .setSupplementaryData(CASE_REFERENCE.toString(), getOrgUserNewCaseSupDataKey(ORGANISATION), false); + + verifyNoInteractions(roleAssignmentService); + } + + @Test + @DisplayName("should clear organisation new user for multiple new case-user relationship") + void shouldClearNewCaseOrganisationForMultipleNewRelationships() { + + // ARRANGE + when(applicationParams.getEnableAttributeBasedAccessControl()).thenReturn(false); + + List caseUserRoles = Lists.newArrayList( + // CASE_REFERENCE/CASE_ID + // (2 orgs with 2 users with 2 roles >> 2 org counts incremented by 2) + new CaseAssignedUserRoleWithOrganisation(CASE_REFERENCE.toString(), USER_ID, CASE_ROLE, ORGANISATION), + new CaseAssignedUserRoleWithOrganisation(CASE_REFERENCE.toString(), USER_ID_OTHER, CASE_ROLE, + ORGANISATION), + new CaseAssignedUserRoleWithOrganisation(CASE_REFERENCE.toString(), USER_ID, CASE_ROLE_OTHER, + ORGANISATION_OTHER), + new CaseAssignedUserRoleWithOrganisation(CASE_REFERENCE.toString(), USER_ID_OTHER, CASE_ROLE_OTHER, + ORGANISATION_OTHER), + + // CASE_REFERENCE_OTHER/CASE_ID_OTHER + // (2 orgs with 1 user each with multiple roles >> 2 org counts incremented by 1) + // (however 2nd org count will not be required as existing relationship added below **) + new CaseAssignedUserRoleWithOrganisation(CASE_REFERENCE_OTHER.toString(), USER_ID, CASE_ROLE, + ORGANISATION), + new CaseAssignedUserRoleWithOrganisation(CASE_REFERENCE_OTHER.toString(), USER_ID, CASE_ROLE_OTHER, + ORGANISATION), + new CaseAssignedUserRoleWithOrganisation(CASE_REFERENCE_OTHER.toString(), USER_ID_OTHER, CASE_ROLE, + ORGANISATION_OTHER), + new CaseAssignedUserRoleWithOrganisation(CASE_REFERENCE_OTHER.toString(), USER_ID_OTHER, + CASE_ROLE_OTHER, ORGANISATION_OTHER) + + ); + // register existing case role + mockExistingCaseUserRoles(List.of( + // ** CASE_REFERENCE_OTHER + USER_ID_OTHER as exiting relationship + // (i.e. to check adjusting count still works in multiple) + createCaseUserEntity(CASE_ID_OTHER, CASE_ROLE_OTHER, USER_ID_OTHER) + )); + + // ACT + caseAccessOperation.addCaseUserRoles(caseUserRoles); + + // ASSERT + // verify CASE_REFERENCE/CASE_ID + verify(supplementaryDataRepository, times(1)) + .findSupplementaryData(CASE_REFERENCE.toString(), + Collections.singleton(getOrgUserNewCaseSupDataKey(ORGANISATION))); + verify(supplementaryDataRepository, times(1)) + .findSupplementaryData(CASE_REFERENCE.toString(), + Collections.singleton(getOrgUserNewCaseSupDataKey(ORGANISATION_OTHER))); + + // verify CASE_REFERENCE_OTHER/CASE_ID_OTHER (NB: only 1 user per org: 2nd org has no new relationships) + verify(supplementaryDataRepository, times(1)) + .findSupplementaryData(CASE_REFERENCE_OTHER.toString(), + Collections.singleton(getOrgUserNewCaseSupDataKey(ORGANISATION))); + verify(supplementaryDataRepository, never()) // NB: never called as exiting relationship ignored + .findSupplementaryData( + eq(CASE_REFERENCE_OTHER.toString()), + eq(Collections.singleton(getOrgUserNewCaseSupDataKey(ORGANISATION_OTHER))) + ); + + verifyNoInteractions(roleAssignmentService); + } + @Test @DisplayName("should increment organisation user count for multiple new case-user relationship") void shouldIncrementOrganisationUserCountForMultipleNewRelationships() { @@ -2551,6 +2648,10 @@ private String getOrgUserCountSupDataKey(String organisationId) { return "orgs_assigned_users." + organisationId; } + private String getOrgUserNewCaseSupDataKey(String organisationId) { + return NewCaseUtils.ORG_POLICY_NEW_CASE + "." + organisationId; + } + @SuppressWarnings("SameParameterValue") private void assertCorrectlyPopulatedRoleAssignmentsDeleteRequest( final String expectedCaseId, @@ -2601,4 +2702,14 @@ private void mockExistingCaseUserRolesForRA(List existingC .thenReturn(secondCallCaseUserRoles); } + private OngoingStubbing mockNewCaseForOrgUser( + SupplementaryData existingSupplementaryData + ) { + return when(supplementaryDataRepository.findSupplementaryData( + argThat(arg -> arg.contains(CASE_REFERENCE.toString()) + || arg.contains(CASE_REFERENCE_OTHER.toString())), + argThat(arg -> arg.contains(getOrgUserNewCaseSupDataKey(ORGANISATION)) + || arg.isEmpty())) + ).thenReturn(existingSupplementaryData); + } } From f86a6b73bc94c9cdba5e73880f21f2411f88736a Mon Sep 17 00:00:00 2001 From: patelila Date: Fri, 7 Feb 2025 17:42:25 +0000 Subject: [PATCH 04/38] added unit test --- .../caseaccess/CaseAccessOperation.java | 18 +++-- .../caseaccess/CaseAccessOperationTest.java | 66 ++++++++++++------- 2 files changed, 53 insertions(+), 31 deletions(-) diff --git a/src/main/java/uk/gov/hmcts/ccd/domain/service/caseaccess/CaseAccessOperation.java b/src/main/java/uk/gov/hmcts/ccd/domain/service/caseaccess/CaseAccessOperation.java index a5a8d55589..47f5243f96 100644 --- a/src/main/java/uk/gov/hmcts/ccd/domain/service/caseaccess/CaseAccessOperation.java +++ b/src/main/java/uk/gov/hmcts/ccd/domain/service/caseaccess/CaseAccessOperation.java @@ -520,13 +520,17 @@ private void clearUserAssignedNewCase(String caseReference, String organisationI SupplementaryData supplementaryData = supplementaryDataRepository.findSupplementaryData(caseReference, Collections.singleton(orgNewCaseSupDataKey)); - if (supplementaryData != null) { - Object newCaseOrgIdValue = supplementaryData.getResponse().getOrDefault(orgNewCaseSupDataKey, null); - boolean value = Boolean.valueOf(newCaseOrgIdValue.toString()); - if (value) { - supplementaryDataRepository.setSupplementaryData(caseReference, - orgNewCaseSupDataKey, false); - } + if (supplementaryData == null) { + return; + } + Object newCaseOrgIdValue = supplementaryData.getResponse().getOrDefault(orgNewCaseSupDataKey, null); + if (newCaseOrgIdValue == null) { + return; + } + boolean value = Boolean.valueOf(newCaseOrgIdValue.toString()); + if (value) { + supplementaryDataRepository.setSupplementaryData(caseReference, + orgNewCaseSupDataKey, false); } } catch (ServiceException e) { // do nothing diff --git a/src/test/java/uk/gov/hmcts/ccd/domain/service/caseaccess/CaseAccessOperationTest.java b/src/test/java/uk/gov/hmcts/ccd/domain/service/caseaccess/CaseAccessOperationTest.java index 4a3e97f4bf..b0420e6e4b 100644 --- a/src/test/java/uk/gov/hmcts/ccd/domain/service/caseaccess/CaseAccessOperationTest.java +++ b/src/test/java/uk/gov/hmcts/ccd/domain/service/caseaccess/CaseAccessOperationTest.java @@ -1424,6 +1424,7 @@ void shouldClearNewCaseOrganisationForSingleNewRelationship() { List caseUserRoles = Lists.newArrayList( new CaseAssignedUserRoleWithOrganisation(CASE_REFERENCE.toString(), USER_ID, CASE_ROLE, ORGANISATION) ); + // behave as no existing case roles mockExistingCaseUserRoles(new ArrayList<>()); @@ -1434,7 +1435,8 @@ void shouldClearNewCaseOrganisationForSingleNewRelationship() { // ASSERT verify(supplementaryDataRepository, times(1)) - .findSupplementaryData(CASE_REFERENCE.toString(), Collections.singleton(getOrgUserNewCaseSupDataKey(ORGANISATION))); + .findSupplementaryData(CASE_REFERENCE.toString(), + Collections.singleton(getOrgUserNewCaseSupDataKey(ORGANISATION))); verify(supplementaryDataRepository, times(1)) .setSupplementaryData(CASE_REFERENCE.toString(), getOrgUserNewCaseSupDataKey(ORGANISATION), false); @@ -1448,30 +1450,10 @@ void shouldClearNewCaseOrganisationForMultipleNewRelationships() { // ARRANGE when(applicationParams.getEnableAttributeBasedAccessControl()).thenReturn(false); - List caseUserRoles = Lists.newArrayList( - // CASE_REFERENCE/CASE_ID - // (2 orgs with 2 users with 2 roles >> 2 org counts incremented by 2) - new CaseAssignedUserRoleWithOrganisation(CASE_REFERENCE.toString(), USER_ID, CASE_ROLE, ORGANISATION), - new CaseAssignedUserRoleWithOrganisation(CASE_REFERENCE.toString(), USER_ID_OTHER, CASE_ROLE, - ORGANISATION), - new CaseAssignedUserRoleWithOrganisation(CASE_REFERENCE.toString(), USER_ID, CASE_ROLE_OTHER, - ORGANISATION_OTHER), - new CaseAssignedUserRoleWithOrganisation(CASE_REFERENCE.toString(), USER_ID_OTHER, CASE_ROLE_OTHER, - ORGANISATION_OTHER), + List caseUserRoles = getCaseAssignedUserRoleWithOrganisations(); - // CASE_REFERENCE_OTHER/CASE_ID_OTHER - // (2 orgs with 1 user each with multiple roles >> 2 org counts incremented by 1) - // (however 2nd org count will not be required as existing relationship added below **) - new CaseAssignedUserRoleWithOrganisation(CASE_REFERENCE_OTHER.toString(), USER_ID, CASE_ROLE, - ORGANISATION), - new CaseAssignedUserRoleWithOrganisation(CASE_REFERENCE_OTHER.toString(), USER_ID, CASE_ROLE_OTHER, - ORGANISATION), - new CaseAssignedUserRoleWithOrganisation(CASE_REFERENCE_OTHER.toString(), USER_ID_OTHER, CASE_ROLE, - ORGANISATION_OTHER), - new CaseAssignedUserRoleWithOrganisation(CASE_REFERENCE_OTHER.toString(), USER_ID_OTHER, - CASE_ROLE_OTHER, ORGANISATION_OTHER) + SupplementaryData supplementaryData = new SupplementaryData(getExpectedSupplementaryDataForOrgNewCase()); - ); // register existing case role mockExistingCaseUserRoles(List.of( // ** CASE_REFERENCE_OTHER + USER_ID_OTHER as exiting relationship @@ -1479,6 +1461,8 @@ void shouldClearNewCaseOrganisationForMultipleNewRelationships() { createCaseUserEntity(CASE_ID_OTHER, CASE_ROLE_OTHER, USER_ID_OTHER) )); + mockNewCaseForOrgUser(supplementaryData); + // ACT caseAccessOperation.addCaseUserRoles(caseUserRoles); @@ -2702,6 +2686,40 @@ private void mockExistingCaseUserRolesForRA(List existingC .thenReturn(secondCallCaseUserRoles); } + private List getCaseAssignedUserRoleWithOrganisations() { + return Lists.newArrayList( + // CASE_REFERENCE/CASE_ID + // (2 orgs with 2 users with 2 roles >> 2 org counts incremented by 2) + new CaseAssignedUserRoleWithOrganisation(CASE_REFERENCE.toString(), USER_ID, CASE_ROLE, ORGANISATION), + new CaseAssignedUserRoleWithOrganisation(CASE_REFERENCE.toString(), USER_ID_OTHER, CASE_ROLE, + ORGANISATION), + new CaseAssignedUserRoleWithOrganisation(CASE_REFERENCE.toString(), USER_ID, CASE_ROLE_OTHER, + ORGANISATION_OTHER), + new CaseAssignedUserRoleWithOrganisation(CASE_REFERENCE.toString(), USER_ID_OTHER, CASE_ROLE_OTHER, + ORGANISATION_OTHER), + + // CASE_REFERENCE_OTHER/CASE_ID_OTHER + // (2 orgs with 1 user each with multiple roles >> 2 org counts incremented by 1) + // (however 2nd org count will not be required as existing relationship added below **) + new CaseAssignedUserRoleWithOrganisation(CASE_REFERENCE_OTHER.toString(), USER_ID, CASE_ROLE, + ORGANISATION), + new CaseAssignedUserRoleWithOrganisation(CASE_REFERENCE_OTHER.toString(), USER_ID, CASE_ROLE_OTHER, + ORGANISATION), + new CaseAssignedUserRoleWithOrganisation(CASE_REFERENCE_OTHER.toString(), USER_ID_OTHER, CASE_ROLE, + ORGANISATION_OTHER), + new CaseAssignedUserRoleWithOrganisation(CASE_REFERENCE_OTHER.toString(), USER_ID_OTHER, + CASE_ROLE_OTHER, ORGANISATION_OTHER) + ); + + } + + private Map getExpectedSupplementaryDataForOrgNewCase() { + Map expectedSupplementaryData = new HashMap<>(); + expectedSupplementaryData.put(getOrgUserCountSupDataKey(ORGANISATION), Boolean.TRUE.toString()); + expectedSupplementaryData.put(getOrgUserCountSupDataKey(ORGANISATION_OTHER), Boolean.TRUE.toString()); + return expectedSupplementaryData; + } + private OngoingStubbing mockNewCaseForOrgUser( SupplementaryData existingSupplementaryData ) { @@ -2711,5 +2729,5 @@ private OngoingStubbing mockNewCaseForOrgUser( argThat(arg -> arg.contains(getOrgUserNewCaseSupDataKey(ORGANISATION)) || arg.isEmpty())) ).thenReturn(existingSupplementaryData); - } + } } From c5bdffea94d39fd48ea371a0c06818bb5ce9ef72 Mon Sep 17 00:00:00 2001 From: patelila Date: Mon, 10 Feb 2025 10:02:00 +0000 Subject: [PATCH 05/38] empty commit to trigger build From 8949b0d87836f73c5c6f0610a0f7aa21dfd91e19 Mon Sep 17 00:00:00 2001 From: patelila Date: Mon, 10 Feb 2025 10:24:16 +0000 Subject: [PATCH 06/38] empty commit to trigger build From a33602ca573a6e141f318d038d0769b4d3a65983 Mon Sep 17 00:00:00 2001 From: patelila Date: Mon, 24 Feb 2025 16:24:30 +0000 Subject: [PATCH 07/38] AC 1 --- .../F-105.feature | 149 ++++++++++-------- ...5_CreateCasePreRequisiteCaseworker.td.json | 70 ++++++++ ...t_Case_Roles_for_Case_NewCase_Base.td.json | 34 ++++ .../S-105.19/F-105_Test_Data_Base.td.json | 41 +++++ .../S-105.19/S-105.19.td.json | 44 ++++++ ...Verify_Case_Roles_for_Case_NewCase.td.json | 29 ++++ .../S-105.19_Verify_NewCase_1.td.json | 14 ++ .../S-105_GetCreateTokenNewCase.td.json | 28 ++++ .../F-105_Check_NewCase_Users_Base.td.json | 39 +++++ ...05_Prerequisite_NewCase_Check_Call.td.json | 18 +++ .../F-105_User_BeftaMasterCaseworker.td.json | 5 + .../common/F-105_Users.td.json | 4 +- 12 files changed, 410 insertions(+), 65 deletions(-) create mode 100644 src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/S-105.19/F-105_CreateCasePreRequisiteCaseworker.td.json create mode 100644 src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/S-105.19/F-105_Get_Case_Roles_for_Case_NewCase_Base.td.json create mode 100644 src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/S-105.19/F-105_Test_Data_Base.td.json create mode 100644 src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/S-105.19/S-105.19.td.json create mode 100644 src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/S-105.19/S-105.19_Verify_Case_Roles_for_Case_NewCase.td.json create mode 100644 src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/S-105.19/S-105.19_Verify_NewCase_1.td.json create mode 100644 src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/S-105.19/S-105_GetCreateTokenNewCase.td.json create mode 100644 src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/common/F-105_Check_NewCase_Users_Base.td.json create mode 100644 src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/common/F-105_Prerequisite_NewCase_Check_Call.td.json create mode 100644 src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/common/F-105_User_BeftaMasterCaseworker.td.json diff --git a/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/F-105.feature b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/F-105.feature index 7fe0109e34..b1988e8e94 100644 --- a/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/F-105.feature +++ b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/F-105.feature @@ -223,73 +223,94 @@ Feature: F-105: Add Case-Assigned Users and Roles And a call [to verify the count of users assigned to a case has increased by 1] will get the expected response as in [S-105.14_Verify_Counter_3]. # RDM-8842 AC-2 - @S-105.15 - Scenario: Must not increment Assigned User Count when assigning a user and case role for a specific case if there was already a case user role assignment with the respective values in the request (by a user calling through/from an authorised application) - Given an appropriate test context as detailed in the test data source, - And a user [Richard - who can create a case], - And a user [Dil - who is to add some case role assignment for a case], - And a user [Olawale - with an active solicitor profile and valid User ID], - And a case [C1, which Richard has just] created as in [F-105_Case_Data_Create_C1], - And a successful call [to grant access for Olawale with a case role CR-1 over the case C1] as in [S-105.15_Grant_Access], - And a successful call [to check the number of users having access to C1 in its supplementary data] as in [F-105_Prerequisite_Counter_Check_Call], - When a request is prepared with appropriate values, - And the request [is made from an authorised application, by Dil, with the Case ID of C1, User ID of Olawale, proper Case Role CR-2 and the Organisation ID of Olawale], - And it is submitted to call the [Add Case-Assigned Users and Roles] operation of [CCD Data Store Api], - Then a positive response is received, - And the response has all the details as expected, - And a call [to verify Olawale's reception of the role CR-2 over the case C1] will get the expected response as in [S-105.15_Verify_Case_Roles_for_Case_C1], - And a call [to verify the count of users assigned to a case has NOT changed] will get the expected response as in [F-105_Verify_Counter_Unchanged]. + @S-105.15 + Scenario: Must not increment Assigned User Count when assigning a user and case role for a specific case if there was already a case user role assignment with the respective values in the request (by a user calling through/from an authorised application) + Given an appropriate test context as detailed in the test data source, + And a user [Richard - who can create a case], + And a user [Dil - who is to add some case role assignment for a case], + And a user [Olawale - with an active solicitor profile and valid User ID], + And a case [C1, which Richard has just] created as in [F-105_Case_Data_Create_C1], + And a successful call [to grant access for Olawale with a case role CR-1 over the case C1] as in [S-105.15_Grant_Access], + And a successful call [to check the number of users having access to C1 in its supplementary data] as in [F-105_Prerequisite_Counter_Check_Call], + When a request is prepared with appropriate values, + And the request [is made from an authorised application, by Dil, with the Case ID of C1, User ID of Olawale, proper Case Role CR-2 and the Organisation ID of Olawale], + And it is submitted to call the [Add Case-Assigned Users and Roles] operation of [CCD Data Store Api], + Then a positive response is received, + And the response has all the details as expected, + And a call [to verify Olawale's reception of the role CR-2 over the case C1] will get the expected response as in [S-105.15_Verify_Case_Roles_for_Case_C1], + And a call [to verify the count of users assigned to a case has NOT changed] will get the expected response as in [F-105_Verify_Counter_Unchanged]. # RDM-8842 AC-3 - @S-105.16 - Scenario: No organisation ID is provided by the user so Assigned User Count remains unchanged - Given an appropriate test context as detailed in the test data source, - And a user [Richard - who can create a case], - And a user [Dil - who is to add some case role assignment for a case], - And a user [Olawale - with an active solicitor profile and valid User ID], - And a case [C1, which Richard has just] created as in [F-105_Case_Data_Create_C1], - And a successful call [to check the number of users having access to C1 in its supplementary data] as in [F-105_Prerequisite_Counter_Check_Call], - When a request is prepared with appropriate values, - And the request [is made from an authorised application, by Dil, with the Case ID of C1, User ID of Olawale, proper Case Role CR-1 and no Organisation ID], - And it is submitted to call the [Add Case-Assigned Users and Roles] operation of [CCD Data Store Api], - Then a positive response is received, - And the response has all the details as expected, - And a call [to verify Olawale's reception of the role CR-1 over the case C1] will get the expected response as in [S-105.16_Verify_Case_Roles_for_Case_C1], - And a call [to verify the count of users assigned to a case has NOT changed] will get the expected response as in [F-105_Verify_Counter_Unchanged]. + @S-105.16 + Scenario: No organisation ID is provided by the user so Assigned User Count remains unchanged + Given an appropriate test context as detailed in the test data source, + And a user [Richard - who can create a case], + And a user [Dil - who is to add some case role assignment for a case], + And a user [Olawale - with an active solicitor profile and valid User ID], + And a case [C1, which Richard has just] created as in [F-105_Case_Data_Create_C1], + And a successful call [to check the number of users having access to C1 in its supplementary data] as in [F-105_Prerequisite_Counter_Check_Call], + When a request is prepared with appropriate values, + And the request [is made from an authorised application, by Dil, with the Case ID of C1, User ID of Olawale, proper Case Role CR-1 and no Organisation ID], + And it is submitted to call the [Add Case-Assigned Users and Roles] operation of [CCD Data Store Api], + Then a positive response is received, + And the response has all the details as expected, + And a call [to verify Olawale's reception of the role CR-1 over the case C1] will get the expected response as in [S-105.16_Verify_Case_Roles_for_Case_C1], + And a call [to verify the count of users assigned to a case has NOT changed] will get the expected response as in [F-105_Verify_Counter_Unchanged]. # RDM-8842 AC-4 - @S-105.17 - Scenario: Invalid Organisation ID provided - Given an appropriate test context as detailed in the test data source, - And a user [Richard - who can create a case], - And a user [Dil - who is to add some case role assignment for a case], - And a user [Olawale - with an active solicitor profile], - And a user [Hemanth - with an active solicitor profile], - And a case [C1, which Richard has just] created as in [F-105_Case_Data_Create_C1], - And a successful call [to check the number of users having access to C1 in its supplementary data] as in [F-105_Prerequisite_Counter_Check_Call], - When a request is prepared with appropriate values, - And the request [is made from an authorised application, by Dil for 2 assignments each containing the Case ID of C1, User ID of Olawale and Hemanth and proper Case Role CR-1], - And the request [contains a valid Organisation ID in one entry and an improper Organisation ID in the other], - And it is submitted to call the [Add Case-Assigned Users and Roles] operation of [CCD Data Store Api], - Then a negative response is received, - And the response has all the details as expected, - And a call [to verify that Olawale hasn't received the role CR-1 over the case C1] will get the expected response as in [S-105.17_Verify_Case_Roles_for_Case_C1], - And a call [to verify the count of users assigned to a case has NOT changed] will get the expected response as in [F-105_Verify_Counter_Unchanged]. + @S-105.17 + Scenario: Invalid Organisation ID provided + Given an appropriate test context as detailed in the test data source, + And a user [Richard - who can create a case], + And a user [Dil - who is to add some case role assignment for a case], + And a user [Olawale - with an active solicitor profile], + And a user [Hemanth - with an active solicitor profile], + And a case [C1, which Richard has just] created as in [F-105_Case_Data_Create_C1], + And a successful call [to check the number of users having access to C1 in its supplementary data] as in [F-105_Prerequisite_Counter_Check_Call], + When a request is prepared with appropriate values, + And the request [is made from an authorised application, by Dil for 2 assignments each containing the Case ID of C1, User ID of Olawale and Hemanth and proper Case Role CR-1], + And the request [contains a valid Organisation ID in one entry and an improper Organisation ID in the other], + And it is submitted to call the [Add Case-Assigned Users and Roles] operation of [CCD Data Store Api], + Then a negative response is received, + And the response has all the details as expected, + And a call [to verify that Olawale hasn't received the role CR-1 over the case C1] will get the expected response as in [S-105.17_Verify_Case_Roles_for_Case_C1], + And a call [to verify the count of users assigned to a case has NOT changed] will get the expected response as in [F-105_Verify_Counter_Unchanged]. # RDM-8842 AC-5 - @S-105.18 - Scenario: Must increment Assigned User Count when assigning a user and case role for a specific case if there was only [CREATOR] case user role assignment with the respective values in the request (by a user calling through/from an authorised application) - Given an appropriate test context as detailed in the test data source, - And a user [Richard - who can create a case], - And a user [Dil - who is to add some case role assignment for a case], - And a user [Olawale - with an active solicitor profile and valid User ID], - And a case [C1, which Richard has just] created as in [F-105_Case_Data_Create_C1], - And a successful call [to grant access for Olawale with a case role CREATOR over the case C1] as in [S-105.18_Grant_Access], - And a successful call [to check the number of users having access to C1 in its supplementary data] as in [F-105_Prerequisite_Counter_Check_Call], - When a request is prepared with appropriate values, - And the request [is made from an authorised application, by Dil, with the Case ID of C1, User ID of Olawale, proper Case Role CR-2 and the Organisation ID of Olawale], - And it is submitted to call the [Add Case-Assigned Users and Roles] operation of [CCD Data Store Api], - Then a positive response is received, - And the response has all the details as expected, - And a call [to verify Olawale's reception of the role CR-2 over the case C1] will get the expected response as in [S-105.18_Verify_Case_Roles_for_Case_C1], - And a call [to verify the count of users assigned to a case has changed] will get the expected response as in [F-105_Verify_Counter_Changed]. + @S-105.18 + Scenario: Must increment Assigned User Count when assigning a user and case role for a specific case if there was only [CREATOR] case user role assignment with the respective values in the request (by a user calling through/from an authorised application) + Given an appropriate test context as detailed in the test data source, + And a user [Richard - who can create a case], + And a user [Dil - who is to add some case role assignment for a case], + And a user [Olawale - with an active solicitor profile and valid User ID], + And a case [C1, which Richard has just] created as in [F-105_Case_Data_Create_C1], + And a successful call [to grant access for Olawale with a case role CREATOR over the case C1] as in [S-105.18_Grant_Access], + And a successful call [to check the number of users having access to C1 in its supplementary data] as in [F-105_Prerequisite_Counter_Check_Call], + When a request is prepared with appropriate values, + And the request [is made from an authorised application, by Dil, with the Case ID of C1, User ID of Olawale, proper Case Role CR-2 and the Organisation ID of Olawale], + And it is submitted to call the [Add Case-Assigned Users and Roles] operation of [CCD Data Store Api], + Then a positive response is received, + And the response has all the details as expected, + And a call [to verify Olawale's reception of the role CR-2 over the case C1] will get the expected response as in [S-105.18_Verify_Case_Roles_for_Case_C1], + And a call [to verify the count of users assigned to a case has changed] will get the expected response as in [F-105_Verify_Counter_Changed]. + + # CCD-5333 AC-1 + @S-105.19 + Scenario: Must successfully set new_case attribute to false for the organisation when assigning a user and case role for a specific case (by a user calling through/from an authorised application) + Given an appropriate test context as detailed in the test data source, + And a user [BeftaMasterCaseworker - who can create a case], + And a user [Dil - who is to add some case role assignment for a case], + And a user [Olawale - with an active solicitor profile], + And a user [Hemanth - with an active solicitor profile], + And a successful call [to create a case] as in [F-105_CreateCasePreRequisiteCaseworker] + When a request is prepared with appropriate values, + And the request [is made from an authorised application, by Dil, with the Case ID of C1, User ID of Olawale, proper Case Role CR-1 and CR-2 and the Organisation ID of Olawale], + And it is submitted to call the [Add Case-Assigned Users and Roles] operation of [CCD Data Store Api], + Then a positive response is received, + And the response has all the details as expected, + And a call [to verify Olawale's reception of the role CR-1 and CR-2 over the case C1] will get the expected response as in [S-105.19_Verify_Case_Roles_for_Case_NewCase], + And a call [to verify newCase assigned to C1 is set to false in the supplementary data] will get the expected response as in [S-105.19_Verify_NewCase_1], + And a call [to repeat the same request as above] will get the expected response as in [S-105.19_Repeated_Call_to_Add_Case_Assigned_Users_and_Roles], + And a call [to verify the count of users assigned to C1 has NOT changed] will get the expected response as in [S-105.19_Verify_Counter_2], + And a call [to repeat the same request as above this time with a different user, Hemanth] will get the expected response as in [S-105.19_Repeated_Call_to_Add_Case_Assigned_Users_and_Roles_Hemanth], + And a call [to verify the count of users assigned to a case has increased by 1] will get the expected response as in [S-105.19_Verify_Counter_3]. diff --git a/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/S-105.19/F-105_CreateCasePreRequisiteCaseworker.td.json b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/S-105.19/F-105_CreateCasePreRequisiteCaseworker.td.json new file mode 100644 index 0000000000..b85e8c808f --- /dev/null +++ b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/S-105.19/F-105_CreateCasePreRequisiteCaseworker.td.json @@ -0,0 +1,70 @@ +{ + "_guid_": "F-105_CreateCasePreRequisiteCaseworker", + "_extends_": "Case_Creation_Data_Base", + "specs": [ + "to create a case", + "As a prerequisite" + ], + + "prerequisites" : [ { + "Token_Creation": "S-105_GetCreateTokenNewCase" + } + ], + + "users": { + "invokingUser": { + "_extends_": "BeftaMasterCaseworker" + } + }, + "request": { + "pathVariables": { + "jid": "BEFTA_MASTER", + "ctid": "FT_NewCaseSupplementry" + }, + "body": { + "data": { + "OrganisationPolicyField": { + "newCase": "Yes", + "Organisation": { + "OrganisationID": "orgID1", + "OrganisationName": "orgName1" + } + } + }, + "event": { + "id": "createCase", + "summary": "", + "description": "" + }, + "event_token": "${[scenarioContext][childContexts][Token_Creation][testData][actualResponse][body][token]}" + } + }, + + "expectedResponse": { + "body": { + "id": "[[ANYTHING_PRESENT]]", + "jurisdiction": "BEFTA_MASTER", + "state" : "CaseCreated", + "case_type_id": "FT_NewCaseSupplementry", + "created_date": "[[ANYTHING_PRESENT]]", + "last_modified": "[[ANYTHING_PRESENT]]", + "last_state_modified_date": "[[ANYTHING_PRESENT]]", + "security_classification": "PUBLIC", + "case_data": { + "OrganisationPolicyField": { + "Organisation": { + "OrganisationID": "orgID1", + "OrganisationName": "orgName1" + } + } + }, + "data_classification": { + }, + "supplementary_data" : { + "new_case" : { + "orgID1" : "true" + } + } + } + } +} diff --git a/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/S-105.19/F-105_Get_Case_Roles_for_Case_NewCase_Base.td.json b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/S-105.19/F-105_Get_Case_Roles_for_Case_NewCase_Base.td.json new file mode 100644 index 0000000000..e5d4686b61 --- /dev/null +++ b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/S-105.19/F-105_Get_Case_Roles_for_Case_NewCase_Base.td.json @@ -0,0 +1,34 @@ +{ + "title": "Get Case-Assigned Users and Roles", + + "_guid_": "F-105_Get_Case_Roles_for_Case_NewCase_Base", + + "productName": "CCD Data Store", + "operationName": "Get Case-Assigned Users and Roles", + + "method": "GET", + "uri": "/case-users", + + "users": { + "invokingUser": { + "_extends_": "BeftaCaseworkerCaa" + } + }, + + "request": { + "_extends_": "Common_Request", + "queryParams": { + "case_ids": "${[scenarioContext][parentContext][testData][request][body][case_users][0][case_id]}" + } + }, + + "expectedResponse": { + "_extends_": "Common_200_Response", + "headers": { + "_extends_": "Common_Response_Headers", + "Content-Length": "[[ANYTHING_PRESENT]]", + "Content-Type": "[[ANYTHING_PRESENT]]", + "Content-Encoding": "[[ANYTHING_PRESENT]]" + } + } +} diff --git a/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/S-105.19/F-105_Test_Data_Base.td.json b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/S-105.19/F-105_Test_Data_Base.td.json new file mode 100644 index 0000000000..44ecbeebb7 --- /dev/null +++ b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/S-105.19/F-105_Test_Data_Base.td.json @@ -0,0 +1,41 @@ +{ + "_guid_": "F-105_Test_Data_Base", + "_extends_": "Case_Creation_Base", + + "users": { + "invokingUser": { + "_extends_": "BeftaMasterCaseworker" + } + }, + + "request": { + "pathVariables": { + "jid": "BEFTA_MASTER", + "ctid": "FT_NewCaseSupplementry" + } + }, + + "expectedResponse": { + "_extends_": "Common_201_Response", + "headers": { + "_extends_": "Common_Response_Headers" + }, + "body" : { + "id" : "[[ANYTHING_PRESENT]]", + "jurisdiction" : "BEFTA_MASTER", + "state" : "CaseCreated", + "case_type_id" : "FT_NewCaseSupplementry", + "version" : 0, + "created_date" : "[[ANY_STRING_NOT_NULLABLE]]", + "last_modified" : "[[ANY_STRING_NOT_NULLABLE]]", + "last_state_modified_date" : "[[ANY_STRING_NOT_NULLABLE]]", + "security_classification" : "PUBLIC", + "supplementary_data" : null, + "after_submit_callback_response" : null, + "callback_response_status_code" : null, + "callback_response_status" : null, + "delete_draft_response_status_code" : null, + "delete_draft_response_status" : null + } + } +} diff --git a/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/S-105.19/S-105.19.td.json b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/S-105.19/S-105.19.td.json new file mode 100644 index 0000000000..c683e4bc58 --- /dev/null +++ b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/S-105.19/S-105.19.td.json @@ -0,0 +1,44 @@ +{ + "title": "Must successfully set new_case attribute to false for the organisation when assigning a user and case role for a specific case (by a user calling through/from an authorised application)", + + "_guid_": "S-105.19", + "_extends_": "F-105_Add_Case_Assigned_User_Roles_Base", + + "specs": [ + "BeftaMasterCaseworker - who can create a case", + "Dil - who is to add some case role assignment for a case", + "Olawale - with an active solicitor profile", + "Hemanth - with an active solicitor profile", + "is made from an authorised application, by Dil, with the Case ID of C1, User ID of Olawale, proper Case Role CR-1 and CR-2 and the Organisation ID of Olawale" + ], + + "users": { + "_extends_": "F-105_Users" + }, + + "request": { + "headers": { + "Authorization": "Bearer ${[scenarioContext][testData][users][userDil][accessToken]}" + }, + "body": { + "case_users": [ + { + "case_id": "${[scenarioContext][childContexts][F-105_CreateCasePreRequisiteCaseworker][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][userOlawale][id]}", + "case_role": "[CR-1]", + "organisation_id": "${[scenarioContext][childContexts][F-105_Prerequisite_NewCase_Check_Call][childContexts][F-105_Get_Organisation_Identifier_Olawale][testData][actualResponse][body][organisationIdentifier]}" + }, + { + "case_id": "${[scenarioContext][childContexts][F-105_CreateCasePreRequisiteCaseworker][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][userOlawale][id]}", + "case_role": "[CR-2]", + "organisation_id": "${[scenarioContext][childContexts][F-105_Prerequisite_NewCase_Check_Call][childContexts][F-105_Get_Organisation_Identifier_Olawale][testData][actualResponse][body][organisationIdentifier]}" + } + ] + } + }, + + "expectedResponse": { + "_extends_": "F-105_Add_Case_Assigned_User_Roles_201_response" + } +} diff --git a/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/S-105.19/S-105.19_Verify_Case_Roles_for_Case_NewCase.td.json b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/S-105.19/S-105.19_Verify_Case_Roles_for_Case_NewCase.td.json new file mode 100644 index 0000000000..22ee1387db --- /dev/null +++ b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/S-105.19/S-105.19_Verify_Case_Roles_for_Case_NewCase.td.json @@ -0,0 +1,29 @@ +{ + "_guid_": "S-105.19_Verify_Case_Roles_for_Case_NewCase", + "_extends_": "F-105_Get_Case_Roles_for_Case_NewCase_Base", + + "specs": [ + "to verify Olawale's reception of the role CR-1 and CR-2 over the case C1" + ], + + "expectedResponse": { + "body": { + "case_users": [ + { + "__ordering__": "UNORDERED", + "__elementId__": "case_id,user_id,case_role" + }, + { + "case_id": "${}${[scenarioContext][siblingContexts][F-105_CreateCasePreRequisiteCaseworker][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][parentContext][testData][users][userOlawale][id]}", + "case_role": "[CR-1]" + }, + { + "case_id": "${}${[scenarioContext][siblingContexts][F-105_CreateCasePreRequisiteCaseworker][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][parentContext][testData][users][userOlawale][id]}", + "case_role": "[CR-2]" + } + ] + } + } +} diff --git a/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/S-105.19/S-105.19_Verify_NewCase_1.td.json b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/S-105.19/S-105.19_Verify_NewCase_1.td.json new file mode 100644 index 0000000000..efd46db284 --- /dev/null +++ b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/S-105.19/S-105.19_Verify_NewCase_1.td.json @@ -0,0 +1,14 @@ +{ + "_guid_": "S-105.19_Verify_NewCase_1", + "_extends_": "F-105_Check_NewCase_Users_Base", + + "specs": [ + "to verify newCase assigned to C1 is set to false in the supplementary data" + ], + + "expectedResponse": { + "body": { + "supplementary_data": "${[scenarioContext][customValues][new_case_siblingContexts.F-105_Prerequisite_NewCase_Check_Call.childContexts.F-105_Get_Organisation_Identifier_Olawale|siblingContexts.F-105_Prerequisite_NewCase_Check_Call|1]}" + } + } +} diff --git a/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/S-105.19/S-105_GetCreateTokenNewCase.td.json b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/S-105.19/S-105_GetCreateTokenNewCase.td.json new file mode 100644 index 0000000000..2c98ec5da3 --- /dev/null +++ b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/S-105.19/S-105_GetCreateTokenNewCase.td.json @@ -0,0 +1,28 @@ +{ + "_guid_": "S-105_GetCreateTokenNewCase", + "_extends_": "Standard_Token_Creation_Data_For_Case_Creation", + + "specs": [ + "to create a token for case creation", + "As a prerequisite" + ], + + "users": { + "invokingUser": { + "_extends_": "BeftaMasterCaseworker" + } + }, + + "request": { + "pathVariables": { + "jid": "BEFTA_MASTER", + "ctid": "FT_NewCaseSupplementry", + "etid": "createCase" + } + }, + "expectedResponse": { + "body": { + "event_id": "createCase" + } + } +} diff --git a/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/common/F-105_Check_NewCase_Users_Base.td.json b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/common/F-105_Check_NewCase_Users_Base.td.json new file mode 100644 index 0000000000..cda99d8eee --- /dev/null +++ b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/common/F-105_Check_NewCase_Users_Base.td.json @@ -0,0 +1,39 @@ +{ + "title": "Check new_case_users in supplementry data", + + "_guid_": "F-105_Check_NewCase_Users_Base", + + "productName": "CCD Data Store", + "operationName": "New Case in Supplementary Data", + + "method": "POST", + "uri": "/cases/{cid}/supplementary-data", + + "users": { + "invokingUser": { + "_extends_": "BeftaCaseworkerCaa" + } + }, + + "request": { + "_extends_": "Common_Request", + "pathVariables": { + "cid": "${[scenarioContext][siblingContexts][F-105_CreateCasePreRequisiteCaseworker][testData][actualResponse][body][id]}" + }, + "body": { + "supplementary_data_updates": { + "$set": "${[scenarioContext][customValues][new_case_siblingContexts.F-105_Prerequisite_NewCase_Check_Call.childContexts.F-105_Get_Organisation_Identifier_Olawale]}" + } + } + }, + + "expectedResponse": { + "_extends_": "Common_200_Response", + "headers": { + "_extends_": "Common_Response_Headers", + "Content-Length": "[[ANYTHING_PRESENT]]", + "Content-Type": "[[ANYTHING_PRESENT]]", + "Content-Encoding": "[[ANYTHING_PRESENT]]" + } + } +} diff --git a/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/common/F-105_Prerequisite_NewCase_Check_Call.td.json b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/common/F-105_Prerequisite_NewCase_Check_Call.td.json new file mode 100644 index 0000000000..8d5bb86bdf --- /dev/null +++ b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/common/F-105_Prerequisite_NewCase_Check_Call.td.json @@ -0,0 +1,18 @@ +{ + "_guid_": "F-105_Prerequisite_NewCase_Check_Call", + "_extends_": "F-105_Check_NewCase_Users_Base", + + "specs": [ + "to check the number of users having access to C1 in its supplementary data" + ], + + "prerequisites": [ + "F-105_Get_Organisation_Identifier_Olawale" + ], + + "expectedResponse": { + "body": { + "supplementary_data": "[[ANYTHING_PRESENT]]" + } + } +} diff --git a/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/common/F-105_User_BeftaMasterCaseworker.td.json b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/common/F-105_User_BeftaMasterCaseworker.td.json new file mode 100644 index 0000000000..d750913988 --- /dev/null +++ b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/common/F-105_User_BeftaMasterCaseworker.td.json @@ -0,0 +1,5 @@ +{ + "_guid_": "F-105_User_BeftaMasterCaseworker", + + "_extends_": "BeftaMasterCaseworker" +} diff --git a/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/common/F-105_Users.td.json b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/common/F-105_Users.td.json index 3fad24a872..8f013eefc4 100644 --- a/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/common/F-105_Users.td.json +++ b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/common/F-105_Users.td.json @@ -1,6 +1,5 @@ { "_guid_": "F-105_Users", - "userRichard": { "_extends_": "F-105_User_Richard" }, @@ -12,5 +11,8 @@ }, "userHemanth": { "_extends_": "F-105_User_Hemanth" + }, + "userMaster": { + "_extends_": "F-105_User_BeftaMasterCaseworker" } } From c677149f37ac83b0661e4114d57dd26884256cb8 Mon Sep 17 00:00:00 2001 From: patelila Date: Mon, 24 Feb 2025 17:08:11 +0000 Subject: [PATCH 08/38] Version of java helm chart below 5.3.0 is deprecated --- charts/ccd-data-store-api/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/ccd-data-store-api/Chart.yaml b/charts/ccd-data-store-api/Chart.yaml index 20703c0259..57472e9844 100644 --- a/charts/ccd-data-store-api/Chart.yaml +++ b/charts/ccd-data-store-api/Chart.yaml @@ -8,7 +8,7 @@ maintainers: email: ccd-devops@HMCTS.NET dependencies: - name: java - version: 5.2.0 + version: 5.3.0 repository: 'https://hmctspublic.azurecr.io/helm/v1/repo/' - name: elasticsearch version: 7.17.3 From 08ec16b164deb49fb0c2f71e963ab0ad3f721b3d Mon Sep 17 00:00:00 2001 From: patelila Date: Tue, 25 Feb 2025 08:45:35 +0000 Subject: [PATCH 09/38] feature changes --- .../F-105.feature | 130 +++++++++--------- 1 file changed, 65 insertions(+), 65 deletions(-) diff --git a/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/F-105.feature b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/F-105.feature index b1988e8e94..3caf9526ff 100644 --- a/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/F-105.feature +++ b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/F-105.feature @@ -223,78 +223,78 @@ Feature: F-105: Add Case-Assigned Users and Roles And a call [to verify the count of users assigned to a case has increased by 1] will get the expected response as in [S-105.14_Verify_Counter_3]. # RDM-8842 AC-2 - @S-105.15 - Scenario: Must not increment Assigned User Count when assigning a user and case role for a specific case if there was already a case user role assignment with the respective values in the request (by a user calling through/from an authorised application) - Given an appropriate test context as detailed in the test data source, - And a user [Richard - who can create a case], - And a user [Dil - who is to add some case role assignment for a case], - And a user [Olawale - with an active solicitor profile and valid User ID], - And a case [C1, which Richard has just] created as in [F-105_Case_Data_Create_C1], - And a successful call [to grant access for Olawale with a case role CR-1 over the case C1] as in [S-105.15_Grant_Access], - And a successful call [to check the number of users having access to C1 in its supplementary data] as in [F-105_Prerequisite_Counter_Check_Call], - When a request is prepared with appropriate values, - And the request [is made from an authorised application, by Dil, with the Case ID of C1, User ID of Olawale, proper Case Role CR-2 and the Organisation ID of Olawale], - And it is submitted to call the [Add Case-Assigned Users and Roles] operation of [CCD Data Store Api], - Then a positive response is received, - And the response has all the details as expected, - And a call [to verify Olawale's reception of the role CR-2 over the case C1] will get the expected response as in [S-105.15_Verify_Case_Roles_for_Case_C1], - And a call [to verify the count of users assigned to a case has NOT changed] will get the expected response as in [F-105_Verify_Counter_Unchanged]. + @S-105.15 + Scenario: Must not increment Assigned User Count when assigning a user and case role for a specific case if there was already a case user role assignment with the respective values in the request (by a user calling through/from an authorised application) + Given an appropriate test context as detailed in the test data source, + And a user [Richard - who can create a case], + And a user [Dil - who is to add some case role assignment for a case], + And a user [Olawale - with an active solicitor profile and valid User ID], + And a case [C1, which Richard has just] created as in [F-105_Case_Data_Create_C1], + And a successful call [to grant access for Olawale with a case role CR-1 over the case C1] as in [S-105.15_Grant_Access], + And a successful call [to check the number of users having access to C1 in its supplementary data] as in [F-105_Prerequisite_Counter_Check_Call], + When a request is prepared with appropriate values, + And the request [is made from an authorised application, by Dil, with the Case ID of C1, User ID of Olawale, proper Case Role CR-2 and the Organisation ID of Olawale], + And it is submitted to call the [Add Case-Assigned Users and Roles] operation of [CCD Data Store Api], + Then a positive response is received, + And the response has all the details as expected, + And a call [to verify Olawale's reception of the role CR-2 over the case C1] will get the expected response as in [S-105.15_Verify_Case_Roles_for_Case_C1], + And a call [to verify the count of users assigned to a case has NOT changed] will get the expected response as in [F-105_Verify_Counter_Unchanged]. # RDM-8842 AC-3 - @S-105.16 - Scenario: No organisation ID is provided by the user so Assigned User Count remains unchanged - Given an appropriate test context as detailed in the test data source, - And a user [Richard - who can create a case], - And a user [Dil - who is to add some case role assignment for a case], - And a user [Olawale - with an active solicitor profile and valid User ID], - And a case [C1, which Richard has just] created as in [F-105_Case_Data_Create_C1], - And a successful call [to check the number of users having access to C1 in its supplementary data] as in [F-105_Prerequisite_Counter_Check_Call], - When a request is prepared with appropriate values, - And the request [is made from an authorised application, by Dil, with the Case ID of C1, User ID of Olawale, proper Case Role CR-1 and no Organisation ID], - And it is submitted to call the [Add Case-Assigned Users and Roles] operation of [CCD Data Store Api], - Then a positive response is received, - And the response has all the details as expected, - And a call [to verify Olawale's reception of the role CR-1 over the case C1] will get the expected response as in [S-105.16_Verify_Case_Roles_for_Case_C1], - And a call [to verify the count of users assigned to a case has NOT changed] will get the expected response as in [F-105_Verify_Counter_Unchanged]. + @S-105.16 + Scenario: No organisation ID is provided by the user so Assigned User Count remains unchanged + Given an appropriate test context as detailed in the test data source, + And a user [Richard - who can create a case], + And a user [Dil - who is to add some case role assignment for a case], + And a user [Olawale - with an active solicitor profile and valid User ID], + And a case [C1, which Richard has just] created as in [F-105_Case_Data_Create_C1], + And a successful call [to check the number of users having access to C1 in its supplementary data] as in [F-105_Prerequisite_Counter_Check_Call], + When a request is prepared with appropriate values, + And the request [is made from an authorised application, by Dil, with the Case ID of C1, User ID of Olawale, proper Case Role CR-1 and no Organisation ID], + And it is submitted to call the [Add Case-Assigned Users and Roles] operation of [CCD Data Store Api], + Then a positive response is received, + And the response has all the details as expected, + And a call [to verify Olawale's reception of the role CR-1 over the case C1] will get the expected response as in [S-105.16_Verify_Case_Roles_for_Case_C1], + And a call [to verify the count of users assigned to a case has NOT changed] will get the expected response as in [F-105_Verify_Counter_Unchanged]. # RDM-8842 AC-4 - @S-105.17 - Scenario: Invalid Organisation ID provided - Given an appropriate test context as detailed in the test data source, - And a user [Richard - who can create a case], - And a user [Dil - who is to add some case role assignment for a case], - And a user [Olawale - with an active solicitor profile], - And a user [Hemanth - with an active solicitor profile], - And a case [C1, which Richard has just] created as in [F-105_Case_Data_Create_C1], - And a successful call [to check the number of users having access to C1 in its supplementary data] as in [F-105_Prerequisite_Counter_Check_Call], - When a request is prepared with appropriate values, - And the request [is made from an authorised application, by Dil for 2 assignments each containing the Case ID of C1, User ID of Olawale and Hemanth and proper Case Role CR-1], - And the request [contains a valid Organisation ID in one entry and an improper Organisation ID in the other], - And it is submitted to call the [Add Case-Assigned Users and Roles] operation of [CCD Data Store Api], - Then a negative response is received, - And the response has all the details as expected, - And a call [to verify that Olawale hasn't received the role CR-1 over the case C1] will get the expected response as in [S-105.17_Verify_Case_Roles_for_Case_C1], - And a call [to verify the count of users assigned to a case has NOT changed] will get the expected response as in [F-105_Verify_Counter_Unchanged]. + @S-105.17 + Scenario: Invalid Organisation ID provided + Given an appropriate test context as detailed in the test data source, + And a user [Richard - who can create a case], + And a user [Dil - who is to add some case role assignment for a case], + And a user [Olawale - with an active solicitor profile], + And a user [Hemanth - with an active solicitor profile], + And a case [C1, which Richard has just] created as in [F-105_Case_Data_Create_C1], + And a successful call [to check the number of users having access to C1 in its supplementary data] as in [F-105_Prerequisite_Counter_Check_Call], + When a request is prepared with appropriate values, + And the request [is made from an authorised application, by Dil for 2 assignments each containing the Case ID of C1, User ID of Olawale and Hemanth and proper Case Role CR-1], + And the request [contains a valid Organisation ID in one entry and an improper Organisation ID in the other], + And it is submitted to call the [Add Case-Assigned Users and Roles] operation of [CCD Data Store Api], + Then a negative response is received, + And the response has all the details as expected, + And a call [to verify that Olawale hasn't received the role CR-1 over the case C1] will get the expected response as in [S-105.17_Verify_Case_Roles_for_Case_C1], + And a call [to verify the count of users assigned to a case has NOT changed] will get the expected response as in [F-105_Verify_Counter_Unchanged]. # RDM-8842 AC-5 - @S-105.18 - Scenario: Must increment Assigned User Count when assigning a user and case role for a specific case if there was only [CREATOR] case user role assignment with the respective values in the request (by a user calling through/from an authorised application) - Given an appropriate test context as detailed in the test data source, - And a user [Richard - who can create a case], - And a user [Dil - who is to add some case role assignment for a case], - And a user [Olawale - with an active solicitor profile and valid User ID], - And a case [C1, which Richard has just] created as in [F-105_Case_Data_Create_C1], - And a successful call [to grant access for Olawale with a case role CREATOR over the case C1] as in [S-105.18_Grant_Access], - And a successful call [to check the number of users having access to C1 in its supplementary data] as in [F-105_Prerequisite_Counter_Check_Call], - When a request is prepared with appropriate values, - And the request [is made from an authorised application, by Dil, with the Case ID of C1, User ID of Olawale, proper Case Role CR-2 and the Organisation ID of Olawale], - And it is submitted to call the [Add Case-Assigned Users and Roles] operation of [CCD Data Store Api], - Then a positive response is received, - And the response has all the details as expected, - And a call [to verify Olawale's reception of the role CR-2 over the case C1] will get the expected response as in [S-105.18_Verify_Case_Roles_for_Case_C1], - And a call [to verify the count of users assigned to a case has changed] will get the expected response as in [F-105_Verify_Counter_Changed]. + @S-105.18 + Scenario: Must increment Assigned User Count when assigning a user and case role for a specific case if there was only [CREATOR] case user role assignment with the respective values in the request (by a user calling through/from an authorised application) + Given an appropriate test context as detailed in the test data source, + And a user [Richard - who can create a case], + And a user [Dil - who is to add some case role assignment for a case], + And a user [Olawale - with an active solicitor profile and valid User ID], + And a case [C1, which Richard has just] created as in [F-105_Case_Data_Create_C1], + And a successful call [to grant access for Olawale with a case role CREATOR over the case C1] as in [S-105.18_Grant_Access], + And a successful call [to check the number of users having access to C1 in its supplementary data] as in [F-105_Prerequisite_Counter_Check_Call], + When a request is prepared with appropriate values, + And the request [is made from an authorised application, by Dil, with the Case ID of C1, User ID of Olawale, proper Case Role CR-2 and the Organisation ID of Olawale], + And it is submitted to call the [Add Case-Assigned Users and Roles] operation of [CCD Data Store Api], + Then a positive response is received, + And the response has all the details as expected, + And a call [to verify Olawale's reception of the role CR-2 over the case C1] will get the expected response as in [S-105.18_Verify_Case_Roles_for_Case_C1], + And a call [to verify the count of users assigned to a case has changed] will get the expected response as in [F-105_Verify_Counter_Changed]. - # CCD-5333 AC-1 + # CCD-5333 AC-1 @S-105.19 Scenario: Must successfully set new_case attribute to false for the organisation when assigning a user and case role for a specific case (by a user calling through/from an authorised application) Given an appropriate test context as detailed in the test data source, From 13231e0477f5eaa2edb1000cca029a72d855532f Mon Sep 17 00:00:00 2001 From: hmcts-jenkins-a-to-c <62422075+hmcts-jenkins-a-to-c[bot]@users.noreply.github.com> Date: Tue, 25 Feb 2025 08:46:33 +0000 Subject: [PATCH 10/38] Bumping chart version/ fixing aliases --- charts/ccd-data-store-api/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/ccd-data-store-api/Chart.yaml b/charts/ccd-data-store-api/Chart.yaml index 57472e9844..647cada77b 100644 --- a/charts/ccd-data-store-api/Chart.yaml +++ b/charts/ccd-data-store-api/Chart.yaml @@ -2,7 +2,7 @@ description: Helm chart for the HMCTS CCD Data Store name: ccd-data-store-api apiVersion: v2 home: https://github.com/hmcts/ccd-data-store-api -version: 2.0.32 +version: 2.0.33 maintainers: - name: HMCTS CCD Dev Team email: ccd-devops@HMCTS.NET From 7b20ba69c9f1f7c47555d3587cd13debb7baf769 Mon Sep 17 00:00:00 2001 From: patelila Date: Tue, 25 Feb 2025 16:35:21 +0000 Subject: [PATCH 11/38] Modified to comment out the call to clearUserAssignedNewCase as not sure if a check is required for new_case in existent in supplementry_data. --- .../F-105_Check_NewCase_Users_Base.td.json | 9 ++++- ...5_Get_Organisation_Identifier_Base.td.json | 4 +-- ...1_Get_Organisation_Identifier_Base.td.json | 4 +-- .../caseaccess/CaseAccessOperation.java | 15 +++++++- .../caseaccess/CaseAccessOperationTest.java | 36 +++++++++---------- 5 files changed, 42 insertions(+), 26 deletions(-) diff --git a/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/common/F-105_Check_NewCase_Users_Base.td.json b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/common/F-105_Check_NewCase_Users_Base.td.json index cda99d8eee..a7083a18a7 100644 --- a/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/common/F-105_Check_NewCase_Users_Base.td.json +++ b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/common/F-105_Check_NewCase_Users_Base.td.json @@ -22,7 +22,9 @@ }, "body": { "supplementary_data_updates": { - "$set": "${[scenarioContext][customValues][new_case_siblingContexts.F-105_Prerequisite_NewCase_Check_Call.childContexts.F-105_Get_Organisation_Identifier_Olawale]}" + "$set": { + "new_case.orgID1": false + } } } }, @@ -34,6 +36,11 @@ "Content-Length": "[[ANYTHING_PRESENT]]", "Content-Type": "[[ANYTHING_PRESENT]]", "Content-Encoding": "[[ANYTHING_PRESENT]]" + }, + "body" : { + "supplementary_data" : { + "new_case.orgID1" : false + } } } } diff --git a/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/common/F-105_Get_Organisation_Identifier_Base.td.json b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/common/F-105_Get_Organisation_Identifier_Base.td.json index 3d7c9c3b81..21c4aa7696 100644 --- a/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/common/F-105_Get_Organisation_Identifier_Base.td.json +++ b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/common/F-105_Get_Organisation_Identifier_Base.td.json @@ -31,9 +31,7 @@ }, "body": { "organisationIdentifier": "[[ANYTHING_PRESENT]]", - "users": "[[ANYTHING_PRESENT]]", - "organisationStatus": "[[ANYTHING_PRESENT]]", - "organisationProfileIds": "[[ANYTHING_PRESENT]]" + "users": "[[ANYTHING_PRESENT]]" } } } diff --git a/src/aat/resources/features/F-111 - Remove Case-Assigned Users and Roles/With Organisation Context/common/common/F-111_Get_Organisation_Identifier_Base.td.json b/src/aat/resources/features/F-111 - Remove Case-Assigned Users and Roles/With Organisation Context/common/common/F-111_Get_Organisation_Identifier_Base.td.json index 8023ae15b3..a9999a1ac4 100644 --- a/src/aat/resources/features/F-111 - Remove Case-Assigned Users and Roles/With Organisation Context/common/common/F-111_Get_Organisation_Identifier_Base.td.json +++ b/src/aat/resources/features/F-111 - Remove Case-Assigned Users and Roles/With Organisation Context/common/common/F-111_Get_Organisation_Identifier_Base.td.json @@ -31,9 +31,7 @@ }, "body": { "organisationIdentifier": "[[ANYTHING_PRESENT]]", - "users": "[[ANYTHING_PRESENT]]", - "organisationStatus": "[[ANYTHING_PRESENT]]", - "organisationProfileIds": "[[ANYTHING_PRESENT]]" + "users": "[[ANYTHING_PRESENT]]" } } } diff --git a/src/main/java/uk/gov/hmcts/ccd/domain/service/caseaccess/CaseAccessOperation.java b/src/main/java/uk/gov/hmcts/ccd/domain/service/caseaccess/CaseAccessOperation.java index 47f5243f96..c6ba2f2916 100644 --- a/src/main/java/uk/gov/hmcts/ccd/domain/service/caseaccess/CaseAccessOperation.java +++ b/src/main/java/uk/gov/hmcts/ccd/domain/service/caseaccess/CaseAccessOperation.java @@ -202,7 +202,8 @@ public void addCaseUserRoles(List caseUser orgNewUserCountMap.forEach((organisationId, newUserCount) -> { supplementaryDataRepository.incrementSupplementaryData(caseReference, ORGS_ASSIGNED_USERS_PATH + organisationId, newUserCount); - clearUserAssignedNewCase(caseReference, organisationId); + //clearUserAssignedNewCase(caseReference, organisationId); + setUserAssignedNewCaseForOrganisationIdToFalse(caseReference, organisationId); }) ); } @@ -537,4 +538,16 @@ private void clearUserAssignedNewCase(String caseReference, String organisationI } } + + private void setUserAssignedNewCaseForOrganisationIdToFalse(String caseReference, String organisationId) { + // Set supplementary data new cases for organisationId to false + String orgNewCaseSupDataKey = NEW_CASE_ORG_PATH + organisationId; + try { + supplementaryDataRepository.setSupplementaryData(caseReference, + orgNewCaseSupDataKey, false); + } catch (ServiceException e) { + // do nothing + } + + } } diff --git a/src/test/java/uk/gov/hmcts/ccd/domain/service/caseaccess/CaseAccessOperationTest.java b/src/test/java/uk/gov/hmcts/ccd/domain/service/caseaccess/CaseAccessOperationTest.java index b0420e6e4b..ffbaeaac6e 100644 --- a/src/test/java/uk/gov/hmcts/ccd/domain/service/caseaccess/CaseAccessOperationTest.java +++ b/src/test/java/uk/gov/hmcts/ccd/domain/service/caseaccess/CaseAccessOperationTest.java @@ -1416,10 +1416,10 @@ void shouldClearNewCaseOrganisationForSingleNewRelationship() { // ARRANGE when(applicationParams.getEnableAttributeBasedAccessControl()).thenReturn(false); - Map responseExpected = new HashMap<>(); - responseExpected.put(getOrgUserNewCaseSupDataKey(ORGANISATION), Boolean.TRUE.toString()); + //Map responseExpected = new HashMap<>(); + //responseExpected.put(getOrgUserNewCaseSupDataKey(ORGANISATION), Boolean.TRUE.toString()); - SupplementaryData supplementaryData = new SupplementaryData(responseExpected); + //SupplementaryData supplementaryData = new SupplementaryData(responseExpected); List caseUserRoles = Lists.newArrayList( new CaseAssignedUserRoleWithOrganisation(CASE_REFERENCE.toString(), USER_ID, CASE_ROLE, ORGANISATION) @@ -1428,15 +1428,15 @@ void shouldClearNewCaseOrganisationForSingleNewRelationship() { // behave as no existing case roles mockExistingCaseUserRoles(new ArrayList<>()); - mockNewCaseForOrgUser(supplementaryData); + //mockNewCaseForOrgUser(supplementaryData); // ACT caseAccessOperation.addCaseUserRoles(caseUserRoles); // ASSERT - verify(supplementaryDataRepository, times(1)) - .findSupplementaryData(CASE_REFERENCE.toString(), - Collections.singleton(getOrgUserNewCaseSupDataKey(ORGANISATION))); + //verify(supplementaryDataRepository, times(1)) + // .findSupplementaryData(CASE_REFERENCE.toString(), + // Collections.singleton(getOrgUserNewCaseSupDataKey(ORGANISATION))); verify(supplementaryDataRepository, times(1)) .setSupplementaryData(CASE_REFERENCE.toString(), getOrgUserNewCaseSupDataKey(ORGANISATION), false); @@ -1452,7 +1452,7 @@ void shouldClearNewCaseOrganisationForMultipleNewRelationships() { List caseUserRoles = getCaseAssignedUserRoleWithOrganisations(); - SupplementaryData supplementaryData = new SupplementaryData(getExpectedSupplementaryDataForOrgNewCase()); + //SupplementaryData supplementaryData = new SupplementaryData(getExpectedSupplementaryDataForOrgNewCase()); // register existing case role mockExistingCaseUserRoles(List.of( @@ -1461,24 +1461,24 @@ void shouldClearNewCaseOrganisationForMultipleNewRelationships() { createCaseUserEntity(CASE_ID_OTHER, CASE_ROLE_OTHER, USER_ID_OTHER) )); - mockNewCaseForOrgUser(supplementaryData); + //mockNewCaseForOrgUser(supplementaryData); // ACT caseAccessOperation.addCaseUserRoles(caseUserRoles); // ASSERT // verify CASE_REFERENCE/CASE_ID - verify(supplementaryDataRepository, times(1)) - .findSupplementaryData(CASE_REFERENCE.toString(), - Collections.singleton(getOrgUserNewCaseSupDataKey(ORGANISATION))); - verify(supplementaryDataRepository, times(1)) - .findSupplementaryData(CASE_REFERENCE.toString(), - Collections.singleton(getOrgUserNewCaseSupDataKey(ORGANISATION_OTHER))); + //verify(supplementaryDataRepository, times(1)) + // .findSupplementaryData(CASE_REFERENCE.toString(), + // Collections.singleton(getOrgUserNewCaseSupDataKey(ORGANISATION))); + //verify(supplementaryDataRepository, times(1)) + // .findSupplementaryData(CASE_REFERENCE.toString(), + // Collections.singleton(getOrgUserNewCaseSupDataKey(ORGANISATION_OTHER))); // verify CASE_REFERENCE_OTHER/CASE_ID_OTHER (NB: only 1 user per org: 2nd org has no new relationships) - verify(supplementaryDataRepository, times(1)) - .findSupplementaryData(CASE_REFERENCE_OTHER.toString(), - Collections.singleton(getOrgUserNewCaseSupDataKey(ORGANISATION))); + //verify(supplementaryDataRepository, times(1)) + // .findSupplementaryData(CASE_REFERENCE_OTHER.toString(), + // Collections.singleton(getOrgUserNewCaseSupDataKey(ORGANISATION))); verify(supplementaryDataRepository, never()) // NB: never called as exiting relationship ignored .findSupplementaryData( eq(CASE_REFERENCE_OTHER.toString()), From 39856f72896530b162aa81e4d45dd84da3d6c667 Mon Sep 17 00:00:00 2001 From: patelila Date: Tue, 25 Feb 2025 16:39:22 +0000 Subject: [PATCH 12/38] revert --- .../common/F-105_Get_Organisation_Identifier_Base.td.json | 4 +++- .../common/F-111_Get_Organisation_Identifier_Base.td.json | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/common/F-105_Get_Organisation_Identifier_Base.td.json b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/common/F-105_Get_Organisation_Identifier_Base.td.json index 21c4aa7696..3d7c9c3b81 100644 --- a/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/common/F-105_Get_Organisation_Identifier_Base.td.json +++ b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/common/F-105_Get_Organisation_Identifier_Base.td.json @@ -31,7 +31,9 @@ }, "body": { "organisationIdentifier": "[[ANYTHING_PRESENT]]", - "users": "[[ANYTHING_PRESENT]]" + "users": "[[ANYTHING_PRESENT]]", + "organisationStatus": "[[ANYTHING_PRESENT]]", + "organisationProfileIds": "[[ANYTHING_PRESENT]]" } } } diff --git a/src/aat/resources/features/F-111 - Remove Case-Assigned Users and Roles/With Organisation Context/common/common/F-111_Get_Organisation_Identifier_Base.td.json b/src/aat/resources/features/F-111 - Remove Case-Assigned Users and Roles/With Organisation Context/common/common/F-111_Get_Organisation_Identifier_Base.td.json index a9999a1ac4..8023ae15b3 100644 --- a/src/aat/resources/features/F-111 - Remove Case-Assigned Users and Roles/With Organisation Context/common/common/F-111_Get_Organisation_Identifier_Base.td.json +++ b/src/aat/resources/features/F-111 - Remove Case-Assigned Users and Roles/With Organisation Context/common/common/F-111_Get_Organisation_Identifier_Base.td.json @@ -31,7 +31,9 @@ }, "body": { "organisationIdentifier": "[[ANYTHING_PRESENT]]", - "users": "[[ANYTHING_PRESENT]]" + "users": "[[ANYTHING_PRESENT]]", + "organisationStatus": "[[ANYTHING_PRESENT]]", + "organisationProfileIds": "[[ANYTHING_PRESENT]]" } } } From e497a4d05faccb38a3567d3fd155aeeed89db5a9 Mon Sep 17 00:00:00 2001 From: patelila Date: Wed, 26 Feb 2025 10:11:33 +0000 Subject: [PATCH 13/38] changes for new_case --- .../F-105 - Add Case-Assigned Users and Roles/F-105.feature | 6 +++--- .../S-105.19/S-105.19_Verify_NewCase_1.td.json | 4 ++-- .../common/F-105_Check_NewCase_Users_Base.td.json | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/F-105.feature b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/F-105.feature index 3caf9526ff..36bb27df86 100644 --- a/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/F-105.feature +++ b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/F-105.feature @@ -309,8 +309,8 @@ Feature: F-105: Add Case-Assigned Users and Roles Then a positive response is received, And the response has all the details as expected, And a call [to verify Olawale's reception of the role CR-1 and CR-2 over the case C1] will get the expected response as in [S-105.19_Verify_Case_Roles_for_Case_NewCase], - And a call [to verify newCase assigned to C1 is set to false in the supplementary data] will get the expected response as in [S-105.19_Verify_NewCase_1], + And a call [to verify newCase assigned to C1 is not set in the supplementary data] will get the expected response as in [S-105.19_Verify_NewCase_1], And a call [to repeat the same request as above] will get the expected response as in [S-105.19_Repeated_Call_to_Add_Case_Assigned_Users_and_Roles], - And a call [to verify the count of users assigned to C1 has NOT changed] will get the expected response as in [S-105.19_Verify_Counter_2], + And a call [to verify newCase organisationId assigned to C1 is set to false in the supplementary data] will get the expected response as in [S-105.19_Verify_NewCase_2], And a call [to repeat the same request as above this time with a different user, Hemanth] will get the expected response as in [S-105.19_Repeated_Call_to_Add_Case_Assigned_Users_and_Roles_Hemanth], - And a call [to verify the count of users assigned to a case has increased by 1] will get the expected response as in [S-105.19_Verify_Counter_3]. + And a call [to verify the new_case of users assigned to a case is set to false in the supplementary data] will get the expected response as in [S-105.19_Verify_NewCase_3]. diff --git a/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/S-105.19/S-105.19_Verify_NewCase_1.td.json b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/S-105.19/S-105.19_Verify_NewCase_1.td.json index efd46db284..5cdf3af93e 100644 --- a/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/S-105.19/S-105.19_Verify_NewCase_1.td.json +++ b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/S-105.19/S-105.19_Verify_NewCase_1.td.json @@ -3,12 +3,12 @@ "_extends_": "F-105_Check_NewCase_Users_Base", "specs": [ - "to verify newCase assigned to C1 is set to false in the supplementary data" + "to verify newCase assigned to C1 is not set in the supplementary data" ], "expectedResponse": { "body": { - "supplementary_data": "${[scenarioContext][customValues][new_case_siblingContexts.F-105_Prerequisite_NewCase_Check_Call.childContexts.F-105_Get_Organisation_Identifier_Olawale|siblingContexts.F-105_Prerequisite_NewCase_Check_Call|1]}" + "supplementary_data": "${[scenarioContext][customValues][siblingContexts.F-105_Prerequisite_No_NewCase_Check_Call.childContexts.F-105_Get_Organisation_Identifier_Olawale|siblingContexts.F-105_Prerequisite_No_NewCase_Check_Call|1]}" } } } diff --git a/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/common/F-105_Check_NewCase_Users_Base.td.json b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/common/F-105_Check_NewCase_Users_Base.td.json index a7083a18a7..b6b0b6b48b 100644 --- a/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/common/F-105_Check_NewCase_Users_Base.td.json +++ b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/common/F-105_Check_NewCase_Users_Base.td.json @@ -23,7 +23,7 @@ "body": { "supplementary_data_updates": { "$set": { - "new_case.orgID1": false + "new_case.QUK822N": false } } } @@ -39,7 +39,7 @@ }, "body" : { "supplementary_data" : { - "new_case.orgID1" : false + "new_case.QUK822N" : false } } } From de290c3760c8be9d5326115f5e2baa130a4ef5f7 Mon Sep 17 00:00:00 2001 From: patelila Date: Wed, 26 Feb 2025 14:47:05 +0000 Subject: [PATCH 14/38] code tidy --- .../caseaccess/CaseAccessOperation.java | 26 ----------- .../caseaccess/CaseAccessOperationTest.java | 44 ------------------- 2 files changed, 70 deletions(-) diff --git a/src/main/java/uk/gov/hmcts/ccd/domain/service/caseaccess/CaseAccessOperation.java b/src/main/java/uk/gov/hmcts/ccd/domain/service/caseaccess/CaseAccessOperation.java index c6ba2f2916..52b8ead663 100644 --- a/src/main/java/uk/gov/hmcts/ccd/domain/service/caseaccess/CaseAccessOperation.java +++ b/src/main/java/uk/gov/hmcts/ccd/domain/service/caseaccess/CaseAccessOperation.java @@ -202,7 +202,6 @@ public void addCaseUserRoles(List caseUser orgNewUserCountMap.forEach((organisationId, newUserCount) -> { supplementaryDataRepository.incrementSupplementaryData(caseReference, ORGS_ASSIGNED_USERS_PATH + organisationId, newUserCount); - //clearUserAssignedNewCase(caseReference, organisationId); setUserAssignedNewCaseForOrganisationIdToFalse(caseReference, organisationId); }) ); @@ -514,31 +513,6 @@ private void revokeRemovedCaseRoles(String userId, currentRole)); } - private void clearUserAssignedNewCase(String caseReference, String organisationId) { - // Set supplementary data new cases for organisationId to false if set to True - String orgNewCaseSupDataKey = NEW_CASE_ORG_PATH + organisationId; - try { - SupplementaryData supplementaryData = supplementaryDataRepository.findSupplementaryData(caseReference, - Collections.singleton(orgNewCaseSupDataKey)); - - if (supplementaryData == null) { - return; - } - Object newCaseOrgIdValue = supplementaryData.getResponse().getOrDefault(orgNewCaseSupDataKey, null); - if (newCaseOrgIdValue == null) { - return; - } - boolean value = Boolean.valueOf(newCaseOrgIdValue.toString()); - if (value) { - supplementaryDataRepository.setSupplementaryData(caseReference, - orgNewCaseSupDataKey, false); - } - } catch (ServiceException e) { - // do nothing - } - - } - private void setUserAssignedNewCaseForOrganisationIdToFalse(String caseReference, String organisationId) { // Set supplementary data new cases for organisationId to false String orgNewCaseSupDataKey = NEW_CASE_ORG_PATH + organisationId; diff --git a/src/test/java/uk/gov/hmcts/ccd/domain/service/caseaccess/CaseAccessOperationTest.java b/src/test/java/uk/gov/hmcts/ccd/domain/service/caseaccess/CaseAccessOperationTest.java index ffbaeaac6e..df582108b3 100644 --- a/src/test/java/uk/gov/hmcts/ccd/domain/service/caseaccess/CaseAccessOperationTest.java +++ b/src/test/java/uk/gov/hmcts/ccd/domain/service/caseaccess/CaseAccessOperationTest.java @@ -1416,11 +1416,6 @@ void shouldClearNewCaseOrganisationForSingleNewRelationship() { // ARRANGE when(applicationParams.getEnableAttributeBasedAccessControl()).thenReturn(false); - //Map responseExpected = new HashMap<>(); - //responseExpected.put(getOrgUserNewCaseSupDataKey(ORGANISATION), Boolean.TRUE.toString()); - - //SupplementaryData supplementaryData = new SupplementaryData(responseExpected); - List caseUserRoles = Lists.newArrayList( new CaseAssignedUserRoleWithOrganisation(CASE_REFERENCE.toString(), USER_ID, CASE_ROLE, ORGANISATION) ); @@ -1428,15 +1423,10 @@ void shouldClearNewCaseOrganisationForSingleNewRelationship() { // behave as no existing case roles mockExistingCaseUserRoles(new ArrayList<>()); - //mockNewCaseForOrgUser(supplementaryData); - // ACT caseAccessOperation.addCaseUserRoles(caseUserRoles); // ASSERT - //verify(supplementaryDataRepository, times(1)) - // .findSupplementaryData(CASE_REFERENCE.toString(), - // Collections.singleton(getOrgUserNewCaseSupDataKey(ORGANISATION))); verify(supplementaryDataRepository, times(1)) .setSupplementaryData(CASE_REFERENCE.toString(), getOrgUserNewCaseSupDataKey(ORGANISATION), false); @@ -1452,8 +1442,6 @@ void shouldClearNewCaseOrganisationForMultipleNewRelationships() { List caseUserRoles = getCaseAssignedUserRoleWithOrganisations(); - //SupplementaryData supplementaryData = new SupplementaryData(getExpectedSupplementaryDataForOrgNewCase()); - // register existing case role mockExistingCaseUserRoles(List.of( // ** CASE_REFERENCE_OTHER + USER_ID_OTHER as exiting relationship @@ -1461,24 +1449,10 @@ void shouldClearNewCaseOrganisationForMultipleNewRelationships() { createCaseUserEntity(CASE_ID_OTHER, CASE_ROLE_OTHER, USER_ID_OTHER) )); - //mockNewCaseForOrgUser(supplementaryData); - // ACT caseAccessOperation.addCaseUserRoles(caseUserRoles); // ASSERT - // verify CASE_REFERENCE/CASE_ID - //verify(supplementaryDataRepository, times(1)) - // .findSupplementaryData(CASE_REFERENCE.toString(), - // Collections.singleton(getOrgUserNewCaseSupDataKey(ORGANISATION))); - //verify(supplementaryDataRepository, times(1)) - // .findSupplementaryData(CASE_REFERENCE.toString(), - // Collections.singleton(getOrgUserNewCaseSupDataKey(ORGANISATION_OTHER))); - - // verify CASE_REFERENCE_OTHER/CASE_ID_OTHER (NB: only 1 user per org: 2nd org has no new relationships) - //verify(supplementaryDataRepository, times(1)) - // .findSupplementaryData(CASE_REFERENCE_OTHER.toString(), - // Collections.singleton(getOrgUserNewCaseSupDataKey(ORGANISATION))); verify(supplementaryDataRepository, never()) // NB: never called as exiting relationship ignored .findSupplementaryData( eq(CASE_REFERENCE_OTHER.toString()), @@ -2712,22 +2686,4 @@ private List getCaseAssignedUserRoleWithOr ); } - - private Map getExpectedSupplementaryDataForOrgNewCase() { - Map expectedSupplementaryData = new HashMap<>(); - expectedSupplementaryData.put(getOrgUserCountSupDataKey(ORGANISATION), Boolean.TRUE.toString()); - expectedSupplementaryData.put(getOrgUserCountSupDataKey(ORGANISATION_OTHER), Boolean.TRUE.toString()); - return expectedSupplementaryData; - } - - private OngoingStubbing mockNewCaseForOrgUser( - SupplementaryData existingSupplementaryData - ) { - return when(supplementaryDataRepository.findSupplementaryData( - argThat(arg -> arg.contains(CASE_REFERENCE.toString()) - || arg.contains(CASE_REFERENCE_OTHER.toString())), - argThat(arg -> arg.contains(getOrgUserNewCaseSupDataKey(ORGANISATION)) - || arg.isEmpty())) - ).thenReturn(existingSupplementaryData); - } } From 836a11f466869a5ead756ccc03deb73137861892 Mon Sep 17 00:00:00 2001 From: patelila Date: Wed, 26 Feb 2025 15:23:38 +0000 Subject: [PATCH 15/38] checkstyle error --- .../ccd/domain/service/caseaccess/CaseAccessOperation.java | 2 -- .../ccd/domain/service/caseaccess/CaseAccessOperationTest.java | 1 - 2 files changed, 3 deletions(-) diff --git a/src/main/java/uk/gov/hmcts/ccd/domain/service/caseaccess/CaseAccessOperation.java b/src/main/java/uk/gov/hmcts/ccd/domain/service/caseaccess/CaseAccessOperation.java index 52b8ead663..a21730b898 100644 --- a/src/main/java/uk/gov/hmcts/ccd/domain/service/caseaccess/CaseAccessOperation.java +++ b/src/main/java/uk/gov/hmcts/ccd/domain/service/caseaccess/CaseAccessOperation.java @@ -20,7 +20,6 @@ import uk.gov.hmcts.ccd.domain.model.definition.CaseDetails; import uk.gov.hmcts.ccd.domain.model.std.CaseAssignedUserRole; import uk.gov.hmcts.ccd.domain.model.std.CaseAssignedUserRoleWithOrganisation; -import uk.gov.hmcts.ccd.domain.model.std.SupplementaryData; import uk.gov.hmcts.ccd.domain.service.casedataaccesscontrol.RoleAssignmentService; import uk.gov.hmcts.ccd.domain.service.common.NewCaseUtils; import uk.gov.hmcts.ccd.domain.service.getcase.CaseNotFoundException; @@ -29,7 +28,6 @@ import uk.gov.hmcts.ccd.v2.external.domain.CaseUser; import java.util.ArrayList; -import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; diff --git a/src/test/java/uk/gov/hmcts/ccd/domain/service/caseaccess/CaseAccessOperationTest.java b/src/test/java/uk/gov/hmcts/ccd/domain/service/caseaccess/CaseAccessOperationTest.java index df582108b3..1b6a59842e 100644 --- a/src/test/java/uk/gov/hmcts/ccd/domain/service/caseaccess/CaseAccessOperationTest.java +++ b/src/test/java/uk/gov/hmcts/ccd/domain/service/caseaccess/CaseAccessOperationTest.java @@ -26,7 +26,6 @@ import uk.gov.hmcts.ccd.domain.model.definition.CaseDetails; import uk.gov.hmcts.ccd.domain.model.std.CaseAssignedUserRole; import uk.gov.hmcts.ccd.domain.model.std.CaseAssignedUserRoleWithOrganisation; -import uk.gov.hmcts.ccd.domain.model.std.SupplementaryData; import uk.gov.hmcts.ccd.domain.service.casedataaccesscontrol.RoleAssignmentCategoryService; import uk.gov.hmcts.ccd.domain.service.casedataaccesscontrol.RoleAssignmentService; import uk.gov.hmcts.ccd.domain.service.common.NewCaseUtils; From 956cffa9ef4dff4307e59bf88798ce080167c426 Mon Sep 17 00:00:00 2001 From: patelila Date: Thu, 27 Feb 2025 11:09:52 +0000 Subject: [PATCH 16/38] add missing files --- ..._Add_Case_Assigned_Users_and_Roles.td.json | 37 +++++++++++++++++ ...e_Assigned_Users_and_Roles_Hemanth.td.json | 41 +++++++++++++++++++ .../S-105.19_Verify_NewCase_2.td.json | 14 +++++++ .../S-105.19_Verify_NewCase_3.td.json | 14 +++++++ .../F-105_Check_No_NewCase_Users_Base.td.json | 38 +++++++++++++++++ ...Prerequisite_No_NewCase_Check_Call.td.json | 18 ++++++++ 6 files changed, 162 insertions(+) create mode 100644 src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/S-105.19/S-105.19_Repeated_Call_to_Add_Case_Assigned_Users_and_Roles.td.json create mode 100644 src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/S-105.19/S-105.19_Repeated_Call_to_Add_Case_Assigned_Users_and_Roles_Hemanth.td.json create mode 100644 src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/S-105.19/S-105.19_Verify_NewCase_2.td.json create mode 100644 src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/S-105.19/S-105.19_Verify_NewCase_3.td.json create mode 100644 src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/common/F-105_Check_No_NewCase_Users_Base.td.json create mode 100644 src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/common/F-105_Prerequisite_No_NewCase_Check_Call.td.json diff --git a/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/S-105.19/S-105.19_Repeated_Call_to_Add_Case_Assigned_Users_and_Roles.td.json b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/S-105.19/S-105.19_Repeated_Call_to_Add_Case_Assigned_Users_and_Roles.td.json new file mode 100644 index 0000000000..4224b64a9c --- /dev/null +++ b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/S-105.19/S-105.19_Repeated_Call_to_Add_Case_Assigned_Users_and_Roles.td.json @@ -0,0 +1,37 @@ +{ + "_guid_": "S-105.19_Repeated_Call_to_Add_Case_Assigned_Users_and_Roles", + "_extends_": "F-105_Add_Case_Assigned_User_Roles_Base", + + "specs": [ + "to repeat the same request as above" + ], + + "users": { + "invokingUser": { + "_extends_": "F-105_User_Dil" + } + }, + + "request": { + "body": { + "case_users": [ + { + "case_id": "${[scenarioContext][siblingContexts][F-105_CreateCasePreRequisiteCaseworker][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][parentContext][testData][users][userOlawale][id]}", + "case_role": "[CR-1]", + "organisation_id": "${[scenarioContext][siblingContexts][F-105_Prerequisite_NewCase_Check_Call][childContexts][F-105_Get_Organisation_Identifier_Olawale][testData][actualResponse][body][organisationIdentifier]}" + }, + { + "case_id": "${[scenarioContext][siblingContexts][F-105_CreateCasePreRequisiteCaseworker][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][parentContext][testData][users][userOlawale][id]}", + "case_role": "[CR-2]", + "organisation_id": "${[scenarioContext][siblingContexts][F-105_Prerequisite_NewCase_Check_Call][childContexts][F-105_Get_Organisation_Identifier_Olawale][testData][actualResponse][body][organisationIdentifier]}" + } + ] + } + }, + + "expectedResponse": { + "_extends_": "F-105_Add_Case_Assigned_User_Roles_201_response" + } +} diff --git a/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/S-105.19/S-105.19_Repeated_Call_to_Add_Case_Assigned_Users_and_Roles_Hemanth.td.json b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/S-105.19/S-105.19_Repeated_Call_to_Add_Case_Assigned_Users_and_Roles_Hemanth.td.json new file mode 100644 index 0000000000..8e114be0c4 --- /dev/null +++ b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/S-105.19/S-105.19_Repeated_Call_to_Add_Case_Assigned_Users_and_Roles_Hemanth.td.json @@ -0,0 +1,41 @@ +{ + "_guid_": "S-105.19_Repeated_Call_to_Add_Case_Assigned_Users_and_Roles_Hemanth", + "_extends_": "F-105_Add_Case_Assigned_User_Roles_Base", + + "specs": [ + "to repeat the same request as above this time with a different user, Hemanth" + ], + + "users": { + "invokingUser": { + "_extends_": "F-105_User_Dil" + } + }, + + "prerequisites": [ + "F-105_Get_Organisation_Identifier_Hemanth" + ], + + "request": { + "body": { + "case_users": [ + { + "case_id": "${[scenarioContext][siblingContexts][F-105_CreateCasePreRequisiteCaseworker][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][parentContext][testData][users][userHemanth][id]}", + "case_role": "[CR-1]", + "organisation_id": "${[scenarioContext][childContexts][F-105_Get_Organisation_Identifier_Hemanth][testData][actualResponse][body][organisationIdentifier]}" + }, + { + "case_id": "${[scenarioContext][siblingContexts][F-105_CreateCasePreRequisiteCaseworker][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][parentContext][testData][users][userHemanth][id]}", + "case_role": "[CR-2]", + "organisation_id": "${[scenarioContext][childContexts][F-105_Get_Organisation_Identifier_Hemanth][testData][actualResponse][body][organisationIdentifier]}" + } + ] + } + }, + + "expectedResponse": { + "_extends_": "F-105_Add_Case_Assigned_User_Roles_201_response" + } +} diff --git a/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/S-105.19/S-105.19_Verify_NewCase_2.td.json b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/S-105.19/S-105.19_Verify_NewCase_2.td.json new file mode 100644 index 0000000000..ab95111478 --- /dev/null +++ b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/S-105.19/S-105.19_Verify_NewCase_2.td.json @@ -0,0 +1,14 @@ +{ + "_guid_": "S-105.19_Verify_NewCase_2", + "_extends_": "F-105_Check_NewCase_Users_Base", + + "specs": [ + "to verify newCase organisationId assigned to C1 is set to false in the supplementary data" + ], + + "expectedResponse": { + "body": { + "supplementary_data": "${[scenarioContext][customValues]siblingContexts.F-105_Prerequisite_NewCase_Check_Call.childContexts.F-105_Get_Organisation_Identifier_Olawale|siblingContexts.S-105\\.19_Verify_NewCase_1|0]}" + } + } +} diff --git a/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/S-105.19/S-105.19_Verify_NewCase_3.td.json b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/S-105.19/S-105.19_Verify_NewCase_3.td.json new file mode 100644 index 0000000000..2ffd7ecfae --- /dev/null +++ b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/S-105.19/S-105.19_Verify_NewCase_3.td.json @@ -0,0 +1,14 @@ +{ + "_guid_": "S-105.19_Verify_NewCase_3", + "_extends_": "F-105_Check_NewCase_Users_Base", + + "specs": [ + "to verify the new_case of users assigned to a case is set to false in the supplementary data" + ], + + "expectedResponse": { + "body": { + "supplementary_data": "${[scenarioContext][customValues][new_case_siblingContexts.F-105_Prerequisite_NewCase_Check_Call.childContexts.F-105_Get_Organisation_Identifier_Olawale|siblingContexts.S-105\\.19_Verify_NewCase_2|1]}" + } + } +} diff --git a/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/common/F-105_Check_No_NewCase_Users_Base.td.json b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/common/F-105_Check_No_NewCase_Users_Base.td.json new file mode 100644 index 0000000000..746743f82d --- /dev/null +++ b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/common/F-105_Check_No_NewCase_Users_Base.td.json @@ -0,0 +1,38 @@ +{ + "title": "Check new_case_users in supplementry data", + + "_guid_": "F-105_Check_No_NewCase_Users_Base", + + "productName": "CCD Data Store", + "operationName": "New Case in Supplementary Data", + + "method": "POST", + "uri": "/cases/{cid}/supplementary-data", + + "users": { + "invokingUser": { + "_extends_": "BeftaCaseworkerCaa" + } + }, + + "request": { + "_extends_": "Common_Request", + "pathVariables": { + "cid": "${[scenarioContext][siblingContexts][F-105_CreateCasePreRequisiteCaseworker][testData][actualResponse][body][id]}" + }, + "body": { + } + }, + + "expectedResponse": { + "_extends_": "Common_200_Response", + "headers": { + "_extends_": "Common_Response_Headers", + "Content-Length": "[[ANYTHING_PRESENT]]", + "Content-Type": "[[ANYTHING_PRESENT]]", + "Content-Encoding": "[[ANYTHING_PRESENT]]" + }, + "body" : { + } + } +} diff --git a/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/common/F-105_Prerequisite_No_NewCase_Check_Call.td.json b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/common/F-105_Prerequisite_No_NewCase_Check_Call.td.json new file mode 100644 index 0000000000..b86cf27a60 --- /dev/null +++ b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/common/F-105_Prerequisite_No_NewCase_Check_Call.td.json @@ -0,0 +1,18 @@ +{ + "_guid_": "F-105_Prerequisite_No_NewCase_Check_Call", + "_extends_": "F-105_Check_No_NewCase_Users_Base", + + "specs": [ + "to check the number of users having access to C1 is not in supplementary data" + ], + + "prerequisites": [ + "F-105_Get_Organisation_Identifier_Olawale" + ], + + "expectedResponse": { + "body": { + "supplementary_data": "[[ANYTHING_PRESENT]]" + } + } +} From b801e6b54d74b8ccfe0d3ddc9cefc2f60f40c1f6 Mon Sep 17 00:00:00 2001 From: patelila Date: Mon, 3 Mar 2025 17:35:15 +0000 Subject: [PATCH 17/38] Funtional test for CCD-5330 --- build.gradle | 2 +- .../F-143.feature | 63 + .../F-143_Add_Supplementary_Data.td.json | 35 + ...3_CreateCasePreRequisiteCaseworker.td.json | 70 ++ .../S-143.1.td.json | 81 ++ .../S-143.2.td.json | 1034 +++++++++++++++++ .../S-143.3.td.json | 126 ++ 7 files changed, 1410 insertions(+), 1 deletion(-) create mode 100644 src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/F-143.feature create mode 100644 src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/F-143_Add_Supplementary_Data.td.json create mode 100644 src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/F-143_CreateCasePreRequisiteCaseworker.td.json create mode 100644 src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/S-143.1.td.json create mode 100644 src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/S-143.2.td.json create mode 100644 src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/S-143.3.td.json diff --git a/build.gradle b/build.gradle index 9b1b4a97a4..6dc16967e4 100644 --- a/build.gradle +++ b/build.gradle @@ -35,7 +35,7 @@ ext['spring-security.version'] = '5.7.11' ext['spring-framework.version'] = '5.3.27' ext['jackson.version'] = '2.16.0' ext['beftaFwVersion'] = '9.2.1' -ext['ccdTestDefinitionVersion'] = '7.26.1' +ext['ccdTestDefinitionVersion'] = '7.26.0-prerelease-CCD-5329' configurations { compileClasspath { diff --git a/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/F-143.feature b/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/F-143.feature new file mode 100644 index 0000000000..e2f5f733e4 --- /dev/null +++ b/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/F-143.feature @@ -0,0 +1,63 @@ +@F-143 @elasticsearch +Feature: F-143 Additional supplementary data property returned by ES Search APIs + + Background: Load test data for the scenario + Given an appropriate test context as detailed in the test data source + And a case that has just been created as in [F-143_CreateCasePreRequisiteCaseworker] + And a successful call [to add supplementary data for the case] as in [F-143_Add_Supplementary_Data] + And a wait time of [5] seconds [to allow for Logstash to index the case just created], + And a user with [a valid profile] + + @S-143.1 @Smoke @Ignore + Scenario: external search api returns supplementary data by default + Given the request [is configured to search for the previously created case], + And the request [does not explicitly request supplementary_data] + And a request is prepared with appropriate values, + When it is submitted to call the [External Elastic Search Endpoint] operation of [CCD Data Store Elastic Search API], + Then the response [contains the previously created case], + Then the response [contains supplementary data], + And the response has all other details as expected. + + @S-143.2 @Ignore + Scenario: standard internal search api returns supplementary data by default + Given the request [is configured to search for the previously created case], + And the request [does not explicitly request supplementary_data] + And a request is prepared with appropriate values, + When it is submitted to call the [Internal Elastic Search Endpoint] operation of [CCD Data Store Elastic Search API], + Then the response [contains the previously created case], + Then the response [contains supplementary data], + And the response has all other details as expected. + + @S-143.3 + Scenario: internal search api usecase request does not return supplementary data by default + Given the request [is configured to search for the previously created case], + And the request [does not explicitly request supplementary_data] + And the request [is using the query parameter use_case=orgcases], + And a request is prepared with appropriate values, + When it is submitted to call the [Internal Elastic Search Endpoint] operation of [CCD Data Store Elastic Search API], + Then the response [contains the previously created case], + Then the response [contains supplementary data], + And the response has all other details as expected. + + @S-143.4 + Scenario: internal search api usecase request does return supplementary data when requested in the request + Given the request [is configured to search for the previously created case], + And the request [is configured to request supplementary_data] + And the request [is using the query parameter use_case=orgcases], + And a request is prepared with appropriate values, + When it is submitted to call the [Internal Elastic Search Endpoint] operation of [CCD Data Store Elastic Search API], + Then the response [contains the previously created case], + Then the response [contains supplementary data], + And the response has all other details as expected. + + @S-143.5 + Scenario: can request sub selection of supplementary data + Given a user with [a valid profile] + When the request [is configured to search for the previously created case], + And the request [requests a subsection of the supplementary data] + And a request is prepared with appropriate values, + And it is submitted to call the [External Elastic Search Endpoint] operation of [CCD Data Store Elastic Search API], + Then the response [contains the previously created case], + Then the response [contains the specified sub section of supplementary data], + And the response has all other details as expected. + diff --git a/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/F-143_Add_Supplementary_Data.td.json b/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/F-143_Add_Supplementary_Data.td.json new file mode 100644 index 0000000000..05b642d53f --- /dev/null +++ b/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/F-143_Add_Supplementary_Data.td.json @@ -0,0 +1,35 @@ +{ + "_guid_": "F-143_Add_Supplementary_Data", + "title": "Update Supplementary Data Base", + "productName": "CCD Data Store", + "operationName": "Update Supplementary Data", + "method": "POST", + "uri": "/cases/{caseId}/supplementary-data", + "specs": ["to add supplementary data for the case"], + "users": { + "invokingUser": { + "_extends_": "BeftaCaseworkerCaa" + } + }, + "request": { + "_extends_": "Common_Request", + "pathVariables": { + "caseId": "${[scenarioContext][parentContext][childContexts][F-143_CreateCasePreRequisiteCaseworker][testData][actualResponse][body][id]}" + }, + "body": { + "supplementary_data_updates": { + "$set": { + "new_case.orgID1": true + } + } + } + }, + "expectedResponse": { + "_extends_": "Common_200_Response", + "body": { + "supplementary_data": { + "new_case.orgID1": true + } + } + } +} diff --git a/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/F-143_CreateCasePreRequisiteCaseworker.td.json b/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/F-143_CreateCasePreRequisiteCaseworker.td.json new file mode 100644 index 0000000000..ffae3285b7 --- /dev/null +++ b/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/F-143_CreateCasePreRequisiteCaseworker.td.json @@ -0,0 +1,70 @@ +{ + "_guid_": "F-143_CreateCasePreRequisiteCaseworker", + "_extends_": "Case_Creation_Data_Base", + "specs": [ + "to create a case", + "As a prerequisite" + ], + + "prerequisites" : [ { + "Token_Creation": "S-143_GetCreateToken" + } + ], + + "users": { + "invokingUser": { + "_extends_": "BeftaMasterCaseworker" + } + }, + "request": { + "pathVariables": { + "jid": "BEFTA_MASTER", + "ctid": "FT_NewCaseSupplementry" + }, + "body": { + "data": { + "OrganisationPolicyField": { + "newCase": "Yes", + "Organisation": { + "OrganisationID": "orgID1", + "OrganisationName": "orgName1" + } + } + }, + "event": { + "id": "createCase", + "summary": "", + "description": "" + }, + "event_token": "${[scenarioContext][childContexts][Token_Creation][testData][actualResponse][body][token]}" + } + }, + + "expectedResponse": { + "body": { + "id": "[[ANYTHING_PRESENT]]", + "jurisdiction": "BEFTA_MASTER", + "state" : "CaseCreated", + "case_type_id": "FT_NewCaseSupplementry", + "created_date": "[[ANYTHING_PRESENT]]", + "last_modified": "[[ANYTHING_PRESENT]]", + "last_state_modified_date": "[[ANYTHING_PRESENT]]", + "security_classification": "PUBLIC", + "case_data": { + "OrganisationPolicyField": { + "Organisation": { + "OrganisationID": "orgID1", + "OrganisationName": "orgName1" + } + } + }, + "data_classification": { + }, + "supplementary_data" : { + "new_case" : { + "orgID1" : "true" + } + } + } + } +} diff --git a/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/S-143.1.td.json b/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/S-143.1.td.json new file mode 100644 index 0000000000..74b04c305b --- /dev/null +++ b/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/S-143.1.td.json @@ -0,0 +1,81 @@ +{ + "_guid_": "S-143.1", + "title": "External Elastic Search Endpoint", + "productName": "CCD Data Store Elastic Search API", + "operationName": "External Elastic Search Endpoint", + "method": "POST", + "uri": "/searchCases", + "specs": [ + "a valid profile", + "is configured to search for the previously created case", + "does not explicitly request supplementary_data", + "contains the previously created case", + "contains supplementary data" + ], + "user" : { + "_extends_": "BeftaMasterCaseworker" + }, + "request": { + "_extends_": "Common_Request", + "queryParams": { + "ctid": "FT_NewCaseSupplementry" + }, + "body": { + "native_es_query" : { + "query": { + "match": { + "reference": "${[scenarioContext][childContexts][F-143_CreateCasePreRequisiteCaseworker][testData][actualResponse][body][id]}" + } + } + } + } + }, + + "expectedResponse": { + "_extends_": "Common_200_Response", + "body": { + "total": 1, + "cases": [{ + "id": "${[scenarioContext][customValues][caseIdAsIntegerFrom_F-143_CreateCasePreRequisiteCaseworker]}", + "jurisdiction": "BEFTA_MASTER", + "state": "TODO", + "version": null, + "case_type_id": "FT_NewCaseSupplementry", + "created_date": "[[ANYTHING_PRESENT]]", + "last_modified": "[[ANYTHING_PRESENT]]", + "last_state_modified_date": "[[ANYTHING_PRESENT]]", + "security_classification": "PRIVATE", + "case_data": { + "OrganisationPolicyField": { + "Organisation": { + "OrganisationID": "orgID1", + "OrganisationName": "orgName1" + } + } + }, + "data_classification": "[[ANYTHING_PRESENT]]", + "supplementary_data": { + "new_case": + { + "orgID1": "true" + } + }, + "after_submit_callback_response": null, + "callback_response_status_code": null, + "callback_response_status": null, + "delete_draft_response_status_code": null, + "delete_draft_response_status": null, + "data_classification": "[[ANYTHING_PRESENT]]", + "supplementary_data" : { + "new_case" : { + "orgID1" : "true" + } + } + }], + "case_types_results" : [{ + "total" : 1, + "case_type_id" : "FT_NewCaseSupplementry" + }] + } + } +} diff --git a/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/S-143.2.td.json b/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/S-143.2.td.json new file mode 100644 index 0000000000..6821ee0b91 --- /dev/null +++ b/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/S-143.2.td.json @@ -0,0 +1,1034 @@ +{ + "_guid_": "S-143.2", + "title": "External Elastic Search Endpoint", + "productName": "CCD Data Store Elastic Search API", + "operationName": "Internal Elastic Search Endpoint", + "method": "POST", + "uri": "/internal/searchCases", + "user" : { + "_extends_": "BeftaMasterCaseworker" + }, + "specs": [ + "a valid profile", + "is configured to search for the previously created case", + "does not explicitly request supplementary_data", + "contains the previously created case", + "contains supplementary data" + ], + "request": { + "_extends_": "Common_Request", + "queryParams": { + "ctid": "FT_NewCaseSupplementry" + }, + "body": { + "native_es_query": { + "query": { + "match": { + "reference": "${[scenarioContext][childContexts][F-143_CreateCasePreRequisiteCaseworker][testData][actualResponse][body][id]}" + } + } + } + } + }, + + "expectedResponse": { + "_extends_": "Common_200_Response", + "body": { + "headers" : [ + { + "metadata" : { + "jurisdiction" : "BEFTA_MASTER", + "case_type_id" : "FT_NewCaseSupplementry" + }, + "fields" : [ + { + "__ordering__": "unordered", + "__elementId__": "label" + }, + { + "label" : "State", + "order" : null, + "metadata" : true, + "case_field_id" : "[STATE]", + "case_field_type" : { + "id" : "FixedList-FT_NewCaseSupplementry[STATE]", + "type" : "FixedList", + "min" : null, + "max" : null, + "regular_expression" : null, + "fixed_list_items" : [ { + "code" : "DONE", + "label" : "Done", + "order" : null + }, { + "code" : "IN_PROGRESS", + "label" : "In progress", + "order" : null + }, { + "code" : "TODO", + "label" : "To do", + "order" : null + } ], + "complex_fields" : [ ], + "collection_field_type" : null + }, + "display_context_parameter" : null + }, + { + "label" : "A `AddressUK` field", + "order" : null, + "metadata" : false, + "case_field_id" : "AddressUKField", + "case_field_type" : { + "id" : "AddressUK", + "type" : "Complex", + "min" : null, + "max" : null, + "regular_expression" : null, + "fixed_list_items" : [ ], + "complex_fields" : [ + { + "__ordering__": "unordered" + },{ + "id" : "AddressLine1", + "label" : "Building and Street", + "hidden" : null, + "order" : null, + "metadata" : false, + "case_type_id" : null, + "hint_text" : null, + "field_type" : { + "id" : "TextMax150", + "type" : "Text", + "min" : null, + "max" : 150, + "regular_expression" : null, + "fixed_list_items" : [ ], + "complex_fields" : [ ], + "collection_field_type" : null + }, + "security_classification" : "PUBLIC", + "live_from" : null, + "live_until" : null, + "show_condition" : null, + "acls" : [ { + "_extends_": "CaseworkerAutotest1PrivateAccessControlList" + }, { + "_extends_": "CaseworkerAutotest1SeniorAccessControlList" + }, { + "_extends_": "CaseworkerAutotest1SolicitorAccessControlList" + },{ + "_extends_": "DefendantAccessControlList" + } ], + "complexACLs" : [ ], + "display_context" : null, + "display_context_parameter" : null, + "retain_hidden_value" : null, + "formatted_value" : null + }, { + "id" : "AddressLine2", + "label" : "Address Line 2", + "hidden" : null, + "order" : null, + "metadata" : false, + "case_type_id" : null, + "hint_text" : null, + "field_type" : { + "id" : "TextMax50", + "type" : "Text", + "min" : null, + "max" : 50, + "regular_expression" : null, + "fixed_list_items" : [ ], + "complex_fields" : [ ], + "collection_field_type" : null + }, + "security_classification" : "PUBLIC", + "live_from" : null, + "live_until" : null, + "show_condition" : null, + "acls" : [ { + "_extends_": "CaseworkerAutotest1PrivateAccessControlList" + }, { + "_extends_": "CaseworkerAutotest1SeniorAccessControlList" + }, { + "_extends_": "CaseworkerAutotest1SolicitorAccessControlList" + },{ + "_extends_": "DefendantAccessControlList" + } ], + "complexACLs" : [ ], + "display_context" : null, + "display_context_parameter" : null, + "retain_hidden_value" : null, + "formatted_value" : null + }, { + "id" : "AddressLine3", + "label" : "Address Line 3", + "hidden" : null, + "order" : null, + "metadata" : false, + "case_type_id" : null, + "hint_text" : null, + "field_type" : { + "id" : "TextMax50", + "type" : "Text", + "min" : null, + "max" : 50, + "regular_expression" : null, + "fixed_list_items" : [ ], + "complex_fields" : [ ], + "collection_field_type" : null + }, + "security_classification" : "PUBLIC", + "live_from" : null, + "live_until" : null, + "show_condition" : null, + "acls" : [ { + "_extends_": "CaseworkerAutotest1PrivateAccessControlList" + }, { + "_extends_": "CaseworkerAutotest1SeniorAccessControlList" + }, { + "_extends_": "CaseworkerAutotest1SolicitorAccessControlList" + },{ + "_extends_": "DefendantAccessControlList" + } ], + "complexACLs" : [ ], + "display_context" : null, + "display_context_parameter" : null, + "retain_hidden_value" : null, + "formatted_value" : null + }, { + "id" : "PostTown", + "label" : "Town or City", + "hidden" : null, + "order" : null, + "metadata" : false, + "case_type_id" : null, + "hint_text" : null, + "field_type" : { + "id" : "TextMax50", + "type" : "Text", + "min" : null, + "max" : 50, + "regular_expression" : null, + "fixed_list_items" : [ ], + "complex_fields" : [ ], + "collection_field_type" : null + }, + "security_classification" : "PUBLIC", + "live_from" : null, + "live_until" : null, + "show_condition" : null, + "acls" : [ { + "_extends_": "CaseworkerAutotest1PrivateAccessControlList" + }, { + "_extends_": "CaseworkerAutotest1SeniorAccessControlList" + }, { + "_extends_": "CaseworkerAutotest1SolicitorAccessControlList" + },{ + "_extends_": "DefendantAccessControlList" + }], + "complexACLs" : [ ], + "display_context" : null, + "display_context_parameter" : null, + "retain_hidden_value" : null, + "formatted_value" : null + }, { + "id" : "County", + "label" : "County", + "hidden" : null, + "order" : null, + "metadata" : false, + "case_type_id" : null, + "hint_text" : null, + "field_type" : { + "id" : "TextMax50", + "type" : "Text", + "min" : null, + "max" : 50, + "regular_expression" : null, + "fixed_list_items" : [ ], + "complex_fields" : [ ], + "collection_field_type" : null + }, + "security_classification" : "PUBLIC", + "live_from" : null, + "live_until" : null, + "show_condition" : null, + "acls" : [ { + "_extends_": "CaseworkerAutotest1PrivateAccessControlList" + }, { + "_extends_": "CaseworkerAutotest1SeniorAccessControlList" + }, { + "_extends_": "CaseworkerAutotest1SolicitorAccessControlList" + },{ + "_extends_": "DefendantAccessControlList" + } ], + "complexACLs" : [ ], + "display_context" : null, + "display_context_parameter" : null, + "retain_hidden_value" : null, + "formatted_value" : null + }, { + "id" : "PostCode", + "label" : "Postcode/Zipcode", + "hidden" : null, + "order" : null, + "metadata" : false, + "case_type_id" : null, + "hint_text" : null, + "field_type" : { + "id" : "TextMax14", + "type" : "Text", + "min" : null, + "max" : 14, + "regular_expression" : null, + "fixed_list_items" : [ ], + "complex_fields" : [ ], + "collection_field_type" : null + }, + "security_classification" : "PUBLIC", + "live_from" : null, + "live_until" : null, + "show_condition" : null, + "acls" : [ { + "_extends_": "CaseworkerAutotest1PrivateAccessControlList" + }, { + "_extends_": "CaseworkerAutotest1SeniorAccessControlList" + }, { + "_extends_": "CaseworkerAutotest1SolicitorAccessControlList" + },{ + "_extends_": "DefendantAccessControlList" + } ], + "complexACLs" : [ ], + "display_context" : null, + "display_context_parameter" : null, + "retain_hidden_value" : null, + "formatted_value" : null + }, { + "id" : "Country", + "label" : "Country", + "hidden" : null, + "order" : null, + "metadata" : false, + "case_type_id" : null, + "hint_text" : null, + "field_type" : { + "id" : "TextMax50", + "type" : "Text", + "min" : null, + "max" : 50, + "regular_expression" : null, + "fixed_list_items" : [ ], + "complex_fields" : [ ], + "collection_field_type" : null + }, + "security_classification" : "PUBLIC", + "live_from" : null, + "live_until" : null, + "show_condition" : null, + "acls" : [ { + "_extends_": "CaseworkerAutotest1PrivateAccessControlList" + }, { + "_extends_": "CaseworkerAutotest1SeniorAccessControlList" + }, { + "_extends_": "CaseworkerAutotest1SolicitorAccessControlList" + },{ + "_extends_": "DefendantAccessControlList" + } ], + "complexACLs" : [ ], + "display_context" : null, + "display_context_parameter" : null, + "retain_hidden_value" : null, + "formatted_value" : null + } ], + "collection_field_type" : null + }, + "display_context_parameter" : null + }, + { + "label" : "A `Complex` field", + "order" : null, + "metadata" : false, + "case_field_id" : "ComplexField", + "case_field_type" : { + "id" : "ComplexType", + "type" : "Complex", + "min" : null, + "max" : null, + "regular_expression" : null, + "fixed_list_items" : [ ], + "complex_fields" : [ + { + "__ordering__": "unordered" + },{ + "id" : "ComplexTextField", + "label" : "A `Text` field inside a complex", + "hidden" : false, + "order" : null, + "metadata" : false, + "case_type_id" : null, + "hint_text" : null, + "field_type" : { + "id" : "Text", + "type" : "Text", + "min" : null, + "max" : null, + "regular_expression" : null, + "fixed_list_items" : [ ], + "complex_fields" : [ ], + "collection_field_type" : null + }, + "security_classification" : "PRIVATE", + "live_from" : null, + "live_until" : null, + "show_condition" : null, + "acls" : [ { + "_extends_": "CaseworkerAutotest1PrivateAccessControlList" + }, { + "_extends_": "CaseworkerAutotest1SeniorAccessControlList" + }, { + "_extends_": "CaseworkerAutotest1SolicitorAccessControlList" + },{ + "_extends_": "DefendantAccessControlList" + } ], + "complexACLs" : [ ], + "display_context" : null, + "display_context_parameter" : null, + "retain_hidden_value" : null, + "formatted_value" : null + }, { + "id" : "ComplexFixedListField", + "label" : "A `FixedList` field inside a complex", + "hidden" : false, + "order" : null, + "metadata" : false, + "case_type_id" : null, + "hint_text" : null, + "field_type" : { + "id" : "FixedList-FixedListType", + "type" : "FixedList", + "min" : null, + "max" : null, + "regular_expression" : null, + "fixed_list_items" : [ + { + "__ordering__": "unordered", + "__elementId__": "code" + },{ + "code" : "VALUE4", + "label" : "Value 4", + "order" : null + },{ + "code" : "VALUE3", + "label" : "Value 3", + "order" : null + }, { + "code" : "VALUE2", + "label" : "Value 2", + "order" : null + }, { + "code" : "VALUE1", + "label" : "Value 1", + "order" : null + } ], + "complex_fields" : [ ], + "collection_field_type" : null + }, + "security_classification" : "PRIVATE", + "live_from" : null, + "live_until" : null, + "show_condition" : null, + "acls" : [ { + "_extends_": "CaseworkerAutotest1PrivateAccessControlList" + }, { + "_extends_": "CaseworkerAutotest1SeniorAccessControlList" + }, { + "_extends_": "CaseworkerAutotest1SolicitorAccessControlList" + },{ + "_extends_": "DefendantAccessControlList" + } ], + "complexACLs" : [ ], + "display_context" : null, + "display_context_parameter" : null, + "retain_hidden_value" : null, + "formatted_value" : null + }, { + "id" : "ComplexNestedField", + "label" : "A `Complex` field inside a complex", + "hidden" : false, + "order" : null, + "metadata" : false, + "case_type_id" : null, + "hint_text" : null, + "field_type" : { + "id" : "NestedComplexType", + "type" : "Complex", + "min" : null, + "max" : null, + "regular_expression" : null, + "fixed_list_items" : [ ], + "complex_fields" : [ + { + "__ordering__": "unordered" + },{ + "id" : "NestedNumberField", + "label" : "A `Number` field inside a nested complex", + "hidden" : false, + "order" : null, + "metadata" : false, + "case_type_id" : null, + "hint_text" : null, + "field_type" : { + "id" : "Number", + "type" : "Number", + "min" : null, + "max" : null, + "regular_expression" : null, + "fixed_list_items" : [ ], + "complex_fields" : [ ], + "collection_field_type" : null + }, + "security_classification" : "PRIVATE", + "live_from" : null, + "live_until" : null, + "show_condition" : null, + "acls" : [ { + "_extends_": "CaseworkerAutotest1PrivateAccessControlList" + }, { + "_extends_": "CaseworkerAutotest1SeniorAccessControlList" + }, { + "_extends_": "CaseworkerAutotest1SolicitorAccessControlList" + },{ + "_extends_": "DefendantAccessControlList" + } ], + "complexACLs" : [ ], + "display_context" : null, + "display_context_parameter" : null, + "retain_hidden_value" : null, + "formatted_value" : null + }, { + "id" : "NestedCollectionTextField", + "label" : "A `Collection` field of `Text` inside a nested complex", + "hidden" : false, + "order" : null, + "metadata" : false, + "case_type_id" : null, + "hint_text" : null, + "field_type" : { + "id" : "[[ANYTHING_PRESENT]]", + "type" : "Collection", + "min" : null, + "max" : null, + "regular_expression" : null, + "fixed_list_items" : [ ], + "complex_fields" : [ ], + "collection_field_type" : { + "id" : "Text", + "type" : "Text", + "min" : null, + "max" : null, + "regular_expression" : null, + "fixed_list_items" : [ ], + "complex_fields" : [ ], + "collection_field_type" : null + } + }, + "security_classification" : "PRIVATE", + "live_from" : null, + "live_until" : null, + "show_condition" : null, + "acls" : [ { + "_extends_": "CaseworkerAutotest1PrivateAccessControlList" + }, { + "_extends_": "CaseworkerAutotest1SeniorAccessControlList" + }, { + "_extends_": "CaseworkerAutotest1SolicitorAccessControlList" + },{ + "_extends_": "DefendantAccessControlList" + } ], + "complexACLs" : [ ], + "display_context" : null, + "display_context_parameter" : null, + "retain_hidden_value" : null, + "formatted_value" : null + } ], + "collection_field_type" : null + }, + "security_classification" : "PRIVATE", + "live_from" : null, + "live_until" : null, + "show_condition" : null, + "acls" : [ { + "_extends_": "CaseworkerAutotest1PrivateAccessControlList" + }, { + "_extends_": "CaseworkerAutotest1SeniorAccessControlList" + }, { + "_extends_": "CaseworkerAutotest1SolicitorAccessControlList" + },{ + "_extends_": "DefendantAccessControlList" + } ], + "complexACLs" : [ ], + "display_context" : null, + "display_context_parameter" : null, + "retain_hidden_value" : null, + "formatted_value" : null + } ], + "collection_field_type" : null + }, + "display_context_parameter" : null + }, + { + "label" : "A `Collection` of `Text` fields", + "order" : null, + "metadata" : false, + "case_field_id" : "CollectionField", + "case_field_type" : { + "id" : "[[ANYTHING_PRESENT]]", + "type" : "Collection", + "min" : null, + "max" : null, + "regular_expression" : null, + "fixed_list_items" : [ ], + "complex_fields" : [ ], + "collection_field_type" : { + "id" : "Text", + "type" : "Text", + "min" : null, + "max" : null, + "regular_expression" : null, + "fixed_list_items" : [ ], + "complex_fields" : [ ], + "collection_field_type" : null + } + }, + "display_context_parameter" : null + }, + { + "label" : "A `TextArea` field", + "order" : null, + "metadata" : false, + "case_field_id" : "TextAreaField", + "case_field_type" : { + "id" : "TextArea", + "type" : "TextArea", + "min" : null, + "max" : null, + "regular_expression" : null, + "fixed_list_items" : [ ], + "complex_fields" : [ ], + "collection_field_type" : null + }, + "display_context_parameter" : null + }, + { + "label" : "A `DateTime` field", + "order" : null, + "metadata" : false, + "case_field_id" : "DateTimeField", + "case_field_type" : { + "id" : "DateTime", + "type" : "DateTime", + "min" : null, + "max" : null, + "regular_expression" : null, + "fixed_list_items" : [ ], + "complex_fields" : [ ], + "collection_field_type" : null + }, + "display_context_parameter" : null + }, + { + "label" : "A `Date` field", + "order" : null, + "metadata" : false, + "case_field_id" : "DateField", + "case_field_type" : { + "id" : "Date", + "type" : "Date", + "min" : null, + "max" : null, + "regular_expression" : null, + "fixed_list_items" : [ ], + "complex_fields" : [ ], + "collection_field_type" : null + }, + "display_context_parameter" : null + }, + { + "label" : "A `MoneyGBP` field", + "order" : null, + "metadata" : false, + "case_field_id" : "MoneyGBPField", + "case_field_type" : { + "id" : "MoneyGBP", + "type" : "MoneyGBP", + "min" : null, + "max" : null, + "regular_expression" : null, + "fixed_list_items" : [ ], + "complex_fields" : [ ], + "collection_field_type" : null + }, + "display_context_parameter" : null + }, + { + "label" : "A `PhoneUK` field", + "order" : null, + "metadata" : false, + "case_field_id" : "PhoneUKField", + "case_field_type" : { + "id" : "PhoneUK", + "type" : "PhoneUK", + "min" : null, + "max" : null, + "regular_expression" : "^(((\\+44\\s?\\d{4}|\\(?0\\d{4}\\)?)\\s?\\d{3}\\s?\\d{3})|((\\+44\\s?\\d{3}|\\(?0\\d{3}\\)?)\\s?\\d{3}\\s?\\d{4})|((\\+44\\s?\\d{2}|\\(?0\\d{2}\\)?)\\s?\\d{4}\\s?\\d{4}))(\\s?\\#(\\d{4}|\\d{3}))?$", + "fixed_list_items" : [ ], + "complex_fields" : [ ], + "collection_field_type" : null + }, + "display_context_parameter" : null + }, + { + "label" : "A `YesOrNo` field", + "order" : null, + "metadata" : false, + "case_field_id" : "YesOrNoField", + "case_field_type" : { + "id" : "YesOrNo", + "type" : "YesOrNo", + "min" : null, + "max" : null, + "regular_expression" : null, + "fixed_list_items" : [ ], + "complex_fields" : [ ], + "collection_field_type" : null + }, + "display_context_parameter" : null + }, + { + "label" : "A `Number` field", + "order" : null, + "metadata" : false, + "case_field_id" : "NumberField", + "case_field_type" : { + "id" : "Number", + "type" : "Number", + "min" : null, + "max" : null, + "regular_expression" : null, + "fixed_list_items" : [ ], + "complex_fields" : [ ], + "collection_field_type" : null + }, + "display_context_parameter" : null + }, + { + "label" : "A `Text` field", + "order" : null, + "metadata" : false, + "case_field_id" : "TextField", + "case_field_type" : { + "id" : "Text", + "type" : "Text", + "min" : null, + "max" : null, + "regular_expression" : null, + "fixed_list_items" : [ ], + "complex_fields" : [ ], + "collection_field_type" : null + }, + "display_context_parameter" : null + }, + { + "label" : "A `MultiSelectList` field", + "order" : null, + "metadata" : false, + "case_field_id" : "MultiSelectListField", + "case_field_type" : { + "id" : "MultiSelectList-MultiSelectListType", + "type" : "MultiSelectList", + "min" : null, + "max" : null, + "regular_expression" : null, + "fixed_list_items" : [ { + "code" : "OPTION5", + "label" : "Option 5", + "order" : null + }, { + "code" : "OPTION4", + "label" : "Option 4", + "order" : null + }, { + "code" : "OPTION3", + "label" : "Option 3", + "order" : null + }, { + "code" : "OPTION2", + "label" : "Option 2", + "order" : null + }, { + "code" : "OPTION1", + "label" : "Option 1", + "order" : null + } ], + "complex_fields" : [ ], + "collection_field_type" : null + }, + "display_context_parameter" : null + }, + { + "label" : "A `FixedList` field", + "order" : null, + "metadata" : false, + "case_field_id" : "FixedListField", + "case_field_type" : { + "id" : "FixedList-FixedListType", + "type" : "FixedList", + "min" : null, + "max" : null, + "regular_expression" : null, + "fixed_list_items" : [ { + "code" : "VALUE4", + "label" : "Value 4", + "order" : null + },{ + "code" : "VALUE3", + "label" : "Value 3", + "order" : null + }, { + "code" : "VALUE2", + "label" : "Value 2", + "order" : null + }, { + "code" : "VALUE1", + "label" : "Value 1", + "order" : null + } ], + "complex_fields" : [ ], + "collection_field_type" : null + }, + "display_context_parameter" : null + }, + { + "label" : "Last State Modified Date", + "order" : null, + "metadata" : true, + "case_field_id" : "[LAST_STATE_MODIFIED_DATE]", + "case_field_type" : { + "id" : "DateTime", + "type" : "DateTime", + "min" : null, + "max" : null, + "regular_expression" : null, + "fixed_list_items" : [ ], + "complex_fields" : [ ], + "collection_field_type" : null + }, + "display_context_parameter" : null + }, + { + "label" : "Last Modified Date", + "order" : null, + "metadata" : true, + "case_field_id" : "[LAST_MODIFIED_DATE]", + "case_field_type" : { + "id" : "DateTime", + "type" : "DateTime", + "min" : null, + "max" : null, + "regular_expression" : null, + "fixed_list_items" : [ ], + "complex_fields" : [ ], + "collection_field_type" : null + }, + "display_context_parameter" : null + }, + { + "label" : "Created Date", + "order" : null, + "metadata" : true, + "case_field_id" : "[CREATED_DATE]", + "case_field_type" : { + "id" : "DateTime", + "type" : "DateTime", + "min" : null, + "max" : null, + "regular_expression" : null, + "fixed_list_items" : [ ], + "complex_fields" : [ ], + "collection_field_type" : null + }, + "display_context_parameter" : null + }, + { + "label" : "Jurisdiction", + "order" : null, + "metadata" : true, + "case_field_id" : "[JURISDICTION]", + "case_field_type" : { + "id" : "Text", + "type" : "Text", + "min" : null, + "max" : null, + "regular_expression" : null, + "fixed_list_items" : [ ], + "complex_fields" : [ ], + "collection_field_type" : null + }, + "display_context_parameter" : null + }, + { + "label" : "Case Type", + "order" : null, + "metadata" : true, + "case_field_id" : "[CASE_TYPE]", + "case_field_type" : { + "id" : "Text", + "type" : "Text", + "min" : null, + "max" : null, + "regular_expression" : null, + "fixed_list_items" : [ ], + "complex_fields" : [ ], + "collection_field_type" : null + }, + "display_context_parameter" : null + }, + { + "label" : "Security Classification", + "order" : null, + "metadata" : true, + "case_field_id" : "[SECURITY_CLASSIFICATION]", + "case_field_type" : { + "id" : "Text", + "type" : "Text", + "min" : null, + "max" : null, + "regular_expression" : null, + "fixed_list_items" : [ ], + "complex_fields" : [ ], + "collection_field_type" : null + }, + "display_context_parameter" : null + }, + { + "label" : "Case Reference", + "order" : null, + "metadata" : true, + "case_field_id" : "[CASE_REFERENCE]", + "case_field_type" : { + "id" : "Number", + "type" : "Number", + "min" : null, + "max" : null, + "regular_expression" : null, + "fixed_list_items" : [ ], + "complex_fields" : [ ], + "collection_field_type" : null + }, + "display_context_parameter" : null + } + ], + "cases" : "[[ANYTHING_PRESENT]]" + } ], + "cases" : [ { + "fields" : { + "MoneyGBPField" : "1000", + "FixedListField" : "VALUE1", + "AddressUKField" : { + "Country" : "", + "AddressLine2" : "", + "PostCode" : "SW1H 9AJ", + "PostTown" : "London", + "AddressLine3" : "", + "County" : "", + "AddressLine1" : "102 Petty France" + }, + "[JURISDICTION]" : "BEFTA_MASTER", + "[LAST_STATE_MODIFIED_DATE]" : "[[ANYTHING_PRESENT]]", + "[CREATED_DATE]" : "[[ANYTHING_PRESENT]]", + "ComplexField" : { + "ComplexFixedListField" : "VALUE2", + "ComplexTextField" : "text inside complex", + "ComplexNestedField" : { + "NestedNumberField" : "20", + "NestedCollectionTextField" : [ { + "id" : "[[ANYTHING_PRESENT]]", + "value" : "collection text inside complex" + } ] + } + }, + "DateTimeField" : "[[ANYTHING_PRESENT]]", + "PhoneUKField" : "02033343555", + "NumberField" : "1", + "[CASE_REFERENCE]" : "[[ANYTHING_PRESENT]]", + "[STATE]" : "TODO", + "[SECURITY_CLASSIFICATION]" : "PRIVATE", + "MultiSelectListField" : [ "OPTION1" ], + "YesOrNoField" : "Yes", + "[CASE_TYPE]" : "FT_NewCaseSupplementry", + "TextField" : "text", + "DateField" : "1989-09-19", + "TextAreaField" : "text area", + "[LAST_MODIFIED_DATE]" : "[[ANYTHING_PRESENT]]", + "CollectionField" : [ { + "id" : "[[ANYTHING_PRESENT]]", + "value" : "collection text" + } ] + }, + "case_id" : "${[scenarioContext][customValues][caseIdAsStringFrom_F-143_CreateCasePreRequisiteCaseworker]}", + "fields_formatted" : { + "MoneyGBPField" : "1000", + "FixedListField" : "VALUE1", + "AddressUKField" : { + "Country" : "", + "AddressLine2" : "", + "PostCode" : "SW1H 9AJ", + "PostTown" : "London", + "AddressLine3" : "", + "County" : "", + "AddressLine1" : "102 Petty France" + }, + "[JURISDICTION]" : "BEFTA_MASTER", + "[LAST_STATE_MODIFIED_DATE]" : "[[ANYTHING_PRESENT]]", + "[CREATED_DATE]" : "[[ANYTHING_PRESENT]]", + "ComplexField" : { + "ComplexFixedListField" : "VALUE2", + "ComplexTextField" : "text inside complex", + "ComplexNestedField" : { + "NestedNumberField" : "20", + "NestedCollectionTextField" : [ { + "id" : "[[ANYTHING_PRESENT]]", + "value" : "collection text inside complex" + } ] + } + }, + "DateTimeField" : "[[ANYTHING_PRESENT]]", + "PhoneUKField" : "02033343555", + "NumberField" : "1", + "[CASE_REFERENCE]" : "[[ANYTHING_PRESENT]]", + "[STATE]" : "TODO", + "[SECURITY_CLASSIFICATION]" : "PRIVATE", + "MultiSelectListField" : [ "OPTION1" ], + "YesOrNoField" : "Yes", + "[CASE_TYPE]" : "FT_NewCaseSupplementry", + "TextField" : "text", + "DateField" : "1989-09-19", + "TextAreaField" : "text area", + "[LAST_MODIFIED_DATE]" : "[[ANYTHING_PRESENT]]", + "CollectionField" : [ { + "id" : "[[ANYTHING_PRESENT]]", + "value" : "collection text" + } ] + }, + "supplementary_data" : { + "new_case" : { + "orgID1" : true + } + } + } ], + "total" : 1 + } + } +} diff --git a/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/S-143.3.td.json b/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/S-143.3.td.json new file mode 100644 index 0000000000..9cceb47c92 --- /dev/null +++ b/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/S-143.3.td.json @@ -0,0 +1,126 @@ +{ + "_guid_": "S-143.3", + "productName": "CCD Data Store Elastic Search API", + "operationName": "Internal Elastic Search Endpoint", + "method": "POST", + "uri": "/internal/searchCases", + "user" : { + "_extends_": "BeftaMasterCaseworker" + }, + "specs": [ + "a valid profile", + "is configured to search for the previously created case", + "does not explicitly request supplementary_data", + "is using the query parameter use_case=orgcases", + "contains the previously created case", + "contains supplementary data" + ], + "request": { + "_extends_": "Common_Request", + "queryParams": { + "ctid": "FT_NewCaseSupplementry", + "use_case": "ORGCASES" + }, + "body": { + "native_es_query": { + "query": { + "match": { + "reference": "${[scenarioContext][childContexts][F-143_CreateCasePreRequisiteCaseworker][testData][actualResponse][body][id]}" + } + } + } + } + }, + + "expectedResponse": { + "_extends_": "Common_200_Response", + "body": { + "headers": [ + { + "__ordering__": "ordered" + }, + { + "metadata": { + "jurisdiction": "BEFTA_MASTER", + "case_type_id": "FT_NewCaseSupplementry" + }, + "fields": [ + { + "__operator__": "equivalent", + "__ordering__": "unordered", + "__elementId__": "label" + }, + { + "label": "`FixedList` orgcases", + "order": 1, + "metadata": false, + "case_field_id": "FixedListField", + "case_field_type": { + "id": "FixedList-FixedListType", + "type": "FixedList", + "min": null, + "max": null, + "regular_expression": null, + "fixed_list_items": [{ + "code" : "VALUE4", + "label" : "Value 4", + "order" : null + }, + { + "code": "VALUE3", + "label": "Value 3", + "order": null + }, + { + "code": "VALUE2", + "label": "Value 2", + "order": null + }, + { + "code": "VALUE1", + "label": "Value 1", + "order": null + } + ], + "complex_fields": [], + "collection_field_type": null + }, + "display_context_parameter": null + } + ], + "cases": "[[ANYTHING_PRESENT]]" + } + ], + "cases": [ + { + "fields": { + "FixedListField": "VALUE1", + "[JURISDICTION]": "BEFTA_MASTER", + "[LAST_STATE_MODIFIED_DATE]" : "[[ANYTHING_PRESENT]]", + "[CREATED_DATE]": "[[ANYTHING_PRESENT]]", + "[CASE_REFERENCE]": "${[scenarioContext][customValues][caseIdAsStringFrom_F-143_CreateCasePreRequisiteCaseworker]}", + "[STATE]": "CaseCreated", + "[SECURITY_CLASSIFICATION]": "PUBLIC", + "[CASE_TYPE]": "FT_NewCaseSupplementry", + "[LAST_MODIFIED_DATE]": "[[ANYTHING_PRESENT]]" + }, + "case_id": "${[scenarioContext][customValues][caseIdAsStringFrom_F-143_CreateCasePreRequisiteCaseworker]}", + "fields_formatted": { + "FixedListField": "VALUE1", + "[JURISDICTION]": "BEFTA_MASTER", + "[LAST_STATE_MODIFIED_DATE]" : "[[ANYTHING_PRESENT]]", + "[CREATED_DATE]": "[[ANYTHING_PRESENT]]", + "[CASE_REFERENCE]": "${[scenarioContext][customValues][caseIdAsStringFrom_F-143_CreateCasePreRequisiteCaseworker]}", + "[STATE]": "CaseCreated", + "[SECURITY_CLASSIFICATION]": "PUBLIC", + "[CASE_TYPE]": "FT_NewCaseSupplementry", + "[LAST_MODIFIED_DATE]": "[[ANYTHING_PRESENT]]" + }, + "supplementary_data" : null + } + ], + "total": 1 + } + + } +} From f588bac2765abe81c1302c9a89ece30edf76ff3f Mon Sep 17 00:00:00 2001 From: patelila Date: Mon, 3 Mar 2025 17:35:40 +0000 Subject: [PATCH 18/38] Functional test for CCD-5330 --- .../S-143.4.td.json | 131 ++++++++++++++++++ .../S-143.5.td.json | 83 +++++++++++ .../S-143_GetCreateToken.td.json | 28 ++++ 3 files changed, 242 insertions(+) create mode 100644 src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/S-143.4.td.json create mode 100644 src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/S-143.5.td.json create mode 100644 src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/S-143_GetCreateToken.td.json diff --git a/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/S-143.4.td.json b/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/S-143.4.td.json new file mode 100644 index 0000000000..194aca30cb --- /dev/null +++ b/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/S-143.4.td.json @@ -0,0 +1,131 @@ +{ + "_guid_": "S-143.4", + "productName": "CCD Data Store Elastic Search API", + "operationName": "Internal Elastic Search Endpoint", + "method": "POST", + "uri": "/internal/searchCases", + "user" : { + "_extends_": "BeftaMasterCaseworker" + }, + "specs": [ + "a valid profile", + "is configured to search for the previously created case", + "is configured to request supplementary_data", + "is using the query parameter use_case=orgcases", + "contains the previously created case", + "contains supplementary data" + ], + "request": { + "_extends_": "Common_Request", + "queryParams": { + "ctid": "FT_NewCaseSupplementry", + "use_case": "ORGCASES" + }, + "body": { + "native_es_query": { + "query": { + "match": { + "reference": "${[scenarioContext][childContexts][F-143_CreateCasePreRequisiteCaseworker][testData][actualResponse][body][id]}" + } + } + }, + "supplementary_data" : ["*"] + } + }, + + "expectedResponse": { + "_extends_": "Common_200_Response", + "body": { + "headers": [ + { + "__ordering__": "ordered" + }, + { + "metadata": { + "jurisdiction": "BEFTA_MASTER", + "case_type_id": "FT_NewCaseSupplementry" + }, + "fields": [ + { + "__operator__": "equivalent", + "__ordering__": "unordered", + "__elementId__": "label" + }, + { + "label": "`FixedList` orgcases", + "order": 1, + "metadata": false, + "case_field_id": "FixedListField", + "case_field_type": { + "id": "FixedList-FixedListType", + "type": "FixedList", + "min": null, + "max": null, + "regular_expression": null, + "fixed_list_items": [{ + "code" : "VALUE4", + "label" : "Value 4", + "order" : null + }, + { + "code": "VALUE3", + "label": "Value 3", + "order": null + }, + { + "code": "VALUE2", + "label": "Value 2", + "order": null + }, + { + "code": "VALUE1", + "label": "Value 1", + "order": null + } + ], + "complex_fields": [], + "collection_field_type": null + }, + "display_context_parameter": null + } + ], + "cases": "[[ANYTHING_PRESENT]]" + } + ], + "cases": [ + { + "fields": { + "FixedListField": "VALUE1", + "[JURISDICTION]": "BEFTA_MASTER", + "[LAST_STATE_MODIFIED_DATE]" : "[[ANYTHING_PRESENT]]", + "[CREATED_DATE]": "[[ANYTHING_PRESENT]]", + "[CASE_REFERENCE]": "${[scenarioContext][customValues][caseIdAsStringFrom_F-143_CreateCasePreRequisiteCaseworker]}", + "[STATE]": "CaseCreated", + "[SECURITY_CLASSIFICATION]": "PUBLIC", + "[CASE_TYPE]": "FT_NewCaseSupplementry", + "[LAST_MODIFIED_DATE]": "[[ANYTHING_PRESENT]]" + }, + "case_id": "${[scenarioContext][customValues][caseIdAsStringFrom_F-143_CreateCasePreRequisiteCaseworker]}", + "fields_formatted": { + "FixedListField": "VALUE1", + "[JURISDICTION]": "BEFTA_MASTER", + "[LAST_STATE_MODIFIED_DATE]" : "[[ANYTHING_PRESENT]]", + "[CREATED_DATE]": "[[ANYTHING_PRESENT]]", + "[CASE_REFERENCE]": "${[scenarioContext][customValues][caseIdAsStringFrom_F-143_CreateCasePreRequisiteCaseworker]}", + "[STATE]": "CaseCreated", + "[SECURITY_CLASSIFICATION]": "PUBLIC", + "[CASE_TYPE]": "FT_NewCaseSupplementry", + "[LAST_MODIFIED_DATE]": "[[ANYTHING_PRESENT]]" + }, + "supplementary_data" : { + "new_case" : { + "orgID1" : true + } + } + } + ], + "total": 1 + } + + } +} diff --git a/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/S-143.5.td.json b/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/S-143.5.td.json new file mode 100644 index 0000000000..21d24ee042 --- /dev/null +++ b/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/S-143.5.td.json @@ -0,0 +1,83 @@ +{ + "_guid_": "S-143.5", + "title": "External Elastic Search Endpoint", + "productName": "CCD Data Store Elastic Search API", + "operationName": "External Elastic Search Endpoint", + "method": "POST", + "uri": "/searchCases", + "specs": [ + "a valid profile", + "is configured to search for the previously created case", + "requests a subsection of the supplementary data", + "does not explicitly request supplementary_data", + "contains the previously created case", + "contains the specified sub section of supplementary data", + "contains supplementary data" + ], + "user" : { + "_extends_": "BeftaMasterCaseworker" + }, + "request": { + "_extends_": "Common_Request", + "queryParams": { + "ctid": "FT_NewCaseSupplementry" + }, + "body": { + "native_es_query" : { + "query": { + "match": { + "reference": "${[scenarioContext][childContexts][F-143_CreateCasePreRequisiteCaseworker][testData][actualResponse][body][id]}" + } + } + }, + "supplementary_data" : ["new_case.orgID1"] + } + }, + + "expectedResponse": { + "_extends_": "Common_200_Response", + "body": { + "total": 1, + "cases": [{ + "id": "${[scenarioContext][customValues][caseIdAsIntegerFrom_F-143_CreateCasePreRequisiteCaseworker]}", + "jurisdiction": "BEFTA_MASTER", + "state": "CaseCreated", + "version": null, + "case_type_id": "FT_NewCaseSupplementry", + "created_date": "[[ANYTHING_PRESENT]]", + "last_modified": "[[ANYTHING_PRESENT]]", + "last_state_modified_date": "[[ANYTHING_PRESENT]]", + "security_classification": "PUBLIC", + "case_data": { + "OrganisationPolicyField": { + "Organisation": { + "OrganisationID": "orgID1", + "OrganisationName": "orgName1" + } + } + }, + "supplementary_data": { + "new_case": + { + "orgID1": "true" + } + }, + "after_submit_callback_response": null, + "callback_response_status_code": null, + "callback_response_status": null, + "delete_draft_response_status_code": null, + "delete_draft_response_status": null, + "data_classification": "[[ANYTHING_PRESENT]]", + "supplementary_data" : { + "new_case" : { + "orgID1" : true + } + } + }], + "case_types_results" : [{ + "total" : 1, + "case_type_id" : "FT_NewCaseSupplementry" + }] + } + } +} diff --git a/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/S-143_GetCreateToken.td.json b/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/S-143_GetCreateToken.td.json new file mode 100644 index 0000000000..99750c9db8 --- /dev/null +++ b/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/S-143_GetCreateToken.td.json @@ -0,0 +1,28 @@ +{ + "_guid_": "S-143_GetCreateToken", + "_extends_": "Standard_Token_Creation_Data_For_Case_Creation", + + "specs": [ + "to create a token for case creation", + "As a prerequisite" + ], + + "users": { + "invokingUser": { + "_extends_": "BeftaMasterCaseworker" + } + }, + + "request": { + "pathVariables": { + "jid": "BEFTA_MASTER", + "ctid": "FT_NewCaseSupplementry", + "etid": "createCase" + } + }, + "expectedResponse": { + "body": { + "event_id": "createCase" + } + } +} From 6fe274714c1866084f865308698dcd39a235cb96 Mon Sep 17 00:00:00 2001 From: patelila Date: Tue, 4 Mar 2025 15:52:19 +0000 Subject: [PATCH 19/38] fix failure in Functional test .3/4 for CCD-5330 --- .../S-143.3.td.json | 2 -- .../S-143.4.td.json | 4 +--- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/S-143.3.td.json b/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/S-143.3.td.json index 9cceb47c92..0d7e9ab845 100644 --- a/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/S-143.3.td.json +++ b/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/S-143.3.td.json @@ -94,7 +94,6 @@ "cases": [ { "fields": { - "FixedListField": "VALUE1", "[JURISDICTION]": "BEFTA_MASTER", "[LAST_STATE_MODIFIED_DATE]" : "[[ANYTHING_PRESENT]]", "[CREATED_DATE]": "[[ANYTHING_PRESENT]]", @@ -106,7 +105,6 @@ }, "case_id": "${[scenarioContext][customValues][caseIdAsStringFrom_F-143_CreateCasePreRequisiteCaseworker]}", "fields_formatted": { - "FixedListField": "VALUE1", "[JURISDICTION]": "BEFTA_MASTER", "[LAST_STATE_MODIFIED_DATE]" : "[[ANYTHING_PRESENT]]", "[CREATED_DATE]": "[[ANYTHING_PRESENT]]", diff --git a/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/S-143.4.td.json b/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/S-143.4.td.json index 194aca30cb..00fb0538c4 100644 --- a/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/S-143.4.td.json +++ b/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/S-143.4.td.json @@ -29,7 +29,7 @@ } } }, - "supplementary_data" : ["*"] + "supplementary_data" : ["new_case.*"] } }, @@ -95,7 +95,6 @@ "cases": [ { "fields": { - "FixedListField": "VALUE1", "[JURISDICTION]": "BEFTA_MASTER", "[LAST_STATE_MODIFIED_DATE]" : "[[ANYTHING_PRESENT]]", "[CREATED_DATE]": "[[ANYTHING_PRESENT]]", @@ -107,7 +106,6 @@ }, "case_id": "${[scenarioContext][customValues][caseIdAsStringFrom_F-143_CreateCasePreRequisiteCaseworker]}", "fields_formatted": { - "FixedListField": "VALUE1", "[JURISDICTION]": "BEFTA_MASTER", "[LAST_STATE_MODIFIED_DATE]" : "[[ANYTHING_PRESENT]]", "[CREATED_DATE]": "[[ANYTHING_PRESENT]]", From 80fc4d94647900864b6abe682ee53fa75fd1c267 Mon Sep 17 00:00:00 2001 From: patelila Date: Wed, 5 Mar 2025 09:14:07 +0000 Subject: [PATCH 20/38] ccd-test-def version change --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index d3702873d2..2bfeafbdf4 100644 --- a/build.gradle +++ b/build.gradle @@ -35,7 +35,7 @@ ext['spring-security.version'] = '5.7.11' ext['spring-framework.version'] = '5.3.27' ext['jackson.version'] = '2.16.0' ext['beftaFwVersion'] = '9.2.3' -ext['ccdTestDefinitionVersion'] = '7.26.0-prerelease-CCD-5329' +ext['ccdTestDefinitionVersion'] = '7.26.1-prerelease-CCD-5329' configurations { compileClasspath { From 472ff3cba707d9c5621f00c3d200fdf35ff62f51 Mon Sep 17 00:00:00 2001 From: patelila Date: Wed, 5 Mar 2025 10:49:09 +0000 Subject: [PATCH 21/38] jenkins change --- Jenkinsfile_CNP | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile_CNP b/Jenkinsfile_CNP index 22ca3e7e1f..d19d3d363b 100644 --- a/Jenkinsfile_CNP +++ b/Jenkinsfile_CNP @@ -20,8 +20,8 @@ def branchesToSync = ['demo', 'ithc', 'perftest', 'develop'] // Variables to switch pipeline logic and wiring per type of build -def definitionStoreDevelopPr = "PR-1529" // This doesn't change frequently, but when it does, only change this value. -def dataStoreApiDevelopPr = "PR-2520" // This doesn't change frequently, but when it does, only change this value. +def definitionStoreDevelopPr = "PR-1534" // This doesn't change frequently, but when it does, only change this value. +def dataStoreApiDevelopPr = "PR-2543" // This doesn't change frequently, but when it does, only change this value. def prsToUseAat = "PR-1793,PR-1888" // Set this value to a PR number, or add it as a comma-separated value, if it's to follow CI/CD. def secrets = [ From 20dc7acb2e3d5fdd0b48052b69bc2a106c173eff Mon Sep 17 00:00:00 2001 From: patelila Date: Wed, 5 Mar 2025 12:06:08 +0000 Subject: [PATCH 22/38] use pr-1534 --- charts/ccd-data-store-api/values.preview.template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/ccd-data-store-api/values.preview.template.yaml b/charts/ccd-data-store-api/values.preview.template.yaml index 157cad95f4..5058a88121 100644 --- a/charts/ccd-data-store-api/values.preview.template.yaml +++ b/charts/ccd-data-store-api/values.preview.template.yaml @@ -27,7 +27,7 @@ java: DATA_STORE_DB_PASSWORD: "{{ .Values.postgresql.auth.password}}" DATA_STORE_DB_OPTIONS: "?stringtype=unspecified" DATA_STORE_DB_MAX_POOL_SIZE: 10 - DEFINITION_STORE_HOST: http://ccd-definition-store-api-pr-1529-java/ + DEFINITION_STORE_HOST: http://ccd-definition-store-api-pr-1534-java/ USER_PROFILE_HOST: http://ccd-user-profile-api-pr-399-java/ ELASTIC_SEARCH_ENABLED: true # enable whenever ES required on a particular PR ELASTIC_SEARCH_NODES_DISCOVERY_ENABLED: true From 166ae380913f80f2a9584a60912678d80638b719 Mon Sep 17 00:00:00 2001 From: patelila Date: Wed, 5 Mar 2025 13:54:30 +0000 Subject: [PATCH 23/38] empty commit to trigger build --- .../S-143.1.td.json | 139 ++- .../S-143.2.td.json | 1055 ++--------------- .../S-143.3.td.json | 143 +-- .../S-143.4.td.json | 129 -- .../S-143.5.td.json | 83 -- 5 files changed, 217 insertions(+), 1332 deletions(-) delete mode 100644 src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/S-143.4.td.json delete mode 100644 src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/S-143.5.td.json diff --git a/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/S-143.1.td.json b/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/S-143.1.td.json index 74b04c305b..a645dde1a9 100644 --- a/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/S-143.1.td.json +++ b/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/S-143.1.td.json @@ -1,27 +1,28 @@ { "_guid_": "S-143.1", - "title": "External Elastic Search Endpoint", "productName": "CCD Data Store Elastic Search API", - "operationName": "External Elastic Search Endpoint", + "operationName": "Internal Elastic Search Endpoint", "method": "POST", - "uri": "/searchCases", + "uri": "/internal/searchCases", + "user" : { + "_extends_": "BeftaMasterCaseworker" + }, "specs": [ "a valid profile", "is configured to search for the previously created case", "does not explicitly request supplementary_data", + "is using the query parameter use_case=orgcases", "contains the previously created case", "contains supplementary data" ], - "user" : { - "_extends_": "BeftaMasterCaseworker" - }, "request": { "_extends_": "Common_Request", "queryParams": { - "ctid": "FT_NewCaseSupplementry" + "ctid": "FT_NewCaseSupplementry", + "use_case": "ORGCASES" }, "body": { - "native_es_query" : { + "native_es_query": { "query": { "match": { "reference": "${[scenarioContext][childContexts][F-143_CreateCasePreRequisiteCaseworker][testData][actualResponse][body][id]}" @@ -34,48 +35,90 @@ "expectedResponse": { "_extends_": "Common_200_Response", "body": { - "total": 1, - "cases": [{ - "id": "${[scenarioContext][customValues][caseIdAsIntegerFrom_F-143_CreateCasePreRequisiteCaseworker]}", - "jurisdiction": "BEFTA_MASTER", - "state": "TODO", - "version": null, - "case_type_id": "FT_NewCaseSupplementry", - "created_date": "[[ANYTHING_PRESENT]]", - "last_modified": "[[ANYTHING_PRESENT]]", - "last_state_modified_date": "[[ANYTHING_PRESENT]]", - "security_classification": "PRIVATE", - "case_data": { - "OrganisationPolicyField": { - "Organisation": { - "OrganisationID": "orgID1", - "OrganisationName": "orgName1" - } - } - }, - "data_classification": "[[ANYTHING_PRESENT]]", - "supplementary_data": { - "new_case": - { - "orgID1": "true" - } + "headers": [ + { + "__ordering__": "ordered" }, - "after_submit_callback_response": null, - "callback_response_status_code": null, - "callback_response_status": null, - "delete_draft_response_status_code": null, - "delete_draft_response_status": null, - "data_classification": "[[ANYTHING_PRESENT]]", - "supplementary_data" : { - "new_case" : { - "orgID1" : "true" - } + { + "metadata": { + "jurisdiction": "BEFTA_MASTER", + "case_type_id": "FT_NewCaseSupplementry" + }, + "fields": [ + { + "__operator__": "equivalent", + "__ordering__": "unordered", + "__elementId__": "label" + }, + { + "label": "`FixedList` orgcases", + "order": 1, + "metadata": false, + "case_field_id": "FixedListField", + "case_field_type": { + "id": "FixedList-FixedListType", + "type": "FixedList", + "min": null, + "max": null, + "regular_expression": null, + "fixed_list_items": [{ + "code" : "VALUE4", + "label" : "Value 4", + "order" : null + }, + { + "code": "VALUE3", + "label": "Value 3", + "order": null + }, + { + "code": "VALUE2", + "label": "Value 2", + "order": null + }, + { + "code": "VALUE1", + "label": "Value 1", + "order": null + } + ], + "complex_fields": [], + "collection_field_type": null + }, + "display_context_parameter": null + } + ], + "cases": "[[ANYTHING_PRESENT]]" + } + ], + "cases": [ + { + "fields": { + "[JURISDICTION]": "BEFTA_MASTER", + "[LAST_STATE_MODIFIED_DATE]" : "[[ANYTHING_PRESENT]]", + "[CREATED_DATE]": "[[ANYTHING_PRESENT]]", + "[CASE_REFERENCE]": "${[scenarioContext][customValues][caseIdAsStringFrom_F-143_CreateCasePreRequisiteCaseworker]}", + "[STATE]": "CaseCreated", + "[SECURITY_CLASSIFICATION]": "PUBLIC", + "[CASE_TYPE]": "FT_NewCaseSupplementry", + "[LAST_MODIFIED_DATE]": "[[ANYTHING_PRESENT]]" + }, + "case_id": "${[scenarioContext][customValues][caseIdAsStringFrom_F-143_CreateCasePreRequisiteCaseworker]}", + "fields_formatted": { + "[JURISDICTION]": "BEFTA_MASTER", + "[LAST_STATE_MODIFIED_DATE]" : "[[ANYTHING_PRESENT]]", + "[CREATED_DATE]": "[[ANYTHING_PRESENT]]", + "[CASE_REFERENCE]": "${[scenarioContext][customValues][caseIdAsStringFrom_F-143_CreateCasePreRequisiteCaseworker]}", + "[STATE]": "CaseCreated", + "[SECURITY_CLASSIFICATION]": "PUBLIC", + "[CASE_TYPE]": "FT_NewCaseSupplementry", + "[LAST_MODIFIED_DATE]": "[[ANYTHING_PRESENT]]" + }, + "supplementary_data" : null } - }], - "case_types_results" : [{ - "total" : 1, - "case_type_id" : "FT_NewCaseSupplementry" - }] + ], + "total": 1 } + } } diff --git a/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/S-143.2.td.json b/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/S-143.2.td.json index 6821ee0b91..18895d9a86 100644 --- a/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/S-143.2.td.json +++ b/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/S-143.2.td.json @@ -1,6 +1,5 @@ { "_guid_": "S-143.2", - "title": "External Elastic Search Endpoint", "productName": "CCD Data Store Elastic Search API", "operationName": "Internal Elastic Search Endpoint", "method": "POST", @@ -11,14 +10,16 @@ "specs": [ "a valid profile", "is configured to search for the previously created case", - "does not explicitly request supplementary_data", + "is configured to request supplementary_data", + "is using the query parameter use_case=orgcases", "contains the previously created case", "contains supplementary data" ], "request": { "_extends_": "Common_Request", "queryParams": { - "ctid": "FT_NewCaseSupplementry" + "ctid": "FT_NewCaseSupplementry", + "use_case": "ORGCASES" }, "body": { "native_es_query": { @@ -27,1008 +28,102 @@ "reference": "${[scenarioContext][childContexts][F-143_CreateCasePreRequisiteCaseworker][testData][actualResponse][body][id]}" } } - } + }, + "supplementary_data" : ["new_case.*"] } }, "expectedResponse": { "_extends_": "Common_200_Response", "body": { - "headers" : [ + "headers": [ { - "metadata" : { - "jurisdiction" : "BEFTA_MASTER", - "case_type_id" : "FT_NewCaseSupplementry" + "__ordering__": "ordered" + }, + { + "metadata": { + "jurisdiction": "BEFTA_MASTER", + "case_type_id": "FT_NewCaseSupplementry" }, - "fields" : [ + "fields": [ { + "__operator__": "equivalent", "__ordering__": "unordered", "__elementId__": "label" }, { - "label" : "State", - "order" : null, - "metadata" : true, - "case_field_id" : "[STATE]", - "case_field_type" : { - "id" : "FixedList-FT_NewCaseSupplementry[STATE]", - "type" : "FixedList", - "min" : null, - "max" : null, - "regular_expression" : null, - "fixed_list_items" : [ { - "code" : "DONE", - "label" : "Done", - "order" : null - }, { - "code" : "IN_PROGRESS", - "label" : "In progress", - "order" : null - }, { - "code" : "TODO", - "label" : "To do", + "label": "`FixedList` orgcases", + "order": 1, + "metadata": false, + "case_field_id": "FixedListField", + "case_field_type": { + "id": "FixedList-FixedListType", + "type": "FixedList", + "min": null, + "max": null, + "regular_expression": null, + "fixed_list_items": [{ + "code" : "VALUE4", + "label" : "Value 4", "order" : null - } ], - "complex_fields" : [ ], - "collection_field_type" : null - }, - "display_context_parameter" : null - }, - { - "label" : "A `AddressUK` field", - "order" : null, - "metadata" : false, - "case_field_id" : "AddressUKField", - "case_field_type" : { - "id" : "AddressUK", - "type" : "Complex", - "min" : null, - "max" : null, - "regular_expression" : null, - "fixed_list_items" : [ ], - "complex_fields" : [ + }, { - "__ordering__": "unordered" - },{ - "id" : "AddressLine1", - "label" : "Building and Street", - "hidden" : null, - "order" : null, - "metadata" : false, - "case_type_id" : null, - "hint_text" : null, - "field_type" : { - "id" : "TextMax150", - "type" : "Text", - "min" : null, - "max" : 150, - "regular_expression" : null, - "fixed_list_items" : [ ], - "complex_fields" : [ ], - "collection_field_type" : null - }, - "security_classification" : "PUBLIC", - "live_from" : null, - "live_until" : null, - "show_condition" : null, - "acls" : [ { - "_extends_": "CaseworkerAutotest1PrivateAccessControlList" - }, { - "_extends_": "CaseworkerAutotest1SeniorAccessControlList" - }, { - "_extends_": "CaseworkerAutotest1SolicitorAccessControlList" - },{ - "_extends_": "DefendantAccessControlList" - } ], - "complexACLs" : [ ], - "display_context" : null, - "display_context_parameter" : null, - "retain_hidden_value" : null, - "formatted_value" : null - }, { - "id" : "AddressLine2", - "label" : "Address Line 2", - "hidden" : null, - "order" : null, - "metadata" : false, - "case_type_id" : null, - "hint_text" : null, - "field_type" : { - "id" : "TextMax50", - "type" : "Text", - "min" : null, - "max" : 50, - "regular_expression" : null, - "fixed_list_items" : [ ], - "complex_fields" : [ ], - "collection_field_type" : null - }, - "security_classification" : "PUBLIC", - "live_from" : null, - "live_until" : null, - "show_condition" : null, - "acls" : [ { - "_extends_": "CaseworkerAutotest1PrivateAccessControlList" - }, { - "_extends_": "CaseworkerAutotest1SeniorAccessControlList" - }, { - "_extends_": "CaseworkerAutotest1SolicitorAccessControlList" - },{ - "_extends_": "DefendantAccessControlList" - } ], - "complexACLs" : [ ], - "display_context" : null, - "display_context_parameter" : null, - "retain_hidden_value" : null, - "formatted_value" : null - }, { - "id" : "AddressLine3", - "label" : "Address Line 3", - "hidden" : null, - "order" : null, - "metadata" : false, - "case_type_id" : null, - "hint_text" : null, - "field_type" : { - "id" : "TextMax50", - "type" : "Text", - "min" : null, - "max" : 50, - "regular_expression" : null, - "fixed_list_items" : [ ], - "complex_fields" : [ ], - "collection_field_type" : null - }, - "security_classification" : "PUBLIC", - "live_from" : null, - "live_until" : null, - "show_condition" : null, - "acls" : [ { - "_extends_": "CaseworkerAutotest1PrivateAccessControlList" - }, { - "_extends_": "CaseworkerAutotest1SeniorAccessControlList" - }, { - "_extends_": "CaseworkerAutotest1SolicitorAccessControlList" - },{ - "_extends_": "DefendantAccessControlList" - } ], - "complexACLs" : [ ], - "display_context" : null, - "display_context_parameter" : null, - "retain_hidden_value" : null, - "formatted_value" : null - }, { - "id" : "PostTown", - "label" : "Town or City", - "hidden" : null, - "order" : null, - "metadata" : false, - "case_type_id" : null, - "hint_text" : null, - "field_type" : { - "id" : "TextMax50", - "type" : "Text", - "min" : null, - "max" : 50, - "regular_expression" : null, - "fixed_list_items" : [ ], - "complex_fields" : [ ], - "collection_field_type" : null + "code": "VALUE3", + "label": "Value 3", + "order": null }, - "security_classification" : "PUBLIC", - "live_from" : null, - "live_until" : null, - "show_condition" : null, - "acls" : [ { - "_extends_": "CaseworkerAutotest1PrivateAccessControlList" - }, { - "_extends_": "CaseworkerAutotest1SeniorAccessControlList" - }, { - "_extends_": "CaseworkerAutotest1SolicitorAccessControlList" - },{ - "_extends_": "DefendantAccessControlList" - }], - "complexACLs" : [ ], - "display_context" : null, - "display_context_parameter" : null, - "retain_hidden_value" : null, - "formatted_value" : null - }, { - "id" : "County", - "label" : "County", - "hidden" : null, - "order" : null, - "metadata" : false, - "case_type_id" : null, - "hint_text" : null, - "field_type" : { - "id" : "TextMax50", - "type" : "Text", - "min" : null, - "max" : 50, - "regular_expression" : null, - "fixed_list_items" : [ ], - "complex_fields" : [ ], - "collection_field_type" : null - }, - "security_classification" : "PUBLIC", - "live_from" : null, - "live_until" : null, - "show_condition" : null, - "acls" : [ { - "_extends_": "CaseworkerAutotest1PrivateAccessControlList" - }, { - "_extends_": "CaseworkerAutotest1SeniorAccessControlList" - }, { - "_extends_": "CaseworkerAutotest1SolicitorAccessControlList" - },{ - "_extends_": "DefendantAccessControlList" - } ], - "complexACLs" : [ ], - "display_context" : null, - "display_context_parameter" : null, - "retain_hidden_value" : null, - "formatted_value" : null - }, { - "id" : "PostCode", - "label" : "Postcode/Zipcode", - "hidden" : null, - "order" : null, - "metadata" : false, - "case_type_id" : null, - "hint_text" : null, - "field_type" : { - "id" : "TextMax14", - "type" : "Text", - "min" : null, - "max" : 14, - "regular_expression" : null, - "fixed_list_items" : [ ], - "complex_fields" : [ ], - "collection_field_type" : null - }, - "security_classification" : "PUBLIC", - "live_from" : null, - "live_until" : null, - "show_condition" : null, - "acls" : [ { - "_extends_": "CaseworkerAutotest1PrivateAccessControlList" - }, { - "_extends_": "CaseworkerAutotest1SeniorAccessControlList" - }, { - "_extends_": "CaseworkerAutotest1SolicitorAccessControlList" - },{ - "_extends_": "DefendantAccessControlList" - } ], - "complexACLs" : [ ], - "display_context" : null, - "display_context_parameter" : null, - "retain_hidden_value" : null, - "formatted_value" : null - }, { - "id" : "Country", - "label" : "Country", - "hidden" : null, - "order" : null, - "metadata" : false, - "case_type_id" : null, - "hint_text" : null, - "field_type" : { - "id" : "TextMax50", - "type" : "Text", - "min" : null, - "max" : 50, - "regular_expression" : null, - "fixed_list_items" : [ ], - "complex_fields" : [ ], - "collection_field_type" : null - }, - "security_classification" : "PUBLIC", - "live_from" : null, - "live_until" : null, - "show_condition" : null, - "acls" : [ { - "_extends_": "CaseworkerAutotest1PrivateAccessControlList" - }, { - "_extends_": "CaseworkerAutotest1SeniorAccessControlList" - }, { - "_extends_": "CaseworkerAutotest1SolicitorAccessControlList" - },{ - "_extends_": "DefendantAccessControlList" - } ], - "complexACLs" : [ ], - "display_context" : null, - "display_context_parameter" : null, - "retain_hidden_value" : null, - "formatted_value" : null - } ], - "collection_field_type" : null - }, - "display_context_parameter" : null - }, - { - "label" : "A `Complex` field", - "order" : null, - "metadata" : false, - "case_field_id" : "ComplexField", - "case_field_type" : { - "id" : "ComplexType", - "type" : "Complex", - "min" : null, - "max" : null, - "regular_expression" : null, - "fixed_list_items" : [ ], - "complex_fields" : [ { - "__ordering__": "unordered" - },{ - "id" : "ComplexTextField", - "label" : "A `Text` field inside a complex", - "hidden" : false, - "order" : null, - "metadata" : false, - "case_type_id" : null, - "hint_text" : null, - "field_type" : { - "id" : "Text", - "type" : "Text", - "min" : null, - "max" : null, - "regular_expression" : null, - "fixed_list_items" : [ ], - "complex_fields" : [ ], - "collection_field_type" : null + "code": "VALUE2", + "label": "Value 2", + "order": null }, - "security_classification" : "PRIVATE", - "live_from" : null, - "live_until" : null, - "show_condition" : null, - "acls" : [ { - "_extends_": "CaseworkerAutotest1PrivateAccessControlList" - }, { - "_extends_": "CaseworkerAutotest1SeniorAccessControlList" - }, { - "_extends_": "CaseworkerAutotest1SolicitorAccessControlList" - },{ - "_extends_": "DefendantAccessControlList" - } ], - "complexACLs" : [ ], - "display_context" : null, - "display_context_parameter" : null, - "retain_hidden_value" : null, - "formatted_value" : null - }, { - "id" : "ComplexFixedListField", - "label" : "A `FixedList` field inside a complex", - "hidden" : false, - "order" : null, - "metadata" : false, - "case_type_id" : null, - "hint_text" : null, - "field_type" : { - "id" : "FixedList-FixedListType", - "type" : "FixedList", - "min" : null, - "max" : null, - "regular_expression" : null, - "fixed_list_items" : [ - { - "__ordering__": "unordered", - "__elementId__": "code" - },{ - "code" : "VALUE4", - "label" : "Value 4", - "order" : null - },{ - "code" : "VALUE3", - "label" : "Value 3", - "order" : null - }, { - "code" : "VALUE2", - "label" : "Value 2", - "order" : null - }, { - "code" : "VALUE1", - "label" : "Value 1", - "order" : null - } ], - "complex_fields" : [ ], - "collection_field_type" : null - }, - "security_classification" : "PRIVATE", - "live_from" : null, - "live_until" : null, - "show_condition" : null, - "acls" : [ { - "_extends_": "CaseworkerAutotest1PrivateAccessControlList" - }, { - "_extends_": "CaseworkerAutotest1SeniorAccessControlList" - }, { - "_extends_": "CaseworkerAutotest1SolicitorAccessControlList" - },{ - "_extends_": "DefendantAccessControlList" - } ], - "complexACLs" : [ ], - "display_context" : null, - "display_context_parameter" : null, - "retain_hidden_value" : null, - "formatted_value" : null - }, { - "id" : "ComplexNestedField", - "label" : "A `Complex` field inside a complex", - "hidden" : false, - "order" : null, - "metadata" : false, - "case_type_id" : null, - "hint_text" : null, - "field_type" : { - "id" : "NestedComplexType", - "type" : "Complex", - "min" : null, - "max" : null, - "regular_expression" : null, - "fixed_list_items" : [ ], - "complex_fields" : [ - { - "__ordering__": "unordered" - },{ - "id" : "NestedNumberField", - "label" : "A `Number` field inside a nested complex", - "hidden" : false, - "order" : null, - "metadata" : false, - "case_type_id" : null, - "hint_text" : null, - "field_type" : { - "id" : "Number", - "type" : "Number", - "min" : null, - "max" : null, - "regular_expression" : null, - "fixed_list_items" : [ ], - "complex_fields" : [ ], - "collection_field_type" : null - }, - "security_classification" : "PRIVATE", - "live_from" : null, - "live_until" : null, - "show_condition" : null, - "acls" : [ { - "_extends_": "CaseworkerAutotest1PrivateAccessControlList" - }, { - "_extends_": "CaseworkerAutotest1SeniorAccessControlList" - }, { - "_extends_": "CaseworkerAutotest1SolicitorAccessControlList" - },{ - "_extends_": "DefendantAccessControlList" - } ], - "complexACLs" : [ ], - "display_context" : null, - "display_context_parameter" : null, - "retain_hidden_value" : null, - "formatted_value" : null - }, { - "id" : "NestedCollectionTextField", - "label" : "A `Collection` field of `Text` inside a nested complex", - "hidden" : false, - "order" : null, - "metadata" : false, - "case_type_id" : null, - "hint_text" : null, - "field_type" : { - "id" : "[[ANYTHING_PRESENT]]", - "type" : "Collection", - "min" : null, - "max" : null, - "regular_expression" : null, - "fixed_list_items" : [ ], - "complex_fields" : [ ], - "collection_field_type" : { - "id" : "Text", - "type" : "Text", - "min" : null, - "max" : null, - "regular_expression" : null, - "fixed_list_items" : [ ], - "complex_fields" : [ ], - "collection_field_type" : null - } - }, - "security_classification" : "PRIVATE", - "live_from" : null, - "live_until" : null, - "show_condition" : null, - "acls" : [ { - "_extends_": "CaseworkerAutotest1PrivateAccessControlList" - }, { - "_extends_": "CaseworkerAutotest1SeniorAccessControlList" - }, { - "_extends_": "CaseworkerAutotest1SolicitorAccessControlList" - },{ - "_extends_": "DefendantAccessControlList" - } ], - "complexACLs" : [ ], - "display_context" : null, - "display_context_parameter" : null, - "retain_hidden_value" : null, - "formatted_value" : null - } ], - "collection_field_type" : null - }, - "security_classification" : "PRIVATE", - "live_from" : null, - "live_until" : null, - "show_condition" : null, - "acls" : [ { - "_extends_": "CaseworkerAutotest1PrivateAccessControlList" - }, { - "_extends_": "CaseworkerAutotest1SeniorAccessControlList" - }, { - "_extends_": "CaseworkerAutotest1SolicitorAccessControlList" - },{ - "_extends_": "DefendantAccessControlList" - } ], - "complexACLs" : [ ], - "display_context" : null, - "display_context_parameter" : null, - "retain_hidden_value" : null, - "formatted_value" : null - } ], - "collection_field_type" : null - }, - "display_context_parameter" : null - }, - { - "label" : "A `Collection` of `Text` fields", - "order" : null, - "metadata" : false, - "case_field_id" : "CollectionField", - "case_field_type" : { - "id" : "[[ANYTHING_PRESENT]]", - "type" : "Collection", - "min" : null, - "max" : null, - "regular_expression" : null, - "fixed_list_items" : [ ], - "complex_fields" : [ ], - "collection_field_type" : { - "id" : "Text", - "type" : "Text", - "min" : null, - "max" : null, - "regular_expression" : null, - "fixed_list_items" : [ ], - "complex_fields" : [ ], - "collection_field_type" : null - } - }, - "display_context_parameter" : null - }, - { - "label" : "A `TextArea` field", - "order" : null, - "metadata" : false, - "case_field_id" : "TextAreaField", - "case_field_type" : { - "id" : "TextArea", - "type" : "TextArea", - "min" : null, - "max" : null, - "regular_expression" : null, - "fixed_list_items" : [ ], - "complex_fields" : [ ], - "collection_field_type" : null - }, - "display_context_parameter" : null - }, - { - "label" : "A `DateTime` field", - "order" : null, - "metadata" : false, - "case_field_id" : "DateTimeField", - "case_field_type" : { - "id" : "DateTime", - "type" : "DateTime", - "min" : null, - "max" : null, - "regular_expression" : null, - "fixed_list_items" : [ ], - "complex_fields" : [ ], - "collection_field_type" : null - }, - "display_context_parameter" : null - }, - { - "label" : "A `Date` field", - "order" : null, - "metadata" : false, - "case_field_id" : "DateField", - "case_field_type" : { - "id" : "Date", - "type" : "Date", - "min" : null, - "max" : null, - "regular_expression" : null, - "fixed_list_items" : [ ], - "complex_fields" : [ ], - "collection_field_type" : null - }, - "display_context_parameter" : null - }, - { - "label" : "A `MoneyGBP` field", - "order" : null, - "metadata" : false, - "case_field_id" : "MoneyGBPField", - "case_field_type" : { - "id" : "MoneyGBP", - "type" : "MoneyGBP", - "min" : null, - "max" : null, - "regular_expression" : null, - "fixed_list_items" : [ ], - "complex_fields" : [ ], - "collection_field_type" : null - }, - "display_context_parameter" : null - }, - { - "label" : "A `PhoneUK` field", - "order" : null, - "metadata" : false, - "case_field_id" : "PhoneUKField", - "case_field_type" : { - "id" : "PhoneUK", - "type" : "PhoneUK", - "min" : null, - "max" : null, - "regular_expression" : "^(((\\+44\\s?\\d{4}|\\(?0\\d{4}\\)?)\\s?\\d{3}\\s?\\d{3})|((\\+44\\s?\\d{3}|\\(?0\\d{3}\\)?)\\s?\\d{3}\\s?\\d{4})|((\\+44\\s?\\d{2}|\\(?0\\d{2}\\)?)\\s?\\d{4}\\s?\\d{4}))(\\s?\\#(\\d{4}|\\d{3}))?$", - "fixed_list_items" : [ ], - "complex_fields" : [ ], - "collection_field_type" : null - }, - "display_context_parameter" : null - }, - { - "label" : "A `YesOrNo` field", - "order" : null, - "metadata" : false, - "case_field_id" : "YesOrNoField", - "case_field_type" : { - "id" : "YesOrNo", - "type" : "YesOrNo", - "min" : null, - "max" : null, - "regular_expression" : null, - "fixed_list_items" : [ ], - "complex_fields" : [ ], - "collection_field_type" : null - }, - "display_context_parameter" : null - }, - { - "label" : "A `Number` field", - "order" : null, - "metadata" : false, - "case_field_id" : "NumberField", - "case_field_type" : { - "id" : "Number", - "type" : "Number", - "min" : null, - "max" : null, - "regular_expression" : null, - "fixed_list_items" : [ ], - "complex_fields" : [ ], - "collection_field_type" : null - }, - "display_context_parameter" : null - }, - { - "label" : "A `Text` field", - "order" : null, - "metadata" : false, - "case_field_id" : "TextField", - "case_field_type" : { - "id" : "Text", - "type" : "Text", - "min" : null, - "max" : null, - "regular_expression" : null, - "fixed_list_items" : [ ], - "complex_fields" : [ ], - "collection_field_type" : null - }, - "display_context_parameter" : null - }, - { - "label" : "A `MultiSelectList` field", - "order" : null, - "metadata" : false, - "case_field_id" : "MultiSelectListField", - "case_field_type" : { - "id" : "MultiSelectList-MultiSelectListType", - "type" : "MultiSelectList", - "min" : null, - "max" : null, - "regular_expression" : null, - "fixed_list_items" : [ { - "code" : "OPTION5", - "label" : "Option 5", - "order" : null - }, { - "code" : "OPTION4", - "label" : "Option 4", - "order" : null - }, { - "code" : "OPTION3", - "label" : "Option 3", - "order" : null - }, { - "code" : "OPTION2", - "label" : "Option 2", - "order" : null - }, { - "code" : "OPTION1", - "label" : "Option 1", - "order" : null - } ], - "complex_fields" : [ ], - "collection_field_type" : null - }, - "display_context_parameter" : null - }, - { - "label" : "A `FixedList` field", - "order" : null, - "metadata" : false, - "case_field_id" : "FixedListField", - "case_field_type" : { - "id" : "FixedList-FixedListType", - "type" : "FixedList", - "min" : null, - "max" : null, - "regular_expression" : null, - "fixed_list_items" : [ { - "code" : "VALUE4", - "label" : "Value 4", - "order" : null - },{ - "code" : "VALUE3", - "label" : "Value 3", - "order" : null - }, { - "code" : "VALUE2", - "label" : "Value 2", - "order" : null - }, { - "code" : "VALUE1", - "label" : "Value 1", - "order" : null - } ], - "complex_fields" : [ ], - "collection_field_type" : null - }, - "display_context_parameter" : null - }, - { - "label" : "Last State Modified Date", - "order" : null, - "metadata" : true, - "case_field_id" : "[LAST_STATE_MODIFIED_DATE]", - "case_field_type" : { - "id" : "DateTime", - "type" : "DateTime", - "min" : null, - "max" : null, - "regular_expression" : null, - "fixed_list_items" : [ ], - "complex_fields" : [ ], - "collection_field_type" : null - }, - "display_context_parameter" : null - }, - { - "label" : "Last Modified Date", - "order" : null, - "metadata" : true, - "case_field_id" : "[LAST_MODIFIED_DATE]", - "case_field_type" : { - "id" : "DateTime", - "type" : "DateTime", - "min" : null, - "max" : null, - "regular_expression" : null, - "fixed_list_items" : [ ], - "complex_fields" : [ ], - "collection_field_type" : null - }, - "display_context_parameter" : null - }, - { - "label" : "Created Date", - "order" : null, - "metadata" : true, - "case_field_id" : "[CREATED_DATE]", - "case_field_type" : { - "id" : "DateTime", - "type" : "DateTime", - "min" : null, - "max" : null, - "regular_expression" : null, - "fixed_list_items" : [ ], - "complex_fields" : [ ], - "collection_field_type" : null - }, - "display_context_parameter" : null - }, - { - "label" : "Jurisdiction", - "order" : null, - "metadata" : true, - "case_field_id" : "[JURISDICTION]", - "case_field_type" : { - "id" : "Text", - "type" : "Text", - "min" : null, - "max" : null, - "regular_expression" : null, - "fixed_list_items" : [ ], - "complex_fields" : [ ], - "collection_field_type" : null - }, - "display_context_parameter" : null - }, - { - "label" : "Case Type", - "order" : null, - "metadata" : true, - "case_field_id" : "[CASE_TYPE]", - "case_field_type" : { - "id" : "Text", - "type" : "Text", - "min" : null, - "max" : null, - "regular_expression" : null, - "fixed_list_items" : [ ], - "complex_fields" : [ ], - "collection_field_type" : null - }, - "display_context_parameter" : null - }, - { - "label" : "Security Classification", - "order" : null, - "metadata" : true, - "case_field_id" : "[SECURITY_CLASSIFICATION]", - "case_field_type" : { - "id" : "Text", - "type" : "Text", - "min" : null, - "max" : null, - "regular_expression" : null, - "fixed_list_items" : [ ], - "complex_fields" : [ ], - "collection_field_type" : null - }, - "display_context_parameter" : null - }, - { - "label" : "Case Reference", - "order" : null, - "metadata" : true, - "case_field_id" : "[CASE_REFERENCE]", - "case_field_type" : { - "id" : "Number", - "type" : "Number", - "min" : null, - "max" : null, - "regular_expression" : null, - "fixed_list_items" : [ ], - "complex_fields" : [ ], - "collection_field_type" : null - }, - "display_context_parameter" : null + { + "code": "VALUE1", + "label": "Value 1", + "order": null + } + ], + "complex_fields": [], + "collection_field_type": null + }, + "display_context_parameter": null } ], - "cases" : "[[ANYTHING_PRESENT]]" - } ], - "cases" : [ { - "fields" : { - "MoneyGBPField" : "1000", - "FixedListField" : "VALUE1", - "AddressUKField" : { - "Country" : "", - "AddressLine2" : "", - "PostCode" : "SW1H 9AJ", - "PostTown" : "London", - "AddressLine3" : "", - "County" : "", - "AddressLine1" : "102 Petty France" - }, - "[JURISDICTION]" : "BEFTA_MASTER", - "[LAST_STATE_MODIFIED_DATE]" : "[[ANYTHING_PRESENT]]", - "[CREATED_DATE]" : "[[ANYTHING_PRESENT]]", - "ComplexField" : { - "ComplexFixedListField" : "VALUE2", - "ComplexTextField" : "text inside complex", - "ComplexNestedField" : { - "NestedNumberField" : "20", - "NestedCollectionTextField" : [ { - "id" : "[[ANYTHING_PRESENT]]", - "value" : "collection text inside complex" - } ] - } + "cases": "[[ANYTHING_PRESENT]]" + } + ], + "cases": [ + { + "fields": { + "[JURISDICTION]": "BEFTA_MASTER", + "[LAST_STATE_MODIFIED_DATE]" : "[[ANYTHING_PRESENT]]", + "[CREATED_DATE]": "[[ANYTHING_PRESENT]]", + "[CASE_REFERENCE]": "${[scenarioContext][customValues][caseIdAsStringFrom_F-143_CreateCasePreRequisiteCaseworker]}", + "[STATE]": "CaseCreated", + "[SECURITY_CLASSIFICATION]": "PUBLIC", + "[CASE_TYPE]": "FT_NewCaseSupplementry", + "[LAST_MODIFIED_DATE]": "[[ANYTHING_PRESENT]]" }, - "DateTimeField" : "[[ANYTHING_PRESENT]]", - "PhoneUKField" : "02033343555", - "NumberField" : "1", - "[CASE_REFERENCE]" : "[[ANYTHING_PRESENT]]", - "[STATE]" : "TODO", - "[SECURITY_CLASSIFICATION]" : "PRIVATE", - "MultiSelectListField" : [ "OPTION1" ], - "YesOrNoField" : "Yes", - "[CASE_TYPE]" : "FT_NewCaseSupplementry", - "TextField" : "text", - "DateField" : "1989-09-19", - "TextAreaField" : "text area", - "[LAST_MODIFIED_DATE]" : "[[ANYTHING_PRESENT]]", - "CollectionField" : [ { - "id" : "[[ANYTHING_PRESENT]]", - "value" : "collection text" - } ] - }, - "case_id" : "${[scenarioContext][customValues][caseIdAsStringFrom_F-143_CreateCasePreRequisiteCaseworker]}", - "fields_formatted" : { - "MoneyGBPField" : "1000", - "FixedListField" : "VALUE1", - "AddressUKField" : { - "Country" : "", - "AddressLine2" : "", - "PostCode" : "SW1H 9AJ", - "PostTown" : "London", - "AddressLine3" : "", - "County" : "", - "AddressLine1" : "102 Petty France" + "case_id": "${[scenarioContext][customValues][caseIdAsStringFrom_F-143_CreateCasePreRequisiteCaseworker]}", + "fields_formatted": { + "[JURISDICTION]": "BEFTA_MASTER", + "[LAST_STATE_MODIFIED_DATE]" : "[[ANYTHING_PRESENT]]", + "[CREATED_DATE]": "[[ANYTHING_PRESENT]]", + "[CASE_REFERENCE]": "${[scenarioContext][customValues][caseIdAsStringFrom_F-143_CreateCasePreRequisiteCaseworker]}", + "[STATE]": "CaseCreated", + "[SECURITY_CLASSIFICATION]": "PUBLIC", + "[CASE_TYPE]": "FT_NewCaseSupplementry", + "[LAST_MODIFIED_DATE]": "[[ANYTHING_PRESENT]]" }, - "[JURISDICTION]" : "BEFTA_MASTER", - "[LAST_STATE_MODIFIED_DATE]" : "[[ANYTHING_PRESENT]]", - "[CREATED_DATE]" : "[[ANYTHING_PRESENT]]", - "ComplexField" : { - "ComplexFixedListField" : "VALUE2", - "ComplexTextField" : "text inside complex", - "ComplexNestedField" : { - "NestedNumberField" : "20", - "NestedCollectionTextField" : [ { - "id" : "[[ANYTHING_PRESENT]]", - "value" : "collection text inside complex" - } ] + "supplementary_data" : { + "new_case" : { + "orgID1" : true } - }, - "DateTimeField" : "[[ANYTHING_PRESENT]]", - "PhoneUKField" : "02033343555", - "NumberField" : "1", - "[CASE_REFERENCE]" : "[[ANYTHING_PRESENT]]", - "[STATE]" : "TODO", - "[SECURITY_CLASSIFICATION]" : "PRIVATE", - "MultiSelectListField" : [ "OPTION1" ], - "YesOrNoField" : "Yes", - "[CASE_TYPE]" : "FT_NewCaseSupplementry", - "TextField" : "text", - "DateField" : "1989-09-19", - "TextAreaField" : "text area", - "[LAST_MODIFIED_DATE]" : "[[ANYTHING_PRESENT]]", - "CollectionField" : [ { - "id" : "[[ANYTHING_PRESENT]]", - "value" : "collection text" - } ] - }, - "supplementary_data" : { - "new_case" : { - "orgID1" : true } } - } ], - "total" : 1 + ], + "total": 1 } + } } diff --git a/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/S-143.3.td.json b/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/S-143.3.td.json index 0d7e9ab845..044fd00259 100644 --- a/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/S-143.3.td.json +++ b/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/S-143.3.td.json @@ -1,124 +1,83 @@ { "_guid_": "S-143.3", + "title": "External Elastic Search Endpoint", "productName": "CCD Data Store Elastic Search API", - "operationName": "Internal Elastic Search Endpoint", + "operationName": "External Elastic Search Endpoint", "method": "POST", - "uri": "/internal/searchCases", - "user" : { - "_extends_": "BeftaMasterCaseworker" - }, + "uri": "/searchCases", "specs": [ "a valid profile", "is configured to search for the previously created case", + "requests a subsection of the supplementary data", "does not explicitly request supplementary_data", - "is using the query parameter use_case=orgcases", "contains the previously created case", + "contains the specified sub section of supplementary data", "contains supplementary data" ], + "user" : { + "_extends_": "BeftaMasterCaseworker" + }, "request": { "_extends_": "Common_Request", "queryParams": { - "ctid": "FT_NewCaseSupplementry", - "use_case": "ORGCASES" + "ctid": "FT_NewCaseSupplementry" }, "body": { - "native_es_query": { + "native_es_query" : { "query": { "match": { "reference": "${[scenarioContext][childContexts][F-143_CreateCasePreRequisiteCaseworker][testData][actualResponse][body][id]}" } } - } + }, + "supplementary_data" : ["new_case.orgID1"] } }, "expectedResponse": { "_extends_": "Common_200_Response", "body": { - "headers": [ - { - "__ordering__": "ordered" - }, - { - "metadata": { - "jurisdiction": "BEFTA_MASTER", - "case_type_id": "FT_NewCaseSupplementry" - }, - "fields": [ - { - "__operator__": "equivalent", - "__ordering__": "unordered", - "__elementId__": "label" - }, - { - "label": "`FixedList` orgcases", - "order": 1, - "metadata": false, - "case_field_id": "FixedListField", - "case_field_type": { - "id": "FixedList-FixedListType", - "type": "FixedList", - "min": null, - "max": null, - "regular_expression": null, - "fixed_list_items": [{ - "code" : "VALUE4", - "label" : "Value 4", - "order" : null - }, - { - "code": "VALUE3", - "label": "Value 3", - "order": null - }, - { - "code": "VALUE2", - "label": "Value 2", - "order": null - }, - { - "code": "VALUE1", - "label": "Value 1", - "order": null - } - ], - "complex_fields": [], - "collection_field_type": null - }, - "display_context_parameter": null + "total": 1, + "cases": [{ + "id": "${[scenarioContext][customValues][caseIdAsIntegerFrom_F-143_CreateCasePreRequisiteCaseworker]}", + "jurisdiction": "BEFTA_MASTER", + "state": "CaseCreated", + "version": null, + "case_type_id": "FT_NewCaseSupplementry", + "created_date": "[[ANYTHING_PRESENT]]", + "last_modified": "[[ANYTHING_PRESENT]]", + "last_state_modified_date": "[[ANYTHING_PRESENT]]", + "security_classification": "PUBLIC", + "case_data": { + "OrganisationPolicyField": { + "Organisation": { + "OrganisationID": "orgID1", + "OrganisationName": "orgName1" } - ], - "cases": "[[ANYTHING_PRESENT]]" - } - ], - "cases": [ - { - "fields": { - "[JURISDICTION]": "BEFTA_MASTER", - "[LAST_STATE_MODIFIED_DATE]" : "[[ANYTHING_PRESENT]]", - "[CREATED_DATE]": "[[ANYTHING_PRESENT]]", - "[CASE_REFERENCE]": "${[scenarioContext][customValues][caseIdAsStringFrom_F-143_CreateCasePreRequisiteCaseworker]}", - "[STATE]": "CaseCreated", - "[SECURITY_CLASSIFICATION]": "PUBLIC", - "[CASE_TYPE]": "FT_NewCaseSupplementry", - "[LAST_MODIFIED_DATE]": "[[ANYTHING_PRESENT]]" - }, - "case_id": "${[scenarioContext][customValues][caseIdAsStringFrom_F-143_CreateCasePreRequisiteCaseworker]}", - "fields_formatted": { - "[JURISDICTION]": "BEFTA_MASTER", - "[LAST_STATE_MODIFIED_DATE]" : "[[ANYTHING_PRESENT]]", - "[CREATED_DATE]": "[[ANYTHING_PRESENT]]", - "[CASE_REFERENCE]": "${[scenarioContext][customValues][caseIdAsStringFrom_F-143_CreateCasePreRequisiteCaseworker]}", - "[STATE]": "CaseCreated", - "[SECURITY_CLASSIFICATION]": "PUBLIC", - "[CASE_TYPE]": "FT_NewCaseSupplementry", - "[LAST_MODIFIED_DATE]": "[[ANYTHING_PRESENT]]" - }, - "supplementary_data" : null + } + }, + "supplementary_data": { + "new_case": + { + "orgID1": "true" + } + }, + "after_submit_callback_response": null, + "callback_response_status_code": null, + "callback_response_status": null, + "delete_draft_response_status_code": null, + "delete_draft_response_status": null, + "data_classification": "[[ANYTHING_PRESENT]]", + "supplementary_data" : { + "new_case" : { + "orgID1" : true + } } - ], - "total": 1 + }], + "case_types_results" : [{ + "total" : 1, + "case_type_id" : "FT_NewCaseSupplementry" + }] } - } } diff --git a/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/S-143.4.td.json b/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/S-143.4.td.json deleted file mode 100644 index 00fb0538c4..0000000000 --- a/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/S-143.4.td.json +++ /dev/null @@ -1,129 +0,0 @@ -{ - "_guid_": "S-143.4", - "productName": "CCD Data Store Elastic Search API", - "operationName": "Internal Elastic Search Endpoint", - "method": "POST", - "uri": "/internal/searchCases", - "user" : { - "_extends_": "BeftaMasterCaseworker" - }, - "specs": [ - "a valid profile", - "is configured to search for the previously created case", - "is configured to request supplementary_data", - "is using the query parameter use_case=orgcases", - "contains the previously created case", - "contains supplementary data" - ], - "request": { - "_extends_": "Common_Request", - "queryParams": { - "ctid": "FT_NewCaseSupplementry", - "use_case": "ORGCASES" - }, - "body": { - "native_es_query": { - "query": { - "match": { - "reference": "${[scenarioContext][childContexts][F-143_CreateCasePreRequisiteCaseworker][testData][actualResponse][body][id]}" - } - } - }, - "supplementary_data" : ["new_case.*"] - } - }, - - "expectedResponse": { - "_extends_": "Common_200_Response", - "body": { - "headers": [ - { - "__ordering__": "ordered" - }, - { - "metadata": { - "jurisdiction": "BEFTA_MASTER", - "case_type_id": "FT_NewCaseSupplementry" - }, - "fields": [ - { - "__operator__": "equivalent", - "__ordering__": "unordered", - "__elementId__": "label" - }, - { - "label": "`FixedList` orgcases", - "order": 1, - "metadata": false, - "case_field_id": "FixedListField", - "case_field_type": { - "id": "FixedList-FixedListType", - "type": "FixedList", - "min": null, - "max": null, - "regular_expression": null, - "fixed_list_items": [{ - "code" : "VALUE4", - "label" : "Value 4", - "order" : null - }, - { - "code": "VALUE3", - "label": "Value 3", - "order": null - }, - { - "code": "VALUE2", - "label": "Value 2", - "order": null - }, - { - "code": "VALUE1", - "label": "Value 1", - "order": null - } - ], - "complex_fields": [], - "collection_field_type": null - }, - "display_context_parameter": null - } - ], - "cases": "[[ANYTHING_PRESENT]]" - } - ], - "cases": [ - { - "fields": { - "[JURISDICTION]": "BEFTA_MASTER", - "[LAST_STATE_MODIFIED_DATE]" : "[[ANYTHING_PRESENT]]", - "[CREATED_DATE]": "[[ANYTHING_PRESENT]]", - "[CASE_REFERENCE]": "${[scenarioContext][customValues][caseIdAsStringFrom_F-143_CreateCasePreRequisiteCaseworker]}", - "[STATE]": "CaseCreated", - "[SECURITY_CLASSIFICATION]": "PUBLIC", - "[CASE_TYPE]": "FT_NewCaseSupplementry", - "[LAST_MODIFIED_DATE]": "[[ANYTHING_PRESENT]]" - }, - "case_id": "${[scenarioContext][customValues][caseIdAsStringFrom_F-143_CreateCasePreRequisiteCaseworker]}", - "fields_formatted": { - "[JURISDICTION]": "BEFTA_MASTER", - "[LAST_STATE_MODIFIED_DATE]" : "[[ANYTHING_PRESENT]]", - "[CREATED_DATE]": "[[ANYTHING_PRESENT]]", - "[CASE_REFERENCE]": "${[scenarioContext][customValues][caseIdAsStringFrom_F-143_CreateCasePreRequisiteCaseworker]}", - "[STATE]": "CaseCreated", - "[SECURITY_CLASSIFICATION]": "PUBLIC", - "[CASE_TYPE]": "FT_NewCaseSupplementry", - "[LAST_MODIFIED_DATE]": "[[ANYTHING_PRESENT]]" - }, - "supplementary_data" : { - "new_case" : { - "orgID1" : true - } - } - } - ], - "total": 1 - } - - } -} diff --git a/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/S-143.5.td.json b/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/S-143.5.td.json deleted file mode 100644 index 21d24ee042..0000000000 --- a/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/S-143.5.td.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "_guid_": "S-143.5", - "title": "External Elastic Search Endpoint", - "productName": "CCD Data Store Elastic Search API", - "operationName": "External Elastic Search Endpoint", - "method": "POST", - "uri": "/searchCases", - "specs": [ - "a valid profile", - "is configured to search for the previously created case", - "requests a subsection of the supplementary data", - "does not explicitly request supplementary_data", - "contains the previously created case", - "contains the specified sub section of supplementary data", - "contains supplementary data" - ], - "user" : { - "_extends_": "BeftaMasterCaseworker" - }, - "request": { - "_extends_": "Common_Request", - "queryParams": { - "ctid": "FT_NewCaseSupplementry" - }, - "body": { - "native_es_query" : { - "query": { - "match": { - "reference": "${[scenarioContext][childContexts][F-143_CreateCasePreRequisiteCaseworker][testData][actualResponse][body][id]}" - } - } - }, - "supplementary_data" : ["new_case.orgID1"] - } - }, - - "expectedResponse": { - "_extends_": "Common_200_Response", - "body": { - "total": 1, - "cases": [{ - "id": "${[scenarioContext][customValues][caseIdAsIntegerFrom_F-143_CreateCasePreRequisiteCaseworker]}", - "jurisdiction": "BEFTA_MASTER", - "state": "CaseCreated", - "version": null, - "case_type_id": "FT_NewCaseSupplementry", - "created_date": "[[ANYTHING_PRESENT]]", - "last_modified": "[[ANYTHING_PRESENT]]", - "last_state_modified_date": "[[ANYTHING_PRESENT]]", - "security_classification": "PUBLIC", - "case_data": { - "OrganisationPolicyField": { - "Organisation": { - "OrganisationID": "orgID1", - "OrganisationName": "orgName1" - } - } - }, - "supplementary_data": { - "new_case": - { - "orgID1": "true" - } - }, - "after_submit_callback_response": null, - "callback_response_status_code": null, - "callback_response_status": null, - "delete_draft_response_status_code": null, - "delete_draft_response_status": null, - "data_classification": "[[ANYTHING_PRESENT]]", - "supplementary_data" : { - "new_case" : { - "orgID1" : true - } - } - }], - "case_types_results" : [{ - "total" : 1, - "case_type_id" : "FT_NewCaseSupplementry" - }] - } - } -} From c38ff89dc4422f13a47051b2233ef1617eee3b08 Mon Sep 17 00:00:00 2001 From: patelila Date: Wed, 5 Mar 2025 13:55:38 +0000 Subject: [PATCH 24/38] use pr-1534 --- .../F-143.feature | 26 +++---------------- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/F-143.feature b/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/F-143.feature index e2f5f733e4..f34a4d3c4c 100644 --- a/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/F-143.feature +++ b/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/F-143.feature @@ -8,27 +8,7 @@ Feature: F-143 Additional supplementary data property returned by ES Search APIs And a wait time of [5] seconds [to allow for Logstash to index the case just created], And a user with [a valid profile] - @S-143.1 @Smoke @Ignore - Scenario: external search api returns supplementary data by default - Given the request [is configured to search for the previously created case], - And the request [does not explicitly request supplementary_data] - And a request is prepared with appropriate values, - When it is submitted to call the [External Elastic Search Endpoint] operation of [CCD Data Store Elastic Search API], - Then the response [contains the previously created case], - Then the response [contains supplementary data], - And the response has all other details as expected. - - @S-143.2 @Ignore - Scenario: standard internal search api returns supplementary data by default - Given the request [is configured to search for the previously created case], - And the request [does not explicitly request supplementary_data] - And a request is prepared with appropriate values, - When it is submitted to call the [Internal Elastic Search Endpoint] operation of [CCD Data Store Elastic Search API], - Then the response [contains the previously created case], - Then the response [contains supplementary data], - And the response has all other details as expected. - - @S-143.3 + @S-143.1 Scenario: internal search api usecase request does not return supplementary data by default Given the request [is configured to search for the previously created case], And the request [does not explicitly request supplementary_data] @@ -39,7 +19,7 @@ Feature: F-143 Additional supplementary data property returned by ES Search APIs Then the response [contains supplementary data], And the response has all other details as expected. - @S-143.4 + @S-143.2 Scenario: internal search api usecase request does return supplementary data when requested in the request Given the request [is configured to search for the previously created case], And the request [is configured to request supplementary_data] @@ -50,7 +30,7 @@ Feature: F-143 Additional supplementary data property returned by ES Search APIs Then the response [contains supplementary data], And the response has all other details as expected. - @S-143.5 + @S-143.3 Scenario: can request sub selection of supplementary data Given a user with [a valid profile] When the request [is configured to search for the previously created case], From 4735e36d05d8975ea58a376004f997dbcc5f5efd Mon Sep 17 00:00:00 2001 From: patelila Date: Wed, 5 Mar 2025 15:14:24 +0000 Subject: [PATCH 25/38] empty commit to trigger build From 038b78e171952e168f7c79eec0b3c80e6c268868 Mon Sep 17 00:00:00 2001 From: patelila Date: Wed, 5 Mar 2025 15:57:07 +0000 Subject: [PATCH 26/38] added FT for multiple organisations --- .../F-143a.feature | 21 ++++ ...d_Supplementary_Data_Multiple_Orgs.td.json | 37 ++++++ ...eRequisiteCaseworker_Multiple_Orgs.td.json | 109 ++++++++++++++++++ .../S-143a.1.td.json | 97 ++++++++++++++++ .../S-143a_GetCreateToken.td.json | 28 +++++ 5 files changed, 292 insertions(+) create mode 100644 src/aat/resources/features/F-143a - supplementary_data multiple new case in ES Search API/F-143a.feature create mode 100644 src/aat/resources/features/F-143a - supplementary_data multiple new case in ES Search API/F-143a_Add_Supplementary_Data_Multiple_Orgs.td.json create mode 100644 src/aat/resources/features/F-143a - supplementary_data multiple new case in ES Search API/F-143a_CreateCasePreRequisiteCaseworker_Multiple_Orgs.td.json create mode 100644 src/aat/resources/features/F-143a - supplementary_data multiple new case in ES Search API/S-143a.1.td.json create mode 100644 src/aat/resources/features/F-143a - supplementary_data multiple new case in ES Search API/S-143a_GetCreateToken.td.json diff --git a/src/aat/resources/features/F-143a - supplementary_data multiple new case in ES Search API/F-143a.feature b/src/aat/resources/features/F-143a - supplementary_data multiple new case in ES Search API/F-143a.feature new file mode 100644 index 0000000000..dcd1b4142b --- /dev/null +++ b/src/aat/resources/features/F-143a - supplementary_data multiple new case in ES Search API/F-143a.feature @@ -0,0 +1,21 @@ +@F-143a @elasticsearch +Feature: F-143a Additional supplementary data property returned by ES Search APIs + + Background: Load test data for the scenario + + Given an appropriate test context as detailed in the test data source + And a case that has just been created as in [F-143a_CreateCasePreRequisiteCaseworker_Multiple_Orgs] + And a successful call [to add supplementary data for the case] as in [F-143a_Add_Supplementary_Data_Multiple_Orgs] + And a wait time of [5] seconds [to allow for Logstash to index the case just created], + And a user with [a valid profile] + + @S-143a.1 + Scenario: external search api returns multiple new case orgs supplementary data by default + Given the request [is configured to search for the previously created case], + And the request [does not explicitly request supplementary_data] + And a request is prepared with appropriate values, + When it is submitted to call the [External Elastic Search Endpoint] operation of [CCD Data Store Elastic Search API], + Then the response [contains the previously created case], + Then the response [contains supplementary data], + Then the response [contains the specified sub section of new_case of supplementary data], + And the response has all other details as expected. diff --git a/src/aat/resources/features/F-143a - supplementary_data multiple new case in ES Search API/F-143a_Add_Supplementary_Data_Multiple_Orgs.td.json b/src/aat/resources/features/F-143a - supplementary_data multiple new case in ES Search API/F-143a_Add_Supplementary_Data_Multiple_Orgs.td.json new file mode 100644 index 0000000000..7d82786868 --- /dev/null +++ b/src/aat/resources/features/F-143a - supplementary_data multiple new case in ES Search API/F-143a_Add_Supplementary_Data_Multiple_Orgs.td.json @@ -0,0 +1,37 @@ +{ + "_guid_": "F-143a_Add_Supplementary_Data_Multiple_Orgs", + "title": "Update Supplementary Data Base", + "productName": "CCD Data Store", + "operationName": "Update Supplementary Data", + "method": "POST", + "uri": "/cases/{caseId}/supplementary-data", + "specs": ["to add supplementary data for the case"], + "users": { + "invokingUser": { + "_extends_": "BeftaCaseworkerCaa" + } + }, + "request": { + "_extends_": "Common_Request", + "pathVariables": { + "caseId": "${[scenarioContext][parentContext][childContexts][F-143a_CreateCasePreRequisiteCaseworker_Multiple_Orgs][testData][actualResponse][body][id]}" + }, + "body": { + "supplementary_data_updates": { + "$set": { + "new_case.orgID1": true, + "new_case.orgID3": true + } + } + } + }, + "expectedResponse": { + "_extends_": "Common_200_Response", + "body": { + "supplementary_data": { + "new_case.orgID1": true, + "new_case.orgID3": true + } + } + } +} diff --git a/src/aat/resources/features/F-143a - supplementary_data multiple new case in ES Search API/F-143a_CreateCasePreRequisiteCaseworker_Multiple_Orgs.td.json b/src/aat/resources/features/F-143a - supplementary_data multiple new case in ES Search API/F-143a_CreateCasePreRequisiteCaseworker_Multiple_Orgs.td.json new file mode 100644 index 0000000000..d553e3a124 --- /dev/null +++ b/src/aat/resources/features/F-143a - supplementary_data multiple new case in ES Search API/F-143a_CreateCasePreRequisiteCaseworker_Multiple_Orgs.td.json @@ -0,0 +1,109 @@ +{ + "_guid_": "F-143a_CreateCasePreRequisiteCaseworker_Multiple_Orgs", + "_extends_": "Case_Creation_Data_Base", + "specs": [ + "to create a case", + "As a prerequisite" + ], + + "prerequisites" : [ { + "Token_Creation": "S-143a_GetCreateToken" + } + ], + + "users": { + "invokingUser": { + "_extends_": "BeftaMasterCaseworker" + } + }, + "request": { + "pathVariables": { + "jid": "BEFTA_MASTER", + "ctid": "FT_NewCaseSupplementry" + }, + "body": { + "data": { + "OrganisationPolicyField": { + "newCase": "Yes", + "Organisation": { + "OrganisationID": "orgID1", + "OrganisationName": "orgName1" + } + }, + "OrganisationPolicyField3" : { + "newCase": "Yes", + "Organisation": { + "OrganisationID": "orgID3", + "OrganisationName": "orgName3" + } + }, + "OrganisationPolicyField5" : { + "newCase" : "no", + "Organisation" : { + "OrganisationID" : "orgID2a", + "OrganisationName" : "orgName2a" + } + }, + "OrganisationPolicyField4" : { + "Organisation" : { + "OrganisationID" : "orgID2", + "OrganisationName" : "orgName2" + } + } + }, + "event": { + "id": "createCase", + "summary": "", + "description": "" + }, + "event_token": "${[scenarioContext][childContexts][Token_Creation][testData][actualResponse][body][token]}" + } + }, + + "expectedResponse": { + "body": { + "id": "[[ANYTHING_PRESENT]]", + "jurisdiction": "BEFTA_MASTER", + "state" : "CaseCreated", + "case_type_id": "FT_NewCaseSupplementry", + "created_date": "[[ANYTHING_PRESENT]]", + "last_modified": "[[ANYTHING_PRESENT]]", + "last_state_modified_date": "[[ANYTHING_PRESENT]]", + "security_classification": "PUBLIC", + "case_data": { + "OrganisationPolicyField": { + "Organisation": { + "OrganisationID": "orgID1", + "OrganisationName": "orgName1" + } + }, + "OrganisationPolicyField3" : { + "Organisation": { + "OrganisationID": "orgID3", + "OrganisationName": "orgName3" + } + }, + "OrganisationPolicyField5" : { + "Organisation" : { + "OrganisationID" : "orgID2a", + "OrganisationName" : "orgName2a" + } + }, + "OrganisationPolicyField4" : { + "Organisation" : { + "OrganisationID" : "orgID2", + "OrganisationName" : "orgName2" + } + } + }, + "data_classification": { + }, + "supplementary_data" : { + "new_case" : { + "orgID1" : "true", + "orgID3" : "true" + } + } + } + } +} diff --git a/src/aat/resources/features/F-143a - supplementary_data multiple new case in ES Search API/S-143a.1.td.json b/src/aat/resources/features/F-143a - supplementary_data multiple new case in ES Search API/S-143a.1.td.json new file mode 100644 index 0000000000..bea941ce5e --- /dev/null +++ b/src/aat/resources/features/F-143a - supplementary_data multiple new case in ES Search API/S-143a.1.td.json @@ -0,0 +1,97 @@ +{ + "_guid_": "S-143a.1", + "title": "External Elastic Search Endpoint", + "productName": "CCD Data Store Elastic Search API", + "operationName": "External Elastic Search Endpoint", + "method": "POST", + "uri": "/searchCases", + "specs": [ + "a valid profile", + "is configured to search for the previously created case", + "requests a subsection of the supplementary data", + "does not explicitly request supplementary_data", + "contains the previously created case", + "contains the specified sub section of new_case of supplementary data", + "contains supplementary data" + ], + "user" : { + "_extends_": "BeftaMasterCaseworker" + }, + "request": { + "_extends_": "Common_Request", + "queryParams": { + "ctid": "FT_NewCaseSupplementry" + }, + "body": { + "native_es_query" : { + "query": { + "match": { + "reference": "${[scenarioContext][childContexts][F-143a_CreateCasePreRequisiteCaseworker_Multiple_Orgs][testData][actualResponse][body][id]}" + } + } + }, + "supplementary_data" : ["new_case.*"] + } + }, + + "expectedResponse": { + "_extends_": "Common_200_Response", + "body": { + "total": 1, + "cases": [{ + "id": "${[scenarioContext][customValues][caseIdAsIntegerFrom_F-143a_CreateCasePreRequisiteCaseworker_Multiple_Orgs]}", + "jurisdiction": "BEFTA_MASTER", + "state": "CaseCreated", + "version": null, + "case_type_id": "FT_NewCaseSupplementry", + "created_date": "[[ANYTHING_PRESENT]]", + "last_modified": "[[ANYTHING_PRESENT]]", + "last_state_modified_date": "[[ANYTHING_PRESENT]]", + "security_classification": "PUBLIC", + "case_data": { + "OrganisationPolicyField" : { + "Organisation" : { + "OrganisationID" : "orgID1", + "OrganisationName" : "orgName1" + } + }, + "OrganisationPolicyField5" : { + "Organisation" : { + "OrganisationID" : "orgID2a", + "OrganisationName" : "orgName2a" + } + }, + "OrganisationPolicyField4" : { + "Organisation" : { + "OrganisationID" : "orgID2", + "OrganisationName" : "orgName2" + } + }, + "OrganisationPolicyField3" : { + "Organisation" : { + "OrganisationID" : "orgID3", + "OrganisationName" : "orgName3" + } + } + }, + "supplementary_data": { + "new_case": + { + "orgID1" : "true", + "orgID3" : "true" + } + }, + "after_submit_callback_response": null, + "callback_response_status_code": null, + "callback_response_status": null, + "delete_draft_response_status_code": null, + "delete_draft_response_status": null, + "data_classification": "[[ANYTHING_PRESENT]]" + }], + "case_types_results" : [{ + "total" : 1, + "case_type_id" : "FT_NewCaseSupplementry" + }] + } + } +} diff --git a/src/aat/resources/features/F-143a - supplementary_data multiple new case in ES Search API/S-143a_GetCreateToken.td.json b/src/aat/resources/features/F-143a - supplementary_data multiple new case in ES Search API/S-143a_GetCreateToken.td.json new file mode 100644 index 0000000000..2091b3ca5f --- /dev/null +++ b/src/aat/resources/features/F-143a - supplementary_data multiple new case in ES Search API/S-143a_GetCreateToken.td.json @@ -0,0 +1,28 @@ +{ + "_guid_": "S-143a_GetCreateToken", + "_extends_": "Standard_Token_Creation_Data_For_Case_Creation", + + "specs": [ + "to create a token for case creation", + "As a prerequisite" + ], + + "users": { + "invokingUser": { + "_extends_": "BeftaMasterCaseworker" + } + }, + + "request": { + "pathVariables": { + "jid": "BEFTA_MASTER", + "ctid": "FT_NewCaseSupplementry", + "etid": "createCase" + } + }, + "expectedResponse": { + "body": { + "event_id": "createCase" + } + } +} From ec996a18f278ff13458c57d0f0c2a121b68e67b9 Mon Sep 17 00:00:00 2001 From: patelila Date: Thu, 6 Mar 2025 15:57:25 +0000 Subject: [PATCH 27/38] fix new_case Org value currrently set to be a string instead of boolean true. Fix FT failures for assertion errors --- .../F-1025_CreateCasePreRequisiteCaseworker.td.json | 2 +- .../S-1025.4.td.json | 2 +- .../S-1025.5.td.json | 4 ++-- .../S-1025.7.td.json | 2 +- .../S-1025.8.td.json | 4 ++-- .../S-1025.9.td.json | 2 +- .../F-143_CreateCasePreRequisiteCaseworker.td.json | 2 +- ...CreateCasePreRequisiteCaseworker_Multiple_Orgs.td.json | 4 ++-- .../S-143a.1.td.json | 4 ++-- .../gov/hmcts/ccd/domain/service/common/NewCaseUtils.java | 8 ++++---- 10 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/F-1025_CreateCasePreRequisiteCaseworker.td.json b/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/F-1025_CreateCasePreRequisiteCaseworker.td.json index 389e9b8e64..d45f66a217 100644 --- a/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/F-1025_CreateCasePreRequisiteCaseworker.td.json +++ b/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/F-1025_CreateCasePreRequisiteCaseworker.td.json @@ -62,7 +62,7 @@ }, "supplementary_data" : { "new_case" : { - "orgID1" : "true" + "orgID1" : true } } } diff --git a/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025.4.td.json b/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025.4.td.json index b6b01e48b6..dc6797a831 100644 --- a/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025.4.td.json +++ b/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025.4.td.json @@ -62,7 +62,7 @@ "supplementary_data": { "new_case": { - "orgID1": "true" + "orgID1": true } }, "after_submit_callback_response": null, diff --git a/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025.5.td.json b/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025.5.td.json index 4197a9a85f..16bf050a85 100644 --- a/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025.5.td.json +++ b/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025.5.td.json @@ -100,8 +100,8 @@ "supplementary_data": { "new_case": { - "orgID1" : "true", - "orgID3" : "true" + "orgID1" : true, + "orgID3" : true } }, "after_submit_callback_response": null, diff --git a/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025.7.td.json b/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025.7.td.json index 2803d192d1..4fbd214a30 100644 --- a/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025.7.td.json +++ b/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025.7.td.json @@ -62,7 +62,7 @@ "supplementary_data": { "new_case": [ { - "orgID1" : "true" + "orgID1" : true } ] }, diff --git a/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025.8.td.json b/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025.8.td.json index 95b57c11b5..a8d0a08802 100644 --- a/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025.8.td.json +++ b/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025.8.td.json @@ -111,8 +111,8 @@ "supplementary_data": { "new_case": { - "orgID1" : "true", - "orgID3" : "true" + "orgID1" : true, + "orgID3" : true } }, "after_submit_callback_response": null, diff --git a/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025.9.td.json b/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025.9.td.json index e50e57e6ef..d9a02f7161 100644 --- a/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025.9.td.json +++ b/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025.9.td.json @@ -72,7 +72,7 @@ "data_classification" : { }, "supplementary_data" : { "new_case" : { - "orgID1" : "true" + "orgID1" : true } }, "after_submit_callback_response" : null, diff --git a/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/F-143_CreateCasePreRequisiteCaseworker.td.json b/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/F-143_CreateCasePreRequisiteCaseworker.td.json index ffae3285b7..8aa198d638 100644 --- a/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/F-143_CreateCasePreRequisiteCaseworker.td.json +++ b/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/F-143_CreateCasePreRequisiteCaseworker.td.json @@ -62,7 +62,7 @@ }, "supplementary_data" : { "new_case" : { - "orgID1" : "true" + "orgID1" : true } } } diff --git a/src/aat/resources/features/F-143a - supplementary_data multiple new case in ES Search API/F-143a_CreateCasePreRequisiteCaseworker_Multiple_Orgs.td.json b/src/aat/resources/features/F-143a - supplementary_data multiple new case in ES Search API/F-143a_CreateCasePreRequisiteCaseworker_Multiple_Orgs.td.json index d553e3a124..456bf59203 100644 --- a/src/aat/resources/features/F-143a - supplementary_data multiple new case in ES Search API/F-143a_CreateCasePreRequisiteCaseworker_Multiple_Orgs.td.json +++ b/src/aat/resources/features/F-143a - supplementary_data multiple new case in ES Search API/F-143a_CreateCasePreRequisiteCaseworker_Multiple_Orgs.td.json @@ -100,8 +100,8 @@ }, "supplementary_data" : { "new_case" : { - "orgID1" : "true", - "orgID3" : "true" + "orgID1" : true, + "orgID3" : true } } } diff --git a/src/aat/resources/features/F-143a - supplementary_data multiple new case in ES Search API/S-143a.1.td.json b/src/aat/resources/features/F-143a - supplementary_data multiple new case in ES Search API/S-143a.1.td.json index bea941ce5e..ac92ee28e4 100644 --- a/src/aat/resources/features/F-143a - supplementary_data multiple new case in ES Search API/S-143a.1.td.json +++ b/src/aat/resources/features/F-143a - supplementary_data multiple new case in ES Search API/S-143a.1.td.json @@ -77,8 +77,8 @@ "supplementary_data": { "new_case": { - "orgID1" : "true", - "orgID3" : "true" + "orgID1" : true, + "orgID3" : true } }, "after_submit_callback_response": null, diff --git a/src/main/java/uk/gov/hmcts/ccd/domain/service/common/NewCaseUtils.java b/src/main/java/uk/gov/hmcts/ccd/domain/service/common/NewCaseUtils.java index dd9f22e85d..64d2b07ff0 100644 --- a/src/main/java/uk/gov/hmcts/ccd/domain/service/common/NewCaseUtils.java +++ b/src/main/java/uk/gov/hmcts/ccd/domain/service/common/NewCaseUtils.java @@ -35,10 +35,10 @@ public static void setupSupplementryDataWithNewCase(CaseDetails caseDetailsAfter CASE_NEW_YES); // Update case supplementary data - NewCaseUtils.updateCaseSupplementaryData(caseDetailsAfterCallbackWithoutHashes, organizationProfiles); + updateCaseNewCaseSupplementaryData(caseDetailsAfterCallbackWithoutHashes, organizationProfiles); // Clear organizationProfiles newCase attributes from case data - NewCaseUtils.clearNewCaseAttributes(organizationProfiles); + clearNewCaseAttributes(organizationProfiles); // Clear newCase attributes from case data if case_new set to No (false) clearNewCaseAttributesFromCaseDetailsSetToFalse(caseDetailsAfterCallbackWithoutHashes); @@ -65,14 +65,14 @@ public static List findListOfOrganisationPolicyNodesForNewCase(CaseDet return orgPolicyNewCaseNodes; } - private static void updateCaseSupplementaryData(CaseDetails caseDetails, List organizationProfiles) { + private static void updateCaseNewCaseSupplementaryData(CaseDetails caseDetails, List organizationProfiles) { ObjectNode orgNode = new ObjectMapper().createObjectNode(); for (JsonNode orgProfile : organizationProfiles) { String orgIdentifier = orgProfile.get(ORGANISATION) .get(ORGANISATIONID).textValue(); if (orgIdentifier != null && !orgIdentifier.isEmpty()) { - orgNode.put(orgIdentifier, Boolean.TRUE.toString()); + orgNode.put(orgIdentifier, Boolean.TRUE); } } From b35bddc68bf31ae720c680162576c991db4ffe56 Mon Sep 17 00:00:00 2001 From: patelila Date: Thu, 6 Mar 2025 16:58:12 +0000 Subject: [PATCH 28/38] Checkstyle error fix --- .../uk/gov/hmcts/ccd/domain/service/common/NewCaseUtils.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/uk/gov/hmcts/ccd/domain/service/common/NewCaseUtils.java b/src/main/java/uk/gov/hmcts/ccd/domain/service/common/NewCaseUtils.java index 64d2b07ff0..e4c377f81b 100644 --- a/src/main/java/uk/gov/hmcts/ccd/domain/service/common/NewCaseUtils.java +++ b/src/main/java/uk/gov/hmcts/ccd/domain/service/common/NewCaseUtils.java @@ -65,7 +65,8 @@ public static List findListOfOrganisationPolicyNodesForNewCase(CaseDet return orgPolicyNewCaseNodes; } - private static void updateCaseNewCaseSupplementaryData(CaseDetails caseDetails, List organizationProfiles) { + private static void updateCaseNewCaseSupplementaryData(CaseDetails caseDetails, + List organizationProfiles) { ObjectNode orgNode = new ObjectMapper().createObjectNode(); for (JsonNode orgProfile : organizationProfiles) { From 37efea5d2d4832de637b0f5555fd191d45e95352 Mon Sep 17 00:00:00 2001 From: patelila Date: Fri, 7 Mar 2025 10:14:59 +0000 Subject: [PATCH 29/38] extra FT to search New cases from supplementary data where new case value is true --- .../F-143.feature | 20 ++- .../S-143.4.td.json | 83 +++++++++++ .../F-143a.feature | 16 ++- .../S-143a.2.td.json | 130 ++++++++++++++++++ 4 files changed, 241 insertions(+), 8 deletions(-) create mode 100644 src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/S-143.4.td.json create mode 100644 src/aat/resources/features/F-143a - supplementary_data multiple new case in ES Search API/S-143a.2.td.json diff --git a/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/F-143.feature b/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/F-143.feature index f34a4d3c4c..db36f9ab98 100644 --- a/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/F-143.feature +++ b/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/F-143.feature @@ -1,5 +1,5 @@ @F-143 @elasticsearch -Feature: F-143 Additional supplementary data property returned by ES Search APIs +Feature: F-143 Additional new cases supplementary data property returned by ES Search APIs Background: Load test data for the scenario Given an appropriate test context as detailed in the test data source @@ -8,7 +8,7 @@ Feature: F-143 Additional supplementary data property returned by ES Search APIs And a wait time of [5] seconds [to allow for Logstash to index the case just created], And a user with [a valid profile] - @S-143.1 + @S-143.1 #AC03 Scenario: internal search api usecase request does not return supplementary data by default Given the request [is configured to search for the previously created case], And the request [does not explicitly request supplementary_data] @@ -19,7 +19,7 @@ Feature: F-143 Additional supplementary data property returned by ES Search APIs Then the response [contains supplementary data], And the response has all other details as expected. - @S-143.2 + @S-143.2 #AC01 Scenario: internal search api usecase request does return supplementary data when requested in the request Given the request [is configured to search for the previously created case], And the request [is configured to request supplementary_data] @@ -30,8 +30,8 @@ Feature: F-143 Additional supplementary data property returned by ES Search APIs Then the response [contains supplementary data], And the response has all other details as expected. - @S-143.3 - Scenario: can request sub selection of supplementary data + @S-143.3 #AC04 + Scenario: external search api can request sub selection of supplementary data Given a user with [a valid profile] When the request [is configured to search for the previously created case], And the request [requests a subsection of the supplementary data] @@ -41,3 +41,13 @@ Feature: F-143 Additional supplementary data property returned by ES Search APIs Then the response [contains the specified sub section of supplementary data], And the response has all other details as expected. + @S-143.4 #AC01 + Scenario: external search api can request New cases from supplementary data where new case value is true + Given a user with [a valid profile] + When the request [is configured to search for the previously created case], + And the request [requests a subsection of the supplementary data] + And a request is prepared with appropriate values, + And it is submitted to call the [External Elastic Search Endpoint] operation of [CCD Data Store Elastic Search API], + Then the response [contains the previously created case], + Then the response [contains the specified sub section of supplementary data], + And the response has all other details as expected. diff --git a/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/S-143.4.td.json b/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/S-143.4.td.json new file mode 100644 index 0000000000..18be57c9b3 --- /dev/null +++ b/src/aat/resources/features/F-143 - supplementary_data new case in ES Search API/S-143.4.td.json @@ -0,0 +1,83 @@ +{ + "_guid_": "S-143.4", + "title": "External Elastic Search Endpoint", + "productName": "CCD Data Store Elastic Search API", + "operationName": "External Elastic Search Endpoint", + "method": "POST", + "uri": "/searchCases", + "specs": [ + "a valid profile", + "is configured to search for the previously created case", + "requests a subsection of the supplementary data", + "does not explicitly request supplementary_data", + "contains the previously created case", + "contains the specified sub section of supplementary data", + "contains supplementary data" + ], + "user" : { + "_extends_": "BeftaMasterCaseworker" + }, + "request": { + "_extends_": "Common_Request", + "queryParams": { + "ctid": "FT_NewCaseSupplementry" + }, + "body": { + "native_es_query" : { + "query": { + "match": { + "reference": "${[scenarioContext][childContexts][F-143_CreateCasePreRequisiteCaseworker][testData][actualResponse][body][id]}" + } + } + }, + "supplementary_data" : ["new_case.orgID1", "true"] + } + }, + + "expectedResponse": { + "_extends_": "Common_200_Response", + "body": { + "total": 1, + "cases": [{ + "id": "${[scenarioContext][customValues][caseIdAsIntegerFrom_F-143_CreateCasePreRequisiteCaseworker]}", + "jurisdiction": "BEFTA_MASTER", + "state": "CaseCreated", + "version": null, + "case_type_id": "FT_NewCaseSupplementry", + "created_date": "[[ANYTHING_PRESENT]]", + "last_modified": "[[ANYTHING_PRESENT]]", + "last_state_modified_date": "[[ANYTHING_PRESENT]]", + "security_classification": "PUBLIC", + "case_data": { + "OrganisationPolicyField": { + "Organisation": { + "OrganisationID": "orgID1", + "OrganisationName": "orgName1" + } + } + }, + "supplementary_data": { + "new_case": + { + "orgID1": "true" + } + }, + "after_submit_callback_response": null, + "callback_response_status_code": null, + "callback_response_status": null, + "delete_draft_response_status_code": null, + "delete_draft_response_status": null, + "data_classification": "[[ANYTHING_PRESENT]]", + "supplementary_data" : { + "new_case" : { + "orgID1" : true + } + } + }], + "case_types_results" : [{ + "total" : 1, + "case_type_id" : "FT_NewCaseSupplementry" + }] + } + } +} diff --git a/src/aat/resources/features/F-143a - supplementary_data multiple new case in ES Search API/F-143a.feature b/src/aat/resources/features/F-143a - supplementary_data multiple new case in ES Search API/F-143a.feature index dcd1b4142b..178e26f553 100644 --- a/src/aat/resources/features/F-143a - supplementary_data multiple new case in ES Search API/F-143a.feature +++ b/src/aat/resources/features/F-143a - supplementary_data multiple new case in ES Search API/F-143a.feature @@ -1,5 +1,5 @@ @F-143a @elasticsearch -Feature: F-143a Additional supplementary data property returned by ES Search APIs +Feature: F-143a Additional new cases supplementary data property returned by ES Search APIs Background: Load test data for the scenario @@ -9,13 +9,23 @@ Feature: F-143a Additional supplementary data property returned by ES Search API And a wait time of [5] seconds [to allow for Logstash to index the case just created], And a user with [a valid profile] - @S-143a.1 + @S-143a.1 #AC01 Scenario: external search api returns multiple new case orgs supplementary data by default Given the request [is configured to search for the previously created case], - And the request [does not explicitly request supplementary_data] + And the request [requests a subsection of the supplementary data] And a request is prepared with appropriate values, When it is submitted to call the [External Elastic Search Endpoint] operation of [CCD Data Store Elastic Search API], Then the response [contains the previously created case], Then the response [contains supplementary data], Then the response [contains the specified sub section of new_case of supplementary data], And the response has all other details as expected. + + @S-143a.2 #AC04 + Scenario: internal search api returns multiple new case orgs supplementary data by default + Given the request [is configured to search for the previously created case], + And the request [is configured to request supplementary_data] + And a request is prepared with appropriate values, + When it is submitted to call the [Internal Elastic Search Endpoint] operation of [CCD Data Store Elastic Search API], + Then the response [contains the previously created case], + Then the response [contains supplementary data], + And the response has all other details as expected. diff --git a/src/aat/resources/features/F-143a - supplementary_data multiple new case in ES Search API/S-143a.2.td.json b/src/aat/resources/features/F-143a - supplementary_data multiple new case in ES Search API/S-143a.2.td.json new file mode 100644 index 0000000000..7fe3509d04 --- /dev/null +++ b/src/aat/resources/features/F-143a - supplementary_data multiple new case in ES Search API/S-143a.2.td.json @@ -0,0 +1,130 @@ +{ + "_guid_": "S-143a.2", + "productName": "CCD Data Store Elastic Search API", + "operationName": "Internal Elastic Search Endpoint", + "method": "POST", + "uri": "/internal/searchCases", + "user" : { + "_extends_": "BeftaMasterCaseworker" + }, + "specs": [ + "a valid profile", + "is configured to search for the previously created case", + "is configured to request supplementary_data", + "is using the query parameter use_case=orgcases", + "contains the previously created case", + "contains supplementary data" + ], + "request": { + "_extends_": "Common_Request", + "queryParams": { + "ctid": "FT_NewCaseSupplementry", + "use_case": "ORGCASES" + }, + "body": { + "native_es_query": { + "query": { + "match": { + "reference": "${[scenarioContext][childContexts][F-143a_CreateCasePreRequisiteCaseworker_Multiple_Orgs][testData][actualResponse][body][id]}" + } + } + }, + "supplementary_data" : ["new_case.*"] + } + }, + + "expectedResponse": { + "_extends_": "Common_200_Response", + "body": { + "headers": [ + { + "__ordering__": "ordered" + }, + { + "metadata": { + "jurisdiction": "BEFTA_MASTER", + "case_type_id": "FT_NewCaseSupplementry" + }, + "fields": [ + { + "__operator__": "equivalent", + "__ordering__": "unordered", + "__elementId__": "label" + }, + { + "label": "`FixedList` orgcases", + "order": 1, + "metadata": false, + "case_field_id": "FixedListField", + "case_field_type": { + "id": "FixedList-FixedListType", + "type": "FixedList", + "min": null, + "max": null, + "regular_expression": null, + "fixed_list_items": [{ + "code" : "VALUE4", + "label" : "Value 4", + "order" : null + }, + { + "code": "VALUE3", + "label": "Value 3", + "order": null + }, + { + "code": "VALUE2", + "label": "Value 2", + "order": null + }, + { + "code": "VALUE1", + "label": "Value 1", + "order": null + } + ], + "complex_fields": [], + "collection_field_type": null + }, + "display_context_parameter": null + } + ], + "cases": "[[ANYTHING_PRESENT]]" + } + ], + "cases": [ + { + "fields": { + "[JURISDICTION]": "BEFTA_MASTER", + "[LAST_STATE_MODIFIED_DATE]" : "[[ANYTHING_PRESENT]]", + "[CREATED_DATE]": "[[ANYTHING_PRESENT]]", + "[CASE_REFERENCE]": "${[scenarioContext][customValues][caseIdAsStringFrom_F-143a_CreateCasePreRequisiteCaseworker_Multiple_Orgs]}", + "[STATE]": "CaseCreated", + "[SECURITY_CLASSIFICATION]": "PUBLIC", + "[CASE_TYPE]": "FT_NewCaseSupplementry", + "[LAST_MODIFIED_DATE]": "[[ANYTHING_PRESENT]]" + }, + "case_id": "${[scenarioContext][customValues][caseIdAsStringFrom_F-143a_CreateCasePreRequisiteCaseworker_Multiple_Orgs]}", + "fields_formatted": { + "[JURISDICTION]": "BEFTA_MASTER", + "[LAST_STATE_MODIFIED_DATE]" : "[[ANYTHING_PRESENT]]", + "[CREATED_DATE]": "[[ANYTHING_PRESENT]]", + "[CASE_REFERENCE]": "${[scenarioContext][customValues][caseIdAsStringFrom_F-143a_CreateCasePreRequisiteCaseworker_Multiple_Orgs]}", + "[STATE]": "CaseCreated", + "[SECURITY_CLASSIFICATION]": "PUBLIC", + "[CASE_TYPE]": "FT_NewCaseSupplementry", + "[LAST_MODIFIED_DATE]": "[[ANYTHING_PRESENT]]" + }, + "supplementary_data" : { + "new_case" : { + "orgID1" : true, + "orgID3" : true + } + } + } + ], + "total": 1 + } + + } +} From 8ac15a7839dd5f2418dcf63a8d6f35a3f8744f03 Mon Sep 17 00:00:00 2001 From: patelila Date: Fri, 7 Mar 2025 12:27:52 +0000 Subject: [PATCH 30/38] fix error: actualResponse.body.supplementary_data.new_case contains a bad value: orgID1: expected 'true' but got 'true' --- .../S-105.19/F-105_CreateCasePreRequisiteCaseworker.td.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/S-105.19/F-105_CreateCasePreRequisiteCaseworker.td.json b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/S-105.19/F-105_CreateCasePreRequisiteCaseworker.td.json index b85e8c808f..7732cabf78 100644 --- a/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/S-105.19/F-105_CreateCasePreRequisiteCaseworker.td.json +++ b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/S-105.19/F-105_CreateCasePreRequisiteCaseworker.td.json @@ -62,7 +62,7 @@ }, "supplementary_data" : { "new_case" : { - "orgID1" : "true" + "orgID1" : true } } } From 336e092259744ad9eb2dc857fa031d3fdaf41fca Mon Sep 17 00:00:00 2001 From: patelila Date: Fri, 7 Mar 2025 12:49:12 +0000 Subject: [PATCH 31/38] fix errors like : actualResponse.body contains a bad value: arrayInMap[Content for the Test Jurisdiction.__X__BEFTA_JURISDICTION_1__X__BEFTA_JURISDICTION_1] contains a bad value: caseTypes[Create a case of type BEFTA_CASETYPE_NO_READ__X__BEFTA_CASETYPE_NO_READ__X__BEFTA Case Type No Read] contains a bad value: states[TODO] contains a bad value: acls[caseworker-befta_jurisdiction_1] contains a bad value: read: expected 'true' but got 'false' --- .../S-580.td.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/aat/resources/features/F-102 - Get Jurisdictions V1 Internal/S-580.td.json b/src/aat/resources/features/F-102 - Get Jurisdictions V1 Internal/S-580.td.json index 770dc4a5f2..7bc212a4f5 100644 --- a/src/aat/resources/features/F-102 - Get Jurisdictions V1 Internal/S-580.td.json +++ b/src/aat/resources/features/F-102 - Get Jurisdictions V1 Internal/S-580.td.json @@ -575,10 +575,10 @@ "__elementId__": "role" }, { - "_extends_": "CaseworkerBeftaJurisdiction1AccessControlList" + "_extends_": "CaseworkerBeftaJurisdiction1NoReadAccessControlList" }, { - "_extends_": "CaseworkerCaaAccessControlList" + "_extends_": "CaseworkerCaaNoReadAccessControlList" } ] }, @@ -594,10 +594,10 @@ "__elementId__": "role" }, { - "_extends_": "CaseworkerBeftaJurisdiction1AccessControlList" + "_extends_": "CaseworkerBeftaJurisdiction1NoReadAccessControlList" }, { - "_extends_": "CaseworkerCaaAccessControlList" + "_extends_": "CaseworkerCaaNoReadAccessControlList" } ] }, @@ -613,10 +613,10 @@ "__elementId__": "role" }, { - "_extends_": "CaseworkerBeftaJurisdiction1AccessControlList" + "_extends_": "CaseworkerBeftaJurisdiction1NoReadAccessControlList" }, { - "_extends_": "CaseworkerCaaAccessControlList" + "_extends_": "CaseworkerCaaNoReadAccessControlList" } ] } From 51a22cd6cca97b816b6ce974f86e7e8c9060f60a Mon Sep 17 00:00:00 2001 From: patelila Date: Mon, 10 Mar 2025 10:23:31 +0000 Subject: [PATCH 32/38] empty commit to trigger build From cd38a300644df3846ef7eac77d8392934326b3fc Mon Sep 17 00:00:00 2001 From: patelila Date: Tue, 11 Mar 2025 08:51:36 +0000 Subject: [PATCH 33/38] empty commit to trigger build From d0abb54df83800c87c145280cc2b243c9682e03b Mon Sep 17 00:00:00 2001 From: patelila Date: Tue, 11 Mar 2025 10:29:11 +0000 Subject: [PATCH 34/38] FT-105: S-109/S-105 -failing on State being populated for case of type BEFTA_CASETYPE_NO_READ. NB: May need to be put back when AAT is in play F-1024: S-1024.3 - should fail and does not so ignore for now as needs investigation --- .../F-051 - Get Profile/S-105.td.json | 64 +------------------ .../F-051 - Get Profile/S-109.td.json | 64 +------------------ .../F-1024.feature | 2 +- 3 files changed, 3 insertions(+), 127 deletions(-) diff --git a/src/aat/resources/features/F-051 - Get Profile/S-105.td.json b/src/aat/resources/features/F-051 - Get Profile/S-105.td.json index b19b445cf1..256225ccb7 100644 --- a/src/aat/resources/features/F-051 - Get Profile/S-105.td.json +++ b/src/aat/resources/features/F-051 - Get Profile/S-105.td.json @@ -354,69 +354,7 @@ "name" : "BEFTA Case Type No Read", "jurisdiction": null, "events": [], - "states": [ - { - "__ordering__": "unordered", - "__elementId__": "id" - }, - { - "id": "TODO", - "name": "To do", - "description": null, - "order": 1, - "title_display": null, - "acls": [ - { - "__ordering__": "unordered", - "__elementId__": "role" - }, - { - "_extends_": "CaseworkerBeftaJurisdiction1AccessControlList" - }, - { - "_extends_": "CaseworkerCaaAccessControlList" - } - ] - }, - { - "id": "IN_PROGRESS", - "name": "In progress", - "description": null, - "order": 2, - "title_display": null, - "acls": [ - { - "__ordering__": "unordered", - "__elementId__": "role" - }, - { - "_extends_": "CaseworkerBeftaJurisdiction1AccessControlList" - }, - { - "_extends_": "CaseworkerCaaAccessControlList" - } - ] - }, - { - "id": "DONE", - "name": "Done", - "description": null, - "order": 3, - "title_display": null, - "acls": [ - { - "__ordering__": "unordered", - "__elementId__": "role" - }, - { - "_extends_": "CaseworkerBeftaJurisdiction1AccessControlList" - }, - { - "_extends_": "CaseworkerCaaAccessControlList" - } - ] - } - ], + "states": [], "searchAliasFields": [], "searchParties" : [], "searchCriterias" : [], diff --git a/src/aat/resources/features/F-051 - Get Profile/S-109.td.json b/src/aat/resources/features/F-051 - Get Profile/S-109.td.json index 379e698ccc..8a6cd43b80 100644 --- a/src/aat/resources/features/F-051 - Get Profile/S-109.td.json +++ b/src/aat/resources/features/F-051 - Get Profile/S-109.td.json @@ -354,69 +354,7 @@ "name" : "BEFTA Case Type No Read", "jurisdiction": null, "events": [], - "states": [ - { - "__ordering__": "unordered", - "__elementId__": "id" - }, - { - "id": "TODO", - "name": "To do", - "description": null, - "order": 1, - "title_display": null, - "acls": [ - { - "__ordering__": "unordered", - "__elementId__": "role" - }, - { - "_extends_": "CaseworkerBeftaJurisdiction1AccessControlList" - }, - { - "_extends_": "CaseworkerCaaAccessControlList" - } - ] - }, - { - "id": "IN_PROGRESS", - "name": "In progress", - "description": null, - "order": 2, - "title_display": null, - "acls": [ - { - "__ordering__": "unordered", - "__elementId__": "role" - }, - { - "_extends_": "CaseworkerBeftaJurisdiction1AccessControlList" - }, - { - "_extends_": "CaseworkerCaaAccessControlList" - } - ] - }, - { - "id": "DONE", - "name": "Done", - "description": null, - "order": 3, - "title_display": null, - "acls": [ - { - "__ordering__": "unordered", - "__elementId__": "role" - }, - { - "_extends_": "CaseworkerBeftaJurisdiction1AccessControlList" - }, - { - "_extends_": "CaseworkerCaaAccessControlList" - } - ] - } - ], + "states": [], "searchAliasFields": [], "searchParties" : [], "searchCriterias" : [], diff --git a/src/aat/resources/features/F-1024 - Get Case Event V2 Data internal staff member or an external user/F-1024.feature b/src/aat/resources/features/F-1024 - Get Case Event V2 Data internal staff member or an external user/F-1024.feature index b08ef38b37..879e181b62 100644 --- a/src/aat/resources/features/F-1024 - Get Case Event V2 Data internal staff member or an external user/F-1024.feature +++ b/src/aat/resources/features/F-1024 - Get Case Event V2 Data internal staff member or an external user/F-1024.feature @@ -46,7 +46,7 @@ Scenario: should retrieve case view with response code HTTP 200 when the case re #------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -@S-1024.3 # AC02B +@S-1024.3 @Ignore # AC02B Scenario: must return negative response for unauthorised access by Internal Parties Given a user with [an active profile in CCD], From b7c651563aa8a4f69d449372c14b6b4346b43446 Mon Sep 17 00:00:00 2001 From: patelila Date: Tue, 11 Mar 2025 11:17:41 +0000 Subject: [PATCH 35/38] empty commit to trigger build From d9204eca408721474774c6f5595e01035daa1597 Mon Sep 17 00:00:00 2001 From: patelila Date: Thu, 8 May 2025 18:02:36 +0100 Subject: [PATCH 36/38] fix for merge build errors --- .../uk/gov/hmcts/ccd/domain/service/common/NewCaseUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/uk/gov/hmcts/ccd/domain/service/common/NewCaseUtils.java b/src/main/java/uk/gov/hmcts/ccd/domain/service/common/NewCaseUtils.java index 4596cc5707..53f45d7fba 100644 --- a/src/main/java/uk/gov/hmcts/ccd/domain/service/common/NewCaseUtils.java +++ b/src/main/java/uk/gov/hmcts/ccd/domain/service/common/NewCaseUtils.java @@ -36,7 +36,7 @@ public static void setupSupplementryDataWithNewCase(CaseDetails caseDetailsAfter // Update case supplementary data - NewCaseUtils.updateCaseSupplementaryData(caseDetailsAfterCallbackWithoutHashes, organizationProfilesYes); + updateCaseNewCaseSupplementaryData(caseDetailsAfterCallbackWithoutHashes, organizationProfilesYes); // Clear organizationProfiles newCase attributes from case data NewCaseUtils.clearNewCaseAttributes(organizationProfilesYes); From 6fcfedf560951351dfa8a2b167d8c25476e5f924 Mon Sep 17 00:00:00 2001 From: patelila Date: Fri, 9 May 2025 17:17:03 +0100 Subject: [PATCH 37/38] resolving conflicts --- ...Befta_Case_Data_Extension_Internal.td.json | 0 ...ase_Data_Extension_NoRead_Internal.td.json | 0 .../F-1025.feature} | 16 ++++---- ..._Autotest_Test_Data_Base_External.td.json} | 4 +- .../F-1025_Test_Data_Base_Internal.td.json} | 4 +- ...25_Test_Data_Base_NoRead_Internal.td.json} | 2 +- ...otest_Case_Data_Extension_External.td.json | 0 .../S-1025.1.td.json} | 6 +-- .../S-1025.2.td.json} | 6 +-- .../S-1025.3.td.json} | 6 +-- .../S-1025_Get_Case_Data_Internal.td.json} | 2 +- ...025_Get_Case_Data_NoRead_Internal.td.json} | 2 +- ...ivate_Autotest_Case_Data_External.td.json} | 2 +- .../F-1026.feature} | 38 +++++++++---------- ..._CreateCasePreRequisiteCaseworker.td.json} | 4 +- .../F-1026_Test_Data_Base.td.json} | 2 +- .../F-1026_Test_Data_Base_V2.td.json} | 2 +- ...F-1026_Test_Data_Event_Caseworker.td.json} | 2 +- .../S-1026-GetUpdateEventToken.td.json} | 4 +- .../S-1026.1.td.json} | 6 +-- .../S-1026.10.td.json} | 12 +++--- .../S-1026.2.td.json} | 6 +-- .../S-1026.3.td.json} | 6 +-- .../S-1026.4.td.json} | 6 +-- .../S-1026.5.td.json} | 6 +-- .../S-1026.6.td.json} | 6 +-- .../S-1026.7.td.json} | 6 +-- .../S-1026.8.td.json} | 6 +-- .../S-1026.9.td.json} | 14 +++---- .../S-1026_GetCreateToken.td.json} | 2 +- .../S-1026_GetEventTokenBase.td.json} | 2 +- .../S-1026_GetUpdateTokenCaseworker.td.json} | 6 +-- 32 files changed, 93 insertions(+), 93 deletions(-) rename src/aat/resources/features/{F-1024 - Get Case Event V2 Data internal staff member or an external user => F-1025 - Get Case Event V2 Data internal staff member or an external user}/Befta_Case_Data_Extension_Internal.td.json (100%) rename src/aat/resources/features/{F-1024 - Get Case Event V2 Data internal staff member or an external user => F-1025 - Get Case Event V2 Data internal staff member or an external user}/Befta_Case_Data_Extension_NoRead_Internal.td.json (100%) rename src/aat/resources/features/{F-1024 - Get Case Event V2 Data internal staff member or an external user/F-1024.feature => F-1025 - Get Case Event V2 Data internal staff member or an external user/F-1025.feature} (91%) rename src/aat/resources/features/{F-1024 - Get Case Event V2 Data internal staff member or an external user/F-1024_Private_Autotest_Test_Data_Base_External.td.json => F-1025 - Get Case Event V2 Data internal staff member or an external user/F-1025_Private_Autotest_Test_Data_Base_External.td.json} (87%) rename src/aat/resources/features/{F-1024 - Get Case Event V2 Data internal staff member or an external user/F-1024_Test_Data_Base_Internal.td.json => F-1025 - Get Case Event V2 Data internal staff member or an external user/F-1025_Test_Data_Base_Internal.td.json} (88%) rename src/aat/resources/features/{F-1024 - Get Case Event V2 Data internal staff member or an external user/F-1024_Test_Data_Base_NoRead_Internal.td.json => F-1025 - Get Case Event V2 Data internal staff member or an external user/F-1025_Test_Data_Base_NoRead_Internal.td.json} (94%) rename src/aat/resources/features/{F-1024 - Get Case Event V2 Data internal staff member or an external user => F-1025 - Get Case Event V2 Data internal staff member or an external user}/Private_Autotest_Case_Data_Extension_External.td.json (100%) rename src/aat/resources/features/{F-1024 - Get Case Event V2 Data internal staff member or an external user/S-1024.1.td.json => F-1025 - Get Case Event V2 Data internal staff member or an external user/S-1025.1.td.json} (84%) rename src/aat/resources/features/{F-1024 - Get Case Event V2 Data internal staff member or an external user/S-1024.2.td.json => F-1025 - Get Case Event V2 Data internal staff member or an external user/S-1025.2.td.json} (93%) rename src/aat/resources/features/{F-1024 - Get Case Event V2 Data internal staff member or an external user/S-1024.3.td.json => F-1025 - Get Case Event V2 Data internal staff member or an external user/S-1025.3.td.json} (80%) rename src/aat/resources/features/{F-1024 - Get Case Event V2 Data internal staff member or an external user/S-1024_Get_Case_Data_Internal.td.json => F-1025 - Get Case Event V2 Data internal staff member or an external user/S-1025_Get_Case_Data_Internal.td.json} (98%) rename src/aat/resources/features/{F-1024 - Get Case Event V2 Data internal staff member or an external user/S-1024_Get_Case_Data_NoRead_Internal.td.json => F-1025 - Get Case Event V2 Data internal staff member or an external user/S-1025_Get_Case_Data_NoRead_Internal.td.json} (96%) rename src/aat/resources/features/{F-1024 - Get Case Event V2 Data internal staff member or an external user/S-1024_Get_Private_Autotest_Case_Data_External.td.json => F-1025 - Get Case Event V2 Data internal staff member or an external user/S-1025_Get_Private_Autotest_Case_Data_External.td.json} (97%) rename src/aat/resources/features/{F-1025 - Case create supplementry data with new_case/F-1025.feature => F-1026 - Case create supplementry data with new_case/F-1026.feature} (94%) rename src/aat/resources/features/{F-1025 - Case create supplementry data with new_case/F-1025_CreateCasePreRequisiteCaseworker.td.json => F-1026 - Case create supplementry data with new_case/F-1026_CreateCasePreRequisiteCaseworker.td.json} (93%) rename src/aat/resources/features/{F-1025 - Case create supplementry data with new_case/F-1025_Test_Data_Base.td.json => F-1026 - Case create supplementry data with new_case/F-1026_Test_Data_Base.td.json} (96%) rename src/aat/resources/features/{F-1025 - Case create supplementry data with new_case/F-1025_Test_Data_Base_V2.td.json => F-1026 - Case create supplementry data with new_case/F-1026_Test_Data_Base_V2.td.json} (92%) rename src/aat/resources/features/{F-1025 - Case create supplementry data with new_case/F-1025_Test_Data_Event_Caseworker.td.json => F-1026 - Case create supplementry data with new_case/F-1026_Test_Data_Event_Caseworker.td.json} (95%) rename src/aat/resources/features/{F-1025 - Case create supplementry data with new_case/S-1025-GetUpdateEventToken.td.json => F-1026 - Case create supplementry data with new_case/S-1026-GetUpdateEventToken.td.json} (86%) rename src/aat/resources/features/{F-1025 - Case create supplementry data with new_case/S-1025.1.td.json => F-1026 - Case create supplementry data with new_case/S-1026.1.td.json} (94%) rename src/aat/resources/features/{F-1025 - Case create supplementry data with new_case/S-1025.10.td.json => F-1026 - Case create supplementry data with new_case/S-1026.10.td.json} (90%) rename src/aat/resources/features/{F-1025 - Case create supplementry data with new_case/S-1025.2.td.json => F-1026 - Case create supplementry data with new_case/S-1026.2.td.json} (94%) rename src/aat/resources/features/{F-1025 - Case create supplementry data with new_case/S-1025.3.td.json => F-1026 - Case create supplementry data with new_case/S-1026.3.td.json} (94%) rename src/aat/resources/features/{F-1025 - Case create supplementry data with new_case/S-1025.4.td.json => F-1026 - Case create supplementry data with new_case/S-1026.4.td.json} (95%) rename src/aat/resources/features/{F-1025 - Case create supplementry data with new_case/S-1025.5.td.json => F-1026 - Case create supplementry data with new_case/S-1026.5.td.json} (96%) rename src/aat/resources/features/{F-1025 - Case create supplementry data with new_case/S-1025.6.td.json => F-1026 - Case create supplementry data with new_case/S-1026.6.td.json} (94%) rename src/aat/resources/features/{F-1025 - Case create supplementry data with new_case/S-1025.7.td.json => F-1026 - Case create supplementry data with new_case/S-1026.7.td.json} (94%) rename src/aat/resources/features/{F-1025 - Case create supplementry data with new_case/S-1025.8.td.json => F-1026 - Case create supplementry data with new_case/S-1026.8.td.json} (96%) rename src/aat/resources/features/{F-1025 - Case create supplementry data with new_case/S-1025.9.td.json => F-1026 - Case create supplementry data with new_case/S-1026.9.td.json} (87%) rename src/aat/resources/features/{F-1025 - Case create supplementry data with new_case/S-1025_GetCreateToken.td.json => F-1026 - Case create supplementry data with new_case/S-1026_GetCreateToken.td.json} (92%) rename src/aat/resources/features/{F-1025 - Case create supplementry data with new_case/S-1025_GetEventTokenBase.td.json => F-1026 - Case create supplementry data with new_case/S-1026_GetEventTokenBase.td.json} (94%) rename src/aat/resources/features/{F-1025 - Case create supplementry data with new_case/S-1025_GetUpdateTokenCaseworker.td.json => F-1026 - Case create supplementry data with new_case/S-1026_GetUpdateTokenCaseworker.td.json} (59%) diff --git a/src/aat/resources/features/F-1024 - Get Case Event V2 Data internal staff member or an external user/Befta_Case_Data_Extension_Internal.td.json b/src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/Befta_Case_Data_Extension_Internal.td.json similarity index 100% rename from src/aat/resources/features/F-1024 - Get Case Event V2 Data internal staff member or an external user/Befta_Case_Data_Extension_Internal.td.json rename to src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/Befta_Case_Data_Extension_Internal.td.json diff --git a/src/aat/resources/features/F-1024 - Get Case Event V2 Data internal staff member or an external user/Befta_Case_Data_Extension_NoRead_Internal.td.json b/src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/Befta_Case_Data_Extension_NoRead_Internal.td.json similarity index 100% rename from src/aat/resources/features/F-1024 - Get Case Event V2 Data internal staff member or an external user/Befta_Case_Data_Extension_NoRead_Internal.td.json rename to src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/Befta_Case_Data_Extension_NoRead_Internal.td.json diff --git a/src/aat/resources/features/F-1024 - Get Case Event V2 Data internal staff member or an external user/F-1024.feature b/src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/F-1025.feature similarity index 91% rename from src/aat/resources/features/F-1024 - Get Case Event V2 Data internal staff member or an external user/F-1024.feature rename to src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/F-1025.feature index 879e181b62..4256cd4531 100644 --- a/src/aat/resources/features/F-1024 - Get Case Event V2 Data internal staff member or an external user/F-1024.feature +++ b/src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/F-1025.feature @@ -1,6 +1,6 @@ #================================================================================== -@F-1024 -Feature: F-1024: Is CaseHistory event accessible to internal staff member and not accessible by external user +@F-1025 +Feature: F-1025: Is CaseHistory event accessible to internal staff member and not accessible by external user #================================================================================== Background: @@ -8,14 +8,14 @@ Background: #------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - @S-1024.1 # AC01 + @S-1025.1 # AC01 Scenario: must return negative response for CaseView Event Data for authorised access by External Parties Given a user with [an active profile in CCD], And a successful call [to create a token for case creation] as in [Private_Autotest_Default_Token_Creation_Data_For_Case_Creation_External], And another successful call [to create a full case] as in [Private_Autotest_Case_Data_Extension_External], - And another successful call [to get the details about case event for the case just created] as in [S-1024_Get_Private_Autotest_Case_Data_External], + And another successful call [to get the details about case event for the case just created] as in [S-1025_Get_Private_Autotest_Case_Data_External], When a request is prepared with appropriate values, And the request [contains the reference of the case just created and the event id valid for that case], @@ -27,14 +27,14 @@ Background: #------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -@S-1024.2 # AC02 +@S-1025.2 # AC02 Scenario: should retrieve case view with response code HTTP 200 when the case reference and case event exists response for authorised access by Internal Parties Given a user with [an active profile in CCD], And a successful call [to create a token for case creation] as in [Befta_Default_Token_Creation_Data_For_Case_Creation], And another successful call [to create a full case] as in [Befta_Case_Data_Extension_Internal], - And another successful call [to get the details about case event for the case just created] as in [S-1024_Get_Case_Data_Internal], + And another successful call [to get the details about case event for the case just created] as in [S-1025_Get_Case_Data_Internal], When a request is prepared with appropriate values, And the request [contains the reference of the case just created and the event id valid for that case], @@ -46,14 +46,14 @@ Scenario: should retrieve case view with response code HTTP 200 when the case re #------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -@S-1024.3 @Ignore # AC02B +@S-1025.3 @Ignore # AC02B Scenario: must return negative response for unauthorised access by Internal Parties Given a user with [an active profile in CCD], And a successful call [to create a token for case creation] as in [Befta_Default_Token_Creation_Data_For_Case_Creation_NoRead], And another successful call [to create a full case] as in [Befta_Case_Data_Extension_NoRead_Internal], - And another successful call [to get the details about case event for the case just created] as in [S-1024_Get_Case_Data_NoRead_Internal], + And another successful call [to get the details about case event for the case just created] as in [S-1025_Get_Case_Data_NoRead_Internal], When a request is prepared with appropriate values, And the request [contains the reference of the case just created and the response will not contain event history case data] diff --git a/src/aat/resources/features/F-1024 - Get Case Event V2 Data internal staff member or an external user/F-1024_Private_Autotest_Test_Data_Base_External.td.json b/src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/F-1025_Private_Autotest_Test_Data_Base_External.td.json similarity index 87% rename from src/aat/resources/features/F-1024 - Get Case Event V2 Data internal staff member or an external user/F-1024_Private_Autotest_Test_Data_Base_External.td.json rename to src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/F-1025_Private_Autotest_Test_Data_Base_External.td.json index cebb8e8059..73972bc06b 100644 --- a/src/aat/resources/features/F-1024 - Get Case Event V2 Data internal staff member or an external user/F-1024_Private_Autotest_Test_Data_Base_External.td.json +++ b/src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/F-1025_Private_Autotest_Test_Data_Base_External.td.json @@ -1,5 +1,5 @@ { - "_guid_": "F-1024_Private_Autotest_Test_Data_Base_External", + "_guid_": "F-1025_Private_Autotest_Test_Data_Base_External", "productName": "CCD Data Store", "operationName": "Retrieve a CaseView Event by case and event id for access to External Parties", @@ -21,7 +21,7 @@ }, "pathVariables": { "cid": "${[scenarioContext][childContexts][Private_Autotest_Case_Data_Extension_External][testData][actualResponse][body][id]}", - "eventId": "${[scenarioContext][childContexts][S-1024_Get_Private_Autotest_Case_Data_External][testData][actualResponse][body][events][0][id]}" + "eventId": "${[scenarioContext][childContexts][S-1025_Get_Private_Autotest_Case_Data_External][testData][actualResponse][body][events][0][id]}" } }, diff --git a/src/aat/resources/features/F-1024 - Get Case Event V2 Data internal staff member or an external user/F-1024_Test_Data_Base_Internal.td.json b/src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/F-1025_Test_Data_Base_Internal.td.json similarity index 88% rename from src/aat/resources/features/F-1024 - Get Case Event V2 Data internal staff member or an external user/F-1024_Test_Data_Base_Internal.td.json rename to src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/F-1025_Test_Data_Base_Internal.td.json index f5b93b505c..6da174f2ef 100644 --- a/src/aat/resources/features/F-1024 - Get Case Event V2 Data internal staff member or an external user/F-1024_Test_Data_Base_Internal.td.json +++ b/src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/F-1025_Test_Data_Base_Internal.td.json @@ -1,5 +1,5 @@ { - "_guid_": "F-1024_Test_Data_Base_Internal", + "_guid_": "F-1025_Test_Data_Base_Internal", "productName": "CCD Data Store", "operationName": "Retrieve a CaseView Event by case and event id for access to Internal Parties", @@ -21,7 +21,7 @@ }, "pathVariables": { "cid": "${[scenarioContext][childContexts][Befta_Case_Data_Extension_Internal][testData][actualResponse][body][id]}", - "eventId": "${[scenarioContext][childContexts][S-1024_Get_Case_Data_Internal][testData][actualResponse][body][events][0][id]}" + "eventId": "${[scenarioContext][childContexts][S-1025_Get_Case_Data_Internal][testData][actualResponse][body][events][0][id]}" } }, diff --git a/src/aat/resources/features/F-1024 - Get Case Event V2 Data internal staff member or an external user/F-1024_Test_Data_Base_NoRead_Internal.td.json b/src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/F-1025_Test_Data_Base_NoRead_Internal.td.json similarity index 94% rename from src/aat/resources/features/F-1024 - Get Case Event V2 Data internal staff member or an external user/F-1024_Test_Data_Base_NoRead_Internal.td.json rename to src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/F-1025_Test_Data_Base_NoRead_Internal.td.json index 631c6fbcc7..cdc52453a6 100644 --- a/src/aat/resources/features/F-1024 - Get Case Event V2 Data internal staff member or an external user/F-1024_Test_Data_Base_NoRead_Internal.td.json +++ b/src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/F-1025_Test_Data_Base_NoRead_Internal.td.json @@ -1,5 +1,5 @@ { - "_guid_": "F-1024_Test_Data_Base_NoRead_Internal", + "_guid_": "F-1025_Test_Data_Base_NoRead_Internal", "productName": "CCD Data Store", "operationName": "Retrieve a CaseView Event by case and event id for access to Internal Parties", diff --git a/src/aat/resources/features/F-1024 - Get Case Event V2 Data internal staff member or an external user/Private_Autotest_Case_Data_Extension_External.td.json b/src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/Private_Autotest_Case_Data_Extension_External.td.json similarity index 100% rename from src/aat/resources/features/F-1024 - Get Case Event V2 Data internal staff member or an external user/Private_Autotest_Case_Data_Extension_External.td.json rename to src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/Private_Autotest_Case_Data_Extension_External.td.json diff --git a/src/aat/resources/features/F-1024 - Get Case Event V2 Data internal staff member or an external user/S-1024.1.td.json b/src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/S-1025.1.td.json similarity index 84% rename from src/aat/resources/features/F-1024 - Get Case Event V2 Data internal staff member or an external user/S-1024.1.td.json rename to src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/S-1025.1.td.json index 0777588aa1..68e710d616 100644 --- a/src/aat/resources/features/F-1024 - Get Case Event V2 Data internal staff member or an external user/S-1024.1.td.json +++ b/src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/S-1025.1.td.json @@ -1,12 +1,12 @@ { - "_guid_": "S-1024.1", - "_extends_": "F-1024_Private_Autotest_Test_Data_Base_External", + "_guid_": "S-1025.1", + "_extends_": "F-1025_Private_Autotest_Test_Data_Base_External", "title": "must return negative response for Specific Case Event Data accessible by External Parties", "specs": [ "an active profile in CCD", "contains the reference of the case just created and the event id valid for that case", - "contains a case that has just been created as in S-1024_Get_Private_AutoTest_Case_Data_External", + "contains a case that has just been created as in S-1025_Get_Private_AutoTest_Case_Data_External", "contains details of the case just created, along with an HTTP-200 OK", "contains the case view history, along with an HTTP-403 Forbidden", "contains HTTP 403 Forbidden" diff --git a/src/aat/resources/features/F-1024 - Get Case Event V2 Data internal staff member or an external user/S-1024.2.td.json b/src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/S-1025.2.td.json similarity index 93% rename from src/aat/resources/features/F-1024 - Get Case Event V2 Data internal staff member or an external user/S-1024.2.td.json rename to src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/S-1025.2.td.json index c9bc5b2cff..c52a98da4a 100644 --- a/src/aat/resources/features/F-1024 - Get Case Event V2 Data internal staff member or an external user/S-1024.2.td.json +++ b/src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/S-1025.2.td.json @@ -1,12 +1,12 @@ { - "_guid_": "S-1024.2", - "_extends_": "F-1024_Test_Data_Base_Internal", + "_guid_": "S-1025.2", + "_extends_": "F-1025_Test_Data_Base_Internal", "title": "should retrieve case view with response code HTTP 200 when the case reference and case event exists response for authorised access by Internal Parties", "specs": [ "an active profile in CCD", "contains the reference of the case just created and the event id valid for that case", - "contains a case that has just been created as in S-1024_Get_Case_Data_Internal", + "contains a case that has just been created as in S-1025_Get_Case_Data_Internal", "contains details of the case just created, along with an HTTP-200 OK", "contains the case view history", "contains HTTP 200 Ok" diff --git a/src/aat/resources/features/F-1024 - Get Case Event V2 Data internal staff member or an external user/S-1024.3.td.json b/src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/S-1025.3.td.json similarity index 80% rename from src/aat/resources/features/F-1024 - Get Case Event V2 Data internal staff member or an external user/S-1024.3.td.json rename to src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/S-1025.3.td.json index a849f4720b..f410f9f6dc 100644 --- a/src/aat/resources/features/F-1024 - Get Case Event V2 Data internal staff member or an external user/S-1024.3.td.json +++ b/src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/S-1025.3.td.json @@ -1,12 +1,12 @@ { - "_guid_": "S-1024.3", - "_extends_": "F-1024_Test_Data_Base_NoRead_Internal", + "_guid_": "S-1025.3", + "_extends_": "F-1025_Test_Data_Base_NoRead_Internal", "title": "must return negative response for unauthorised access by Internal Parties", "specs": [ "an active profile in CCD", "contains the reference of the case just created and the response will not contain event history case data", - "contains a case that has just been created as in S-1024_Get_Case_Data_NoRead_Internal", + "contains a case that has just been created as in S-1025_Get_Case_Data_NoRead_Internal", "contains details of the case just created, along with an HTTP-200 OK", "contains the case view history, along with an HTTP-401 Unauthorised", "includes a HTTP 401 Unauthorised" diff --git a/src/aat/resources/features/F-1024 - Get Case Event V2 Data internal staff member or an external user/S-1024_Get_Case_Data_Internal.td.json b/src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/S-1025_Get_Case_Data_Internal.td.json similarity index 98% rename from src/aat/resources/features/F-1024 - Get Case Event V2 Data internal staff member or an external user/S-1024_Get_Case_Data_Internal.td.json rename to src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/S-1025_Get_Case_Data_Internal.td.json index 97aab3c0a2..01c893f84e 100644 --- a/src/aat/resources/features/F-1024 - Get Case Event V2 Data internal staff member or an external user/S-1024_Get_Case_Data_Internal.td.json +++ b/src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/S-1025_Get_Case_Data_Internal.td.json @@ -1,5 +1,5 @@ { - "_guid_": "S-1024_Get_Case_Data_Internal", + "_guid_": "S-1025_Get_Case_Data_Internal", "title": "to get the details about case event for the case just created", "productName": "CCD Data Store", diff --git a/src/aat/resources/features/F-1024 - Get Case Event V2 Data internal staff member or an external user/S-1024_Get_Case_Data_NoRead_Internal.td.json b/src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/S-1025_Get_Case_Data_NoRead_Internal.td.json similarity index 96% rename from src/aat/resources/features/F-1024 - Get Case Event V2 Data internal staff member or an external user/S-1024_Get_Case_Data_NoRead_Internal.td.json rename to src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/S-1025_Get_Case_Data_NoRead_Internal.td.json index 3b2be435c9..639600f640 100644 --- a/src/aat/resources/features/F-1024 - Get Case Event V2 Data internal staff member or an external user/S-1024_Get_Case_Data_NoRead_Internal.td.json +++ b/src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/S-1025_Get_Case_Data_NoRead_Internal.td.json @@ -1,5 +1,5 @@ { - "_guid_": "S-1024_Get_Case_Data_NoRead_Internal", + "_guid_": "S-1025_Get_Case_Data_NoRead_Internal", "title": "to get the details about case event for the case just created", "productName": "CCD Data Store", diff --git a/src/aat/resources/features/F-1024 - Get Case Event V2 Data internal staff member or an external user/S-1024_Get_Private_Autotest_Case_Data_External.td.json b/src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/S-1025_Get_Private_Autotest_Case_Data_External.td.json similarity index 97% rename from src/aat/resources/features/F-1024 - Get Case Event V2 Data internal staff member or an external user/S-1024_Get_Private_Autotest_Case_Data_External.td.json rename to src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/S-1025_Get_Private_Autotest_Case_Data_External.td.json index 5ed800a670..9452222ccb 100644 --- a/src/aat/resources/features/F-1024 - Get Case Event V2 Data internal staff member or an external user/S-1024_Get_Private_Autotest_Case_Data_External.td.json +++ b/src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/S-1025_Get_Private_Autotest_Case_Data_External.td.json @@ -1,5 +1,5 @@ { - "_guid_": "S-1024_Get_Private_Autotest_Case_Data_External", + "_guid_": "S-1025_Get_Private_Autotest_Case_Data_External", "title": "to get the details about case event for the case just created", "productName": "CCD Data Store", diff --git a/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/F-1025.feature b/src/aat/resources/features/F-1026 - Case create supplementry data with new_case/F-1026.feature similarity index 94% rename from src/aat/resources/features/F-1025 - Case create supplementry data with new_case/F-1025.feature rename to src/aat/resources/features/F-1026 - Case create supplementry data with new_case/F-1026.feature index b7c83a888a..a7f344948d 100644 --- a/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/F-1025.feature +++ b/src/aat/resources/features/F-1026 - Case create supplementry data with new_case/F-1026.feature @@ -1,5 +1,5 @@ -@F-1025 -Feature: F-1025: Submit Case Creation Handle OrganisationProfileField with newCase +@F-1026 +Feature: F-1026: Submit Case Creation Handle OrganisationProfileField with newCase Background: Load test data for the scenario Given an appropriate test context as detailed in the test data source @@ -9,7 +9,7 @@ Feature: F-1025: Submit Case Creation Handle OrganisationProfileField with newCa # Submit Case Creation Event: v1_external#/case-details-endpoint/saveCaseDetailsForCaseWorkerUsingPOST #======================================= - @S-1025.1 #AC-1 + @S-1026.1 #AC-1 Scenario: Invoke saveCaseDetailsForCaseWorkerUsingPOST and organisationProfile with no newCase Given a user with [an active profile in CCD] When a request is prepared with appropriate values @@ -21,7 +21,7 @@ Feature: F-1025: Submit Case Creation Handle OrganisationProfileField with newCa And the response has all other details as expected And the response [contains updated values for case_data and data_classification] - @S-1025.2 #AC-2 + @S-1026.2 #AC-2 Scenario: Invoke saveCaseDetailsForCaseWorkerUsingPOST with newCase set to No Given a user with [an active profile in CCD] When a request is prepared with appropriate values @@ -33,7 +33,7 @@ Feature: F-1025: Submit Case Creation Handle OrganisationProfileField with newCa And the response has all other details as expected And the response [contains updated values for case_data and data_classification] - @S-1025.3 #AC-3 + @S-1026.3 #AC-3 Scenario: Invoke saveCaseDetailsForCaseWorkerUsingPOST when OrganisationID is empty Given a user with [an active profile in CCD] When a request is prepared with appropriate values @@ -46,7 +46,7 @@ Feature: F-1025: Submit Case Creation Handle OrganisationProfileField with newCa And the response has all other details as expected And the response [contains updated values for case_data and data_classification] - @S-1025.4 #AC-4 + @S-1026.4 #AC-4 Scenario: case_data has organisationProfile with newCase set to YES and Submit Case Creation Event is invoked on v1_external#/case-details-endpoint/saveCaseDetailsForCaseWorkerUsingPOST Given a user with [an active profile in CCD] When a request is prepared with appropriate values @@ -57,7 +57,7 @@ Feature: F-1025: Submit Case Creation Handle OrganisationProfileField with newCa And the response has all other details as expected And the response [contains updated values for case_data and data_classification] - @S-1025.5 #AC-5 + @S-1026.5 #AC-5 Scenario: case_data has multiple organisationProfile with newCase set to YES or No and Submit Case Creation Event is invoked on v1_external#/case-details-endpoint/saveCaseDetailsForCaseWorkerUsingPOST Given a user with [an active profile in CCD] When a request is prepared with appropriate values @@ -72,7 +72,7 @@ Feature: F-1025: Submit Case Creation Handle OrganisationProfileField with newCa # Submit Event Creation: v2_external#/case-controller/createCaseUsingPOST #======================================= - @S-1025.6 #AC-06 + @S-1026.6 #AC-06 Scenario: Invoke v2_external#/case-controller/createCaseUsingPOST has organisationProfile with newCase set to No Given a user with [an active profile in CCD] When a request is prepared with appropriate values @@ -84,7 +84,7 @@ Feature: F-1025: Submit Case Creation Handle OrganisationProfileField with newCa And the response has all other details as expected And the response [contains updated values for data and data_classification] - @S-1025.7 #AC-07 + @S-1026.7 #AC-07 Scenario: Invoke v2_external#/case-controller/createCaseUsingPOST and has organisationProfile with newCase set to Yes Given a user with [an active profile in CCD] When a request is prepared with appropriate values @@ -96,7 +96,7 @@ Feature: F-1025: Submit Case Creation Handle OrganisationProfileField with newCa And the response has all other details as expected And the response [contains updated values for data and data_classification] - @S-1025.8 #AC-08 + @S-1026.8 #AC-08 Scenario: Invoke v2_external#/case-controller/createCaseUsingPOST and has multiple organisationProfile with newCase set to Yes/No Given a user with [an active profile in CCD] When a request is prepared with appropriate values @@ -113,17 +113,17 @@ Feature: F-1025: Submit Case Creation Handle OrganisationProfileField with newCa # v1_external#/case-details-endpoint/createCaseEventForCaseWorkerUsingPOST #------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - @S-1025.9 #AC-09 + @S-1026.9 #AC-09 Scenario: Submit Event is invoked on v1_external#/case-details-endpoint/createCaseEventForCaseWorkerUsingPOST and case_data has organisationProfile with newCase set to YES Given a user with [an active profile in CCD] - And a successful call [to create a case] as in [F-1025_CreateCasePreRequisiteCaseworker] - And a successful call [to get an event token for the case just created] as in [S-1025-GetUpdateEventToken] + And a successful call [to create a case] as in [F-1026_CreateCasePreRequisiteCaseworker] + And a successful call [to get an event token for the case just created] as in [S-1026-GetUpdateEventToken] When a request is prepared with appropriate values - And the request [contains a case Id that has just been created as in F-1025_CreateCasePreRequisiteCaseworker] + And the request [contains a case Id that has just been created as in F-1026_CreateCasePreRequisiteCaseworker] And the request [contains an event token for the case just created above] And the request [contains some OrganisationPolicy fields with all correct values] And the request [is of caseType where case_data case data has Organisation.OrganisationID and organisationProfile with newCase set to Yes] - And the request [specifying the case to be updated, as created in F-1025_CreateCasePreRequisiteCaseworker] + And the request [specifying the case to be updated, as created in F-1026_CreateCasePreRequisiteCaseworker] And it is submitted to call the [Submit event creation as Case worker] operation of [CCD Data Store] Then a positive response is received And the response has all other details as expected @@ -132,17 +132,17 @@ Feature: F-1025: Submit Case Creation Handle OrganisationProfileField with newCa # v2_external#/case-controller/createEventUsingPOST #------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - @S-1025.10 #AC-10 + @S-1026.10 #AC-10 Scenario: Submit Event is invoked on v2_external#/case-controller/createEventUsingPOST and multiple organisationProfile with newCase set to Yes or No Given a user with [an active profile in CCD] - And a successful call [to create a case] as in [F-1025_CreateCasePreRequisiteCaseworker] + And a successful call [to create a case] as in [F-1026_CreateCasePreRequisiteCaseworker] When a request is prepared with appropriate values - And the request [contains a case Id that has just been created as in F-1025_CreateCasePreRequisiteCaseworker] + And the request [contains a case Id that has just been created as in F-1026_CreateCasePreRequisiteCaseworker] And the request [contains an event token for the case just created above] And the request [contains some OrganisationPolicy fields with all correct values] And the request [is of caseType where case data has Organisation.OrganisationID and multiple organisationProfile with newCase set to Yes or No] - And the request [specifying the case to be updated, as created in F-1025_CreateCasePreRequisiteCaseworker] + And the request [specifying the case to be updated, as created in F-1026_CreateCasePreRequisiteCaseworker] And it is submitted to call the [Submit event creation (v2_ext)] operation of [CCD Data Store] Then a positive response is received diff --git a/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/F-1025_CreateCasePreRequisiteCaseworker.td.json b/src/aat/resources/features/F-1026 - Case create supplementry data with new_case/F-1026_CreateCasePreRequisiteCaseworker.td.json similarity index 93% rename from src/aat/resources/features/F-1025 - Case create supplementry data with new_case/F-1025_CreateCasePreRequisiteCaseworker.td.json rename to src/aat/resources/features/F-1026 - Case create supplementry data with new_case/F-1026_CreateCasePreRequisiteCaseworker.td.json index d45f66a217..e1c9cfd651 100644 --- a/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/F-1025_CreateCasePreRequisiteCaseworker.td.json +++ b/src/aat/resources/features/F-1026 - Case create supplementry data with new_case/F-1026_CreateCasePreRequisiteCaseworker.td.json @@ -1,5 +1,5 @@ { - "_guid_": "F-1025_CreateCasePreRequisiteCaseworker", + "_guid_": "F-1026_CreateCasePreRequisiteCaseworker", "_extends_": "Case_Creation_Data_Base", "specs": [ "to create a case", @@ -7,7 +7,7 @@ ], "prerequisites" : [ { - "Token_Creation": "S-1025_GetCreateToken" + "Token_Creation": "S-1026_GetCreateToken" } ], diff --git a/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/F-1025_Test_Data_Base.td.json b/src/aat/resources/features/F-1026 - Case create supplementry data with new_case/F-1026_Test_Data_Base.td.json similarity index 96% rename from src/aat/resources/features/F-1025 - Case create supplementry data with new_case/F-1025_Test_Data_Base.td.json rename to src/aat/resources/features/F-1026 - Case create supplementry data with new_case/F-1026_Test_Data_Base.td.json index 762ac1b292..db98fec388 100644 --- a/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/F-1025_Test_Data_Base.td.json +++ b/src/aat/resources/features/F-1026 - Case create supplementry data with new_case/F-1026_Test_Data_Base.td.json @@ -1,5 +1,5 @@ { - "_guid_": "F-1025_Test_Data_Base", + "_guid_": "F-1026_Test_Data_Base", "_extends_": "Case_Creation_Base", "users": { diff --git a/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/F-1025_Test_Data_Base_V2.td.json b/src/aat/resources/features/F-1026 - Case create supplementry data with new_case/F-1026_Test_Data_Base_V2.td.json similarity index 92% rename from src/aat/resources/features/F-1025 - Case create supplementry data with new_case/F-1025_Test_Data_Base_V2.td.json rename to src/aat/resources/features/F-1026 - Case create supplementry data with new_case/F-1026_Test_Data_Base_V2.td.json index 151d2b7f2b..f94f087fbf 100644 --- a/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/F-1025_Test_Data_Base_V2.td.json +++ b/src/aat/resources/features/F-1026 - Case create supplementry data with new_case/F-1026_Test_Data_Base_V2.td.json @@ -1,5 +1,5 @@ { - "_guid_": "F-1025_Test_Data_Base_V2", + "_guid_": "F-1026_Test_Data_Base_V2", "_extends_": "Case_Creation_V2_Data_Base", "request": { diff --git a/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/F-1025_Test_Data_Event_Caseworker.td.json b/src/aat/resources/features/F-1026 - Case create supplementry data with new_case/F-1026_Test_Data_Event_Caseworker.td.json similarity index 95% rename from src/aat/resources/features/F-1025 - Case create supplementry data with new_case/F-1025_Test_Data_Event_Caseworker.td.json rename to src/aat/resources/features/F-1026 - Case create supplementry data with new_case/F-1026_Test_Data_Event_Caseworker.td.json index fc83bb7222..4cbcf31f67 100644 --- a/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/F-1025_Test_Data_Event_Caseworker.td.json +++ b/src/aat/resources/features/F-1026 - Case create supplementry data with new_case/F-1026_Test_Data_Event_Caseworker.td.json @@ -1,5 +1,5 @@ { - "_guid_": "F-1025_Test_Data_Event_Caseworker", + "_guid_": "F-1026_Test_Data_Event_Caseworker", "_extends_": "Event_Creation_Caseworker_Base", "users": { diff --git a/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025-GetUpdateEventToken.td.json b/src/aat/resources/features/F-1026 - Case create supplementry data with new_case/S-1026-GetUpdateEventToken.td.json similarity index 86% rename from src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025-GetUpdateEventToken.td.json rename to src/aat/resources/features/F-1026 - Case create supplementry data with new_case/S-1026-GetUpdateEventToken.td.json index 5565076544..d3ef765e77 100644 --- a/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025-GetUpdateEventToken.td.json +++ b/src/aat/resources/features/F-1026 - Case create supplementry data with new_case/S-1026-GetUpdateEventToken.td.json @@ -1,6 +1,6 @@ { "title": "should create an event token for correct inputs", - "_guid_": "S-1025-GetUpdateEventToken", + "_guid_": "S-1026-GetUpdateEventToken", "_extends_": "Token_Creation_Data_For_Master_Caseworker_Case_Creation", "users": { @@ -11,7 +11,7 @@ "request": { "pathVariables": { - "cid": "${[scenarioContext][siblingContexts][F-1025_CreateCasePreRequisiteCaseworker][testData][actualResponse][body][id]}" + "cid": "${[scenarioContext][siblingContexts][F-1026_CreateCasePreRequisiteCaseworker][testData][actualResponse][body][id]}" } }, diff --git a/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025.1.td.json b/src/aat/resources/features/F-1026 - Case create supplementry data with new_case/S-1026.1.td.json similarity index 94% rename from src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025.1.td.json rename to src/aat/resources/features/F-1026 - Case create supplementry data with new_case/S-1026.1.td.json index 69734ef9c3..e4be5d01a1 100644 --- a/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025.1.td.json +++ b/src/aat/resources/features/F-1026 - Case create supplementry data with new_case/S-1026.1.td.json @@ -1,10 +1,10 @@ { - "_guid_": "S-1025.1", - "_extends_": "F-1025_Test_Data_Base", + "_guid_": "S-1026.1", + "_extends_": "F-1026_Test_Data_Base", "title": "Invoke saveCaseDetailsForCaseWorkerUsingPOST and organisationProfile with no newCase", "prerequisites" : [ { - "Token_Creation": "S-1025_GetCreateToken" + "Token_Creation": "S-1026_GetCreateToken" } ], "specs": [ diff --git a/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025.10.td.json b/src/aat/resources/features/F-1026 - Case create supplementry data with new_case/S-1026.10.td.json similarity index 90% rename from src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025.10.td.json rename to src/aat/resources/features/F-1026 - Case create supplementry data with new_case/S-1026.10.td.json index 0be1c72afc..d75dfd676b 100644 --- a/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025.10.td.json +++ b/src/aat/resources/features/F-1026 - Case create supplementry data with new_case/S-1026.10.td.json @@ -1,22 +1,22 @@ { - "_guid_": "S-1025.10", + "_guid_": "S-1026.10", "_extends_": "SubmitEvent_v2Ext__PositiveResponse_Base", "title": "Submit Event Creation is invoked on v2_external#/case-controller/createEventUsingPOST and multiple organisationProfile with newCase set to Yes or No", "prerequisites" : [ { - "Token_Creation": "S-1025_GetUpdateTokenCaseworker" + "Token_Creation": "S-1026_GetUpdateTokenCaseworker" } ], "specs": [ "an active profile in CCD", - "contains a case Id that has just been created as in F-1025_CreateCasePreRequisiteCaseworker", + "contains a case Id that has just been created as in F-1026_CreateCasePreRequisiteCaseworker", "contains an event token for the case just created above", "contains some OrganisationPolicy fields with all correct values", "is of caseType where case data has Organisation.OrganisationID and multiple organisationProfile with newCase set to Yes or No", - "contains correctly configured OrganisationPolicy field in F-1025_CreateCasePreRequisiteCaseworker", - "specifying the case to be updated, as created in F-1025_CreateCasePreRequisiteCaseworker" + "contains correctly configured OrganisationPolicy field in F-1026_CreateCasePreRequisiteCaseworker", + "specifying the case to be updated, as created in F-1026_CreateCasePreRequisiteCaseworker" ], "users": { @@ -27,7 +27,7 @@ "request": { "pathVariables": { - "cid": "${[scenarioContext][childContexts][F-1025_CreateCasePreRequisiteCaseworker][testData][actualResponse][body][id]}" + "cid": "${[scenarioContext][childContexts][F-1026_CreateCasePreRequisiteCaseworker][testData][actualResponse][body][id]}" }, "body": { "data": { diff --git a/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025.2.td.json b/src/aat/resources/features/F-1026 - Case create supplementry data with new_case/S-1026.2.td.json similarity index 94% rename from src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025.2.td.json rename to src/aat/resources/features/F-1026 - Case create supplementry data with new_case/S-1026.2.td.json index 890d1e45d4..f99ebf9da4 100644 --- a/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025.2.td.json +++ b/src/aat/resources/features/F-1026 - Case create supplementry data with new_case/S-1026.2.td.json @@ -1,10 +1,10 @@ { - "_guid_": "S-1025.2", - "_extends_": "F-1025_Test_Data_Base", + "_guid_": "S-1026.2", + "_extends_": "F-1026_Test_Data_Base", "title": "Invoke saveCaseDetailsForCaseWorkerUsingPOST has organisationProfile with newCase set to No", "prerequisites" : [ { - "Token_Creation": "S-1025_GetCreateToken" + "Token_Creation": "S-1026_GetCreateToken" } ], "specs": [ diff --git a/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025.3.td.json b/src/aat/resources/features/F-1026 - Case create supplementry data with new_case/S-1026.3.td.json similarity index 94% rename from src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025.3.td.json rename to src/aat/resources/features/F-1026 - Case create supplementry data with new_case/S-1026.3.td.json index dc793b4c89..ab332ece59 100644 --- a/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025.3.td.json +++ b/src/aat/resources/features/F-1026 - Case create supplementry data with new_case/S-1026.3.td.json @@ -1,10 +1,10 @@ { - "_guid_": "S-1025.3", - "_extends_": "F-1025_Test_Data_Base", + "_guid_": "S-1026.3", + "_extends_": "F-1026_Test_Data_Base", "title": "Invoke saveCaseDetailsForCaseWorkerUsingPOST when OrganisationID is empty", "prerequisites" : [ { - "Token_Creation": "S-1025_GetCreateToken" + "Token_Creation": "S-1026_GetCreateToken" } ], "specs": [ diff --git a/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025.4.td.json b/src/aat/resources/features/F-1026 - Case create supplementry data with new_case/S-1026.4.td.json similarity index 95% rename from src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025.4.td.json rename to src/aat/resources/features/F-1026 - Case create supplementry data with new_case/S-1026.4.td.json index dc6797a831..ead37075c2 100644 --- a/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025.4.td.json +++ b/src/aat/resources/features/F-1026 - Case create supplementry data with new_case/S-1026.4.td.json @@ -1,10 +1,10 @@ { - "_guid_": "S-1025.4", - "_extends_": "F-1025_Test_Data_Base", + "_guid_": "S-1026.4", + "_extends_": "F-1026_Test_Data_Base", "title": "Invoke saveCaseDetailsForCaseWorkerUsingPOST where case_data has organisationProfile with newCase set to YES", "prerequisites" : [ { - "Token_Creation": "S-1025_GetCreateToken" + "Token_Creation": "S-1026_GetCreateToken" } ], "specs": [ diff --git a/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025.5.td.json b/src/aat/resources/features/F-1026 - Case create supplementry data with new_case/S-1026.5.td.json similarity index 96% rename from src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025.5.td.json rename to src/aat/resources/features/F-1026 - Case create supplementry data with new_case/S-1026.5.td.json index 16bf050a85..e9b5116415 100644 --- a/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025.5.td.json +++ b/src/aat/resources/features/F-1026 - Case create supplementry data with new_case/S-1026.5.td.json @@ -1,10 +1,10 @@ { - "_guid_": "S-1025.5", - "_extends_": "F-1025_Test_Data_Base", + "_guid_": "S-1026.5", + "_extends_": "F-1026_Test_Data_Base", "title": "Invoke saveCaseDetailsForCaseWorkerUsingPOST where case_data has multiple organisationProfile with newCase set to YES or NO", "prerequisites" : [ { - "Token_Creation": "S-1025_GetCreateToken" + "Token_Creation": "S-1026_GetCreateToken" } ], "specs": [ diff --git a/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025.6.td.json b/src/aat/resources/features/F-1026 - Case create supplementry data with new_case/S-1026.6.td.json similarity index 94% rename from src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025.6.td.json rename to src/aat/resources/features/F-1026 - Case create supplementry data with new_case/S-1026.6.td.json index b3ea542d62..f9b507556c 100644 --- a/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025.6.td.json +++ b/src/aat/resources/features/F-1026 - Case create supplementry data with new_case/S-1026.6.td.json @@ -1,10 +1,10 @@ { - "_guid_": "S-1025.6", - "_extends_": "F-1025_Test_Data_Base_V2", + "_guid_": "S-1026.6", + "_extends_": "F-1026_Test_Data_Base_V2", "title": "Invoke v2_external#/case-controller/createCaseUsingPOST has organisationProfile with newCase set to No", "prerequisites" : [ { - "Token_Creation": "S-1025_GetCreateToken" + "Token_Creation": "S-1026_GetCreateToken" } ], "specs": [ diff --git a/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025.7.td.json b/src/aat/resources/features/F-1026 - Case create supplementry data with new_case/S-1026.7.td.json similarity index 94% rename from src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025.7.td.json rename to src/aat/resources/features/F-1026 - Case create supplementry data with new_case/S-1026.7.td.json index 4fbd214a30..f46951e6d1 100644 --- a/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025.7.td.json +++ b/src/aat/resources/features/F-1026 - Case create supplementry data with new_case/S-1026.7.td.json @@ -1,10 +1,10 @@ { - "_guid_": "S-1025.7", - "_extends_": "F-1025_Test_Data_Base_V2", + "_guid_": "S-1026.7", + "_extends_": "F-1026_Test_Data_Base_V2", "title": "Invoke v2_external#/case-controller/createCaseUsingPOST has organisationProfile with newCase set to Yes", "prerequisites" : [ { - "Token_Creation": "S-1025_GetCreateToken" + "Token_Creation": "S-1026_GetCreateToken" } ], "specs": [ diff --git a/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025.8.td.json b/src/aat/resources/features/F-1026 - Case create supplementry data with new_case/S-1026.8.td.json similarity index 96% rename from src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025.8.td.json rename to src/aat/resources/features/F-1026 - Case create supplementry data with new_case/S-1026.8.td.json index a8d0a08802..13877bfe67 100644 --- a/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025.8.td.json +++ b/src/aat/resources/features/F-1026 - Case create supplementry data with new_case/S-1026.8.td.json @@ -1,10 +1,10 @@ { - "_guid_": "S-1025.8", - "_extends_": "F-1025_Test_Data_Base_V2", + "_guid_": "S-1026.8", + "_extends_": "F-1026_Test_Data_Base_V2", "title": "Invoke v2_external#/case-controller/createCaseUsingPOST and where case_data has multiple organisationProfile with newCase set to YES/No", "prerequisites" : [ { - "Token_Creation": "S-1025_GetCreateToken" + "Token_Creation": "S-1026_GetCreateToken" } ], "specs": [ diff --git a/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025.9.td.json b/src/aat/resources/features/F-1026 - Case create supplementry data with new_case/S-1026.9.td.json similarity index 87% rename from src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025.9.td.json rename to src/aat/resources/features/F-1026 - Case create supplementry data with new_case/S-1026.9.td.json index d9a02f7161..fd9448716e 100644 --- a/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025.9.td.json +++ b/src/aat/resources/features/F-1026 - Case create supplementry data with new_case/S-1026.9.td.json @@ -1,27 +1,27 @@ { - "_guid_": "S-1025.9", - "_extends_": "F-1025_Test_Data_Event_Caseworker", + "_guid_": "S-1026.9", + "_extends_": "F-1026_Test_Data_Event_Caseworker", "title": "Submit Event is invoked on v1_external#/case-details-endpoint/createCaseEventForCaseWorkerUsingPOST and case_data has organisationProfile with newCase set to YES", "prerequisites" : [ { - "Token_Creation": "S-1025_GetUpdateTokenCaseworker" + "Token_Creation": "S-1026_GetUpdateTokenCaseworker" } ], "specs": [ "an active profile in CCD", - "contains a case Id that has just been created as in F-1025_CreateCasePreRequisiteCaseworker", + "contains a case Id that has just been created as in F-1026_CreateCasePreRequisiteCaseworker", "contains an event token for the case just created above", "contains some OrganisationPolicy fields with all correct values", "is of caseType where case_data case data has Organisation.OrganisationID and organisationProfile with newCase set to Yes", - "contains correctly configured OrganisationPolicy field in F-1025_CreateCasePreRequisiteCaseworker", - "specifying the case to be updated, as created in F-1025_CreateCasePreRequisiteCaseworker" + "contains correctly configured OrganisationPolicy field in F-1026_CreateCasePreRequisiteCaseworker", + "specifying the case to be updated, as created in F-1026_CreateCasePreRequisiteCaseworker" ], "request": { "pathVariables": { "ctid" : "FT_NewCaseSupplementry", - "cid": "${[scenarioContext][childContexts][F-1025_CreateCasePreRequisiteCaseworker][testData][actualResponse][body][id]}" + "cid": "${[scenarioContext][childContexts][F-1026_CreateCasePreRequisiteCaseworker][testData][actualResponse][body][id]}" }, "headers": { "_extends_": "Common_Request_Headers" diff --git a/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025_GetCreateToken.td.json b/src/aat/resources/features/F-1026 - Case create supplementry data with new_case/S-1026_GetCreateToken.td.json similarity index 92% rename from src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025_GetCreateToken.td.json rename to src/aat/resources/features/F-1026 - Case create supplementry data with new_case/S-1026_GetCreateToken.td.json index d17872efcf..2276d23ac9 100644 --- a/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025_GetCreateToken.td.json +++ b/src/aat/resources/features/F-1026 - Case create supplementry data with new_case/S-1026_GetCreateToken.td.json @@ -1,5 +1,5 @@ { - "_guid_": "S-1025_GetCreateToken", + "_guid_": "S-1026_GetCreateToken", "_extends_": "Standard_Token_Creation_Data_For_Case_Creation", "specs": [ diff --git a/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025_GetEventTokenBase.td.json b/src/aat/resources/features/F-1026 - Case create supplementry data with new_case/S-1026_GetEventTokenBase.td.json similarity index 94% rename from src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025_GetEventTokenBase.td.json rename to src/aat/resources/features/F-1026 - Case create supplementry data with new_case/S-1026_GetEventTokenBase.td.json index 6b8f9632c9..7cd64dca2f 100644 --- a/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025_GetEventTokenBase.td.json +++ b/src/aat/resources/features/F-1026 - Case create supplementry data with new_case/S-1026_GetEventTokenBase.td.json @@ -1,5 +1,5 @@ { - "_guid_": "S-1025_GetEventTokenBase", + "_guid_": "S-1026_GetEventTokenBase", "_extends_": "StartEvent_v2Ext__PositiveResponse_Base", "specs": [ diff --git a/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025_GetUpdateTokenCaseworker.td.json b/src/aat/resources/features/F-1026 - Case create supplementry data with new_case/S-1026_GetUpdateTokenCaseworker.td.json similarity index 59% rename from src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025_GetUpdateTokenCaseworker.td.json rename to src/aat/resources/features/F-1026 - Case create supplementry data with new_case/S-1026_GetUpdateTokenCaseworker.td.json index b28c66f07d..57dd9fc6a0 100644 --- a/src/aat/resources/features/F-1025 - Case create supplementry data with new_case/S-1025_GetUpdateTokenCaseworker.td.json +++ b/src/aat/resources/features/F-1026 - Case create supplementry data with new_case/S-1026_GetUpdateTokenCaseworker.td.json @@ -1,6 +1,6 @@ { - "_guid_": "S-1025_GetUpdateTokenCaseworker", - "_extends_": "S-1025_GetEventTokenBase", + "_guid_": "S-1026_GetUpdateTokenCaseworker", + "_extends_": "S-1026_GetEventTokenBase", "users": { "invokingUser": { @@ -10,7 +10,7 @@ "request": { "pathVariables": { - "cid": "${[scenarioContext][parentContext][childContexts][F-1025_CreateCasePreRequisiteCaseworker][testData][actualResponse][body][id]}" + "cid": "${[scenarioContext][parentContext][childContexts][F-1026_CreateCasePreRequisiteCaseworker][testData][actualResponse][body][id]}" } } } From fec4837802d566be460ccd359343def35a094749 Mon Sep 17 00:00:00 2001 From: patelila Date: Fri, 9 May 2025 17:46:49 +0100 Subject: [PATCH 38/38] resolving conflicts --- ...e_Autotest_Test_Data_Base_External.td.json | 35 -------- .../F-1025_Test_Data_Base_Internal.td.json | 35 -------- ...025_Test_Data_Base_NoRead_Internal.td.json | 39 --------- .../S-1025.1.td.json | 26 ------ .../S-1025.2.td.json | 59 ------------- .../S-1025.3.td.json | 21 ----- .../S-1025_Get_Case_Data_Internal.td.json | 83 ------------------- ...1025_Get_Case_Data_NoRead_Internal.td.json | 65 --------------- ...rivate_Autotest_Case_Data_External.td.json | 83 ------------------- 9 files changed, 446 deletions(-) delete mode 100644 src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/F-1025_Private_Autotest_Test_Data_Base_External.td.json delete mode 100644 src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/F-1025_Test_Data_Base_Internal.td.json delete mode 100644 src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/F-1025_Test_Data_Base_NoRead_Internal.td.json delete mode 100644 src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/S-1025.1.td.json delete mode 100644 src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/S-1025.2.td.json delete mode 100644 src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/S-1025.3.td.json delete mode 100644 src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/S-1025_Get_Case_Data_Internal.td.json delete mode 100644 src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/S-1025_Get_Case_Data_NoRead_Internal.td.json delete mode 100644 src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/S-1025_Get_Private_Autotest_Case_Data_External.td.json diff --git a/src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/F-1025_Private_Autotest_Test_Data_Base_External.td.json b/src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/F-1025_Private_Autotest_Test_Data_Base_External.td.json deleted file mode 100644 index 73972bc06b..0000000000 --- a/src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/F-1025_Private_Autotest_Test_Data_Base_External.td.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "_guid_": "F-1025_Private_Autotest_Test_Data_Base_External", - - "productName": "CCD Data Store", - "operationName": "Retrieve a CaseView Event by case and event id for access to External Parties", - - "method": "GET", - "uri": "/internal/cases/{cid}/events/{eventId}", - - "users": { - "invokingUser": { - "_extends_": "ExternalCaseworkerSolicitor" - } - }, - - "request": { - "headers": { - "_extends_": "Common_Request_Headers", - "experimental": true, - "Content-Type": "application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-event-view.v2+json;charset=UTF-8" - }, - "pathVariables": { - "cid": "${[scenarioContext][childContexts][Private_Autotest_Case_Data_Extension_External][testData][actualResponse][body][id]}", - "eventId": "${[scenarioContext][childContexts][S-1025_Get_Private_Autotest_Case_Data_External][testData][actualResponse][body][events][0][id]}" - } - }, - - "expectedResponse": { - "headers": { - "Content-Encoding": "gzip", - "Content-Length": "[[ANYTHING_PRESENT]]", - "Content-Type": "[[ANYTHING_PRESENT]]" - } - } -} diff --git a/src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/F-1025_Test_Data_Base_Internal.td.json b/src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/F-1025_Test_Data_Base_Internal.td.json deleted file mode 100644 index 6da174f2ef..0000000000 --- a/src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/F-1025_Test_Data_Base_Internal.td.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "_guid_": "F-1025_Test_Data_Base_Internal", - - "productName": "CCD Data Store", - "operationName": "Retrieve a CaseView Event by case and event id for access to Internal Parties", - - "method": "GET", - "uri": "/internal/cases/{cid}/events/{eventId}", - - "users": { - "invokingUser": { - "_extends_": "BeftaCaseworker1" - } - }, - - "request": { - "headers": { - "_extends_": "Common_Request_Headers", - "experimental": true, - "Content-Type": "application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-event-view.v2+json;charset=UTF-8" - }, - "pathVariables": { - "cid": "${[scenarioContext][childContexts][Befta_Case_Data_Extension_Internal][testData][actualResponse][body][id]}", - "eventId": "${[scenarioContext][childContexts][S-1025_Get_Case_Data_Internal][testData][actualResponse][body][events][0][id]}" - } - }, - - "expectedResponse": { - "headers": { - "Content-Encoding": "gzip", - "Content-Length": "[[ANYTHING_PRESENT]]", - "Content-Type": "[[ANYTHING_PRESENT]]" - } - } -} diff --git a/src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/F-1025_Test_Data_Base_NoRead_Internal.td.json b/src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/F-1025_Test_Data_Base_NoRead_Internal.td.json deleted file mode 100644 index 1a9d3497b8..0000000000 --- a/src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/F-1025_Test_Data_Base_NoRead_Internal.td.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "_guid_": "F-1025_Test_Data_Base_NoRead_Internal", - - "productName": "CCD Data Store", - "operationName": "Retrieve a CaseView Event by case and event id for access to Internal Parties", - - "method": "GET", - "uri": "/internal/cases/{cid}/events/{eventId}", - - "users": { - "invokingUser": { - "_extends_": "BeftaCaseworker1" - } - }, - - "request": { - "headers": { - "_extends_": "Common_Request_Headers", - "experimental": true, - "Content-Type": "application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-event-view.v2+json;charset=UTF-8" - }, - "pathVariables": { - "cid": "${[scenarioContext][childContexts][Befta_Case_Data_Extension_NoRead_Internal][testData][actualResponse][body][id]}" - }, - "body": { - "data": { - - } - } - }, - - "expectedResponse": { - "headers": { - "Content-Encoding": "gzip", - "Content-Length": "[[ANYTHING_PRESENT]]", - "Content-Type": "[[ANYTHING_PRESENT]]" - } - } -} diff --git a/src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/S-1025.1.td.json b/src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/S-1025.1.td.json deleted file mode 100644 index 68e710d616..0000000000 --- a/src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/S-1025.1.td.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "_guid_": "S-1025.1", - "_extends_": "F-1025_Private_Autotest_Test_Data_Base_External", - "title": "must return negative response for Specific Case Event Data accessible by External Parties", - - "specs": [ - "an active profile in CCD", - "contains the reference of the case just created and the event id valid for that case", - "contains a case that has just been created as in S-1025_Get_Private_AutoTest_Case_Data_External", - "contains details of the case just created, along with an HTTP-200 OK", - "contains the case view history, along with an HTTP-403 Forbidden", - "contains HTTP 403 Forbidden" - ], - - "expectedResponse": { - "_extends_": "Common_403_Response", - "body": { - "exception": "uk.gov.hmcts.ccd.endpoint.exceptions.CaseHistoryRoleAccessException", - "message": "Case History not accessible to the user", - "details": null, - "callbackErrors": null, - "callbackWarnings": null - - } - } -} diff --git a/src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/S-1025.2.td.json b/src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/S-1025.2.td.json deleted file mode 100644 index c52a98da4a..0000000000 --- a/src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/S-1025.2.td.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "_guid_": "S-1025.2", - "_extends_": "F-1025_Test_Data_Base_Internal", - "title": "should retrieve case view with response code HTTP 200 when the case reference and case event exists response for authorised access by Internal Parties", - - "specs": [ - "an active profile in CCD", - "contains the reference of the case just created and the event id valid for that case", - "contains a case that has just been created as in S-1025_Get_Case_Data_Internal", - "contains details of the case just created, along with an HTTP-200 OK", - "contains the case view history", - "contains HTTP 200 Ok" - ], - - "expectedResponse": { - "_extends_": "Common_200_Response", - "headers": { - "Content-Type": "application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-event-view.v2+json;charset=UTF-8" - }, - "body": { - "tabs": "[[ANYTHING_PRESENT]]", - "metadataFields": null, - "_links": { - "self": { - "href": "[[ANYTHING_PRESENT]]" - } - }, - "case_id": "[[ANYTHING_PRESENT]]", - "case_type": { - "id": "BEFTA_CASETYPE_1_1", - "name": "BEFTA Case Type 1 1", - "description": "Create a case of type BEFTA_CASETYPE_1_1", - "jurisdiction": { - "id": "BEFTA_JURISDICTION_1", - "name": "BEFTA_JURISDICTION_1", - "description": "Content for the Test Jurisdiction." - }, - "printEnabled": false - }, - "event": { - "id": "[[ANYTHING_PRESENT]]", - "timestamp": "[[ANYTHING_PRESENT]]", - "summary": "", - "comment": "", - "event_id": "CREATE", - "event_name": "Create a new case", - "user_id": "[[ANYTHING_PRESENT]]", - "user_last_name": "[[ANYTHING_PRESENT]]", - "user_first_name": "[[ANYTHING_PRESENT]]", - "state_name": "To do", - "state_id": "TODO", - "significant_item": null, - "proxied_by" : null, - "proxied_by_last_name" : null, - "proxied_by_first_name" : null - } - } - } -} diff --git a/src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/S-1025.3.td.json b/src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/S-1025.3.td.json deleted file mode 100644 index f410f9f6dc..0000000000 --- a/src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/S-1025.3.td.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "_guid_": "S-1025.3", - "_extends_": "F-1025_Test_Data_Base_NoRead_Internal", - "title": "must return negative response for unauthorised access by Internal Parties", - - "specs": [ - "an active profile in CCD", - "contains the reference of the case just created and the response will not contain event history case data", - "contains a case that has just been created as in S-1025_Get_Case_Data_NoRead_Internal", - "contains details of the case just created, along with an HTTP-200 OK", - "contains the case view history, along with an HTTP-401 Unauthorised", - "includes a HTTP 401 Unauthorised" - ], - - "expectedResponse": { - "_extends_": "Common_401_Response", - "body": { - "message": "Unauthorised" - } - } -} diff --git a/src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/S-1025_Get_Case_Data_Internal.td.json b/src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/S-1025_Get_Case_Data_Internal.td.json deleted file mode 100644 index 01c893f84e..0000000000 --- a/src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/S-1025_Get_Case_Data_Internal.td.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "_guid_": "S-1025_Get_Case_Data_Internal", - "title": "to get the details about case event for the case just created", - - "productName": "CCD Data Store", - "operationName": "Retrieve a CaseView Event by case for access to Internal Parties", - - "method": "GET", - "uri": "/internal/cases/{cid}", - - "specs": [ - "to get the details about case event for the case just created" - ], - - "users": { - "invokingUser": { - "_extends_": "BeftaCaseworker1" - } - }, - - "request": { - "headers": { - "experimental": true, - "_extends_": "Common_Request_Headers" - }, - "pathVariables": { - "cid": "${[scenarioContext][parentContext][childContexts][Befta_Case_Data_Extension_Internal][testData][actualResponse][body][id]}" - } - }, - - "expectedResponse": { - "_extends_": "Common_200_Response", - "headers": { - "Content-Length": "[[ANYTHING_PRESENT]]", - "Content-Type": "[[ANYTHING_PRESENT]]", - "Content-Encoding": "gzip" - }, - "body": { - "_links": { - "self": { - "href": "[[ANYTHING_PRESENT]]" - } - }, - "case_id": "[[ANYTHING_PRESENT]]", - "case_type": { - "id": "BEFTA_CASETYPE_1_1", - "name": "BEFTA Case Type 1 1", - "description": "Create a case of type BEFTA_CASETYPE_1_1", - "jurisdiction": { - "id": "BEFTA_JURISDICTION_1", - "name": "BEFTA_JURISDICTION_1", - "description": "Content for the Test Jurisdiction." - }, - "printEnabled": false - }, - "tabs": "[[ANYTHING_PRESENT]]", - "metadataFields": "[[ANYTHING_PRESENT]]", - "state": "[[ANYTHING_PRESENT]]", - "triggers": "[[ANYTHING_PRESENT]]", - "events": [ - { - "id": "[[ANYTHING_PRESENT]]", - "timestamp": "[[ANYTHING_PRESENT]]", - "summary": "", - "comment": "", - "event_id": "CREATE", - "event_name": "Create a new case", - "user_id": "[[ANYTHING_PRESENT]]", - "user_last_name": "[[ANYTHING_PRESENT]]", - "user_first_name": "[[ANYTHING_PRESENT]]", - "state_name": "To do", - "state_id": "TODO", - "significant_item": null, - "proxied_by" : null, - "proxied_by_last_name" : null, - "proxied_by_first_name" : null - } - ] - } - } -} - - diff --git a/src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/S-1025_Get_Case_Data_NoRead_Internal.td.json b/src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/S-1025_Get_Case_Data_NoRead_Internal.td.json deleted file mode 100644 index 639600f640..0000000000 --- a/src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/S-1025_Get_Case_Data_NoRead_Internal.td.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "_guid_": "S-1025_Get_Case_Data_NoRead_Internal", - "title": "to get the details about case event for the case just created", - - "productName": "CCD Data Store", - "operationName": "Retrieve a CaseView Event by case for access to Internal Parties", - - "method": "GET", - "uri": "/internal/cases/{cid}", - - "specs": [ - "to get the details about case event for the case just created" - ], - - "users": { - "invokingUser": { - "_extends_": "BeftaCaseworker1" - } - }, - - "request": { - "headers": { - "experimental": true, - "_extends_": "Common_Request_Headers" - }, - "pathVariables": { - "cid": "${[scenarioContext][parentContext][childContexts][Befta_Case_Data_Extension_NoRead_Internal][testData][actualResponse][body][id]}" - } - }, - - "expectedResponse": { - "_extends_": "Common_200_Response", - "headers": { - "Content-Length": "[[ANYTHING_PRESENT]]", - "Content-Type": "[[ANYTHING_PRESENT]]", - "Content-Encoding": "gzip" - }, - "body": { - "_links": { - "self": { - "href": "[[ANYTHING_PRESENT]]" - } - }, - "case_id": "[[ANYTHING_PRESENT]]", - "case_type": { - "id": "BEFTA_CASETYPE_NO_READ", - "name": "BEFTA Case Type No Read", - "description": "Create a case of type BEFTA_CASETYPE_NO_READ", - "jurisdiction": { - "id": "BEFTA_JURISDICTION_1", - "name": "BEFTA_JURISDICTION_1", - "description": "Content for the Test Jurisdiction." - }, - "printEnabled": false - }, - "tabs": "[[ANYTHING_PRESENT]]", - "metadataFields": "[[ANYTHING_PRESENT]]", - "state": "[[ANYTHING_PRESENT]]", - "triggers": "[[ANYTHING_PRESENT]]", - "events": [] - } - } -} - - diff --git a/src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/S-1025_Get_Private_Autotest_Case_Data_External.td.json b/src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/S-1025_Get_Private_Autotest_Case_Data_External.td.json deleted file mode 100644 index 9452222ccb..0000000000 --- a/src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/S-1025_Get_Private_Autotest_Case_Data_External.td.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "_guid_": "S-1025_Get_Private_Autotest_Case_Data_External", - "title": "to get the details about case event for the case just created", - - "productName": "CCD Data Store", - "operationName": "Retrieve a CaseView Event by case for access to External Parties", - - "method": "GET", - "uri": "/internal/cases/{cid}", - - "specs": [ - "to get the details about case event for the case just created" - ], - - "users": { - "invokingUser": { - "_extends_": "ExternalCaseworkerSolicitor" - } - }, - - "request": { - "headers": { - "experimental": true, - "_extends_": "Common_Request_Headers" - }, - "pathVariables": { - "cid": "${[scenarioContext][parentContext][childContexts][Private_Autotest_Case_Data_Extension_External][testData][actualResponse][body][id]}" - } - }, - - "expectedResponse": { - "_extends_": "Common_200_Response", - "headers": { - "Content-Length": "[[ANYTHING_PRESENT]]", - "Content-Type": "[[ANYTHING_PRESENT]]", - "Content-Encoding": "gzip" - }, - "body": { - "_links": { - "self": { - "href": "[[ANYTHING_PRESENT]]" - } - }, - "case_id": "[[ANYTHING_PRESENT]]", - "case_type": { - "id": "AAT_PRIVATE", - "name": "Case type for AAT_PRIVATE", - "description": "Demonstrate AAT_PRIVATE's capability", - "jurisdiction": { - "id": "AUTOTEST1", - "name": "Auto Test 1", - "description": "Content for the Test Jurisdiction." - }, - "printEnabled": false - }, - "tabs": "[[ANYTHING_PRESENT]]", - "metadataFields": "[[ANYTHING_PRESENT]]", - "state": "[[ANYTHING_PRESENT]]", - "triggers": "[[ANYTHING_PRESENT]]", - "events": [ - { - "id": "[[ANYTHING_PRESENT]]", - "timestamp": "[[ANYTHING_PRESENT]]", - "summary": "", - "comment": "", - "event_id": "CREATE", - "event_name": "Create a new case", - "user_id": "[[ANYTHING_PRESENT]]", - "user_last_name": "[[ANYTHING_PRESENT]]", - "user_first_name": "[[ANYTHING_PRESENT]]", - "state_name": "To do", - "state_id": "TODO", - "significant_item": null, - "proxied_by" : null, - "proxied_by_last_name" : null, - "proxied_by_first_name" : null - } - ] - } - } -} - -