mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:06:00 +00:00
Fixed UI test problems introduced after the accessibility identifier … (#586)
* Fixed UI test problems introduced after the accessibility identifier changes * Disable parallel UITests, they don't seem to work properly * Fix UITests `elementFallbackLanguage`
This commit is contained in:
@@ -24,7 +24,10 @@ struct Application {
|
||||
"IS_RUNNING_UI_TESTS": "1",
|
||||
"UI_TESTS_SCREEN": identifier.rawValue
|
||||
]
|
||||
|
||||
// Use the same fallback language as the real app so translation comparison works
|
||||
Bundle.elementFallbackLanguage = "en"
|
||||
|
||||
app.launch()
|
||||
return app
|
||||
}
|
||||
|
||||
@@ -21,14 +21,16 @@ class RoomDetailsScreenUITests: XCTestCase {
|
||||
func testInitialStateComponents() {
|
||||
let app = Application.launch(.roomDetailsScreen)
|
||||
|
||||
XCTAssert(app.staticTexts[A11yIdentifiers.roomScreen.avatar].exists)
|
||||
XCTAssert(app.staticTexts[A11yIdentifiers.roomDetailsScreen.avatar].exists)
|
||||
XCTAssert(app.buttons[A11yIdentifiers.roomDetailsScreen.people].waitForExistence(timeout: 1))
|
||||
app.assertScreenshot(.roomDetailsScreen)
|
||||
}
|
||||
|
||||
func testInitialStateComponentsWithRoomAvatar() {
|
||||
let app = Application.launch(.roomDetailsScreenWithRoomAvatar)
|
||||
|
||||
XCTAssert(app.images[A11yIdentifiers.roomScreen.avatar].waitForExistence(timeout: 1))
|
||||
XCTAssert(app.images[A11yIdentifiers.roomDetailsScreen.avatar].waitForExistence(timeout: 1))
|
||||
XCTAssert(app.buttons[A11yIdentifiers.roomDetailsScreen.people].waitForExistence(timeout: 1))
|
||||
app.assertScreenshot(.roomDetailsScreenWithRoomAvatar)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user