Skip to content

Commit

Permalink
10001-design-debt: fix default attachFile behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
Mwindo committed Sep 20, 2024
1 parent e054291 commit 13036d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cypress/helpers/file/upload-file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ 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,
}: {
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) {
Expand Down

0 comments on commit 13036d9

Please sign in to comment.