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

cypress-wait-until

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cypress-wait-until

A waiting plugin for Cypress

  • 3.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is cypress-wait-until?

The cypress-wait-until package is a Cypress plugin that allows you to wait for arbitrary conditions to be met before proceeding with the next steps in your test. This is particularly useful for waiting for asynchronous operations or specific states in your application that are not directly tied to DOM elements.

What are cypress-wait-until's main functionalities?

Wait for a condition to be true

This feature allows you to wait until a specific condition is true. In this example, the test waits until an input element becomes visible before proceeding.

cy.waitUntil(() => cy.get('input').then($input => $input.is(':visible')));

Wait for a promise to resolve

This feature allows you to wait until a promise resolves. In this example, the test waits for a promise that resolves after 1 second before proceeding.

cy.waitUntil(() => new Cypress.Promise((resolve) => setTimeout(resolve, 1000)));

Wait for a custom command

This feature allows you to wait until a custom Cypress command returns a specific value. In this example, the test waits until the custom command returns 'expectedValue' before proceeding.

cy.waitUntil(() => cy.customCommand().then(result => result === 'expectedValue'));

Other packages similar to cypress-wait-until

Keywords

FAQs

Package last updated on 16 Jul 2024

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