Skip to content

Commit

Permalink
Fix UI tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jotaemepereira committed Nov 5, 2024
1 parent f21203d commit 34a7696
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions UITests/OnboardingUITests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,10 @@ final class OnboardingUITests: XCTestCase {
startBrowsingButton.click()

// AfterOnboarding
let duckduckgoPrivacySimplifiedWindow = app.windows["DuckDuckGo — Your protection, our priority."]
XCTAssertTrue(duckduckgoPrivacySimplifiedWindow.webViews["DuckDuckGo — Your protection, our priority."].waitForExistence(timeout: UITests.Timeouts.elementExistence))
XCTAssertTrue(duckduckgoPrivacySimplifiedWindow.buttons["NavigationBarViewController.optionsButton"].isEnabled)
let ddgLogo = app.windows.webViews.groups.containing(.image, identifier:"DuckDuckGo Logo").element
XCTAssertTrue(ddgLogo.waitForExistence(timeout: UITests.Timeouts.elementExistence))
let homePageSubTitle = app.windows.webViews.groups.containing(.staticText, identifier:"Your protection, our priority.").element
XCTAssertTrue(homePageSubTitle.waitForExistence(timeout: UITests.Timeouts.elementExistence))
}

func resetApplicationData() throws {
Expand Down
2 changes: 1 addition & 1 deletion UITests/PinnedTabsTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ class PinnedTabsTests: XCTestCase {
let newApp = XCUIApplication()
newApp.launch()

sleep(2)
sleep(10) // This was increased from two to ten, because slower VMs needed more time to re-launch the app.

/// Goes to Page #2 to check the state
newApp.typeKey("[", modifierFlags: [.command, .shift])
Expand Down

0 comments on commit 34a7696

Please sign in to comment.