Skip to content

Commit ee2963f

Browse files
authoredMar 13, 2025
Remove MTE-4386 - outdated workarounds (#25317)
1 parent 8160f7c commit ee2963f

7 files changed

+6
-34
lines changed
 

‎firefox-ios/firefox-ios-tests/Tests/Smoketest4.xctestplan

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"ActivityStreamTest\/testContextMenuInLandscape()",
2828
"ActivityStreamTest\/testLongTapOnTopSiteOptions()",
2929
"ActivityStreamTest\/testShortcutsToggle()",
30+
"ActivityStreamTest\/testSiteCanBeAddedToShortcuts()",
3031
"ActivityStreamTest\/testTopSites2Add()",
3132
"ActivityStreamTest\/testTopSitesRemoveAllExceptDefaultClearPrivateData()",
3233
"ActivityStreamTest\/testTopSitesRemoveAllExceptPinnedClearPrivateData()",

‎firefox-ios/firefox-ios-tests/Tests/XCUITests/ActivityStreamTest.swift

+1-3
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,6 @@ class ActivityStreamTest: BaseTestCase {
192192
app.collectionViews["FxCollectionView"].links[defaultTopSite["bookmarkLabel"]!].press(forDuration: 1)
193193
selectOptionFromContextMenu(option: "Open in a Private Tab")
194194
// Check that two tabs are open and one of them is the default top site one
195-
// Workaround needed after xcode 11.3 update Issue 5937
196-
sleep(3)
197195
navigator.nowAt(HomePanelsScreen)
198196
waitForTabsButton()
199197
navigator.toggleOn(userState.isPrivate, withAction: Action.TogglePrivateMode)
@@ -253,7 +251,7 @@ class ActivityStreamTest: BaseTestCase {
253251
}
254252

255253
// https://mozilla.testrail.io/index.php?/cases/view/2855325
256-
func testsiteCanBeAddedToShortcuts() {
254+
func testSiteCanBeAddedToShortcuts() {
257255
addWebsiteToShortcut(website: url_3)
258256
let itemCell = app.links[AccessibilityIdentifiers.FirefoxHomepage.TopSites.itemCell]
259257
let cell = itemCell.staticTexts["Example Domain"]

‎firefox-ios/firefox-ios-tests/Tests/XCUITests/DesktopModeTests.swift

-4
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,7 @@ class DesktopModeTestsIphone: IphoneOnlyTestCase {
139139
navigator.nowAt(BrowserTab)
140140
navigator.toggleOn(userState.isPrivate, withAction: Action.TogglePrivateMode)
141141
navigator.openURL(path(forTestPage: "test-user-agent.html"))
142-
// Workaround to be sure the snackbar disappears
143142
waitUntilPageLoad()
144-
app.buttons[AccessibilityIdentifiers.Toolbar.reloadButton].waitAndTap()
145143
navigator.goto(BrowserTabMenu)
146144
navigator.goto(RequestDesktopSite) // toggle off
147145
waitUntilPageLoad()
@@ -167,8 +165,6 @@ class DesktopModeTestsIphone: IphoneOnlyTestCase {
167165
navigator.toggleOn(userState.isPrivate, withAction: Action.TogglePrivateMode)
168166
navigator.openURL(path(forTestPage: "test-user-agent.html"))
169167
waitUntilPageLoad()
170-
// Workaround
171-
app.buttons[AccessibilityIdentifiers.Toolbar.reloadButton].waitAndTap()
172168
navigator.goto(BrowserTabMenu)
173169
navigator.goto(RequestDesktopSite)
174170
waitUntilPageLoad()

‎firefox-ios/firefox-ios-tests/Tests/XCUITests/FindInPageTests.swift

-3
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@ class FindInPageTests: BaseTestCase {
3030
func testFindInLargeDoc() {
3131
navigator.openURL("http://localhost:\(serverPort)/test-fixture/find-in-page-test.html")
3232
waitUntilPageLoad()
33-
// Workaround until FxSGraph is fixed to allow the previous way with goto
3433
navigator.nowAt(BrowserTab)
35-
3634
mozWaitForElementToNotExist(app.staticTexts["Fennec pasted from XCUITests-Runner"])
3735
navigator.goto(FindInPage)
3836

@@ -118,7 +116,6 @@ class FindInPageTests: BaseTestCase {
118116
// https://mozilla.testrail.io/index.php?/cases/view/2323714
119117
func testFindInPageTwoWordsSearchLargeDoc() {
120118
navigator.openURL("http://localhost:\(serverPort)/test-fixture/find-in-page-test.html")
121-
// Workaround until FxSGraph is fixed to allow the previous way with goto
122119
waitUntilPageLoad()
123120
navigator.nowAt(BrowserTab)
124121
navigator.goto(FindInPage)

‎firefox-ios/firefox-ios-tests/Tests/XCUITests/HistoryTests.swift

+1-12
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,6 @@ class HistoryTests: BaseTestCase {
439439
private func navigateToPage() {
440440
navigator.openURL("example.com")
441441
waitUntilPageLoad()
442-
// Workaround as the item does not appear if there is only that tab open
443442
navigator.goto(TabTray)
444443
navigator.performAction(Action.OpenNewTabFromTabTray)
445444
let cancelButton = app.buttons[AccessibilityIdentifiers.Browser.UrlBar.cancelButton]
@@ -464,19 +463,9 @@ class HistoryTests: BaseTestCase {
464463
}
465464

466465
private func closeFirstTabByX() {
467-
// Workaround for FXIOS-5128. To be replaced by tapping "Close All Tabs"
468466
waitForTabsButton()
469467
navigator.goto(TabTray)
470-
if isTablet {
471-
app.otherElements["Tabs Tray"]
472-
.collectionViews
473-
.cells
474-
.element(boundBy: 0)
475-
.buttons[StandardImageIdentifiers.Large.crossCircleFill]
476-
.waitAndTap()
477-
} else {
478-
app.cells.buttons[StandardImageIdentifiers.Large.crossCircleFill].firstMatch.waitAndTap()
479-
}
468+
app.cells.buttons[StandardImageIdentifiers.Large.crossCircleFill].firstMatch.waitAndTap()
480469
}
481470

482471
private func closeKeyboard() {

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

+1-8
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,7 @@ class PhotonActionSheetTests: BaseTestCase {
4646
navigator.openURL("example.com")
4747
waitUntilPageLoad()
4848
mozWaitForElementToNotExist(app.staticTexts["Fennec pasted from CoreSimulatorBridge"])
49-
50-
// Temporarily workaround for the url bar redesign work FXIOS-8172:
51-
// Launch "Share" from the hamburger menu instead of the share icon from the
52-
// awesome bar.
53-
// mozWaitForElementToExist(app.buttons[AccessibilityIdentifiers.Toolbar.shareButton], timeout: 10)
54-
// app.buttons[AccessibilityIdentifiers.Toolbar.shareButton].tap()
55-
navigator.goto(ToolsBrowserTabMenu)
56-
app.cells[AccessibilityIdentifiers.MainMenu.share].waitAndTap()
49+
app.buttons[AccessibilityIdentifiers.Toolbar.shareButton].waitAndTap()
5750

5851
if #unavailable(iOS 16) {
5952
waitForElementsToExist(

‎firefox-ios/firefox-ios-tests/Tests/XCUITests/TrackingProtectionTests.swift

+2-4
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,8 @@ class TrackingProtectionTests: BaseTestCase {
151151
XCTAssertEqual(switchValueOFF as? String, "0")
152152

153153
// Open TP Settings menu
154-
// app.buttons["Privacy settings"].waitAndTap()
155-
// Workaround for https://github.com/mozilla-mobile/firefox-ios/issues/23706
156-
navigator.goto(SettingsScreen)
157-
app.staticTexts["Tracking Protection"].waitAndTap()
154+
app.buttons[AccessibilityIdentifiers.EnhancedTrackingProtection
155+
.MainScreen.trackingProtectionSettingsButton].waitAndTap()
158156
mozWaitForElementToExist(app.navigationBars["Tracking Protection"], timeout: 5)
159157
let switchSettingsValue = app.switches["prefkey.trackingprotection.normalbrowsing"].value!
160158
XCTAssertEqual(switchSettingsValue as? String, "1")

0 commit comments

Comments
 (0)
Failed to load comments.