@@ -8,50 +8,7 @@ import Common
88class PhotonActionSheetTests : FeatureFlaggedTestBase {
99 // https://mozilla.testrail.io/index.php?/cases/view/2306849
1010 // Smoketest
11- func testPinToShortcuts_topSitesVisualRefreshFlagDisabled( ) {
12- addLaunchArgument ( jsonFileName: " defaultEnabledOff " , featureName: " hnt-top-sites-visual-refresh-feature " )
13- app. launch ( )
14- navigator. nowAt ( HomePanelsScreen)
15- navigator. goto ( URLBarOpen)
16- navigator. openURL ( path ( forTestPage: " test-example.html " ) )
17- waitUntilPageLoad ( )
18- // Open Page Action Menu Sheet and Pin the site
19- navigator. nowAt ( BrowserTab)
20- navigator. goto ( BrowserTabMenuMore)
21- navigator. performAction ( Action . PinToTopSitesPAM)
22-
23- // Navigate to topsites to verify that the site has been pinned
24- navigator. nowAt ( BrowserTab)
25- navigator. performAction ( Action . OpenNewTabFromTabTray)
26-
27- // Verify that the site is pinned to top
28- let itemCell = app. links [ AccessibilityIdentifiers . FirefoxHomepage. TopSites. itemCell]
29- let cell = itemCell. staticTexts [ " Example Domain " ]
30- mozWaitForElementToExist ( cell)
31- if #available( iOS 17 , * ) {
32- mozWaitForElementToExist ( app. links [ " Pinned: Example Domain " ] . images [ StandardImageIdentifiers . Small. pinBadgeFill] )
33- } else {
34- // No identifier is available for iOS 17 amd below
35- mozWaitForElementToExist ( app. links [ " Pinned: Example Domain " ] . images. element ( boundBy: 1 ) )
36- }
37-
38- // Remove pin
39- cell. press ( forDuration: 2 )
40- app. tables. cells. buttons [ StandardImageIdentifiers . Large. pinSlash] . waitAndTap ( )
41- // Check that it has been unpinned
42- if #available( iOS 17 , * ) {
43- mozWaitForElementToNotExist ( app. links [ " Example Domain " ] . images [ StandardImageIdentifiers . Small. pinBadgeFill] )
44- } else {
45- mozWaitForElementToNotExist ( app. links [ " Example Domain " ] . images. element ( boundBy: 1 ) )
46- }
47-
48- mozWaitForElementToNotExist ( cell)
49- }
50-
51- // https://mozilla.testrail.io/index.php?/cases/view/2306849
52- // Smoketest
53- func testPinToShortcuts_testPinToShortcuts_topSitesVisualRefreshFlagEnabled( ) {
54- addLaunchArgument ( jsonFileName: " defaultEnabledOn " , featureName: " hnt-top-sites-visual-refresh-feature " )
11+ func testPinToShortcuts_testPinToShortcuts( ) {
5512 app. launch ( )
5613 navigator. nowAt ( HomePanelsScreen)
5714 navigator. goto ( URLBarOpen)
@@ -90,8 +47,7 @@ class PhotonActionSheetTests: FeatureFlaggedTestBase {
9047 mozWaitForElementToNotExist ( cell)
9148 }
9249
93- func testPinToShortcuts_andThenRemovingShortcuts_topSitesVisualRefreshFlagEnabled( ) {
94- addLaunchArgument ( jsonFileName: " defaultEnabledOn " , featureName: " hnt-top-sites-visual-refresh-feature " )
50+ func testPinToShortcuts_andThenRemovingShortcuts( ) {
9551 app. launch ( )
9652 navigator. nowAt ( HomePanelsScreen)
9753 navigator. goto ( URLBarOpen)
@@ -121,38 +77,6 @@ class PhotonActionSheetTests: FeatureFlaggedTestBase {
12177 mozWaitForElementToNotExist ( shortcutCell)
12278 }
12379
124- // https://mozilla.testrail.io/index.php?/cases/view/3102521
125- func testPinToShortcuts_andThenRemovingShortcuts_topSitesVisualRefreshFlagDisabled( ) {
126- addLaunchArgument ( jsonFileName: " defaultEnabledOff " , featureName: " hnt-top-sites-visual-refresh-feature " )
127- app. launch ( )
128- navigator. nowAt ( HomePanelsScreen)
129- navigator. goto ( URLBarOpen)
130- navigator. openURL ( path ( forTestPage: " test-example.html " ) )
131- waitUntilPageLoad ( )
132- navigator. nowAt ( BrowserTab)
133- navigator. goto ( BrowserTabMenuMore)
134- navigator. performAction ( Action . PinToTopSitesPAM)
135- navigator. nowAt ( BrowserTab)
136- navigator. performAction ( Action . OpenNewTabFromTabTray)
137-
138- let itemCell = app. links [ AccessibilityIdentifiers . FirefoxHomepage. TopSites. itemCell]
139- let shortcutCell = itemCell. staticTexts [ " Example Domain " ]
140- mozWaitForElementToExist ( shortcutCell)
141- if #available( iOS 17 , * ) {
142- mozWaitForElementToExist ( app. links [ " Pinned: Example Domain " ] . images [ StandardImageIdentifiers . Small. pinBadgeFill] )
143- } else {
144- // No identifier is available for iOS 17 amd below
145- mozWaitForElementToExist ( app. links [ " Pinned: Example Domain " ] . images. element ( boundBy: 1 ) )
146- }
147-
148- let pinnedShortcutCell = app. collectionViews. links [ " Pinned: Example Domain " ]
149- pinnedShortcutCell. press ( forDuration: 2 )
150- app. tables. cells. buttons [ StandardImageIdentifiers . Large. cross] . waitAndTap ( )
151-
152- mozWaitForElementToNotExist ( shortcutCell)
153- mozWaitForElementToNotExist ( pinnedShortcutCell)
154- }
155-
15680 private func openNewShareSheet( ) {
15781 app. launch ( )
15882 navigator. nowAt ( HomePanelsScreen)
0 commit comments