|
|
@@ -62,6 +62,7 @@ class NSButtonExtensionTests: XCTestCase {
|
|
|
super.tearDown()
|
|
|
}
|
|
|
|
|
|
+ @MainActor
|
|
|
func testDownloadAndSetImage() {
|
|
|
let exp = expectation(description: #function)
|
|
|
let url = testURLs[0]
|
|
|
@@ -84,6 +85,7 @@ class NSButtonExtensionTests: XCTestCase {
|
|
|
waitForExpectations(timeout: 3, handler: nil)
|
|
|
}
|
|
|
|
|
|
+ @MainActor
|
|
|
func testDownloadAndSetAlternateImage() {
|
|
|
let exp = expectation(description: #function)
|
|
|
let url = testURLs[0]
|
|
|
@@ -105,7 +107,8 @@ class NSButtonExtensionTests: XCTestCase {
|
|
|
}
|
|
|
waitForExpectations(timeout: 5, handler: nil)
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
+ @MainActor
|
|
|
func testCancelImageTask() {
|
|
|
let exp = expectation(description: #function)
|
|
|
let url = testURLs[0]
|
|
|
@@ -123,6 +126,7 @@ class NSButtonExtensionTests: XCTestCase {
|
|
|
waitForExpectations(timeout: 3, handler: nil)
|
|
|
}
|
|
|
|
|
|
+ @MainActor
|
|
|
func testCancelAlternateImageTask() {
|
|
|
let exp = expectation(description: #function)
|
|
|
let url = testURLs[0]
|
|
|
@@ -140,6 +144,7 @@ class NSButtonExtensionTests: XCTestCase {
|
|
|
waitForExpectations(timeout: 3, handler: nil)
|
|
|
}
|
|
|
|
|
|
+ @MainActor
|
|
|
func testSettingNilURL() {
|
|
|
let exp = expectation(description: #function)
|
|
|
let url: URL? = nil
|
|
|
@@ -158,6 +163,7 @@ class NSButtonExtensionTests: XCTestCase {
|
|
|
waitForExpectations(timeout: 3, handler: nil)
|
|
|
}
|
|
|
|
|
|
+ @MainActor
|
|
|
func testSettingNonWorkingImageWithFailureImage() {
|
|
|
let expectation = self.expectation(description: "wait for downloading image")
|
|
|
let url = testURLs[0]
|
|
|
@@ -173,6 +179,7 @@ class NSButtonExtensionTests: XCTestCase {
|
|
|
XCTAssertEqual(testImage, button.image)
|
|
|
}
|
|
|
|
|
|
+ @MainActor
|
|
|
func testSettingNonWorkingAlternateImageWithFailureImage() {
|
|
|
let expectation = self.expectation(description: "wait for downloading image")
|
|
|
let url = testURLs[0]
|