cypress-plugin-xhr-toggle
TypeScript icon, indicating that this package has built-in type declarations

1.2.1 • Public • Published

Cypress XHR toggle plugin

A small Cypress helper that de-clutters your timeline by hiding XHR requests.

Toggle XHR in timeline

Installation

Install this package:

npm i cypress-plugin-xhr-toggle
# or
yarn add cypress-plugin-xhr-toggle

Import the plugin into your cypress/support/e2e.js file:

import 'cypress-plugin-xhr-toggle'
// or
require('cypress-plugin-xhr-toggle')

Usage

Open Cypress in GUI mode and see a new button. Click on it to hide all your XHR lines to de-clutter your timeline. You can set this up as default behavior by setting up hideXhr into your env object:

import { defineConfig } from "cypress";

export default defineConfig({
  fixturesFolder: false,
  e2e: {
    setupNodeEvents(on, config) {},
    env: {
      hideXhr: true
    }
  },
});

...powered by coffee and love ❤️ Filip Hric

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.2.1
    3,429
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.2.1
    3,429
  • 1.0.0
    4,440
  • 0.2.0
    156
  • 0.1.0
    0

Package Sidebar

Install

npm i cypress-plugin-xhr-toggle

Weekly Downloads

6,443

Version

1.2.1

License

ISC

Unpacked Size

11.8 kB

Total Files

9

Last publish

Collaborators

  • filiphric