Skip to content

Commit

Permalink
CIV-15702 Made Progressable tasks to Inactive (#5792)
Browse files Browse the repository at this point in the history
Co-authored-by: neeta-hmcts <[email protected]>
Co-authored-by: CourtneySuhr-Solirius <[email protected]>
Co-authored-by: sankhajuria <[email protected]>
  • Loading branch information
4 people authored Nov 12, 2024
1 parent e8f8dbc commit 66430e5
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,19 @@ public List<CaseEvent> handledEvents() {
public String getScenario(CaseData caseData) {
return SCENARIO_AAA6_CLAIMANT_INTENT_CLAIM_SETTLED_EVENT_CLAIMANT.getScenario();
}

@Override
protected void beforeRecordScenario(CaseData caseData, String authToken) {
dashboardApiClient.deleteNotificationsForCaseIdentifierAndRole(
caseData.getCcdCaseReference().toString(),
"CLAIMANT",
authToken
);

dashboardApiClient.makeProgressAbleTasksInactiveForCaseIdentifierAndRole(
caseData.getCcdCaseReference().toString(),
"CLAIMANT",
authToken
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,19 @@ public List<CaseEvent> handledEvents() {
public String getScenario(CaseData caseData) {
return SCENARIO_AAA6_CLAIMANT_INTENT_CLAIM_SETTLE_EVENT_DEFENDANT.getScenario();
}

@Override
protected void beforeRecordScenario(CaseData caseData, String authToken) {
dashboardApiClient.deleteNotificationsForCaseIdentifierAndRole(
caseData.getCcdCaseReference().toString(),
"DEFENDANT",
authToken
);

dashboardApiClient.makeProgressAbleTasksInactiveForCaseIdentifierAndRole(
caseData.getCcdCaseReference().toString(),
"DEFENDANT",
authToken
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,15 @@ void shouldRecordScenario_whenInvoked() {
).build();

handler.handle(params);
verify(dashboardApiClient).deleteNotificationsForCaseIdentifierAndRole(
caseData.getCcdCaseReference().toString(),
"CLAIMANT",
"BEARER_TOKEN");
verify(dashboardApiClient).makeProgressAbleTasksInactiveForCaseIdentifierAndRole(
caseData.getCcdCaseReference().toString(),
"CLAIMANT",
"BEARER_TOKEN");

verify(dashboardApiClient).recordScenario(
caseData.getCcdCaseReference().toString(),
"Scenario.AAA6.ClaimantIntent.ClaimSettledEvent.Claimant",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,15 @@ void shouldRecordScenario_whenInvoked() {
).build();

handler.handle(params);
verify(dashboardApiClient).deleteNotificationsForCaseIdentifierAndRole(
caseData.getCcdCaseReference().toString(),
"DEFENDANT",
"BEARER_TOKEN");
verify(dashboardApiClient).makeProgressAbleTasksInactiveForCaseIdentifierAndRole(
caseData.getCcdCaseReference().toString(),
"DEFENDANT",
"BEARER_TOKEN");

verify(dashboardApiClient).recordScenario(
caseData.getCcdCaseReference().toString(),
SCENARIO_AAA6_CLAIMANT_INTENT_CLAIM_SETTLE_EVENT_DEFENDANT.getScenario(),
Expand Down

0 comments on commit 66430e5

Please sign in to comment.