Glacier960 / android-test-kit

Automatically exported from code.google.com/p/android-test-kit
0 stars 0 forks source link

Log message when onView(...).check(matches(...)) does not find the selected view #58

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create an Activity with no content
2. Create a test with `onView(withText("Hello 
Steve!")).check(matches(isDisplayed()));`
3. Check the logcat output

What is the expected output? What do you see instead?

I expect to see `'is displayed on the screen to the user' check could not be 
performed because view 'with text: is "Hello Steve!"' was not found.`

Instead I see `'is displayed on the screen to the user' check could not be 
performed because view 'is displayed on the screen to the user' was not found.`

What version of the product are you using? On what operating system?

Espresso 1.1, on API level 10.

Please provide any additional information below.

The root cause seems to be in the definition of the ViewAssertions.matches 
method. The line with `description.appendText` refers to viewMatcher, but it 
should instead use the viewMatcher in noViewException.

To fix this issue, I think NoMatchingViewException would need to be enhanced 
with a getViewMatcher method.

Original issue reported on code.google.com by antoine....@gmail.com on 22 Feb 2014 at 5:17

GoogleCodeExporter commented 9 years ago

Original comment by vale...@google.com on 7 May 2014 at 7:10

GoogleCodeExporter commented 9 years ago
Fixed in Espresso 2.0

Original comment by vale...@google.com on 20 Dec 2014 at 4:33