Skip to content

Commit

Permalink
Fix failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyenhuy committed Jul 19, 2017
1 parent 441f69a commit 19e8b75
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Tests/ASPagerNodeTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ - (void)DISABLED_testThatRootPagerNodeDoesGetTheRightInsetWhilePoppingBack
#pragma clang diagnostic pop
XCTAssertEqualObjects(NSStringFromCGRect(window.bounds), NSStringFromCGRect(node.frame));
XCTAssertEqualObjects(NSStringFromCGRect(window.bounds), NSStringFromCGRect(cell.frame));
XCTAssertEqual(pagerNode.view.contentOffset.y, 0);
XCTAssertEqual(pagerNode.contentOffset.y, 0);
XCTAssertEqual(pagerNode.view.contentInset.top, 0);

e = [self expectationWithDescription:@"Transition completed"];
Expand Down Expand Up @@ -158,7 +158,7 @@ - (void)DISABLED_testThatRootPagerNodeDoesGetTheRightInsetWhilePoppingBack
#pragma clang diagnostic pop
XCTAssertEqualObjects(NSStringFromCGRect(window.bounds), NSStringFromCGRect(node.frame));
XCTAssertEqualObjects(NSStringFromCGRect(window.bounds), NSStringFromCGRect(cell.frame));
XCTAssertEqual(pagerNode.view.contentOffset.y, 0);
XCTAssertEqual(pagerNode.contentOffset.y, 0);
XCTAssertEqual(pagerNode.view.contentInset.top, 0);
}

Expand Down
4 changes: 2 additions & 2 deletions Tests/ASTableViewTests.mm
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,7 @@ - (void)testAutomaticallyAdjustingContentOffset
[node waitUntilAllUpdatesAreCommitted];
CGFloat rowHeight = [node.view rectForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]].size.height;
// Scroll to row (0,1) + 10pt
node.view.contentOffset = CGPointMake(0, rowHeight + 10);
node.contentOffset = CGPointMake(0, rowHeight + 10);

[node performBatchAnimated:NO updates:^{
// Delete row 0 from all sections.
Expand All @@ -829,7 +829,7 @@ - (void)testAutomaticallyAdjustingContentOffset

// Now that row (0,0) is deleted, we should have slid up to be at just 10
// i.e. we should have subtracted the deleted row height from our content offset.
XCTAssertEqual(node.view.contentOffset.y, 10);
XCTAssertEqual(node.contentOffset.y, 10);
}

@end
Expand Down

0 comments on commit 19e8b75

Please sign in to comment.