[go: up one dir, main page]

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

Surface 'text' condition in css query error message when specified #714

Merged

Conversation

vanderhoop
Copy link
Contributor

Summary

This pull request surfaces the text condition value when it's specified in CSS queries, and leaves the existing error message as-is when the condition isn't specified.

Motivation

I frequently build out css queries using the text condition (in combination with the base css selector of the query). Sometimes I would get failures where the element selector was found in the application UI but failed due the text condition, but in those cases the error message would only reference the selector, which would lead me to think that the element hadn't been present at all.

These cases usually led me to open the screenshots and see the element present in the UI and realize my error—usually a case mismatch or outright typo🤦🏻‍♂️—and it's happened to me enough that I figured the lib could and should specify this condition in the error.

When the text-condition isn't specified, we leave the existing error message as-is so as to not confuse devs.

Before

image

After

image

@mhanberg mhanberg merged commit ae20b0c into elixir-wallaby:main Nov 10, 2022
@mhanberg
Copy link
Member

Excellent!

@vanderhoop vanderhoop deleted the add-text-to-css-query-error-messages branch November 10, 2022 03:45
@cysiegel
Copy link

Thank you - this feature saves a lot of time when debugging

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.

3 participants