Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,6 @@
"OnboardingTests\/testOnboardingSignIn()",
"OnboardingTests\/testSelectBottomPlacement()",
"OnboardingTests\/testSelectTopPlacement()",
"OnboardingTests\/testWhatsNewPage()",
"OpeningScreenTests",
"OpeningScreenTests\/testLastOpenedTab()",
"PerformanceTests",
Expand Down
1 change: 0 additions & 1 deletion firefox-ios/firefox-ios-tests/Tests/Smoketest.xctestplan
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,6 @@
"OnboardingTests\/testOnboardingSignIn_TAE()",
"OnboardingTests\/testSelectBottomPlacement()",
"OnboardingTests\/testSelectTopPlacement()",
"OnboardingTests\/testWhatsNewPage()",
"OpeningScreenTests",
"PerformanceTests",
"PhotonActionSheetTests\/testPinToShortcuts_TAE()",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,6 @@
"OnboardingTests\/testOnboardingSignIn()",
"OnboardingTests\/testSelectBottomPlacement()",
"OnboardingTests\/testSelectTopPlacement()",
"OnboardingTests\/testWhatsNewPage()",
"OpeningScreenTests",
"OpeningScreenTests\/testLastOpenedTab()",
"PerformanceTests",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,7 @@ class BaseTestCase: XCTestCase {
urlBar.pressWithRetry(duration: 2.0, element: pasteAction)
mozWaitForElementToExist(app.tables["Context Menu"])
pasteAction.waitAndTap()
springboard.buttons["Allow Paste"].tapIfExists(timeout: 0.5)
mozWaitForElementToExist(urlBar)
mozWaitForValueContains(urlBar, value: url)
}
Expand Down
53 changes: 10 additions & 43 deletions firefox-ios/firefox-ios-tests/Tests/XCUITests/OnboardingTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@ class OnboardingTests: BaseTestCase {

override func tearDown() async throws {
if #available(iOS 17.0, *) {
switchThemeToDarkOrLight(theme: "Light")
if self.name.contains("testSelectBottomPlacement") || iPad() {
// Toolbar option not available for iPad, so the theme is not changed there.
return
} else {
switchThemeToDarkOrLight(theme: "Light")
}
}
app.terminate()
try await super.tearDown()
Expand Down Expand Up @@ -287,44 +292,6 @@ class OnboardingTests: BaseTestCase {
firefoxHomePageScreen.assertTopSitesItemCellExist()
}

// https://mozilla.testrail.io/index.php?/cases/view/2306815
func testWhatsNewPage() throws {
throw XCTSkip("Skipping. The option whats new page is not available on the new menu")
/*
app.buttons["\(AccessibilityIdentifiers.Onboarding.closeButton)"].waitAndTap()
// Dismiss new changes pop up if exists
app.buttons["Close"].tapIfExists()
navigator.goto(BrowserTabMenu)
navigator.performAction(Action.OpenWhatsNewPage)
waitUntilPageLoad()
app.textFields[AccessibilityIdentifiers.Browser.AddressToolbar.searchTextField].waitAndTap()

// Extract version number from url
let url = app.textFields[AccessibilityIdentifiers.Browser.AddressToolbar.searchTextField].value
let textUrl = String(describing: url)
let start = textUrl.index(textUrl.startIndex, offsetBy: 51)
let end = textUrl.index(textUrl.startIndex, offsetBy: 56)
let range = start..<end
let mySubstring = textUrl[range]
let releaseVersion = String(mySubstring)

mozWaitForElementToExist(app.staticTexts[releaseVersion])
mozWaitForValueContains(
app.textFields[AccessibilityIdentifiers.Browser.AddressToolbar.searchTextField],
value: "https://www.mozilla.org/en-US/firefox/ios/" + releaseVersion + "/releasenotes/"
)
app.buttons[AccessibilityIdentifiers.Browser.UrlBar.cancelButton].waitAndTap()
waitForElementsToExist(
[
app.staticTexts["Release Notes"],
app.staticTexts["Firefox for iOS Release"],
app.staticTexts["\(releaseVersion)"],
app.staticTexts["Get the most recent version"]
]
)
*/
}

// TOOLBAR THEME
// https://mozilla.testrail.io/index.php?/cases/view/2575175
func testSelectTopPlacement() {
Expand Down Expand Up @@ -379,12 +346,12 @@ class OnboardingTests: BaseTestCase {

// https://mozilla.testrail.io/index.php?/cases/view/2575176
func testSelectBottomPlacement() throws {
if iPad() {
let shouldSkipTest = true
try XCTSkipIf(shouldSkipTest, "Toolbar option not available for iPad")
}
waitForElementsToExist([app.buttons["TermsOfService.AgreeAndContinueButton"]])
app.buttons["TermsOfService.AgreeAndContinueButton"].tap()

guard !iPad() else {
throw XCTSkip("Toolbar option not available for iPad")
}
let toolbar = app.textFields["url"]

// Wait for the initial title label to appear
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class ShareLongPressTests: FeatureFlaggedTestBase {
}

// https://mozilla.testrail.io/index.php?/cases/view/2864380
func testBookmarksShareNormalWebsiteReminders() {
func verifyBookmarksShareNormalWebsiteReminders() {
app.launch()
if #available(iOS 17, *) {
longPressBookmarkAndReachShareOptions(option: "Reminders")
Expand Down Expand Up @@ -243,9 +243,10 @@ class ShareLongPressTests: FeatureFlaggedTestBase {
waitForTabsButton()
navigator.goto(LibraryPanel_Bookmarks)
// Long-press on a bookmarked website
app.tables.cells.staticTexts["Example Domain"].press(forDuration: 1.0)
let contextMenu = app.tables["Context Menu"]
app.tables.cells.staticTexts["Example Domain"].pressWithRetry(duration: 0.5, element: contextMenu)
// Tap the Share button in the context menu
app.tables["Context Menu"].buttons["shareLarge"].waitAndTap()
contextMenu.buttons["shareLarge"].waitAndTap()
// Tap the Reminders button in the menu
if #available(iOS 16, *) {
mozWaitForElementToExist(app.collectionViews.cells[option])
Expand Down