Skip to content

Commit d90e8d1

Browse files
committed
Adjust UI tests
1 parent 8a9036c commit d90e8d1

File tree

4 files changed

+6
-86
lines changed

4 files changed

+6
-86
lines changed

firefox-ios/firefox-ios-tests/Tests/FullFunctionalTestPlan.xctestplan

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,7 @@
239239
"OnboardingTests\/testOnboardingSignIn_TAE()",
240240
"PerformanceTests",
241241
"PhotonActionSheetTests\/testPinToShortcuts()",
242-
"PhotonActionSheetTests\/testPinToShortcuts_testPinToShortcuts_topSitesVisualRefreshFlagEnabled()",
243-
"PhotonActionSheetTests\/testPinToShortcuts_topSitesVisualRefreshFlagDisabled()",
242+
"PhotonActionSheetTests\/testPinToShortcuts_testPinToShortcuts()",
244243
"PhotonActionSheetTests\/testSharePageWithShareSheetOptions()",
245244
"PrivateBrowsingTest\/testClosePrivateTabsOptionClosesPrivateTabsShortCutiPad()",
246245
"PrivateBrowsingTest\/testLongPressLinkOptionsPrivateMode_TAE()",

firefox-ios/firefox-ios-tests/Tests/Smoketest.xctestplan

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,8 +415,7 @@
415415
"OnboardingTests\/testWhatsNewPage()",
416416
"OpeningScreenTests",
417417
"PerformanceTests",
418-
"PhotonActionSheetTests\/testPinToShortcuts_andThenRemovingShortcuts_topSitesVisualRefreshFlagDisabled()",
419-
"PhotonActionSheetTests\/testPinToShortcuts_andThenRemovingShortcuts_topSitesVisualRefreshFlagEnabled()",
418+
"PhotonActionSheetTests\/testPinToShortcuts_andThenRemovingShortcuts()",
420419
"PhotonActionSheetTests\/testShareSheetOpenAndCancel()",
421420
"PhotonActionSheetTests\/testShareSheetSendToDevice()",
422421
"PocketTest",

firefox-ios/firefox-ios-tests/Tests/TAESmokeTestPlan.xctestplan

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -439,10 +439,8 @@
439439
"PerformanceTests\/testPerfTabs_3_20tabTray()",
440440
"PerformanceTests\/testPerfTabs_4_1280tabTray()",
441441
"PhotonActionSheetTests",
442-
"PhotonActionSheetTests\/testPinToShortcuts_andThenRemovingShortcuts_topSitesVisualRefreshFlagDisabled()",
443-
"PhotonActionSheetTests\/testPinToShortcuts_andThenRemovingShortcuts_topSitesVisualRefreshFlagEnabled()",
444-
"PhotonActionSheetTests\/testPinToShortcuts_testPinToShortcuts_topSitesVisualRefreshFlagEnabled()",
445-
"PhotonActionSheetTests\/testPinToShortcuts_topSitesVisualRefreshFlagDisabled()",
442+
"PhotonActionSheetTests\/testPinToShortcuts_andThenRemovingShortcuts()",
443+
"PhotonActionSheetTests\/testPinToShortcuts_testPinToShortcuts()",
446444
"PhotonActionSheetTests\/testSharePageWithShareSheetOptions()",
447445
"PhotonActionSheetTests\/testShareSheetOpenAndCancel()",
448446
"PhotonActionSheetTests\/testShareSheetSendToDevice()",

firefox-ios/firefox-ios-tests/Tests/XCUITests/PhotonActionSheetTests.swift

Lines changed: 2 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -8,50 +8,7 @@ import Common
88
class 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

Comments
 (0)