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 ba9ade2
Show file tree
Hide file tree
Showing 15 changed files with 626 additions and 12 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("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("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
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 @@ -149,6 +150,7 @@ class CollectionTest {

@SmokeTest
@Test
@Ignore("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 @@ -259,6 +261,7 @@ class CollectionTest {
}

@Test
@Ignore("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 Down Expand Up @@ -326,6 +329,7 @@ class CollectionTest {
}

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

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

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

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

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

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("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("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 @@ -363,6 +363,7 @@ class SettingsPrivacyTest {
}

@Test
@Ignore("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("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
2 changes: 2 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("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("Move GridViewHolder to compose: https://github.com/mozilla-mobile/fenix/pull/25996")
fun deleteRecentlyClosedTabsItemTest() {
val website = TestAssetHelper.getGenericAsset(mockWebServer, 1)

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

@Test
@Ignore("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("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("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("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("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("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("Move GridViewHolder to compose: https://github.com/mozilla-mobile/fenix/pull/25996")
fun verifyPrivateTabUndoSnackBarTest() {
val genericURL = 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 Expand Up @@ -606,7 +606,7 @@ private fun tab(title: String) =
private fun tabItem(title: String) =
mDevice.findObject(
UiSelector()
.resourceId("$packageName:id/tab_item")
// .resourceId("$packageName:id/tab_item")
.childSelector(UiSelector().text(title))
)

Expand Down
Loading

0 comments on commit ba9ade2

Please sign in to comment.