Registry / testing / cypress-skip-and-only-ui

cypress-skip-and-only-ui

JSON →
library1.2.19jsnpmunverified

cypress-skip-and-only-ui is a Cypress plugin that enhances the Cypress Test Runner UI by adding client-side buttons to `it` and `describe` blocks. These buttons allow developers to dynamically mark individual tests or test suites to run in isolation (`.only`) or to be skipped (`.skip`) directly from the browser interface, without modifying the test code. This provides a convenient way to focus on specific tests during development or debugging sessions. The package is currently stable at version 1.2.19, with releases occurring irregularly, primarily addressing compatibility with newer Cypress versions and updating internal dependencies like React. Its key differentiator is the direct UI integration for test isolation, offering an alternative to manually adding or removing `.only`/`.skip` modifiers in test files, which can be prone to accidental commits.

npm install cypress-skip-and-only-ui
INSTALL
IMPORT
SIG · CYPRESS-SKIP-AND-O
C
cypress-skip-and-only-ui
testingjavascriptv1.2.19
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

support file
import 'cypress-skip-and-only-ui/support';
require('cypress-skip-and-only-ui/support');
This import activates the client-side UI and must be placed in your Cypress support file (e.g., `cypress/support/e2e.js` or `cypress/support/component.js`). Use ESM `import` syntax.
skipAndOnlyUiTasks
import skipAndOnlyUiTasks from 'cypress-skip-and-only-ui/task';
const skipAndOnlyUiTasks = require('cypress-skip-and-only-ui/task');
This is a named import for the Node.js tasks required by the plugin, used in `cypress.config.js|ts`. Modern Cypress configurations prefer ESM import style.
defineConfig
import { defineConfig } from 'cypress';
const { defineConfig } = require('cypress');
This is a standard Cypress configuration import. While not directly from this package, it's essential for proper plugin setup in `cypress.config.js|ts`.

This quickstart demonstrates how to install and configure `cypress-skip-and-only-ui` by adding the support file import and registering the necessary Node.js tasks within your `cypress.config.ts` or `cypress.config.js`.

import { defineConfig } from 'cypress' import skipAndOnlyUiTasks from 'cypress-skip-and-only-ui/task'; // In cypress/support/e2e.js or cypress/support/component.js import 'cypress-skip-and-only-ui/support'; export default defineConfig({ e2e: { setupNodeEvents(on, config) { // Ensure you merge with any other existing tasks on('task', skipAndOnlyUiTasks) // or if you have other tasks: // on('task', { // ...otherTasks, // ...skipAndOnlyUiTasks // }) } }, // You might also need to configure for component testing component: { setupNodeEvents(on, config) { on('task', skipAndOnlyUiTasks) } } });
Debug
Known issues
breakingThe plugin's functionality depends on compatibility with the Cypress API. Upgrades to Cypress may require corresponding updates to this plugin. Always check the changelog for specific Cypress version support.
fix
Ensure your `cypress-skip-and-only-ui` version is compatible with your installed Cypress version. Update `cypress-skip-and-only-ui` to the latest version if experiencing issues after a Cypress upgrade.
affects: >=1.0.0
gotchaThe plugin requires both a client-side support file import (`import 'cypress-skip-and-only-ui/support';`) and a Node.js task registration (`on('task', skipAndOnlyUiTasks)`) to function correctly. Omitting either will result in incomplete functionality or errors.
fix
Verify that both the support file import is present in your `cypress/support` file and the tasks are registered in your `cypress.config.js|ts`.
affects: >=1.0.0
gotchaWhen merging tasks in `cypress.config.js|ts`, ensure you use the object spread syntax correctly (`on('task', { ...existingTasks, ...skipAndOnlyUiTasks })`) to avoid overwriting other essential tasks.
fix
Carefully review your `setupNodeEvents` function to confirm that `skipAndOnlyUiTasks` are merged without conflicts with any other task definitions.
affects: >=1.0.0
Errors
Common errors & fixes
CypressError: `cy.task()` received a task that does not exist: 'skip-test-by-id'
The Node.js tasks for the plugin have not been registered in `cypress.config.js|ts`.
fix
Add `on('task', skipAndOnlyUiTasks)` to your `setupNodeEvents` function in `cypress.config.js|ts`.
Error: Cannot find module 'cypress-skip-and-only-ui/support'
The package is not installed, or the import path in your support file is incorrect.
fix
Run `npm install -D cypress-skip-and-only-ui` (or `yarn add -D cypress-skip-and-only-ui`). Verify the import path `import 'cypress-skip-and-only-ui/support';` is exactly as specified.
TypeError: on is not a function
This error typically indicates that `setupNodeEvents` is not correctly receiving the `on` argument in `cypress.config.js|ts`, or the config file structure is incorrect.
fix
Ensure your `cypress.config.js|ts` file uses `export default defineConfig({ e2e: { setupNodeEvents(on, config) { ... } } });` structure and that `on` is passed to your task registration correctly.
Upgrade
Version history
1.2.19latest on npm
Audit
Dependencies
cypressrequiredThis package is a Cypress plugin and requires a compatible Cypress installation to function.
Agent activity
6 hits · last 30 days
node
6
Resources
cypress-skip-and-only-ui — npm install cypress-skip-and-only-ui · libregistry