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

Rename the format function for matchers #906

Closed
minkimcello opened this issue Mar 23, 2021 · 2 comments · Fixed by #918
Closed

Rename the format function for matchers #906

minkimcello opened this issue Mar 23, 2021 · 2 comments · Fixed by #918
Labels
@bigtest/interactor higher order interface manipulation

Comments

@minkimcello
Copy link
Contributor

From a discussion in PR #902:

is format only used to format the error message? if so can we name it more explicitly like formatErrorMessage? format reads a bit confusing imo because it is also makes me think that I'll use format to check a value complies with a format or something like that

I think we could call it error() or errorMessage().

@minkimcello minkimcello added the @bigtest/interactor higher order interface manipulation label Mar 23, 2021
@cowboyd
Copy link
Member

cowboyd commented Mar 23, 2021

I think we could call it error() or errorMessage().

It isn't just an error message, it's also used in locators:

HTML(including("Hello World")).click():

couldn't find html element including "Hello World"
did you mean one of:
Hello Mom
Hello Planet
Hello Universe

In that case, is the string including "Hello World" really an error message even though it appears inside an error message?

Also, in our inspector These could appear matchers that you are just evaluating to play around, and we'd want to render them html including "Hello World" and there would be no error message at all.

@minkimcello
Copy link
Contributor Author

@cowboyd Oh I see. Then maybe description() as you suggested would be most appropriate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@bigtest/interactor higher order interface manipulation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants