-
-
Notifications
You must be signed in to change notification settings - Fork 120
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
Fixed visibility assertions #316
Fixed visibility assertions #316
Conversation
The method is in BaristaVisibilityAssertions, but doesn't handle visibility. Also Displayed is pretty clear on what is expected, no one would think that a view displayed is not visible, that's weird. The only reason to have another method name could be for retrocompatibility like @rocboronat suggested, and in this case we should deprecate the assertDisplayed and push developers to use assertVisible instead. (Even add a assertExists if it's needed for some people.) |
@nickmi11er maybe add tests to confirm the broken behaviour. |
Yes, I totally agree with you. The problem here is just a naming issue. Native Espresso names the current behavior "display". I mean, if we understand Barista as a list of shortcut recipes, But honestly, I know this is a mess. I'm wondering what's better for the current Barista users and I think that creating a new method to know if a Food for thought! And for the rest of Barista contributors... Guys, naming issue here! 📛 |
After writing a long paragraph about how I don't understand the issue... I understood it 😂 Yes, you're right. The I'm more declined towards "let's fix it and warn about it in the changelog". |
I always thought it worked like that, I don't see why it would "break" something |
Hey @nickmi11er! I'm so sorry for not checking this sooner, it's been a long time. Since there has been no further discussion, I think the best choice is to merge your PR fixing the issues. However, I'm missing some tests to make sure this doesn't break again (it should have been tested already but it wasn't). Let me add them myself and then I'll merge the PR :) |
This PR relates to #294
Issue:
assertDisplayed(@idres viewId: Int, text: String)
assertDisplayed(@idres viewId: Int, @StringRes stringId: Int)
assertNotDisplayed(@idres viewId: Int, text: String)
assertNotDisplayed(@idres viewId: Int, @StringRes stringId: Int)
check only if there is a view in the hierarchy with provided text. But it does not check that view is really (not)displayed for user