mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Updated Screenshot Tests and fixed an issue with the MockMediaProvider (#554)
* updated the tests * updated ui tests * removed unused files * fixed a bug that prevented the image to be added in the avatar of the rooms from the mock, and improved some UI tests * swiftformat * fixed an issue where the room Id was not matching the real room id coming from the timelineController, also updated some tests, and added a test for the case where the RoomAvatar is available. * added some waitForExistence checks to allow the CI to find the UI elements * this should make the loading bar always match at the HStack size * code improvement for the tests * fix for the max frame of the loading screen * updated tests * regenerated and improved some tests * sonarcloud improvements * changelog
This commit is contained in:
@@ -41,6 +41,7 @@ enum UITestScreenIdentifier: String {
|
||||
case sessionVerification
|
||||
case userSessionScreen
|
||||
case roomDetailsScreen
|
||||
case roomDetailsScreenWithRoomAvatar
|
||||
case roomMemberDetailsScreen
|
||||
}
|
||||
|
||||
|
||||
@@ -274,11 +274,24 @@ class MockScreen: Identifiable {
|
||||
return navigationSplitCoordinator
|
||||
case .roomDetailsScreen:
|
||||
let navigationStackCoordinator = NavigationStackCoordinator()
|
||||
let userNotificationController = UserNotificationController(rootCoordinator: navigationStackCoordinator)
|
||||
let roomProxy = MockRoomProxy(id: "MockRoomIdentifier",
|
||||
displayName: "Room",
|
||||
isEncrypted: true,
|
||||
members: [.mockAlice, .mockBob, .mockCharlie])
|
||||
let coordinator = RoomDetailsCoordinator(parameters: .init(navigationStackCoordinator: navigationStackCoordinator,
|
||||
roomProxy: MockRoomProxy(displayName: "Room",
|
||||
isEncrypted: true,
|
||||
members: [.mockAlice, .mockBob, .mockCharlie]),
|
||||
roomProxy: roomProxy,
|
||||
mediaProvider: MockMediaProvider()))
|
||||
navigationStackCoordinator.setRootCoordinator(coordinator)
|
||||
return navigationStackCoordinator
|
||||
case .roomDetailsScreenWithRoomAvatar:
|
||||
let navigationStackCoordinator = NavigationStackCoordinator()
|
||||
let roomProxy = MockRoomProxy(id: "MockRoomIdentifier",
|
||||
displayName: "Room",
|
||||
avatarURL: URL.picturesDirectory,
|
||||
isEncrypted: true,
|
||||
members: [.mockAlice, .mockBob, .mockCharlie])
|
||||
let coordinator = RoomDetailsCoordinator(parameters: .init(navigationStackCoordinator: navigationStackCoordinator,
|
||||
roomProxy: roomProxy,
|
||||
mediaProvider: MockMediaProvider()))
|
||||
navigationStackCoordinator.setRootCoordinator(coordinator)
|
||||
return navigationStackCoordinator
|
||||
|
||||
Reference in New Issue
Block a user