You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
toReturn.likesCount.defaultState =button["segmentedLikeDislikeButtonViewModel"]["likeCountEntity"]["likeCountIfIndifferent"]["content"].string ?? /* usually because there is no account connected */ button["segmentedLikeDislikeButtonViewModel"]["likeButtonViewModel"]["likeButtonViewModel"]["toggleButtonViewModel"]["toggleButtonViewModel"]["toggledButtonViewModel"]["buttonViewModel"]["title"].string
122
+
toReturn.likesCount.likeButtonClickedNewValue =button["segmentedLikeDislikeButtonViewModel"]["likeCountEntity"]["likeCountIfLiked"]["content"].string ?? /* usually because there is no account connected */ button["segmentedLikeDislikeButtonViewModel"]["likeButtonViewModel"]["likeButtonViewModel"]["toggleButtonViewModel"]["toggleButtonViewModel"]["defaultButtonViewModel"]["buttonViewModel"]["title"].string
Copy file name to clipboardexpand all lines: Tests/YouTubeKitTests/YouTubeKitTests.swift
+2-1
Original file line number
Diff line number
Diff line change
@@ -662,7 +662,6 @@ final class YouTubeKitTests: XCTestCase {
662
662
XCTAssertNotNil(moreVideoInfosResponse.channel, TEST_NAME +"Checking if the channel has been extracted.")
663
663
XCTAssertNotNil(moreVideoInfosResponse.commentsCount, TEST_NAME +"Checking if the commentsCount has been extracted.")
664
664
XCTAssertNotNil(moreVideoInfosResponse.likesCount.defaultState, TEST_NAME +"Checking if the likesCount has been extracted.")
665
-
XCTAssertNotEqual(moreVideoInfosResponse.recommendedVideos.count,0, TEST_NAME +"Checking if recommendedVideos are not empty.")
666
665
XCTAssertNotNil(moreVideoInfosResponse.recommendedVideosContinuationToken, TEST_NAME +"Checking if the recommendedVideosContinuationToken has been extracted.")
667
666
XCTAssertNotNil(moreVideoInfosResponse.timePosted.postedDate, TEST_NAME +"Checking if the timePosted.postedDate has been extracted.")
668
667
XCTAssertNotNil(moreVideoInfosResponse.timePosted.relativePostedDate, TEST_NAME +"Checking if the timePosted.relativePostedDate has been extracted.")
@@ -676,6 +675,8 @@ final class YouTubeKitTests: XCTestCase {
676
675
677
676
guardlet recommendedVideosContinuationResponse = recommendedVideosContinuationResponse else{XCTFail(TEST_NAME +"Checking if recommendedVideosResponse is defined, error -> \(String(describing: recommendedVideosContinuationError))"); return}
678
677
678
+
guard !(moreVideoInfosResponse.recommendedVideos.isEmpty && recommendedVideosContinuationResponse.results.isEmpty)else{XCTFail(TEST_NAME +"No recommanded videos in the first place nor with the continuationResponse, error -> \(String(describing: recommendedVideosContinuationError))"); return}
679
+
679
680
XCTAssertNotEqual(recommendedVideosContinuationResponse.results.count,0, TEST_NAME +"Checking if results for continuation have been extracted.")
680
681
XCTAssertNotNil(recommendedVideosContinuationResponse.continuationToken, TEST_NAME +"Checking if continuationToken has been extracted.")
0 commit comments