Skip to content

Commit

Permalink
PSP-7228 Management summary lease information - text change (#3588)
Browse files Browse the repository at this point in the history
  • Loading branch information
asanchezr authored Nov 10, 2023
1 parent fbfd704 commit 1d8811d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ exports[`PropertyManagementDetailView component renders as expected when provide
<div
class="c5 text-left col"
>
No active Lease/License
No
</div>
</div>
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ exports[`PropertyManagementUpdateForm component renders as expected 1`] = `
<div
class="c5 text-left col"
>
No active Lease/License
No
</div>
</div>
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ describe('Property management model tests', () => {
expect(model.additionalDetails).toBe('');
expect(model.isTaxesPayable).toBe(null);
expect(model.isUtilitiesPayable).toBe(null);
expect(model.formattedLeaseInformation).toBe('No active Lease/License');
expect(model.formattedLeaseInformation).toBe('No');
});

it('fromApi sets values as expected from api response', () => {
Expand All @@ -35,11 +35,11 @@ describe('Property management model tests', () => {
expect(model.additionalDetails).toBe('test');
expect(model.isTaxesPayable).toBe(null);
expect(model.isUtilitiesPayable).toBe(null);
expect(model.formattedLeaseInformation).toBe('No active Lease/License');
expect(model.formattedLeaseInformation).toBe('No');
});

it.each([
['NO lease found', 0, null, 'No active Lease/License'],
['NO lease found', 0, null, 'No'],
['ONE lease with expiry date', 1, '2020-03-15', 'Yes (Mar 15, 2020)'],
['ONE lease with no expiry date', 1, null, 'Yes'],
['MULTIPLE leases', 5, null, 'Multiple'],
Expand Down
2 changes: 1 addition & 1 deletion source/frontend/src/utils/propertyUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export function formatApiPropertyManagementLease(base?: Api_PropertyManagement |
const count = base?.relatedLeases || 0;
switch (count) {
case 0:
return 'No active Lease/License';
return 'No';

case 1:
const expiryDate = base?.leaseExpiryDate ? `(${prettyFormatDate(base.leaseExpiryDate)})` : '';
Expand Down

0 comments on commit 1d8811d

Please sign in to comment.