You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
iceraven-browser/app/src/androidTest/java/org/mozilla/fenix/ui/OnboardingTest.kt

74 lines
2.6 KiB
Kotlin

package org.mozilla.fenix.ui
import androidx.compose.ui.test.junit4.AndroidComposeTestRule
import org.junit.Rule
import org.junit.Test
import org.mozilla.fenix.customannotations.SmokeTest
import org.mozilla.fenix.helpers.AppAndSystemHelper.runWithLauncherIntent
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
import org.mozilla.fenix.helpers.TestSetup
import org.mozilla.fenix.ui.robots.homeScreen
class OnboardingTest : TestSetup() {
@get:Rule
val activityTestRule =
AndroidComposeTestRule(
HomeActivityIntentTestRule.withDefaultSettingsOverrides(launchActivity = false),
) { it.activity }
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2122321
@Test
fun verifyFirstOnboardingCardItemsTest() {
runWithLauncherIntent(activityTestRule) {
homeScreen {
verifyFirstOnboardingCard(activityTestRule)
}
}
}
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2122334
@SmokeTest
@Test
fun verifyFirstOnboardingCardItemsFunctionalityTest() {
runWithLauncherIntent(activityTestRule) {
homeScreen {
clickDefaultCardNotNowOnboardingButton(activityTestRule)
verifySecondOnboardingCard(activityTestRule)
swipeSecondOnboardingCardToRight()
}.clickSetAsDefaultBrowserOnboardingButton(activityTestRule) {
verifyAndroidDefaultAppsMenuAppears()
}.goBackToOnboardingScreen {
verifySecondOnboardingCard(activityTestRule)
}
}
}
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2122343
@Test
fun verifySecondOnboardingCardItemsTest() {
runWithLauncherIntent(activityTestRule) {
homeScreen {
clickDefaultCardNotNowOnboardingButton(activityTestRule)
verifySecondOnboardingCard(activityTestRule)
}
}
}
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2122344
@SmokeTest
@Test
fun verifyThirdOnboardingCardSignInFunctionalityTest() {
runWithLauncherIntent(activityTestRule) {
homeScreen {
clickDefaultCardNotNowOnboardingButton(activityTestRule)
verifySecondOnboardingCard(activityTestRule)
clickAddSearchWidgetNotNowOnboardingButton(activityTestRule)
verifyThirdOnboardingCard(activityTestRule)
}.clickSignInOnboardingButton(activityTestRule) {
verifyTurnOnSyncMenu()
}
}
}
}