Skip to content

Commit

Permalink
Merge pull request #154 from nickbabcock/cypress-4
Browse files Browse the repository at this point in the history
Bump to cypress v4
  • Loading branch information
nickbabcock authored Mar 25, 2020
2 parents e8b9ad7 + 7c898bc commit d7b4563
Show file tree
Hide file tree
Showing 3 changed files with 303 additions and 379 deletions.
11 changes: 4 additions & 7 deletions cypress/support/commands.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
import "cypress-file-upload";

Cypress.Commands.add("uploadFile", (selector, fileUrl, type = "") => {
return cy.fixture(fileUrl, "base64").then(fileContent => {
cy.get(selector).upload({
fileContent,
fileName: fileUrl,
mimeType: "application/octet-stream",
encoding: "base64"
return cy.get(selector).attachFile({
filePath: fileUrl,
encoding: "binary",
mimeType: "application/octet-stream",
});
});
});
Loading

0 comments on commit d7b4563

Please sign in to comment.