File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
app/src/androidTest/java/org/kabiri/android/usbterminal Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package org.kabiri.android.usbterminal
2
2
3
3
import androidx.test.espresso.Espresso.onView
4
4
import androidx.test.espresso.assertion.ViewAssertions.matches
5
+ import androidx.test.espresso.action.ViewActions.click
5
6
import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
6
7
import androidx.test.espresso.matcher.ViewMatchers.withId
7
8
import androidx.test.ext.junit.rules.activityScenarioRule
@@ -22,5 +23,18 @@ internal class MainActivityAndroidTest {
22
23
onView(withId(R .id.tvOutput)).check(matches(isDisplayed()))
23
24
onView(withId(R .id.btEnter)).check(matches(isDisplayed()))
24
25
onView(withId(R .id.etInput)).check(matches(isDisplayed()))
26
+
27
+ // Check menu items are displayed
28
+ onView(withId(R .id.actionSettings)).check(matches(isDisplayed()))
29
+ onView(withId(R .id.actionConnect)).check(matches(isDisplayed()))
30
+ onView(withId(R .id.actionDisconnect)).check(matches(isDisplayed()))
31
+ }
32
+
33
+ @Test
34
+ fun clickingSettingsOpensSettingsBottomSheet () {
35
+ // Click the Settings menu item
36
+ onView(withId(R .id.actionSettings)).perform(click())
37
+ // Assert the bottom sheet content is displayed
38
+ onView(withId(R .id.composeViewSettingContent)).check(matches(isDisplayed()))
25
39
}
26
40
}
You can’t perform that action at this time.
0 commit comments