Skip to content

Commit

Permalink
feat(clearinghouse): add comments to process step and application che…
Browse files Browse the repository at this point in the history
…cklist

enhance application checklist with a comment of the skipped self description step

Refs: #837
  • Loading branch information
Phil91 committed Jul 18, 2024
1 parent 1816125 commit 94de1eb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,16 @@ public Task RegisterConnectorAsync(
if (_settings.ClearinghouseConnectDisabled)
{
return new IApplicationChecklistService.WorkerChecklistProcessStepExecutionResult(
ProcessStepStatusId.DONE,
entry => entry.ApplicationChecklistEntryStatusId = ApplicationChecklistEntryStatusId.DONE,
ProcessStepStatusId.SKIPPED,
entry =>
{
entry.ApplicationChecklistEntryStatusId = ApplicationChecklistEntryStatusId.DONE;
entry.Comment = "Self description was skipped due to clearinghouse trigger is disabled";
},
new[] { ProcessStepTypeId.ACTIVATE_APPLICATION },
null,
true,
null
"Self description was skipped due to clearinghouse trigger is disabled"
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,12 @@ public async Task StartSelfDescriptionRegistration_WithValidData_CompanyIsUpdate
result.Should().NotBeNull();
result.ModifyChecklistEntry.Should().NotBeNull();
result.ModifyChecklistEntry!.Invoke(entry);
result.ProcessMessage.Should().Be(clearinghouseConnectDisabled ? "Self description was skipped due to clearinghouse trigger is disabled" : null);
entry.ApplicationChecklistEntryStatusId.Should().Be(clearinghouseConnectDisabled ? ApplicationChecklistEntryStatusId.DONE : ApplicationChecklistEntryStatusId.IN_PROGRESS);
result.ScheduleStepTypeIds.Should().ContainSingle().And.Match(x => clearinghouseConnectDisabled ? x.Single() == ProcessStepTypeId.ACTIVATE_APPLICATION : x.Single() == ProcessStepTypeId.FINISH_SELF_DESCRIPTION_LP);
result.SkipStepTypeIds.Should().BeNull();
result.Modified.Should().BeTrue();
result.StepStatusId.Should().Be(clearinghouseConnectDisabled ? ProcessStepStatusId.SKIPPED : ProcessStepStatusId.DONE);
}

[Fact]
Expand Down

0 comments on commit 94de1eb

Please sign in to comment.