Skip to content

Commit

Permalink
text: Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
DafyddLlyr committed Feb 8, 2024
1 parent 29aca86 commit 013b500
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ test("recovers previously submitted files when clicking the back button", async
const uploadedFile = {
data: {
[dataField]: [dummyFile],
[PASSPORT_REQUESTED_FILES_KEY]: [dataField],
[PASSPORT_REQUESTED_FILES_KEY]: {
required: [dataField],
recommended: [],
optional: [],
},
},
};

Expand Down
5 changes: 1 addition & 4 deletions editor.planx.uk/src/@planx/components/FileUpload/Public.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ import { FileWithPath } from "react-dropzone";
import ErrorWrapper from "ui/shared/ErrorWrapper";
import { array } from "yup";

import {
FileList,
PASSPORT_REQUESTED_FILES_KEY,
} from "../FileUploadAndLabel/model";
import { PASSPORT_REQUESTED_FILES_KEY } from "../FileUploadAndLabel/model";
import { PrivateFileUpload } from "../shared/PrivateFileUpload/PrivateFileUpload";
import { getPreviouslySubmittedData, makeData } from "../shared/utils";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,11 +227,6 @@ const formatUserFiles = (userFile: UserFileWithSlots): FormattedUserFile[] =>
},
}));

const formatRequestedFiles = ({
fn,
rule: { condition },
}: FileType): RequestedFile => ({ fn, condition });

/**
* Type guard to coerce UserFile -> UserFileWithSlot
*/
Expand Down

0 comments on commit 013b500

Please sign in to comment.