Skip to content

Commit

Permalink
fix(fe:FSADT1-1654): Submission review - Display birthdate for Sole p…
Browse files Browse the repository at this point in the history
…roprietorship (#1359)

* fix: display birthdate when clientType is RSP

* test: add scenario fixture

---------

Co-authored-by: Paulo Gomes da Cruz Junior <[email protected]>
  • Loading branch information
fterra-encora and paulushcgcj authored Dec 17, 2024
1 parent 37a6274 commit 8662c92
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 2 deletions.
23 changes: 22 additions & 1 deletion frontend/cypress/e2e/pages/SubmissionReviewPage.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,28 @@ describe("Submission Review Page", () => {
});

});


it("displays the birthdate when clientType is Individual", () => {
beforeInit("test-case-review-staff-pending");
cy.contains("h2", "Client summary")
.parent()
.within(() => {
cy.contains("Client type").parents(".grouping-11").first().contains("Individual");
cy.contains("Birthdate").should("be.visible");
});
});

it("displays the birthdate when clientType is Registered sole proprietorship", () => {
beforeInit("test-case-review-rsp");
cy.contains("h2", "Client summary")
.parent()
.within(() => {
cy.contains("Client type")
.parents(".grouping-11")
.first()
.contains("Registered sole proprietorship");
cy.contains("Birthdate").should("be.visible");
});
});

});
57 changes: 57 additions & 0 deletions frontend/cypress/fixtures/test-case-review-rsp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"submissionId": 4444,
"submissionStatus": "Approved",
"submissionType": "Staff submitted data",
"submittedTimestamp": "2024-01-01 00:00:00",
"updateTimestamp": "2024-01-01 00:00:00",
"approvedTimestamp": "2024-01-01 00:00:00",
"updateUser": "CLIADMIN",
"business": {
"businessType": "R",
"registrationNumber": "FM1234567",
"clientNumber": "",
"organizationName": "Dunder Mifflin Paper Company",
"clientType": "RSP",
"clientTypeDesc": "Registered sole proprietorship",
"goodStandingInd": "Y",
"birthdate": "1962-08-17",
"district": null,
"districtDesc": null
},
"contact": [
{
"index": 0,
"contactType": "Billing",
"firstName": "Johnathan",
"lastName": "Wick",
"phoneNumber": "(222) 333-4455",
"emailAddress": "[email protected]",
"locations": [
"Hangar"
],
"userId": "userid"
}
],
"address": [
{
"index": 0,
"streetAddress": "1234 Nowhere St",
"country": "Canada",
"province": "British Columbia",
"city": "Victoria",
"postalCode": "V8V8V8",
"name": "Hangar"
}
],
"matchers": {
"info": {
"name": "Johnathan Wick",
"email": "[email protected]",
"userId": "",
"businessId": "",
"businessName": ""
}
},
"rejectionReason": null,
"confirmedMatchUserId": ""
}
5 changes: 4 additions & 1 deletion frontend/src/pages/SubmissionReviewPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,10 @@ const isProcessing = computed(() => {
<span class="body-compact-01">{{ data.business.clientTypeDesc }}</span>
</read-only-component>

<read-only-component label="Birthdate" v-if="data.business.clientType === 'I'">
<read-only-component
label="Birthdate"
v-if="data.business.clientType === 'I' || data.business.clientType === 'RSP'"
>
<span class="body-compact-01">{{ data.business.birthdate }}</span>
</read-only-component>

Expand Down

0 comments on commit 8662c92

Please sign in to comment.