mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-08-03 18:56:44 -04:00
fix activity name assertions
This commit is contained in:
parent
29f2537f29
commit
46779565ed
@ -93,12 +93,12 @@ public class HelpActivityTest {
|
|||||||
onView(withId(R.id.get_started)).check(matches(notNullValue()));
|
onView(withId(R.id.get_started)).check(matches(notNullValue()));
|
||||||
onView(withId(R.id.get_started)).perform(click());
|
onView(withId(R.id.get_started)).perform(click());
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
// The app didn't start with the IntroActivity
|
// the app started directly at the homescreen instead of the intro activity
|
||||||
}
|
}
|
||||||
BaristaSleepInteractions.sleep(TEST_PAUSE_MS);
|
BaristaSleepInteractions.sleep(TEST_PAUSE_MS);
|
||||||
|
|
||||||
|
onView(childAtPosition(withId(R.id.toolbar), 0)).check(matches(withText("Wikipedia")));
|
||||||
|
|
||||||
//onView(withText("Kiwix")).check(matches(notNullValue())); //TODO: verify that this is on the top toolbar
|
|
||||||
|
|
||||||
openActionBarOverflowOrOptionsMenu(context);
|
openActionBarOverflowOrOptionsMenu(context);
|
||||||
onView(withText("Help")).perform(click());
|
onView(withText("Help")).perform(click());
|
||||||
@ -118,9 +118,7 @@ public class HelpActivityTest {
|
|||||||
BaristaSleepInteractions.sleep(TEST_PAUSE_MS);
|
BaristaSleepInteractions.sleep(TEST_PAUSE_MS);
|
||||||
|
|
||||||
// Verify that the home activity is opened
|
// Verify that the home activity is opened
|
||||||
// TODO : fix this issue
|
onView(childAtPosition(withId(R.id.toolbar), 0)).check(matches(withText("Wikipedia")));
|
||||||
//onView(withText("Wikipedia")).check(matches(notNullValue())); //TODO: verify that this is on the top toolbar
|
|
||||||
|
|
||||||
|
|
||||||
ViewInteraction recyclerView = onView(
|
ViewInteraction recyclerView = onView(
|
||||||
allOf(withId(R.id.recycler_view),
|
allOf(withId(R.id.recycler_view),
|
||||||
@ -139,7 +137,7 @@ public class HelpActivityTest {
|
|||||||
|
|
||||||
|
|
||||||
// Verify that the help Activity is opened
|
// Verify that the help Activity is opened
|
||||||
onView(withText("Help")).check(matches(notNullValue())); //TODO: verify that this is on the top toolbar
|
onView(withId(R.id.title)).check(matches(withText("Help")))
|
||||||
|
|
||||||
// Verify that the back button is displayed
|
// Verify that the back button is displayed
|
||||||
onView(withContentDescription("Navigate up")).check(matches(notNullValue()));
|
onView(withContentDescription("Navigate up")).check(matches(notNullValue()));
|
||||||
@ -187,23 +185,6 @@ public class HelpActivityTest {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
onView(withContentDescription("Navigate up")).perform(click());
|
|
||||||
|
|
||||||
|
|
||||||
//ViewInteraction textView14 = onView(
|
|
||||||
// allOf(withText("Wikipedia"),
|
|
||||||
// childAtPosition(
|
|
||||||
// allOf(withId(R.id.toolbar),
|
|
||||||
// childAtPosition(
|
|
||||||
// withId(R.id.toolbar_layout),
|
|
||||||
// 0)),
|
|
||||||
// 1),
|
|
||||||
// isDisplayed()));
|
|
||||||
//textView14.check(matches(withText("Wikipedia")));
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@After
|
@After
|
||||||
|
Loading…
x
Reference in New Issue
Block a user