Fix various UI test snapshot issues.

This commit is contained in:
Stefan Ceriu
2026-09-30 10:43:28 +03:00
parent 5a3c4ad2f5
commit a8bc26dc93
7 changed files with 6 additions and 23 deletions
+3 -3
View File
@@ -17,20 +17,20 @@ class BugReportTests: XCTestCase {
try await app.assertScreenshot()
}
func testReportText() async throws {
func testReportText() {
let app = Application.launch(.bugReport)
// Type 4 characters and the send button should be disabled.
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()
XCTAssertFalse(app.buttons["Send"].isEnabled)
// Type more than 4 characters and send the button should become enabled.
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()
XCTAssertTrue(app.buttons["Send"].isEnabled)
}
}