Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: fix empty findAll results #11401

Merged
merged 11 commits into from
Jan 29, 2025
Merged

Conversation

jcfranco
Copy link
Member

@jcfranco jcfranco commented Jan 28, 2025

Related Issue: #11398

Summary

This introduces a replacement to using page.findAll/element.findAll to avoid false positives from asserting on empty results (e.g., assertions in a loop).

Also, this will be enforced by the no-restricted-properties ESLint rule.

@jcfranco jcfranco added the skip visual snapshots Pull requests that do not need visual regression testing. label Jan 28, 2025
@jcfranco jcfranco marked this pull request as ready for review January 28, 2025 21:14
Copy link
Member

@driskull driskull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@jcfranco
Copy link
Member Author

@Elijbet Can you help me fix the remaining failing tests? It looks like we missed some subtly invalid selectors when working on #6038 some time ago.

Copy link
Contributor

@eriklharper eriklharper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks very useful, thanks @jcfranco !

@jcfranco
Copy link
Member Author

@Elijbet I ended up skipping those tests as they were silently broken and created #11407 to restore them.

@jcfranco jcfranco merged commit f208961 into dev Jan 29, 2025
10 checks passed
@jcfranco jcfranco deleted the jcfranco/11398-use-custom-findAll branch January 29, 2025 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip visual snapshots Pull requests that do not need visual regression testing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants