mirror of
https://github.com/Instagram/IGListKit
synced 2026-05-24 09:48:21 +00:00
Fix some disabled unit tests
Summary: The window frame needs to be big enough so that the cells are rendered fine with the bounds. Reviewed By: candance Differential Revision: D18949587 fbshipit-source-id: 1374bc3bab6892aafea5bbab9e8af3399e966344
This commit is contained in:
parent
d7a6fc0847
commit
cf1db53da5
3 changed files with 9 additions and 7 deletions
|
|
@ -18,6 +18,7 @@
|
||||||
|
|
||||||
- (void)setUp {
|
- (void)setUp {
|
||||||
self.dataSource = [IGTestSingleNibItemDataSource new];
|
self.dataSource = [IGTestSingleNibItemDataSource new];
|
||||||
|
self.frame = CGRectMake(0, 0, 100, 1000);
|
||||||
[super setUp];
|
[super setUp];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -33,7 +34,7 @@
|
||||||
XCTAssertEqual([self.collectionView numberOfItemsInSection:2], 1);
|
XCTAssertEqual([self.collectionView numberOfItemsInSection:2], 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)DISABLED_test_whenDisplayingCollectionView_thatCellsAreConfigured {
|
- (void)test_whenDisplayingCollectionView_thatCellsAreConfigured {
|
||||||
[self setupWithObjects:@[
|
[self setupWithObjects:@[
|
||||||
genTestObject(@1, @"Foo"),
|
genTestObject(@1, @"Foo"),
|
||||||
genTestObject(@2, @"Bar"),
|
genTestObject(@2, @"Bar"),
|
||||||
|
|
@ -47,7 +48,7 @@
|
||||||
XCTAssertEqualObjects(cell3.label.text, @"Baz");
|
XCTAssertEqualObjects(cell3.label.text, @"Baz");
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)DISABLED_test_whenDisplayingCollectionView_thatCellsAreSized {
|
- (void)test_whenDisplayingCollectionView_thatCellsAreSized {
|
||||||
[self setupWithObjects:@[
|
[self setupWithObjects:@[
|
||||||
genTestObject(@1, @"Foo"),
|
genTestObject(@1, @"Foo"),
|
||||||
genTestObject(@2, @"Bar"),
|
genTestObject(@2, @"Bar"),
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@
|
||||||
|
|
||||||
- (void)setUp {
|
- (void)setUp {
|
||||||
self.dataSource = [IGTestSingleItemDataSource new];
|
self.dataSource = [IGTestSingleItemDataSource new];
|
||||||
|
self.frame = CGRectMake(0, 0, 100, 1000);
|
||||||
[super setUp];
|
[super setUp];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -37,7 +38,7 @@
|
||||||
XCTAssertEqual([self.collectionView numberOfItemsInSection:2], 1);
|
XCTAssertEqual([self.collectionView numberOfItemsInSection:2], 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)DISABLED_test_whenDisplayingCollectionView_thatCellsAreConfigured {
|
- (void)test_whenDisplayingCollectionView_thatCellsAreConfigured {
|
||||||
[self setupWithObjects:@[
|
[self setupWithObjects:@[
|
||||||
genTestObject(@1, @"Foo"),
|
genTestObject(@1, @"Foo"),
|
||||||
genTestObject(@2, @"Bar"),
|
genTestObject(@2, @"Bar"),
|
||||||
|
|
@ -51,7 +52,7 @@
|
||||||
XCTAssertEqualObjects(cell3.label.text, @"Baz");
|
XCTAssertEqualObjects(cell3.label.text, @"Baz");
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)DISABLED_test_whenDisplayingCollectionView_thatCellsAreSized {
|
- (void)test_whenDisplayingCollectionView_thatCellsAreSized {
|
||||||
[self setupWithObjects:@[
|
[self setupWithObjects:@[
|
||||||
genTestObject(@1, @"Foo"),
|
genTestObject(@1, @"Foo"),
|
||||||
genTestObject(@2, @"Bar"),
|
genTestObject(@2, @"Bar"),
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
- (void)setUp {
|
- (void)setUp {
|
||||||
[super setUp];
|
[super setUp];
|
||||||
self.window = [[UIWindow alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];
|
self.window = [[UIWindow alloc] initWithFrame:CGRectMake(0, 0, 100, 1000)];
|
||||||
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"IGTestStoryboard" bundle:[NSBundle bundleForClass:self.class]];
|
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"IGTestStoryboard" bundle:[NSBundle bundleForClass:self.class]];
|
||||||
self.viewController = [storyboard instantiateViewControllerWithIdentifier:@"testVC"];
|
self.viewController = [storyboard instantiateViewControllerWithIdentifier:@"testVC"];
|
||||||
[self.window addSubview:self.viewController.view];
|
[self.window addSubview:self.viewController.view];
|
||||||
|
|
@ -67,7 +67,7 @@
|
||||||
XCTAssertEqual([self.collectionView numberOfItemsInSection:2], 1);
|
XCTAssertEqual([self.collectionView numberOfItemsInSection:2], 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)DISABLED_test_whenDisplayingCollectionView_thatCellsAreConfigured {
|
- (void)test_whenDisplayingCollectionView_thatCellsAreConfigured {
|
||||||
[self setupWithObjects:@[
|
[self setupWithObjects:@[
|
||||||
genTestObject(@1, @"Foo"),
|
genTestObject(@1, @"Foo"),
|
||||||
genTestObject(@2, @"Bar"),
|
genTestObject(@2, @"Bar"),
|
||||||
|
|
@ -81,7 +81,7 @@
|
||||||
XCTAssertEqualObjects(cell3.label.text, @"Baz");
|
XCTAssertEqualObjects(cell3.label.text, @"Baz");
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)DISABLED_test_whenDisplayingCollectionView_thatCellsAreSized {
|
- (void)test_whenDisplayingCollectionView_thatCellsAreSized {
|
||||||
[self setupWithObjects:@[
|
[self setupWithObjects:@[
|
||||||
genTestObject(@1, @"Foo"),
|
genTestObject(@1, @"Foo"),
|
||||||
genTestObject(@2, @"Bar"),
|
genTestObject(@2, @"Bar"),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue