bmlct / android-test-kit

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

Espresso doesn't click on dialog buttons. #176

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. create dialog with custom view and OnGlobalLayoutListener
2. change LayoutParams inside onGlobalLayout
3. create espresso test which try to click on the dialog buttons

What is the expected output? What do you see instead?
Expect: espresso clicks on the dialog buttons
Instead: espresso misses the dialog buttons and onClick method not called.

What version of the product are you using?
Espresso 2.2

Please provide any additional information below.
I create test project for this issue, you can find it here: 
https://github.com/moonsweel/onGlobalLayout-espresso

If start MainActivityTest as it is, onClick method of Save button will not be 
called... But if you comment layout LayoutParams changing it works as it should.

Also if make LayoutParams changes outside of onGlobalLayout(), but before 
showing dialog, the test also works fine.

Best regards.

Original issue reported on code.google.com by moonsw...@gmail.com on 1 Sep 2015 at 11:54

GoogleCodeExporter commented 8 years ago

Original comment by slinz...@google.com on 15 Sep 2015 at 10:58