Skip to content

Commit

Permalink
COT-818 - adding case allocator for salaried judge (#1815)
Browse files Browse the repository at this point in the history
Co-authored-by: mikebrownccd <104495891+mikebrownccd@users.noreply.github.com>
  • Loading branch information
anthonydummer and mikebrownccd authored Mar 7, 2024
1 parent 0920587 commit 78a6e19
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ when
$f: FeatureFlag(status && flagName == FeatureFlagEnum.EMPLOYMENT_WA_1_0.getValue())
$joh: JudicialOfficeHolder(office in ( "EMPLOYMENT President of Tribunal-Salaried",
"EMPLOYMENT Vice President-Salaried",
"EMPLOYMENT Regional Employment Judge-Salaried"))
"EMPLOYMENT Regional Employment Judge-Salaried",
"EMPLOYMENT Employment Judge-Salaried"))
then
Map<String,JsonNode> attribute = new HashMap<>();
attribute.put("contractType", JacksonUtils.convertObjectIntoJsonNode("Salaried"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ static Stream<Arguments> endToEndData() {
false,
true,
List.of("Employment Judge"),
List.of("judge", "hmcts-judiciary", "hearing-viewer"),
List.of("judge", "hmcts-judiciary", "hearing-viewer", "case-allocator"),
null),
Arguments.of("Employment Judge",
"Fee Paid",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import uk.gov.hmcts.reform.orgrolemapping.domain.model.enums.GrantType;
import uk.gov.hmcts.reform.orgrolemapping.helper.TestDataBuilder;

import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -125,7 +126,7 @@ void shouldReturnPresidentOfTribunalVicePresidentRegionalEmploymentJudgeSalaried

@ParameterizedTest
@CsvSource({
"EMPLOYMENT Employment Judge-Salaried,judge,hmcts-judiciary"
"EMPLOYMENT Employment Judge-Salaried,judge,hmcts-judiciary,case-allocator"
})
void shouldReturnEmploymentJudgeSalariedRoles(String setOffice,
@AggregateWith(VarargsAggregator.class) String[] roleNameOutput) {
Expand All @@ -141,7 +142,7 @@ void shouldReturnEmploymentJudgeSalariedRoles(String setOffice,
assertEquals(judicialOfficeHolders.stream().iterator().next().getUserId(),roleAssignments.get(0).getActorId());
assertThat(roleAssignments.stream().map(RoleAssignment::getRoleName).collect(Collectors.toList()),
containsInAnyOrder(roleNameOutput));
assertEquals(2, roleAssignments.size());
assertEquals(Arrays.stream(roleNameOutput).count(), roleAssignments.size());
String regionId = allProfiles.iterator().next().getRegionId();
roleAssignments.forEach(r -> {
assertEquals("Salaried", r.getAttributes().get("contractType").asText());
Expand Down

0 comments on commit 78a6e19

Please sign in to comment.