Skip to content
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

Scroll once when waiting for UITableViewCells #1141

Merged
merged 1 commit into from
Mar 19, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Classes/KIFUITestActor.m
Original file line number Diff line number Diff line change
Expand Up @@ -1251,10 +1251,13 @@ - (UITableViewCell *)waitForCellAtIndexPath:(NSIndexPath *)indexPath inTableView
return KIFTestStepResultSuccess;
}];

[tableView scrollToRowAtIndexPath:indexPath
atScrollPosition:position
animated:[[self class] testActorAnimationsEnabled]];

__block UITableViewCell *cell = nil;
__block CGFloat lastYOffset = CGFLOAT_MAX;
[self runBlock:^KIFTestStepResult(NSError **error) {
[tableView scrollToRowAtIndexPath:indexPath atScrollPosition:position animated:[[self class] testActorAnimationsEnabled]];
cell = [tableView cellForRowAtIndexPath:indexPath];
KIFTestWaitCondition(!!cell, error, @"Table view cell at index path %@ not found", indexPath);

Expand Down