Skip to content

Commit

Permalink
Fix UI tests following Xcode 16.1 migration
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanceriu committed Nov 13, 2024
1 parent b122b02 commit 4684c15
Show file tree
Hide file tree
Showing 18 changed files with 37 additions and 37 deletions.
4 changes: 2 additions & 2 deletions UITests/Sources/BugReportUITests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ class BugReportUITests: XCTestCase {
let app = Application.launch(.bugReport)

// Type 4 characters and the send button should be disabled.
app.textViews[A11yIdentifiers.bugReportScreen.report].clearAndTypeText("Text", app: app)
app.textFields[A11yIdentifiers.bugReportScreen.report].clearAndTypeText("Text", app: app)
XCTAssert(app.switches[A11yIdentifiers.bugReportScreen.sendLogs].isOn)
XCTAssert(!app.switches[A11yIdentifiers.bugReportScreen.canContact].isOn)
try await app.assertScreenshot(.bugReport, step: 2)

// Type more than 4 characters and send the button should become enabled.
app.textViews[A11yIdentifiers.bugReportScreen.report].clearAndTypeText("Longer text", app: app)
app.textFields[A11yIdentifiers.bugReportScreen.report].clearAndTypeText("Longer text", app: app)
XCTAssert(app.switches[A11yIdentifiers.bugReportScreen.sendLogs].isOn)
XCTAssert(!app.switches[A11yIdentifiers.bugReportScreen.canContact].isOn)
try await app.assertScreenshot(.bugReport, step: 3)
Expand Down
6 changes: 3 additions & 3 deletions UITests/Sources/PollFormScreenUITests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ class PollFormScreenUITests: XCTestCase {

func testFilledPoll() async throws {
let app = Application.launch(.createPoll)
let questionTextField = app.textViews[A11yIdentifiers.pollFormScreen.question]
let questionTextField = app.textFields[A11yIdentifiers.pollFormScreen.question]
questionTextField.tapCenter()
questionTextField.typeText("Do you like polls?")

let option1TextField = app.textViews[A11yIdentifiers.pollFormScreen.optionID(0)]
let option1TextField = app.textFields[A11yIdentifiers.pollFormScreen.optionID(0)]
option1TextField.tapCenter()
option1TextField.typeText("Yes")

let option2TextField = app.textViews[A11yIdentifiers.pollFormScreen.optionID(1)]
let option2TextField = app.textFields[A11yIdentifiers.pollFormScreen.optionID(1)]
option2TextField.tapCenter()
option2TextField.typeText("No")

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4684c15

Please sign in to comment.