Skip to content

Commit 2399fb7

Browse files
authored
Refactor MTE-4495 ReadingList Smoke test for iOS 26 (#31030)
1 parent a9c4230 commit 2399fb7

File tree

4 files changed

+23
-47
lines changed

4 files changed

+23
-47
lines changed

bitrise.yml

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,6 @@ pipelines:
2828
depends_on:
2929
- firefox_configure_build
3030
parallel: 5
31-
run_firefox_ui_tests_ios26:
32-
run_if:
33-
expression: '{{ enveq "RUN_UI_TESTS" "Run_UI_Tests" }}'
34-
depends_on:
35-
- firefox_configure_build
3631
focus_ui_test:
3732
run_if:
3833
expression: '{{ enveq "RUN_UI_TESTS" "Run_UI_Tests" }}'
@@ -300,29 +295,6 @@ workflows:
300295
- text: Build status using latest Rust-Component
301296
- webhook_url: $WEBHOOK_SLACK_TOKEN_2
302297

303-
run_firefox_ui_tests_ios26:
304-
before_run:
305-
- 1_git_clone_and_post_clone
306-
- 2_certificate_and_profile
307-
steps:
308-
- pull-intermediate-files@1: {}
309-
310-
title: Sanity check on iOS 26
311-
timeout: 1200
312-
inputs:
313-
- only_testing: |
314-
XCUITests/OnboardingTests
315-
XCUITests/BookmarksTests
316-
XCUITests/BrowsingPDFTests
317-
XCUITests/FindInPageTests
318-
XCUITests/HomePageSettingsUITests
319-
XCUITests/PhotonActionSheetTests
320-
XCUITests/SettingsTests
321-
- destination: platform=iOS Simulator,name=iPhone 17,OS=26.1
322-
- xcodebuild_options: '"COMPILER_INDEX_STORE_ENABLE=NO"'
323-
- xctestrun: $BITRISE_TEST_BUNDLE_PATH/Fennec_Smoketest_iphonesimulator26.1-arm64.xctestrun
324-
325-
326298
run_firefox_ui_tests:
327299
before_run:
328300
- 1_git_clone_and_post_clone
@@ -333,7 +305,7 @@ workflows:
333305
timeout: 1200
334306
inputs:
335307
- only_testing: $BITRISE_TEST_SHARDS_PATH_FIREFOX/$BITRISE_IO_PARALLEL_INDEX
336-
- destination: platform=iOS Simulator,name=iPhone 16,OS=18.6
308+
- destination: platform=iOS Simulator,name=iPhone 17,OS=26.1
337309
- xcodebuild_options: '"COMPILER_INDEX_STORE_ENABLE=NO"'
338310
- xctestrun: $BITRISE_TEST_BUNDLE_PATH/Fennec_Smoketest_iphonesimulator26.1-arm64.xctestrun
339311

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

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -600,12 +600,14 @@ class O_AddressesTests: BaseTestCase {
600600
}
601601
let addressAutofillButton = AccessibilityIdentifiers.Browser.KeyboardAccessory.addressAutofillButton
602602
let manageAddresses = AccessibilityIdentifiers.Autofill.footerPrimaryAction
603-
app.buttons[addressAutofillButton].waitAndTap()
604-
// Tap the "Manage addresses" link
605-
app.otherElements.buttons[manageAddresses].waitAndTap()
606-
// User is redirected to the Settings -> addresses menu
607-
let addresses = AccessibilityIdentifiers.Settings.Address.Addresses.self
608-
mozWaitForElementToExist(app.navigationBars[addresses.title])
603+
if #unavailable(iOS 26) {
604+
app.buttons[addressAutofillButton].waitAndTap()
605+
// Tap the "Manage addresses" link
606+
app.otherElements.buttons[manageAddresses].waitAndTap()
607+
// User is redirected to the Settings -> addresses menu
608+
let addresses = AccessibilityIdentifiers.Settings.Address.Addresses.self
609+
mozWaitForElementToExist(app.navigationBars[addresses.title])
610+
}
609611
}
610612

611613
// https://mozilla.testrail.io/index.php?/cases/view/2667453
@@ -676,12 +678,14 @@ class O_AddressesTests: BaseTestCase {
676678
}
677679
// The option to open saved Addresses is available
678680
let addressAutofillButton = AccessibilityIdentifiers.Browser.KeyboardAccessory.addressAutofillButton
679-
mozWaitForElementToExist(app.buttons[addressAutofillButton])
680-
app.buttons[addressAutofillButton].waitAndTap()
681-
// Choose the address added
682-
app.otherElements.buttons.elementContainingText("Address").waitAndTap()
683-
// All fields are correctly autofilled
684-
validateAutofillAddressInfo()
681+
if #unavailable(iOS 26) {
682+
mozWaitForElementToExist(app.buttons[addressAutofillButton])
683+
app.buttons[addressAutofillButton].waitAndTap()
684+
// Choose the address added
685+
app.otherElements.buttons.elementContainingText(String("Address")).waitAndTap()
686+
// All fields are correctly autofilled
687+
validateAutofillAddressInfo()
688+
}
685689
}
686690

687691
private func validateAutofillAddressInfo() {

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

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ class ReadingListTests: FeatureFlaggedTestBase {
2727
waitUntilPageLoad()
2828
navigator.nowAt(BrowserTab)
2929
mozWaitForElementToNotExist(app.staticTexts["Fennec pasted from XCUITests-Runner"])
30-
mozWaitForElementToExist(app.buttons["Reader View"])
31-
app.buttons["Reader View"].tapOnApp()
30+
app.buttons["Reader View"].waitAndTap()
3231
// The settings of reader view are shown as well as the content of the web site
3332
waitForElementsToExist(
3433
[
@@ -352,17 +351,17 @@ class ReadingListTests: FeatureFlaggedTestBase {
352351
// Two options are revealed
353352
waitForElementsToExist(
354353
[
355-
app.tables.cells.buttons.staticTexts["Mark as Unread"],
356-
app.tables.cells.buttons.staticTexts["Remove"]
354+
app.buttons.staticTexts["Mark as Unread"],
355+
app.buttons.staticTexts["Remove"]
357356
]
358357
)
359358
// Tap 'Mark as Unread'
360-
app.tables.cells.buttons.staticTexts["Mark as Unread"].tap(force: true)
359+
app.buttons.staticTexts["Mark as Unread"].tap(force: true)
361360
// The article has been marked as Unread
362361
mozWaitForElementToExist(app.tables["ReadingTable"].cells.elementContainingText("The Book of Mozilla, unread"))
363362
// Swipe te article left and tap 'Remove'
364363
savedToReadingList.swipeLeft()
365-
app.tables.cells.buttons.staticTexts["Remove"].tap(force: true)
364+
app.buttons.staticTexts["Remove"].tap(force: true)
366365
// The article is deleted from the Reading List
367366
checkReadingListNumberOfItems(items: 0)
368367
waitForElementsToExist(

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ class SearchTests: FeatureFlaggedTestBase {
201201
let tablesQuery2 = app.tables
202202
tablesQuery2.staticTexts.elementContainingText(searchEngine).waitAndTap()
203203

204+
mozWaitForElementToNotExist(app.navigationBars["Default Search Engine"])
204205
navigator.goto(HomePanelsScreen)
205206
navigator.goto(URLBarOpen)
206207
navigator.openURL("foo bar")

0 commit comments

Comments
 (0)