From e62232c1cbba6a5669c0daad28b8cdffe7ffc640 Mon Sep 17 00:00:00 2001 From: Alan Tai Date: Mon, 21 May 2018 00:40:29 +0800 Subject: [PATCH] Fix instrumented tests --- .../java/com/github/ayltai/newspaper/AboutTest.java | 2 +- .../java/com/github/ayltai/newspaper/BookmarkedNewsTest.java | 2 +- .../java/com/github/ayltai/newspaper/DetailsTest.java | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mobile/src/androidTest/java/com/github/ayltai/newspaper/AboutTest.java b/mobile/src/androidTest/java/com/github/ayltai/newspaper/AboutTest.java index bcb375c3..da4e0d0c 100644 --- a/mobile/src/androidTest/java/com/github/ayltai/newspaper/AboutTest.java +++ b/mobile/src/androidTest/java/com/github/ayltai/newspaper/AboutTest.java @@ -50,7 +50,7 @@ public void rateApp() { Espresso.onView(Matchers.allOf( ViewMatchers.withId(R.id.action_about), ViewMatchers.withParent(ViewMatchers.withParent(ViewMatchers.withId(R.id.bottomNavigationView))))) - .perform(ViewActions.scrollTo(), ViewActions.click()); + .perform(ViewActions.click()); ScreenShotter.takeScreenshot(this.getClass().getSimpleName() + ".rateApp", this.testRule.getActivity()); diff --git a/mobile/src/androidTest/java/com/github/ayltai/newspaper/BookmarkedNewsTest.java b/mobile/src/androidTest/java/com/github/ayltai/newspaper/BookmarkedNewsTest.java index b5cd3aaa..0ad0e782 100644 --- a/mobile/src/androidTest/java/com/github/ayltai/newspaper/BookmarkedNewsTest.java +++ b/mobile/src/androidTest/java/com/github/ayltai/newspaper/BookmarkedNewsTest.java @@ -68,7 +68,7 @@ public void bookmarkNewsTest() { Espresso.onView(Matchers.allOf( ViewMatchers.withId(R.id.action_bookmark), ViewMatchers.withContentDescription("Bookmark"))) - .perform(ViewActions.scrollTo(), ViewActions.click()); + .perform(ViewActions.click()); MoreTestUtils.sleep(MoreTestUtils.DURATION_SHORT); diff --git a/mobile/src/androidTest/java/com/github/ayltai/newspaper/DetailsTest.java b/mobile/src/androidTest/java/com/github/ayltai/newspaper/DetailsTest.java index 45d0aa99..ef637875 100644 --- a/mobile/src/androidTest/java/com/github/ayltai/newspaper/DetailsTest.java +++ b/mobile/src/androidTest/java/com/github/ayltai/newspaper/DetailsTest.java @@ -72,7 +72,7 @@ public void detailsTest() { Espresso.onView(Matchers.allOf( ViewMatchers.withId(R.id.action_share), ViewMatchers.withContentDescription("Share"))) - .perform(ViewActions.scrollTo(), ViewActions.click()); + .perform(ViewActions.click()); // Checks that the fired Intent is correct Intents.intended(shareIntent); @@ -82,6 +82,6 @@ public void detailsTest() { Espresso.onView(Matchers.allOf( ViewMatchers.withId(R.id.action_text_to_speech), ViewMatchers.withContentDescription("Text to speech"))) - .perform(ViewActions.scrollTo(), ViewActions.click()); + .perform(ViewActions.click()); } }