1 package org.mozilla.fenix.ui
3 import androidx.compose.ui.test.junit4.AndroidComposeTestRule
6 import org.mozilla.fenix.customannotations.SmokeTest
7 import org.mozilla.fenix.helpers.AppAndSystemHelper.runWithLauncherIntent
8 import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
9 import org.mozilla.fenix.helpers.TestSetup
10 import org.mozilla.fenix.ui.robots.homeScreen
12 class OnboardingTest : TestSetup() {
15 val activityTestRule =
16 AndroidComposeTestRule(
17 HomeActivityIntentTestRule.withDefaultSettingsOverrides(launchActivity = false),
20 // TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2122321
22 fun verifyFirstOnboardingCardItemsTest() {
23 runWithLauncherIntent(activityTestRule) {
25 verifyFirstOnboardingCard(activityTestRule)
30 // TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2122334
33 fun verifyFirstOnboardingCardItemsFunctionalityTest() {
34 runWithLauncherIntent(activityTestRule) {
36 clickDefaultCardNotNowOnboardingButton(activityTestRule)
37 verifySecondOnboardingCard(activityTestRule)
38 swipeSecondOnboardingCardToRight()
39 }.clickSetAsDefaultBrowserOnboardingButton(activityTestRule) {
40 verifyAndroidDefaultAppsMenuAppears()
41 }.goBackToOnboardingScreen {
42 verifySecondOnboardingCard(activityTestRule)
47 // TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2122343
49 fun verifySecondOnboardingCardItemsTest() {
50 runWithLauncherIntent(activityTestRule) {
52 clickDefaultCardNotNowOnboardingButton(activityTestRule)
53 verifySecondOnboardingCard(activityTestRule)
58 // TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2122344
61 fun verifyThirdOnboardingCardSignInFunctionalityTest() {
62 runWithLauncherIntent(activityTestRule) {
64 clickDefaultCardNotNowOnboardingButton(activityTestRule)
65 verifySecondOnboardingCard(activityTestRule)
66 clickAddSearchWidgetNotNowOnboardingButton(activityTestRule)
67 verifyThirdOnboardingCard(activityTestRule)
68 }.clickSignInOnboardingButton(activityTestRule) {
69 verifyTurnOnSyncMenu()