From 7e5688231e532c568a3589625f6b4695ba160c91 Mon Sep 17 00:00:00 2001 From: Clare So <1740517+clarmso@users.noreply.github.com> Date: Wed, 25 Sep 2024 16:09:02 -0400 Subject: [PATCH] Bugfix MTE-3529 DownloadsTests and iOS 16 (#22154) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * "Add Tags" don't have label in iOS 16 only * 🈳 Empty commit 🈳 --- .../Tests/XCUITests/DownloadsTests.swift | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/firefox-ios/firefox-ios-tests/Tests/XCUITests/DownloadsTests.swift b/firefox-ios/firefox-ios-tests/Tests/XCUITests/DownloadsTests.swift index ae8e55cabe59..5ddb3ca225e9 100644 --- a/firefox-ios/firefox-ios-tests/Tests/XCUITests/DownloadsTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/XCUITests/DownloadsTests.swift @@ -121,10 +121,12 @@ class DownloadsTests: BaseTestCase { shareButton.tap(force: true) mozWaitForElementToExist(app.tables["DownloadsTable"]) mozWaitForElementToExist(app.tables["DownloadsTable"].staticTexts[testFileNameDownloadPanel]) - if #available(iOS 16, *) { + if #available(iOS 17, *) { mozWaitForElementToExist(app.collectionViews.cells["Copy"]) mozWaitForElementToExist(app.collectionViews.cells["Add Tags"]) mozWaitForElementToExist(app.collectionViews.cells["Save to Files"]) + } else if #available(iOS 16, *) { + mozWaitForElementToExist(app.collectionViews.cells["Copy"]) } else { mozWaitForElementToExist(app.collectionViews.buttons["Copy"]) } @@ -148,10 +150,12 @@ class DownloadsTests: BaseTestCase { app.tables.cells.staticTexts[testFileNameDownloadPanel].press(forDuration: 2) mozWaitForElementToExist(app.otherElements["ActivityListView"]) mozWaitForElementToExist(app.tables["DownloadsTable"].staticTexts[testFileNameDownloadPanel]) - if #available(iOS 16, *) { + if #available(iOS 17, *) { mozWaitForElementToExist(app.collectionViews.cells["Copy"]) mozWaitForElementToExist(app.collectionViews.cells["Add Tags"]) mozWaitForElementToExist(app.collectionViews.cells["Save to Files"]) + } else if #available(iOS 16, *) { + mozWaitForElementToExist(app.collectionViews.cells["Copy"]) } else { mozWaitForElementToExist(app.collectionViews.buttons["Copy"]) }