mirror of
https://github.com/Hestia-Homes/assessment-model.git
synced 2026-06-08 11:37:25 +00:00
Correct required file type count in tests
Some checks failed
Test Suite / unit-tests (push) Has been cancelled
Some checks failed
Test Suite / unit-tests (push) Has been cancelled
This commit is contained in:
parent
c533bb3e80
commit
e22833041d
2 changed files with 4 additions and 4 deletions
|
|
@ -75,14 +75,14 @@ describe("splitDocumentsByType", () => {
|
|||
describe("getMissingRetrofitTypes", () => {
|
||||
it("returns all mandatory types when no docs uploaded", () => {
|
||||
const missing = getMissingSurveyDocTypes([]);
|
||||
expect(missing).toHaveLength(9);
|
||||
expect(missing).toHaveLength(8);
|
||||
});
|
||||
|
||||
it("excludes types that have been uploaded", () => {
|
||||
const uploaded = [makeDoc({ docType: "photo_pack" })];
|
||||
const missing = getMissingSurveyDocTypes(uploaded);
|
||||
expect(missing).not.toContain("photo_pack");
|
||||
expect(missing).toHaveLength(8);
|
||||
expect(missing).toHaveLength(7);
|
||||
});
|
||||
|
||||
it("returns empty array when all mandatory types uploaded", () => {
|
||||
|
|
@ -98,7 +98,7 @@ describe("getMissingRetrofitTypes", () => {
|
|||
const uploaded = [makeDoc({ docType: "ecmk_site_note" })];
|
||||
const missing = getMissingSurveyDocTypes(uploaded);
|
||||
expect(missing).not.toContain("ecmk_site_note");
|
||||
expect(missing).toHaveLength(9);
|
||||
expect(missing).toHaveLength(8);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -278,7 +278,7 @@ export type DocStatus = {
|
|||
// Retrofit assessment docs
|
||||
presentSurveyTypes: string[];
|
||||
hasSurveyDocs: boolean;
|
||||
isSurveyComplete: boolean; // all 9 EXPECTED_RETROFIT_ASSESSMENT_DOC_TYPES present (ecmk not counted)
|
||||
isSurveyComplete: boolean; // all 8 EXPECTED_RETROFIT_ASSESSMENT_DOC_TYPES present (ecmk not counted)
|
||||
// Install docs
|
||||
hasInstallDocs: boolean;
|
||||
installStatus: "none" | "partial" | "hasDocs" | "all";
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue