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
22
33import androidx.test.espresso.Espresso.onView
44import androidx.test.espresso.assertion.ViewAssertions.matches
5+ import androidx.test.espresso.action.ViewActions.click
56import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
67import androidx.test.espresso.matcher.ViewMatchers.withId
78import androidx.test.ext.junit.rules.activityScenarioRule
@@ -22,5 +23,18 @@ internal class MainActivityAndroidTest {
2223 onView(withId(R .id.tvOutput)).check(matches(isDisplayed()))
2324 onView(withId(R .id.btEnter)).check(matches(isDisplayed()))
2425 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()))
2539 }
2640}
You can’t perform that action at this time.
0 commit comments