Remove flakiness from DrawerLayout tests.
Expose a new pair of APIs on DrawerLayout that allows
registering multiple listeners. Wrap API / swipe actions
with a custom action that uses Espresso's idling resource
functionality to wait until the DrawerLayout transitions
into STATE_IDLE state.
Also add custom measure logic to our test activity to that
the drawer is not too wide on smaller screens. Otherwise a
swipe on an already opened drawer is treated as a click on
one of the items which is then results in closing the drawer.
Bug: 26003516
Bug: 26160710
Change-Id: Ifa7b99ad396636cedb4429e3e3204ca521188f70
5 files changed