Fix the test case `testWebImageEXIFImage`
This commit is contained in:
parent
09c55243c2
commit
78a2769b06
|
@ -162,10 +162,15 @@ class WebImageTests: XCTestCase {
|
|||
let displayImage = try? imageView.inspect().group().image(0).nsImage()
|
||||
XCTAssertNotNil(displayImage)
|
||||
#else
|
||||
let displayImage = try? imageView.inspect().group().image(0).cgImage()
|
||||
let orientation = try! imageView.inspect().group().image(0).orientation()
|
||||
XCTAssertNotNil(displayImage)
|
||||
XCTAssertEqual(orientation, .leftMirrored)
|
||||
if #available(iOS 14.0, watchOS 7.0, tvOS 14.0, *) {
|
||||
let displayImage = try? imageView.inspect().group().image(0).uiImage()
|
||||
XCTAssertEqual(displayImage, image)
|
||||
} else {
|
||||
let displayImage = try? imageView.inspect().group().image(0).cgImage()
|
||||
let orientation = try? imageView.inspect().group().image(0).orientation()
|
||||
XCTAssertNotNil(displayImage)
|
||||
XCTAssertEqual(orientation, .leftMirrored)
|
||||
}
|
||||
#endif
|
||||
expectation.fulfill()
|
||||
}.onFailure { error in
|
||||
|
|
Loading…
Reference in New Issue