Various test fixes (#873)

* Switch back to macos-12 and see if the tests work

* Fix unit tests, add default invited, joined and active member counts to the mock room proxy

* Try running UI tests on 14.3 but on an existing iPad simulator

* Revert "Try running UI tests on 14.3 but on an existing iPad simulator"

This reverts commit b075e7fa384330a9070dc35ed4dded57e0af26e1.
This commit is contained in:
Stefan Ceriu
2023-05-11 16:28:35 +03:00
committed by GitHub
parent 16eb3311f0
commit 3468ed2a02
8 changed files with 28 additions and 21 deletions
@@ -414,21 +414,21 @@ class RoomProxyMock: RoomProxyProtocol {
set(value) { underlyingMembersPublisher = value }
}
var underlyingMembersPublisher: AnyPublisher<[RoomMemberProxyProtocol], Never>!
var invitedMembersCount: UInt64 {
var invitedMembersCount: UInt {
get { return underlyingInvitedMembersCount }
set(value) { underlyingInvitedMembersCount = value }
}
var underlyingInvitedMembersCount: UInt64!
var joinedMembersCount: UInt64 {
var underlyingInvitedMembersCount: UInt!
var joinedMembersCount: UInt {
get { return underlyingJoinedMembersCount }
set(value) { underlyingJoinedMembersCount = value }
}
var underlyingJoinedMembersCount: UInt64!
var activeMembersCount: UInt64 {
var underlyingJoinedMembersCount: UInt!
var activeMembersCount: UInt {
get { return underlyingActiveMembersCount }
set(value) { underlyingActiveMembersCount = value }
}
var underlyingActiveMembersCount: UInt64!
var underlyingActiveMembersCount: UInt!
//MARK: - loadAvatarURLForUserId
@@ -33,6 +33,10 @@ struct RoomProxyMockConfiguration {
var hasUnreadNotifications = Bool.random()
var members: [RoomMemberProxyProtocol]?
var inviter: RoomMemberProxyMock?
var invitedMembersCount: UInt = 100
var joinedMembersCount: UInt = 50
var activeMembersCount: UInt = 25
}
extension RoomProxyMock {
@@ -52,6 +56,10 @@ extension RoomProxyMock {
canonicalAlias = configuration.canonicalAlias
alternativeAliases = configuration.alternativeAliases
hasUnreadNotifications = configuration.hasUnreadNotifications
invitedMembersCount = configuration.invitedMembersCount
joinedMembersCount = configuration.joinedMembersCount
activeMembersCount = configuration.activeMembersCount
if let members = configuration.members {
membersPublisher = Just(members).eraseToAnyPublisher()