Skip to content

Conversation

@dprevost-LMI
Copy link
Contributor

@dprevost-LMI dprevost-LMI commented Dec 30, 2025

Fixes #1982.
Now:

  • We considered isNot when wait = 0
  • We run the condition function until the timeout, so it can become true before checking for the negation of it
  • Fixes multiple UTs whose titles were even correctly named but had the wrong assertions

Bonus: Fix toHaveElementProperty typing in the d.ts file

@dprevost-LMI dprevost-LMI marked this pull request as ready for review December 30, 2025 06:08
@dprevost-LMI
Copy link
Contributor Author

dprevost-LMI commented Dec 30, 2025

We run the condition function until the timeout, so it can become true before checking for the negation of it

Might need a second opinion here, since now when using expect().not, the test will be slower since we need to "always" timeout

@christian-bromann
Copy link
Member

@dprevost-LMI merged some PRs, mind updating this branch?

@dprevost-LMI dprevost-LMI force-pushed the fix-isNot-not-always-considered-in-waitUntil branch from 3c7baa4 to da0b63e Compare January 4, 2026 22:19
@dprevost-LMI
Copy link
Contributor Author

@christian-bromann Done
Let me know if you have a second opinion on the small concern raised (See here)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Negation isNot is not always properly considered in waitUntil

2 participants