A fill command that fills inputs faster than the cypress native type command.
This package adds a custom Cypress command that fills inputs, textareas and content editable elements. The type command from cypress has 10ms delay, so it slows the tests a bit. This command doesn't have any delay at all.
The package is distributed via npm and should be installed as one of your project's
npm install --save-dev cypress-fill-command
yarn add cypress-fill-command --dev
cypress-fill-command extends Cypress'
Add this line to your project's
Now you are ready to use the command. Here is a basic example:
Exposed command in a nutshell:
text– The text to be filled into an input
Options contains following properties:
overwrite- To overwrite the input value. Defaults to
prepend- To insert before (
true) or after (
false) the current input value when
false. Defaults to
It has been used on a React project with inputs controlled by React state.
I cannot guarantee it will work in any custom input, but we can try to improve it, just open an issue or a PR.
Thanks goes to these wonderful people (emoji key):
🤔 ⚠️ 💻
🚇 📖 ⚠️ 💻 👀
🤔 ⚠️ 💻
This project follows the all-contributors specification. Contributions of any kind welcome!