From f4af90e7828e1304d27291d369e440046aabb703 Mon Sep 17 00:00:00 2001 From: AndiAJ Date: Tue, 23 May 2023 14:41:33 +0300 Subject: [PATCH] Bug 1829104 - Re-enable verifyInsecurePageSecuritySubMenuTest UI test --- .../java/org/mozilla/fenix/ui/NavigationToolbarTest.kt | 3 +-- .../java/org/mozilla/fenix/ui/robots/SiteSecurityRobot.kt | 7 +++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/src/androidTest/java/org/mozilla/fenix/ui/NavigationToolbarTest.kt b/app/src/androidTest/java/org/mozilla/fenix/ui/NavigationToolbarTest.kt index 266549159c..bd4a77a1d1 100644 --- a/app/src/androidTest/java/org/mozilla/fenix/ui/NavigationToolbarTest.kt +++ b/app/src/androidTest/java/org/mozilla/fenix/ui/NavigationToolbarTest.kt @@ -10,7 +10,6 @@ import androidx.test.uiautomator.UiDevice import okhttp3.mockwebserver.MockWebServer import org.junit.After import org.junit.Before -import org.junit.Ignore import org.junit.Rule import org.junit.Test import org.mozilla.fenix.customannotations.SmokeTest @@ -234,13 +233,13 @@ class NavigationToolbarTest { } } - @Ignore("Failing, see: https://bugzilla.mozilla.org/show_bug.cgi?id=1829104") @Test fun verifyInsecurePageSecuritySubMenuTest() { val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1) navigationToolbar { }.enterURLAndEnterToBrowser(defaultWebPage.url) { + waitForPageToLoad() }.openSiteSecuritySheet { verifyQuickActionSheet(defaultWebPage.url.toString(), false) openSecureConnectionSubMenu(false) diff --git a/app/src/androidTest/java/org/mozilla/fenix/ui/robots/SiteSecurityRobot.kt b/app/src/androidTest/java/org/mozilla/fenix/ui/robots/SiteSecurityRobot.kt index 1ad88c91f2..b5ce4345a5 100644 --- a/app/src/androidTest/java/org/mozilla/fenix/ui/robots/SiteSecurityRobot.kt +++ b/app/src/androidTest/java/org/mozilla/fenix/ui/robots/SiteSecurityRobot.kt @@ -16,6 +16,7 @@ import mozilla.components.support.ktx.kotlin.tryGetHostFromUrl import org.junit.Assert.assertTrue import org.mozilla.fenix.R import org.mozilla.fenix.helpers.TestAssetHelper.waitingTime +import org.mozilla.fenix.helpers.TestAssetHelper.waitingTimeShort import org.mozilla.fenix.helpers.TestHelper.getStringResource import org.mozilla.fenix.helpers.TestHelper.mDevice import org.mozilla.fenix.helpers.TestHelper.packageName @@ -26,8 +27,10 @@ import org.mozilla.fenix.helpers.TestHelper.packageName class SiteSecurityRobot { fun verifyQuickActionSheet(url: String = "", isConnectionSecure: Boolean) = assertQuickActionSheet(url, isConnectionSecure) - fun openSecureConnectionSubMenu(isConnectionSecure: Boolean) = - quickActionSheetSecurityInfo(isConnectionSecure).clickAndWaitForNewWindow(waitingTime) + fun openSecureConnectionSubMenu(isConnectionSecure: Boolean) { + quickActionSheetSecurityInfo(isConnectionSecure).click() + mDevice.waitForWindowUpdate(packageName, waitingTimeShort) + } fun verifySecureConnectionSubMenu(pageTitle: String = "", url: String = "", isConnectionSecure: Boolean) = assertSecureConnectionSubMenu(pageTitle, url, isConnectionSecure) fun clickQuickActionSheetClearSiteData() = quickActionSheetClearSiteData().click()