Skip to content

Commit

Permalink
Fix MTE-3640 - testMultiWindowNewTab test (#22326)
Browse files Browse the repository at this point in the history
  • Loading branch information
dragosb01 authored Oct 2, 2024
1 parent c6ed66a commit b1d8bf3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class MultiWindowTests: IpadOnlyTestCase {
let topSites = AccessibilityIdentifiers.FirefoxHomepage.TopSites.itemCell
let homeButtom = AccessibilityIdentifiers.Toolbar.homeButton
// A new tab is opened in the same window
mozWaitForElementToExist(app.collectionViews.cells.matching(identifier: topSites).firstMatch)
app.collectionViews.cells.matching(identifier: topSites).firstMatch.tap()
mozWaitForElementToExist(app.buttons[homeButtom])
app.buttons.matching(identifier: menuButton).element(boundBy: 0).tap()
Expand All @@ -53,6 +54,7 @@ class MultiWindowTests: IpadOnlyTestCase {
let tabButtonSecondWindow = app.buttons.matching(identifier: tabsButtonIdentifier).element(boundBy: 0)
XCTAssertEqual(tabButtonSecondWindow.value as! String, "2", "Number of tabs opened should be equal to 2")
// A new tab is opened in the same window
mozWaitForElementToExist(app.collectionViews.cells.matching(identifier: topSites).element(boundBy: 6))
app.collectionViews.cells.matching(identifier: topSites).element(boundBy: 6).tap()
mozWaitForElementToExist(app.buttons[homeButtom])
app.buttons.matching(identifier: menuButton).element(boundBy: 1).tap()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class PhotonActionSheetTests: BaseTestCase {
app.tables.cells.otherElements[StandardImageIdentifiers.Large.pinSlash].tap()

// Check that it has been unpinned
// Adding sleep as an workaround until https://github.com/mozilla-mobile/firefox-ios/issues/22323 is fixed
sleep(5)
cell.press(forDuration: 2)
mozWaitForElementToExist(app.tables.cells.otherElements[StandardImageIdentifiers.Large.pin])
Expand Down

0 comments on commit b1d8bf3

Please sign in to comment.