diff --git a/cypress/helpers/file/upload-file.ts b/cypress/helpers/file/upload-file.ts index d83e7ebea78..e572c241ba3 100644 --- a/cypress/helpers/file/upload-file.ts +++ b/cypress/helpers/file/upload-file.ts @@ -15,7 +15,7 @@ export function attachSamplePdfFile(testId: string) { } export function attachFile({ - encoding, + encoding = 'binary', // Default to binary, which better mimics PDF data handling on the browser filePath, selector, selectorToAwaitOnSuccess, @@ -23,7 +23,7 @@ export function attachFile({ selector: string; filePath: string; selectorToAwaitOnSuccess?: string; - encoding?: 'binary'; // Default to binary, which better mimics PDF data handling on the browser + encoding?: 'binary' | 'utf8'; // Expand as needed }) { cy.get(selector).attachFile({ encoding, filePath }); if (selectorToAwaitOnSuccess) {