Enter a valid OTP token in your UI tests
Use this plugin to insert a valid OTP token in a Cypress test.
npm i -D cypress-otp# oryarn add -D cypress-otp
then open your
cypress/plugins/index.js file and register a new task
How to use it
To get an OTP code
Take a look at the example test source code.
- the plugin saves the last used secret so you can avoid to pass it every time. You can even set it at the beginning of your test suite
and then consume the
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!