Socket
Socket
Sign inDemoInstall

@devoxa/cypress-wait-for-network-idle

Package Overview
Dependencies
167
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @devoxa/cypress-wait-for-network-idle

Wait for the network to be idle before continuing during Cypress runs


Version published
Maintainers
1
Created

Readme

Source

:no_entry: DEPRECATED :no_entry:

This package has been archived and is no longer maintained. While we will not provide any updates or support, the code is still available for reference. If you need this package for your project, we encourage you to fork & republish the code following the license terms.


cypress-wait-for-network-idle

Wait for the network to be idle before continuing during Cypress runs.

Package Version Build Status

InstallationUsageContributorsLicense


Installation

  1. Install the package
yarn add --dev @devoxa/cypress-wait-for-network-idle

The package also has a peer dependency on cypress@^7.3.0.

  1. Import the command in cypress/support/commands.ts:
import { addWaitForNetworkIdleCommand } from '@devoxa/cypress-wait-for-network-idle/command'
addWaitForNetworkIdleCommand()

Usage

describe('SignInPage', () => {
  it('waits for network requests', () => {
    cy.waitForNetworkIdlePrepare()
    cy.visit('/sign-in')
    cy.waitForNetworkIdle()
  })

  it('waits for network requests that have a delay between them', () => {
    cy.waitForNetworkIdlePrepare()
    cy.visit('/sign-in')
    cy.waitForNetworkIdle({ minIdleTime: 500 })
  })
})

Additional available options:

  • timeout: The maximum time (in ms) to wait for the network to idle, defaults to 2000
  • minIdleTime: The time (in ms) to wait for another request after network activity ceases, defaults to 200

Contributors

Thanks goes to these wonderful people (emoji key):


David Reeß

💻 📖 ⚠️

This project follows the all-contributors specification. Contributions of any kind welcome!

License

MIT

FAQs

Last updated on 28 Jan 2023

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc