@Test public void testTemplateConstructor() { espDrawer = new EspDrawer(espDrawer); espDrawer.open(); espDrawer.assertIsDisplayedOnScreen(); }
@Test public void testNavigationMenuItemByText() { addNavigationMenuItem(); espDrawer.open(); espDrawer.navigationMenuItem(navigationItemTitleStandard).assertIsDisplayedOnScreen(); }
@Test public void testDrawer() { espDrawer.assertIsHidden(); espDrawer.open(); espDrawer.assertIsDisplayedOnScreen(); espDrawer.close(); espDrawer.assertIsHidden(); }
@Test public void testClickStandard() { espTextViewClickFeedback.assertTextIs(initialClickFeedbackText); espDrawer.open(); espNavigationMenuItemStandard.assertIsNotSelected(); espNavigationMenuItemStandard.click(); espNavigationMenuItemStandard.assertIsSelected(); espTextViewClickFeedback.assertTextIs(navigationItemTitleStandard); }
@Test public void testClickCustomActionView() { espTextViewClickFeedback.assertTextIs(initialClickFeedbackText); espDrawer.open(); espNavigationMenuItemCustomActionView.assertIsNotSelected(); espNavigationMenuItemCustomActionView.click(); espNavigationMenuItemCustomActionView.assertIsSelected(); espTextViewClickFeedback.assertTextIs(navigationItemTitleCustomActionView); }
@Test public void testCompareDifferentPictures() { EspScreenshotTool.takeWithName("testCompareDifferentPictures"); EspDrawer.byId(NavigationDrawerActivity.drawerLayout, NavigationDrawerActivity.drawerNavigationView).open(); EspScreenshotTool.takeWithName("testCompareDifferentPictures2"); double percentage = EspScreenshotTool.comparePercentage( new EspScreenshotTool().obtainScreenshotDirectory() + "/testCompareDifferentPictures.png", new EspScreenshotTool().obtainScreenshotDirectory() + "/testCompareDifferentPictures2.png"); assertEquals(88.0, percentage, EspScreenshotTool.COMPARE_DELTA_TIME_CHANGE + DELTA_FOR_DIFFERENT_DEVICES); }