Simple custom Cypress command to ease file upload testing
Branch: master
Clone or download
Latest commit 53abb20 Feb 12, 2019

README.md

cypress-file-upload

All Contributors

Simple custom Cypress command to ease file upload testing.

Table of Contents

Installation

This module is distributed via npm which is bundled with uglify-es and should be installed as one of your project's devDependencies:

npm install --save-dev cypress-file-upload

Usage

cypress-file-upload extends Cypress' cy command. Add this line to your project's cypress/support/commands.js:

import 'cypress-file-upload';

Here is a simple example:

cy.fixture('data.json', 'base64').then(content => {
  cy.get('[data-cy="dropzone"]').upload(content, 'data.json', 'application/json');
});

Please see full version in [example][example].

Contributors

Thanks goes to these wonderful people (emoji key):

James Hollowell
James Hollowell

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

License

MIT