Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cypress-explorer

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cypress-explorer

A simple file explorer that can run multiple specs for Cypress 10.

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

Cypress Explorer

A simple file explorer that can run multiple specs for Cypress 10.

Warning very experimental, relies on internal APIs, hardly tested.

  • Screenshot:

  • Demo:

Installation

  • yarn add cypress-explorer --dev
  • npm install cypress-explorer --dev

Usage

  1. Install the plugin (cypress.config.ts)
import { defineConfig } from 'cypress'
import { startExplorerServer } from 'cypress-explorer/server'

export default defineConfig({
  e2e: {
    async setupNodeEvents (on, config) {
      await startExplorerServer()
    }
  }
})
  1. Install the command (cypress/commands/e2e.ts)
import { registerCypressExplorer } from 'cypress-explorer'

registerCypressExplorer()

How It Works

Warning this plugin uses many hacks, internal Cypress APIs, etc. It's also highly experimental and assumes you are using the default specPattern, which means your E2E specs are in cypress/e2e/**/*.cy.*.

The approach is similar to the one suggested by Gleb Bahmutov in his blog post for a temporary work around to the "Run All Specs" button, which due to technical limitations, was removed from Cypress 10 (until the limitations are solved, and it is returned). It creates a temporary spec, _cypress-explorer.cy.js, and imports all the specs you want to run. It then navigates to the temprary spec and executes them all.

The main difference is Cypress Explorer provides you a simple UI, where you can simply check the specs you want to run. It writes them all to a cypress-explorer.cy.js file, which imports all your specs. So, just select cypress-explorer.cy.js from the sidebar, and you can run all your specs.

Known Issues

Same as "Run All Specs" in Cypress 9:

  • out of memory when running large amount of specs due to snapshots consuming a lot of memory
  • non deterministic (code from other tests can impact each other, since they all run in the same scope)
  • not working for Component Testing (yet, fix soon)
  • does not respect custom specPattern
  • probably not working on Windows (fix soon)
  • probably doesn't handle mix of JS/TS correctly
  • not tested with type: module or native ESM
  • does not support jsx or tsx extensions (fix soon)
  • very ugly UI (PR definitely welcome on this front)
  • likely lots of other bugs, it's a work in progress!

TODO

  • Support custom specPattern, other configuration
  • Less ugly UI
  • Test thoroughly
  • Keyboard shortcuts for the Explorer UI

Developing

Clone this, install with yarn. Run yarn build:ui --watch in watch mode for the front-end. You need to restart for changes to the server.

FAQs

Package last updated on 14 Jun 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc