This repository was archived by the owner on Mar 10, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ osx_image: xcode8.1
33branches :
44 only :
55 - master
6-
6+ - develop
77env :
88 global :
99 - PROJECT_NAME="Spinner.xcodeproj"
@@ -31,4 +31,4 @@ script:
3131 - xcodebuild -project "$PROJECT_NAME" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO build | xcpretty;
3232
3333after_success :
34- - bash <(curl -s https://codecov.io/bash)
34+ - bash <(curl -s https://codecov.io/bash)
Original file line number Diff line number Diff line change @@ -119,6 +119,24 @@ class SpinnerTests: XCTestCase {
119119 XCTAssertTrue ( view. isUserInteractionEnabled)
120120 }
121121
122+ func testShowCustomSpinnerInButton( ) {
123+ _ = SpinnerView . showCustomSpinner ( inButton: button, disablesUserInteraction: true )
124+ var hasSpinner = button. subviews. contains { $0 is Spinner }
125+ XCTAssert ( hasSpinner && !button. isUserInteractionEnabled)
126+
127+ _ = SpinnerView . showCustomSpinner ( inButton: button, disablesUserInteraction: false )
128+ hasSpinner = button. subviews. contains { $0 is Spinner }
129+ XCTAssert ( hasSpinner && button. isUserInteractionEnabled)
130+ }
131+
132+ func testDismissCustomSpinnerInButton( ) {
133+ let spinner = SpinnerView . showCustomSpinner ( inButton: button, disablesUserInteraction: true )
134+ spinner. dismiss ( )
135+ let hasSpinner = button. subviews. contains { $0 is Spinner }
136+ XCTAssertFalse ( hasSpinner)
137+ XCTAssertTrue ( view. isUserInteractionEnabled)
138+ }
139+
122140 func testShowSpinnerInButtonWithAttributedSting( ) {
123141 button. isUserInteractionEnabled = true
124142
You can’t perform that action at this time.
0 commit comments