mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Update Unit tests for Xcode 16.
This commit is contained in:
@@ -67,7 +67,7 @@ final class MediaUploadingPreprocessorTests: XCTestCase {
|
|||||||
|
|
||||||
XCTAssertNotNil(videoInfo.thumbnailInfo)
|
XCTAssertNotNil(videoInfo.thumbnailInfo)
|
||||||
XCTAssertEqual(videoInfo.thumbnailInfo?.mimetype, "image/jpeg")
|
XCTAssertEqual(videoInfo.thumbnailInfo?.mimetype, "image/jpeg")
|
||||||
XCTAssertEqual(videoInfo.thumbnailInfo?.size ?? 0, 33949, accuracy: 100)
|
XCTAssertEqual(videoInfo.thumbnailInfo?.size ?? 0, 34206, accuracy: 100)
|
||||||
XCTAssertEqual(videoInfo.thumbnailInfo?.width, 800)
|
XCTAssertEqual(videoInfo.thumbnailInfo?.width, 800)
|
||||||
XCTAssertEqual(videoInfo.thumbnailInfo?.height, 450)
|
XCTAssertEqual(videoInfo.thumbnailInfo?.height, 450)
|
||||||
}
|
}
|
||||||
@@ -99,7 +99,7 @@ final class MediaUploadingPreprocessorTests: XCTestCase {
|
|||||||
|
|
||||||
// Check resulting video info
|
// Check resulting video info
|
||||||
XCTAssertEqual(videoInfo.mimetype, "video/mp4")
|
XCTAssertEqual(videoInfo.mimetype, "video/mp4")
|
||||||
XCTAssertEqual(videoInfo.blurhash, "K7C$_zt70LKQMx^+~B9GIU")
|
XCTAssertEqual(videoInfo.blurhash, "K7C$_zs;0LKQMx^+~B9GIU")
|
||||||
XCTAssertEqual(videoInfo.size ?? 0, 9_775_822, accuracy: 100)
|
XCTAssertEqual(videoInfo.size ?? 0, 9_775_822, accuracy: 100)
|
||||||
XCTAssertEqual(videoInfo.width, 1080)
|
XCTAssertEqual(videoInfo.width, 1080)
|
||||||
XCTAssertEqual(videoInfo.height, 1920)
|
XCTAssertEqual(videoInfo.height, 1920)
|
||||||
@@ -107,7 +107,7 @@ final class MediaUploadingPreprocessorTests: XCTestCase {
|
|||||||
|
|
||||||
XCTAssertNotNil(videoInfo.thumbnailInfo)
|
XCTAssertNotNil(videoInfo.thumbnailInfo)
|
||||||
XCTAssertEqual(videoInfo.thumbnailInfo?.mimetype, "image/jpeg")
|
XCTAssertEqual(videoInfo.thumbnailInfo?.mimetype, "image/jpeg")
|
||||||
XCTAssertEqual(videoInfo.thumbnailInfo?.size ?? 0, 82854, accuracy: 100)
|
XCTAssertEqual(videoInfo.thumbnailInfo?.size ?? 0, 83220, accuracy: 100)
|
||||||
XCTAssertEqual(videoInfo.thumbnailInfo?.width, 337)
|
XCTAssertEqual(videoInfo.thumbnailInfo?.width, 337)
|
||||||
XCTAssertEqual(videoInfo.thumbnailInfo?.height, 600)
|
XCTAssertEqual(videoInfo.thumbnailInfo?.height, 600)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ class RoomMembersListScreenViewModelTests: XCTestCase {
|
|||||||
func testSelectUserAsAdmin() async throws {
|
func testSelectUserAsAdmin() async throws {
|
||||||
// Given the room list viewed as an admin.
|
// Given the room list viewed as an admin.
|
||||||
setup(with: .allMembersAsAdmin)
|
setup(with: .allMembersAsAdmin)
|
||||||
var deferred = deferFulfillment(context.$viewState) { !$0.visibleInvitedMembers.isEmpty }
|
var deferred = deferFulfillment(context.$viewState) { !$0.visibleInvitedMembers.isEmpty && $0.canKickUsers && $0.canBanUsers }
|
||||||
try await deferred.fulfill()
|
try await deferred.fulfill()
|
||||||
XCTAssertNil(context.memberToManage)
|
XCTAssertNil(context.memberToManage)
|
||||||
|
|
||||||
@@ -160,7 +160,7 @@ class RoomMembersListScreenViewModelTests: XCTestCase {
|
|||||||
func testSelectModeratorAsAdmin() async throws {
|
func testSelectModeratorAsAdmin() async throws {
|
||||||
// Given the room list viewed as an admin.
|
// Given the room list viewed as an admin.
|
||||||
setup(with: .allMembersAsAdmin)
|
setup(with: .allMembersAsAdmin)
|
||||||
var deferred = deferFulfillment(context.$viewState) { !$0.visibleInvitedMembers.isEmpty }
|
var deferred = deferFulfillment(context.$viewState) { !$0.visibleInvitedMembers.isEmpty && $0.canKickUsers && $0.canBanUsers }
|
||||||
try await deferred.fulfill()
|
try await deferred.fulfill()
|
||||||
XCTAssertNil(context.memberToManage)
|
XCTAssertNil(context.memberToManage)
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -82,7 +82,7 @@ end
|
|||||||
lane :unit_tests do |options|
|
lane :unit_tests do |options|
|
||||||
run_tests(
|
run_tests(
|
||||||
scheme: "UnitTests",
|
scheme: "UnitTests",
|
||||||
device: 'iPhone 15',
|
device: 'iPhone 16',
|
||||||
ensure_devices_found: true,
|
ensure_devices_found: true,
|
||||||
result_bundle: true,
|
result_bundle: true,
|
||||||
number_of_retries: 3,
|
number_of_retries: 3,
|
||||||
|
|||||||
Reference in New Issue
Block a user