-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Run unit tests for tvOS #1401
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Run unit tests for tvOS #1401
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -75,14 +75,14 @@ - (void)test_whenItemUpdated_thatCellIsConfigured { | |
genTestObject(@3, @"Baz"), | ||
]]; | ||
self.dataSource.objects = @[ | ||
genTestObject(@1, @"Foo"), | ||
genTestObject(@2, @"Qux"), // new value | ||
genTestObject(@1, @"Qux"), // new value | ||
genTestObject(@2, @"Bar"), | ||
genTestObject(@3, @"Baz"), | ||
Comment on lines
-78
to
80
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I changed this so that the first object is updated instead of the second, because on tvOS There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Ummm this seems weird, it should return the right section data if the indexPath is correct, can you investigate a bit more why the test doesn't work for tvOS? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @koenpunt did u figure out why this has to change? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not yet, I'll dive into this a bit more tomorrow. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The behavior of |
||
]; | ||
XCTestExpectation *expectation = genExpectation; | ||
[self.adapter performUpdatesAnimated:YES completion:^(BOOL finished) { | ||
IGTestCell *cell2 = (IGTestCell *)[self.collectionView cellForItemAtIndexPath:[NSIndexPath indexPathForItem:0 inSection:1]]; | ||
XCTAssertEqualObjects(cell2.label.text, @"Qux"); | ||
IGTestCell *cell1 = (IGTestCell *)[self.collectionView cellForItemAtIndexPath:[NSIndexPath indexPathForItem:0 inSection:0]]; | ||
XCTAssertEqualObjects(cell1.label.text, @"Qux"); | ||
[expectation fulfill]; | ||
}]; | ||
[self waitForExpectationsWithTimeout:30 handler:nil]; | ||
|
Uh oh!
There was an error while loading. Please reload this page.