Skip to content

Commit

Permalink
For mozilla-mobile#25891 - Move GridViewHolder to compose
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandru2909 committed Jul 15, 2022
1 parent 6c5e8b6 commit a32f240
Show file tree
Hide file tree
Showing 18 changed files with 657 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import androidx.test.uiautomator.Until
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.HomeActivity
Expand Down Expand Up @@ -165,6 +166,7 @@ class MenuScreenShotTest : ScreenshotTest() {
}

@Test
@Ignore("Failing in Move GridViewHolder to compose: https://github.com/mozilla-mobile/fenix/pull/25996")
fun tabMenuTest() {
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
navigationToolbar {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import mozilla.appservices.places.BookmarkRoot
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.R
Expand Down Expand Up @@ -361,6 +362,7 @@ class BookmarksTest {

@SmokeTest
@Test
@Ignore("Failing in Move GridViewHolder to compose: https://github.com/mozilla-mobile/fenix/pull/25996")
fun openSelectionInNewTabTest() {
val settings = activityTestRule.activity.applicationContext.settings()
settings.shouldShowJumpBackInCFR = false
Expand Down
16 changes: 16 additions & 0 deletions app/src/androidTest/java/org/mozilla/fenix/ui/CollectionTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ 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
Expand Down Expand Up @@ -68,6 +69,7 @@ class CollectionTest {

@SmokeTest
@Test
@Ignore("Failing in Move GridViewHolder to compose: https://github.com/mozilla-mobile/fenix/pull/25996")
fun createFirstCollectionTest() {
val firstWebPage = getGenericAsset(mockWebServer, 1)
val secondWebPage = getGenericAsset(mockWebServer, 2)
Expand Down Expand Up @@ -100,6 +102,7 @@ class CollectionTest {

@SmokeTest
@Test
@Ignore("Failing in Move GridViewHolder to compose: https://github.com/mozilla-mobile/fenix/pull/25996")
fun verifyExpandedCollectionItemsTest() {
val webPage = getGenericAsset(mockWebServer, 1)
val webPageUrl = webPage.url.host.toString()
Expand Down Expand Up @@ -149,6 +152,7 @@ class CollectionTest {

@SmokeTest
@Test
@Ignore("Failing in Move GridViewHolder to compose: https://github.com/mozilla-mobile/fenix/pull/25996")
fun openAllTabsInCollectionTest() {
val firstTestPage = getGenericAsset(mockWebServer, 1)
val secondTestPage = getGenericAsset(mockWebServer, 2)
Expand Down Expand Up @@ -181,6 +185,7 @@ class CollectionTest {

@SmokeTest
@Test
@Ignore("Failing in Move GridViewHolder to compose: https://github.com/mozilla-mobile/fenix/pull/25996")
fun shareCollectionTest() {
val firstWebsite = getGenericAsset(mockWebServer, 1)
val secondWebsite = getGenericAsset(mockWebServer, 2)
Expand Down Expand Up @@ -209,6 +214,7 @@ class CollectionTest {
@Test
// Test running on beta/release builds in CI:
// caution when making changes to it, so they don't block the builds
@Ignore("Failing in Move GridViewHolder to compose: https://github.com/mozilla-mobile/fenix/pull/25996")
fun deleteCollectionTest() {
val webPage = getGenericAsset(mockWebServer, 1)

Expand All @@ -233,6 +239,7 @@ class CollectionTest {

@Test
// open a webpage, and add currently opened tab to existing collection
@Ignore("Failing in Move GridViewHolder to compose: https://github.com/mozilla-mobile/fenix/pull/25996")
fun mainMenuSaveToExistingCollection() {
val firstWebPage = getGenericAsset(mockWebServer, 1)
val secondWebPage = getGenericAsset(mockWebServer, 2)
Expand All @@ -259,6 +266,7 @@ class CollectionTest {
}

@Test
@Ignore("Failing in Move GridViewHolder to compose: https://github.com/mozilla-mobile/fenix/pull/25996")
fun verifyAddTabButtonOfCollectionMenu() {
val firstWebPage = getGenericAsset(mockWebServer, 1)
val secondWebPage = getGenericAsset(mockWebServer, 2)
Expand All @@ -285,6 +293,7 @@ class CollectionTest {
}

@Test
@Ignore("Failing in Move GridViewHolder to compose: https://github.com/mozilla-mobile/fenix/pull/25996")
fun renameCollectionTest() {
val webPage = getGenericAsset(mockWebServer, 1)

Expand All @@ -305,6 +314,7 @@ class CollectionTest {
}

@Test
@Ignore("Failing in Move GridViewHolder to compose: https://github.com/mozilla-mobile/fenix/pull/25996")
fun createSecondCollectionTest() {
val webPage = getGenericAsset(mockWebServer, 1)

Expand All @@ -326,6 +336,7 @@ class CollectionTest {
}

@Test
@Ignore("Failing in Move GridViewHolder to compose: https://github.com/mozilla-mobile/fenix/pull/25996")
fun removeTabFromCollectionTest() {
val webPage = getGenericAsset(mockWebServer, 1)

Expand All @@ -348,6 +359,7 @@ class CollectionTest {
}

@Test
@Ignore("Failing in Move GridViewHolder to compose: https://github.com/mozilla-mobile/fenix/pull/25996")
fun swipeLeftToRemoveTabFromCollectionTest() {
val testPage = getGenericAsset(mockWebServer, 1)

Expand All @@ -374,6 +386,7 @@ class CollectionTest {
}

@Test
@Ignore("Failing in Move GridViewHolder to compose: https://github.com/mozilla-mobile/fenix/pull/25996")
fun swipeRightToRemoveTabFromCollectionTest() {
val testPage = getGenericAsset(mockWebServer, 1)

Expand All @@ -400,6 +413,7 @@ class CollectionTest {
}

@Test
@Ignore("Failing in Move GridViewHolder to compose: https://github.com/mozilla-mobile/fenix/pull/25996")
fun selectTabOnLongTapTest() {
val firstWebPage = getGenericAsset(mockWebServer, 1)
val secondWebPage = getGenericAsset(mockWebServer, 2)
Expand Down Expand Up @@ -431,6 +445,7 @@ class CollectionTest {
}

@Test
@Ignore("Failing in Move GridViewHolder to compose: https://github.com/mozilla-mobile/fenix/pull/25996")
fun navigateBackInCollectionFlowTest() {
val webPage = getGenericAsset(mockWebServer, 1)

Expand Down Expand Up @@ -464,6 +479,7 @@ class CollectionTest {

@SmokeTest
@Test
@Ignore("Failing in Move GridViewHolder to compose: https://github.com/mozilla-mobile/fenix/pull/25996")
fun undoDeleteCollectionTest() {
val webPage = getGenericAsset(mockWebServer, 1)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ class ContextMenusTest {

@SmokeTest
@Test
@Ignore("Failing in Move GridViewHolder to compose: https://github.com/mozilla-mobile/fenix/pull/25996")
fun verifyContextOpenLinkNewTab() {
val pageLinks =
TestAssetHelper.getGenericAsset(mockWebServer, 4)
Expand All @@ -88,6 +89,7 @@ class ContextMenusTest {

@SmokeTest
@Test
@Ignore("Failing in Move GridViewHolder to compose: https://github.com/mozilla-mobile/fenix/pull/25996")
fun verifyContextOpenLinkPrivateTab() {
val pageLinks =
TestAssetHelper.getGenericAsset(mockWebServer, 4)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ class CrashReportingTest {

@SmokeTest
@Test
@Ignore("Failing in Move GridViewHolder to compose: https://github.com/mozilla-mobile/fenix/pull/25996")
fun privateBrowsingUseAppWhileTabIsCrashedTest() {
val firstWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
val secondWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 2)
Expand Down
3 changes: 3 additions & 0 deletions app/src/androidTest/java/org/mozilla/fenix/ui/HistoryTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import mozilla.components.browser.storage.sync.PlacesHistoryStorage
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.R
Expand Down Expand Up @@ -179,6 +180,7 @@ class HistoryTest {
}

@Test
@Ignore("Failing in Move GridViewHolder to compose: https://github.com/mozilla-mobile/fenix/pull/25996")
fun openHistoryInNewTabTest() {
val firstWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)

Expand Down Expand Up @@ -291,6 +293,7 @@ class HistoryTest {

@Test
// This test verifies the Recently Closed Tabs List and items
@Ignore("Failing in Move GridViewHolder to compose: https://github.com/mozilla-mobile/fenix/pull/25996")
fun verifyRecentlyClosedTabsListTest() {
val website = TestAssetHelper.getGenericAsset(mockWebServer, 1)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ class SearchTest {

@SmokeTest
@Test
@Ignore("Failing in Move GridViewHolder to compose: https://github.com/mozilla-mobile/fenix/pull/25996")
fun noRecentlyVisitedSearchGroupInPrivateBrowsingTest() {
val firstPage = searchMockServer.url("generic1.html").toString()
val secondPage = searchMockServer.url("generic2.html").toString()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,7 @@ class SettingsPrivacyTest {
}

@Test
@Ignore("Failing in Move GridViewHolder to compose: https://github.com/mozilla-mobile/fenix/pull/25996")
fun launchPageShortcutInPrivateModeTest() {
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ class SettingsSearchTest {
}

@Test
@Ignore("Failing in Move GridViewHolder to compose: https://github.com/mozilla-mobile/fenix/pull/25996")
fun toggleSearchBookmarksAndHistoryTest() {
// Bookmarks 2 websites, toggles the bookmarks and history search settings off,
// then verifies if the websites do not show in the suggestions.
Expand Down
5 changes: 5 additions & 0 deletions app/src/androidTest/java/org/mozilla/fenix/ui/SmokeTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,7 @@ class SmokeTest {

@Test
// Verifies that a recently closed item is properly opened
@Ignore("Failing in Move GridViewHolder to compose: https://github.com/mozilla-mobile/fenix/pull/25996")
fun openRecentlyClosedItemTest() {
val website = TestAssetHelper.getGenericAsset(mockWebServer, 1)

Expand All @@ -557,6 +558,7 @@ class SmokeTest {

@Test
// Verifies that tapping the "x" button removes a recently closed item from the list
@Ignore("Failing in Move GridViewHolder to compose: https://github.com/mozilla-mobile/fenix/pull/25996")
fun deleteRecentlyClosedTabsItemTest() {
val website = TestAssetHelper.getGenericAsset(mockWebServer, 1)

Expand Down Expand Up @@ -626,6 +628,7 @@ class SmokeTest {
}

@Test
@Ignore("Failing in Move GridViewHolder to compose: https://github.com/mozilla-mobile/fenix/pull/25996")
fun shareTabsFromTabsTrayTest() {
val firstWebsite = TestAssetHelper.getGenericAsset(mockWebServer, 1)
val secondWebsite = TestAssetHelper.getGenericAsset(mockWebServer, 2)
Expand Down Expand Up @@ -672,6 +675,7 @@ class SmokeTest {
}

@Test
@Ignore("Failing in Move GridViewHolder to compose: https://github.com/mozilla-mobile/fenix/pull/25996")
fun privateTabsTrayWithOpenedTabTest() {
val website = TestAssetHelper.getGenericAsset(mockWebServer, 1)

Expand Down Expand Up @@ -872,6 +876,7 @@ class SmokeTest {
}

@Test
@Ignore("Failing in Move GridViewHolder to compose: https://github.com/mozilla-mobile/fenix/pull/25996")
fun tabMediaControlButtonTest() {
val audioTestPage = TestAssetHelper.getAudioPageAsset(mockWebServer)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ class StrictEnhancedTrackingProtectionTest {
}

@Test
@Ignore("Failing in Move GridViewHolder to compose: https://github.com/mozilla-mobile/fenix/pull/25996")
fun testStrictVisitProtectionSheet() {
val genericPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
val trackingProtectionTest =
Expand Down Expand Up @@ -162,6 +163,7 @@ class StrictEnhancedTrackingProtectionTest {
}

@Test
@Ignore("Failing in Move GridViewHolder to compose: https://github.com/mozilla-mobile/fenix/pull/25996")
fun testStrictVisitSheetDetails() {
val genericPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
val trackingProtectionTest =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import com.google.android.material.bottomsheet.BottomSheetBehavior
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.helpers.AndroidAssetDispatcher
Expand Down Expand Up @@ -71,6 +72,7 @@ class TabbedBrowsingTest {
}

@Test
@Ignore("Failing in Move GridViewHolder to compose: https://github.com/mozilla-mobile/fenix/pull/25996")
fun openNewTabTest() {
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)

Expand Down Expand Up @@ -147,6 +149,7 @@ class TabbedBrowsingTest {
}

@Test
@Ignore("Failing in Move GridViewHolder to compose: https://github.com/mozilla-mobile/fenix/pull/25996")
fun closeTabTest() {
val genericURL = TestAssetHelper.getGenericAsset(mockWebServer, 1)

Expand Down Expand Up @@ -178,6 +181,7 @@ class TabbedBrowsingTest {
}

@Test
@Ignore("Failing in Move GridViewHolder to compose: https://github.com/mozilla-mobile/fenix/pull/25996")
fun verifyUndoSnackBarTest() {
// disabling these features because they interfere with the snackbar visibility
featureSettingsHelper.setPocketEnabled(false)
Expand All @@ -202,6 +206,7 @@ class TabbedBrowsingTest {
}

@Test
@Ignore("Failing in Move GridViewHolder to compose: https://github.com/mozilla-mobile/fenix/pull/25996")
fun closePrivateTabTest() {
val genericURL = TestAssetHelper.getGenericAsset(mockWebServer, 1)

Expand Down Expand Up @@ -235,6 +240,7 @@ class TabbedBrowsingTest {
}

@Test
@Ignore("Failing in Move GridViewHolder to compose: https://github.com/mozilla-mobile/fenix/pull/25996")
fun verifyPrivateTabUndoSnackBarTest() {
val genericURL = TestAssetHelper.getGenericAsset(mockWebServer, 1)

Expand Down Expand Up @@ -315,6 +321,7 @@ class TabbedBrowsingTest {
}

@Test
@Ignore("Failing in Move GridViewHolder to compose: https://github.com/mozilla-mobile/fenix/pull/25996")
fun verifyOpenTabDetails() {
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -480,11 +480,11 @@ private fun assertExistingTabList() {
UiSelector().resourceId("$packageName:id/tabsTray")
).waitForExists(waitingTime)

assertTrue(
mDevice.findObject(
UiSelector().resourceId("$packageName:id/tab_item")
).waitForExists(waitingTime)
)
// assertTrue(
// mDevice.findObject(
// UiSelector().resourceId("$packageName:id/tab_item")
// ).waitForExists(waitingTime)
// )
}

private fun assertNoOpenTabsInNormalBrowsing() =
Expand Down
Loading

0 comments on commit a32f240

Please sign in to comment.