From 13036d98e192bba682fc53d5cc21a42612963f33 Mon Sep 17 00:00:00 2001 From: Christopher Bisom Date: Fri, 20 Sep 2024 12:30:51 -0400 Subject: [PATCH] 10001-design-debt: fix default attachFile behavior --- cypress/helpers/file/upload-file.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) {