diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 0aed882..924a7ac 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -80,11 +80,11 @@ dependencies { implementation("androidx.lifecycle:lifecycle-runtime-ktx:${rootProject.extra["lifecycle_version"]}") implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:${rootProject.extra["lifecycle_version"]}") implementation("androidx.lifecycle:lifecycle-viewmodel-savedstate:${rootProject.extra["lifecycle_version"]}") - implementation("androidx.navigation:navigation-compose:2.5.3") + implementation("androidx.navigation:navigation-compose:2.6.0") androidTestImplementation(platform("androidx.compose:compose-bom:2023.05.01")) androidTestImplementation("androidx.compose.ui:ui-test-junit4") - androidTestImplementation("androidx.navigation:navigation-testing:2.5.3") + androidTestImplementation("androidx.navigation:navigation-testing:2.6.0") androidTestImplementation("androidx.test.espresso:espresso-intents:3.5.1") androidTestImplementation("androidx.test.ext:junit:1.1.5") diff --git a/app/src/androidTest/java/com/example/cupcake/test/CupcakeOrderScreenTest.kt b/app/src/androidTest/java/com/example/cupcake/test/CupcakeOrderScreenTest.kt index 3695f49..e22b61e 100644 --- a/app/src/androidTest/java/com/example/cupcake/test/CupcakeOrderScreenTest.kt +++ b/app/src/androidTest/java/com/example/cupcake/test/CupcakeOrderScreenTest.kt @@ -76,25 +76,25 @@ class CupcakeOrderScreenTest { @Test fun selectOptionScreen_verifyContent() { // Given list of options - val flavours = listOf("Vanilla", "Chocolate", "Hazelnut", "Cookie", "Mango") - // And sub total - val subTotal = "$100" + val flavors = listOf("Vanilla", "Chocolate", "Hazelnut", "Cookie", "Mango") + // And subtotal + val subtotal = "$100" // When SelectOptionScreen is loaded composeTestRule.setContent { - SelectOptionScreen(subtotal = subTotal, options = flavours) + SelectOptionScreen(subtotal = subtotal, options = flavors) } // Then all the options are displayed on the screen. - flavours.forEach { flavour -> - composeTestRule.onNodeWithText(flavour).assertIsDisplayed() + flavors.forEach { flavor -> + composeTestRule.onNodeWithText(flavor).assertIsDisplayed() } // And then the subtotal is displayed correctly. composeTestRule.onNodeWithText( composeTestRule.activity.getString( R.string.subtotal_price, - subTotal + subtotal ) ).assertIsDisplayed() @@ -148,6 +148,6 @@ class CupcakeOrderScreenTest { R.string.subtotal_price, fakeOrderUiState.price ) - ) + ).assertIsDisplayed() } }