Bug 1807268 - Re-enable verifyShowClipboardSuggestionsToggleTest UI test r=jajohnson
[gecko.git] / mobile / android / fenix / app / src / androidTest / java / org / mozilla / fenix / ui / OnboardingTest.kt
blob4eead4f63c98918a892c889c7a37647366a64927
1 package org.mozilla.fenix.ui
3 import androidx.compose.ui.test.junit4.AndroidComposeTestRule
4 import org.junit.Rule
5 import org.junit.Test
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() {
14     @get:Rule
15     val activityTestRule =
16         AndroidComposeTestRule(
17             HomeActivityIntentTestRule.withDefaultSettingsOverrides(launchActivity = false),
18         ) { it.activity }
20     // TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2122321
21     @Test
22     fun verifyFirstOnboardingCardItemsTest() {
23         runWithLauncherIntent(activityTestRule) {
24             homeScreen {
25                 verifyFirstOnboardingCard(activityTestRule)
26             }
27         }
28     }
30     // TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2122334
31     @SmokeTest
32     @Test
33     fun verifyFirstOnboardingCardItemsFunctionalityTest() {
34         runWithLauncherIntent(activityTestRule) {
35             homeScreen {
36                 clickDefaultCardNotNowOnboardingButton(activityTestRule)
37                 verifySecondOnboardingCard(activityTestRule)
38                 swipeSecondOnboardingCardToRight()
39             }.clickSetAsDefaultBrowserOnboardingButton(activityTestRule) {
40                 verifyAndroidDefaultAppsMenuAppears()
41             }.goBackToOnboardingScreen {
42                 verifySecondOnboardingCard(activityTestRule)
43             }
44         }
45     }
47     // TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2122343
48     @Test
49     fun verifySecondOnboardingCardItemsTest() {
50         runWithLauncherIntent(activityTestRule) {
51             homeScreen {
52                 clickDefaultCardNotNowOnboardingButton(activityTestRule)
53                 verifySecondOnboardingCard(activityTestRule)
54             }
55         }
56     }
58     // TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2122344
59     @SmokeTest
60     @Test
61     fun verifyThirdOnboardingCardSignInFunctionalityTest() {
62         runWithLauncherIntent(activityTestRule) {
63             homeScreen {
64                 clickDefaultCardNotNowOnboardingButton(activityTestRule)
65                 verifySecondOnboardingCard(activityTestRule)
66                 clickAddSearchWidgetNotNowOnboardingButton(activityTestRule)
67                 verifyThirdOnboardingCard(activityTestRule)
68             }.clickSignInOnboardingButton(activityTestRule) {
69                 verifyTurnOnSyncMenu()
70             }
71         }
72     }