Wait for pointer-events in Cypress by default
Asked Answered
L

1

7

The pointer-events CSS property sets under what circumstances (if any) a particular graphic element can become the target of pointer events. I use this property to prevent interaction with some sections of a web application for a short time while content is updating.

This causes problems with end to end tests run through Cypress. Cypress is correctly blocked from interacting with an element with pointer-events set to none. However, instead of failing immediately, I would like Cypress to wait for the element to become intractable. This is the default behaviour for elements which are disabled, readonly, animating etc.

My question is: Is there any way to make Cypress apply this default behaviour to elements with pointer-events set to none (or with a parent whose pointer-events is set to none)?

Lope answered 27/3, 2020 at 10:11 Comment(0)
G
1

This seems to have been added with Cypress 5.6.0!

Here's the update in Cypress' issues:

https://github.com/cypress-io/cypress/issues/9227#issuecomment-729465861

Gmt answered 7/2, 2023 at 14:1 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.