File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
app/src/androidTest/java/org/kabiri/android/usbterminal Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -35,15 +35,24 @@ internal class MainActivityAndroidTest {
35
35
36
36
@Test
37
37
fun checkUiViewsAreDisplayed () {
38
+ // arrange
39
+ // act
40
+ // assert
38
41
onView(withId(R .id.tvOutput)).check(matches(isDisplayed()))
39
42
onView(withId(R .id.btEnter)).check(matches(isDisplayed()))
40
43
onView(withId(R .id.etInput)).check(matches(isDisplayed()))
44
+ }
41
45
46
+ @Test
47
+ fun checkActionMenuItemsAreDisplayed () {
48
+ // arrange
49
+ // act
42
50
// Ensure action items are accessible, either in the toolbar or via overflow
43
51
ensureMenuIsAccessible(R .id.actionSettings)
44
52
ensureMenuIsAccessible(R .id.actionConnect)
45
53
ensureMenuIsAccessible(R .id.actionDisconnect)
46
54
55
+ // assert
47
56
// Check menu items are displayed
48
57
onView(withId(R .id.actionSettings)).check(matches(isDisplayed()))
49
58
onView(withId(R .id.actionConnect)).check(matches(isDisplayed()))
@@ -52,11 +61,14 @@ internal class MainActivityAndroidTest {
52
61
53
62
@Test
54
63
fun clickingSettingsOpensSettingsBottomSheet () {
64
+ // arrange
55
65
// Ensure the action item is accisble, either in the toolbar or via overflow
56
66
ensureMenuIsAccessible(R .id.actionSettings)
57
- // Click the Settings menu item
67
+
68
+ // act
58
69
onView(withId(R .id.actionSettings)).perform(click())
59
- // Assert the bottom sheet content is displayed
70
+
71
+ // assert
60
72
onView(withId(R .id.composeViewSettingContent)).check(matches(isDisplayed()))
61
73
}
62
74
}
You can’t perform that action at this time.
0 commit comments