cypress-plugin-filter-runnables
v1.3.1
Published
Cypress plugin that allows user to filter suites/tests in Cypress Test Runner.
Maintainers
Readme
Features
- 🔍 A new UI search bar within
cypress opento filter suites/tests in a given spec
Table of Contents
📦 Installation
- Install the following packages:
npm install --save-dev cypress-plugin-filter-runnables- In
cypress/support/e2e.js(For E2E tests) and/orcypress/support/component.js(For Component tests),
import 'cypress-plugin-filter-runnables';🔍 Open mode
Run npx cypress open to launch Cypress in open mode.
Choose a spec file to run and you will be able to filter by suite/test title at the top of the reporter.
You can combine multiple searches by separating them with a semicolon (;).
Example:
@smoke; can add todo
Pairing with cypress-plugin-grep-boxes
The cypress-plugin-grep-boxes is a great companion for this plugin.
Paired with cypress-plugin-grep-boxes (@bahmutov/cy-grep is also required), you can filter suites/tests and use the main toggle (v2.1.0 of cypress-plugin-grep-boxes) or individual checkboxes to run only the tests you've filtered:
Additionally, you can filter tags when paired with cypress-plugin-grep-boxes (version 2.1.0 of @bahmutov/cy-grep required):
In addition, cypress-plugin-grep-boxes supports a disableInitialAutoRun feature that will prevent Cypress Test Runner from automatically running available tests once a spec file is open.
This gives you a moment to filter down to whichever tests to select before running them:
Contributions
Feel free to open a pull request or drop any feature request or bug in the issues.
Please see more details in the contributing doc.
