-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(EMS-3466): no pdf - application submission - XLSX - your buyer se…
…ction (#2554) * fix(EMS-3466): no pdf - application submission - xlsx - buyer section * fix(EMS-3466): improve unit test coverage * fix(EMS-3466): fix/update documentation * fix(EMS-3466): fix/update unit tests * fix(EMS-3466): update todo comments * fix(EMS-3466): linting issue
- Loading branch information
Showing
15 changed files
with
180 additions
and
105 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
...ts/XLSX-CONFIG/index-multiple-contract-policy-total-contract-value-over-threshold.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { XLSX_ROW_INDEXES } from '.'; | ||
import { INDEXES } from './INDEXES'; | ||
import { APPLICATION } from '../application'; | ||
import { mockApplicationMultiplePolicyTotalContractValueOverThreshold } from '../../test-mocks'; | ||
|
||
describe(`api/constants/XLSX-CONFIG - XLSX_ROW_INDEXES - ${APPLICATION.POLICY_TYPE.MULTIPLE} - total contract value over threshold`, () => { | ||
it('should return the correct row indexes', () => { | ||
const result = XLSX_ROW_INDEXES(mockApplicationMultiplePolicyTotalContractValueOverThreshold); | ||
|
||
const indexes = INDEXES(); | ||
|
||
const expected = { | ||
...indexes, | ||
BUYER_ADDRESS: indexes.BUYER_ADDRESS + 1, | ||
BUYER_CONTACT_DETAILS: indexes.BUYER_CONTACT_DETAILS + 1, | ||
TITLES: { | ||
...indexes.TITLES, | ||
BUYER: indexes.TITLES.BUYER + 1, | ||
DECLARATIONS: indexes.TITLES.DECLARATIONS + 3, | ||
}, | ||
}; | ||
|
||
expect(result).toEqual(expected); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
...ants/XLSX-CONFIG/index-single-contract-policy-total-contract-value-over-threshold.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { XLSX_ROW_INDEXES } from '.'; | ||
import { INDEXES } from './INDEXES'; | ||
import { APPLICATION } from '../application'; | ||
import { mockApplicationSinglePolicyTotalContractValueOverThreshold } from '../../test-mocks'; | ||
|
||
describe(`api/constants/XLSX-CONFIG - XLSX_ROW_INDEXES - ${APPLICATION.POLICY_TYPE.SINGLE} - total contract value over threshold`, () => { | ||
it('should return the correct row indexes', () => { | ||
const result = XLSX_ROW_INDEXES(mockApplicationSinglePolicyTotalContractValueOverThreshold); | ||
|
||
const indexes = INDEXES(); | ||
|
||
const expected = { | ||
...indexes, | ||
TITLES: { | ||
...indexes.TITLES, | ||
DECLARATIONS: indexes.TITLES.DECLARATIONS + 2, | ||
}, | ||
}; | ||
|
||
expect(result).toEqual(expected); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.