Closed zecarrera closed 3 years ago
The following error is shown if you change command.js but don't change index.js TypeError: cy.get(...).attachFile is not a function
As a first time user of cypress, I just followed the instructions here, and therefore the added commands were not loaded.
Under usage section of readme. Add the following line or similar:
Make sure that the following line is not commented out in your project's cypress/support/index.js or cypress/support/index.ts file:
import './commands';
1 - Install cypress-file-upload 2 - Add import command to commands.js 3 - Run a test that tries to use cy.get('#anylocator').attachFile('filePath');
Actual result: 3 - Test fails with TypeError: cy.get(...).attachFile is not a function
This is a documentation related issue, which was observed using the following versions: "cypress": "^5.6.0", "cypress-file-upload": "^4.1.1",
Hi @zecarrera Thanks for submitting the issue! Good one, let me add it
Current behavior:
The following error is shown if you change command.js but don't change index.js TypeError: cy.get(...).attachFile is not a function
As a first time user of cypress, I just followed the instructions here, and therefore the added commands were not loaded.
Desired behavior:
Under usage section of readme. Add the following line or similar:
Make sure that the following line is not commented out in your project's cypress/support/index.js or cypress/support/index.ts file:
import './commands';
Steps to reproduce: (app code and test code)
1 - Install cypress-file-upload 2 - Add import command to commands.js 3 - Run a test that tries to use cy.get('#anylocator').attachFile('filePath');
Actual result: 3 - Test fails with TypeError: cy.get(...).attachFile is not a function
Versions
This is a documentation related issue, which was observed using the following versions: "cypress": "^5.6.0", "cypress-file-upload": "^4.1.1",