File tree Expand file tree Collapse file tree 3 files changed +15
-8
lines changed
app/src/androidTest/java/com/google/samples/apps/nowinandroid/ui Expand file tree Collapse file tree 3 files changed +15
-8
lines changed Original file line number Diff line number Diff line change @@ -19,9 +19,11 @@ package com.google.samples.apps.nowinandroid.ui
1919import androidx.compose.ui.test.assertCountEquals
2020import androidx.compose.ui.test.assertIsOn
2121import androidx.compose.ui.test.assertIsSelected
22+ import androidx.compose.ui.test.hasAnyAncestor
23+ import androidx.compose.ui.test.hasTestTag
24+ import androidx.compose.ui.test.hasText
2225import androidx.compose.ui.test.junit4.createAndroidComposeRule
2326import androidx.compose.ui.test.onAllNodesWithText
24- import androidx.compose.ui.test.onLast
2527import androidx.compose.ui.test.onNodeWithContentDescription
2628import androidx.compose.ui.test.onNodeWithText
2729import androidx.compose.ui.test.performClick
@@ -213,7 +215,12 @@ class NavigationTest {
213215 onNodeWithText(ok).performClick()
214216
215217 // Check that the saved screen is still visible and selected.
216- onAllNodesWithText(saved).onLast().assertIsSelected()
218+ onNode(
219+ hasText(saved) and
220+ hasAnyAncestor(
221+ hasTestTag(" NiaBottomBar" ) or hasTestTag(" NiaNavRail" ),
222+ ),
223+ ).assertIsSelected()
217224 }
218225 }
219226
Original file line number Diff line number Diff line change 11[versions ]
22accompanist = " 0.28.0"
33androidDesugarJdkLibs = " 1.2.2"
4- androidGradlePlugin = " 7.4.0 "
4+ androidGradlePlugin = " 7.4.1 "
55androidxActivity = " 1.6.1"
66androidxAppCompat = " 1.5.1"
77androidxBrowser = " 1.4.0"
Original file line number Diff line number Diff line change 1414 * limitations under the License.
1515 */
1616plugins {
17- id ' java-library'
18- id ' kotlin'
19- id ' com.android.lint'
17+ ` java- library`
18+ kotlin( " jvm " )
19+ id( " com.android.lint" )
2020}
2121
2222java {
2525}
2626
2727dependencies {
28- compileOnly libs. kotlin. stdlib
29- compileOnly libs. lint. api
28+ compileOnly( libs.kotlin.stdlib)
29+ compileOnly( libs.lint.api)
3030}
You can’t perform that action at this time.
0 commit comments