From 8b8f3d1b567b90f928ba0fb01c8a8ac9c377d6df Mon Sep 17 00:00:00 2001 From: ValentinTimisica Date: Mon, 25 Nov 2019 16:05:37 +0200 Subject: [PATCH] For #4776: Refactored UI tests. After removing the 'Privacy notice' and 'Help' items from the Settings screen the UI tests for them became unneeded. --- .../java/org/mozilla/fenix/ui/SettingsAboutTest.kt | 1 - .../java/org/mozilla/fenix/ui/SettingsPrivacyTest.kt | 1 - .../java/org/mozilla/fenix/ui/robots/SettingsRobot.kt | 11 ----------- 3 files changed, 13 deletions(-) diff --git a/app/src/androidTest/java/org/mozilla/fenix/ui/SettingsAboutTest.kt b/app/src/androidTest/java/org/mozilla/fenix/ui/SettingsAboutTest.kt index 223d4c543..94409643c 100644 --- a/app/src/androidTest/java/org/mozilla/fenix/ui/SettingsAboutTest.kt +++ b/app/src/androidTest/java/org/mozilla/fenix/ui/SettingsAboutTest.kt @@ -52,7 +52,6 @@ class SettingsAboutTest { }.openSettings { // ABOUT verifyAboutHeading() - verifyHelp() verifyRateOnGooglePlay() verifyAboutFirefoxPreview() } diff --git a/app/src/androidTest/java/org/mozilla/fenix/ui/SettingsPrivacyTest.kt b/app/src/androidTest/java/org/mozilla/fenix/ui/SettingsPrivacyTest.kt index 8ce8be27e..5a16f4f65 100644 --- a/app/src/androidTest/java/org/mozilla/fenix/ui/SettingsPrivacyTest.kt +++ b/app/src/androidTest/java/org/mozilla/fenix/ui/SettingsPrivacyTest.kt @@ -103,7 +103,6 @@ class SettingsPrivacyTest { verifyDeleteBrowsingDataButton() verifyDeleteBrowsingDataOnQuitButton() verifyDataCollectionButton() - verifyPrivacyNoticeButton() verifyLeakCanaryButton() } } diff --git a/app/src/androidTest/java/org/mozilla/fenix/ui/robots/SettingsRobot.kt b/app/src/androidTest/java/org/mozilla/fenix/ui/robots/SettingsRobot.kt index f10b44a4b..9b3b14dc6 100644 --- a/app/src/androidTest/java/org/mozilla/fenix/ui/robots/SettingsRobot.kt +++ b/app/src/androidTest/java/org/mozilla/fenix/ui/robots/SettingsRobot.kt @@ -47,7 +47,6 @@ class SettingsRobot { fun verifyDeleteBrowsingDataButton() = assertDeleteBrowsingDataButton() fun verifyDeleteBrowsingDataOnQuitButton() = assertDeleteBrowsingDataOnQuitButton() fun verifyDataCollectionButton() = assertDataCollectionButton() - fun verifyPrivacyNoticeButton() = assertPrivacyNoticeButton() fun verifyLeakCanaryButton() = assertLeakCanaryButton() fun verifySettingsView() = assertSettingsView() @@ -59,7 +58,6 @@ class SettingsRobot { // ABOUT SECTION fun verifyAboutHeading() = assertAboutHeading() - fun verifyHelp() = assertHelp() fun verifyRateOnGooglePlay() = assertRateOnGooglePlay() fun verifyAboutFirefoxPreview() = assertAboutFirefoxPreview() @@ -191,9 +189,6 @@ private fun assertDeleteBrowsingDataOnQuitButton() { private fun assertDataCollectionButton() = onView(ViewMatchers.withText("Data collection")) .check(matches(withEffectiveVisibility(Visibility.VISIBLE))) -private fun assertPrivacyNoticeButton() = onView(ViewMatchers.withText("Privacy notice")) - .check(matches(withEffectiveVisibility(Visibility.VISIBLE))) - private fun assertLeakCanaryButton() = onView(ViewMatchers.withText("LeakCanary")) .check(matches(withEffectiveVisibility(Visibility.VISIBLE))) @@ -214,12 +209,6 @@ private fun assertAboutHeading() { .check(matches(withEffectiveVisibility(Visibility.VISIBLE))) } -private fun assertHelp() { - TestHelper.scrollToElementByText("About Firefox Preview") - onView(ViewMatchers.withText("Help")) - .check(matches(withEffectiveVisibility(Visibility.VISIBLE))) -} - private fun assertRateOnGooglePlay() { TestHelper.scrollToElementByText("About Firefox Preview") onView(ViewMatchers.withText("Rate on Google Play"))