From 43fca1adcfecb8148703b8578b4255d0dde80cf4 Mon Sep 17 00:00:00 2001 From: jrecio Date: Thu, 28 Nov 2019 11:06:00 +0100 Subject: [PATCH] adapt Log tests to new Log implementation --- .../settings/more/OCSettingsLogTest.kt | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/owncloudApp/src/androidTest/java/com/owncloud/android/settings/more/OCSettingsLogTest.kt b/owncloudApp/src/androidTest/java/com/owncloud/android/settings/more/OCSettingsLogTest.kt index 914f955bd9d..2aa501ace32 100644 --- a/owncloudApp/src/androidTest/java/com/owncloud/android/settings/more/OCSettingsLogTest.kt +++ b/owncloudApp/src/androidTest/java/com/owncloud/android/settings/more/OCSettingsLogTest.kt @@ -42,15 +42,24 @@ class OCSettingsLogTest { val activityRule = ActivityTestRule(LogHistoryActivity::class.java, true, true) @Test - fun checkTitle() { - onView(withText(R.string.actionbar_logger)).check(matches(isDisplayed())) + fun itemsToolbar() { + onView(withId(R.id.search_button)).check(matches(isDisplayed())) + onView(withId(R.id.menu_share)).check(matches(isDisplayed())) + onView(withId(R.id.menu_clear)).check(matches(isDisplayed())) + //Values not i18n + onView(withText("LOGCAT")).check(matches(isDisplayed())) + onView(withText("LOGFILE")).check(matches(isDisplayed())) } @Test - fun itemsToolbar() { - onView(withId(R.id.menu_search)).check(matches(isDisplayed())) + fun itemsLogLevel() { openActionBarOverflowOrOptionsMenu(InstrumentationRegistry.getInstrumentation().targetContext) - onView(withText("Logcat")).check(matches(isDisplayed())) + //Values not i18n + onView(withText("Verbose")).check(matches(isDisplayed())) + onView(withText("Debug")).check(matches(isDisplayed())) + onView(withText("Info")).check(matches(isDisplayed())) + onView(withText("Warning")).check(matches(isDisplayed())) + onView(withText("Error")).check(matches(isDisplayed())) } }