diff --git a/client/app/nonComp/components/IndividualClaimHistoryTable.jsx b/client/app/nonComp/components/IndividualClaimHistoryTable.jsx index 772b5b9a340..d4a5c933d99 100644 --- a/client/app/nonComp/components/IndividualClaimHistoryTable.jsx +++ b/client/app/nonComp/components/IndividualClaimHistoryTable.jsx @@ -46,13 +46,12 @@ const IndividualClaimHistoryTable = (props) => { }; const ClaimClosedFragment = (details) => { - let component = null; switch (details.eventType) { case 'cancelled': component = - Claim cancelled. + Claim cancelled. ; break; default: diff --git a/spec/feature/non_comp/individual_claim_history_spec.rb b/spec/feature/non_comp/individual_claim_history_spec.rb index f89bd2e36b1..1d7513bfd9a 100644 --- a/spec/feature/non_comp/individual_claim_history_spec.rb +++ b/spec/feature/non_comp/individual_claim_history_spec.rb @@ -667,7 +667,7 @@ end end - context "should do expected details to show claim closed" do + context "should do expected details to show claim closed when cancelled" do before { visit "/decision_reviews/vha/tasks/#{cancelled_claim.tasks[0].id}/history" } it "Claim Cancelled" do @@ -676,12 +676,12 @@ dropdown_filter = page.find(class: "cf-dropdown-filter") dropdown_filter.find("label", text: "Claim closed (1)", match: :prefer_exact).click - table = page.find("tbody") expect(table).to have_selector("tr", count: 1) table_row = table.first("tr") - expect(table_row).to have_content("Claim closed.") + expect(table_row).to have_content("Claim closed") + expect(table_row).to have_content("Claim cancelled.") end end end diff --git a/spec/services/claim_change_history/change_history_event_serializer_spec.rb b/spec/services/claim_change_history/change_history_event_serializer_spec.rb index 474ea72db40..39cfac56c98 100644 --- a/spec/services/claim_change_history/change_history_event_serializer_spec.rb +++ b/spec/services/claim_change_history/change_history_event_serializer_spec.rb @@ -36,6 +36,24 @@ ClaimHistoryService.new(vha_org, task_id: vha_task.id).build_events end + let(:modificationRequestDetailsObject) do + { + benefitType: "vha", + requestType: nil, + issueModificationRequestWithdrawalDate: nil, + modificationRequestReason: nil, + newDecisionDate: nil, + newIssueDescription: nil, + newIssueType: nil, + removeOriginalIssue: nil, + issueModificationRequestStatus: nil, + requestor: nil, + decider: nil, + decidedAtDate: nil, + decisionReason: nil + } + end + let(:serialized_hash_array) do [ { @@ -60,22 +78,7 @@ issueType: nil, withdrawalRequestDate: nil }, - modificationRequestDetails: - { - benefitType: "vha", - requestType: nil, - issueModificationRequestWithdrawalDate: nil, - modificationRequestReason: nil, - newDecisionDate: nil, - newIssueDescription: nil, - newIssueType: nil, - removeOriginalIssue: nil, - issueModificationRequestStatus: nil, - requestor: nil, - decider: nil, - decidedAtDate: nil, - decisionReason: nil - } + modificationRequestDetails: modificationRequestDetailsObject } }, { @@ -96,22 +99,7 @@ issueType: "Other", withdrawalRequestDate: nil }, - modificationRequestDetails: - { - benefitType: "vha", - requestType: nil, - issueModificationRequestWithdrawalDate: nil, - modificationRequestReason: nil, - newDecisionDate: nil, - newIssueDescription: nil, - newIssueType: nil, - removeOriginalIssue: nil, - issueModificationRequestStatus: nil, - requestor: nil, - decider: nil, - decidedAtDate: nil, - decisionReason: nil - }, + modificationRequestDetails: modificationRequestDetailsObject, eventDate: events[1].event_date, eventType: :added_issue, eventUser: "L. Roth",