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:
Zhisheng Huang 2019-12-12 11:10:22 -08:00 committed by Facebook Github Bot
parent d7a6fc0847
commit cf1db53da5
3 changed files with 9 additions and 7 deletions

View file

@ -18,6 +18,7 @@
- (void)setUp {
self.dataSource = [IGTestSingleNibItemDataSource new];
self.frame = CGRectMake(0, 0, 100, 1000);
[super setUp];
}
@ -33,7 +34,7 @@
XCTAssertEqual([self.collectionView numberOfItemsInSection:2], 1);
}
- (void)DISABLED_test_whenDisplayingCollectionView_thatCellsAreConfigured {
- (void)test_whenDisplayingCollectionView_thatCellsAreConfigured {
[self setupWithObjects:@[
genTestObject(@1, @"Foo"),
genTestObject(@2, @"Bar"),
@ -47,7 +48,7 @@
XCTAssertEqualObjects(cell3.label.text, @"Baz");
}
- (void)DISABLED_test_whenDisplayingCollectionView_thatCellsAreSized {
- (void)test_whenDisplayingCollectionView_thatCellsAreSized {
[self setupWithObjects:@[
genTestObject(@1, @"Foo"),
genTestObject(@2, @"Bar"),

View file

@ -22,6 +22,7 @@
- (void)setUp {
self.dataSource = [IGTestSingleItemDataSource new];
self.frame = CGRectMake(0, 0, 100, 1000);
[super setUp];
}
@ -37,7 +38,7 @@
XCTAssertEqual([self.collectionView numberOfItemsInSection:2], 1);
}
- (void)DISABLED_test_whenDisplayingCollectionView_thatCellsAreConfigured {
- (void)test_whenDisplayingCollectionView_thatCellsAreConfigured {
[self setupWithObjects:@[
genTestObject(@1, @"Foo"),
genTestObject(@2, @"Bar"),
@ -51,7 +52,7 @@
XCTAssertEqualObjects(cell3.label.text, @"Baz");
}
- (void)DISABLED_test_whenDisplayingCollectionView_thatCellsAreSized {
- (void)test_whenDisplayingCollectionView_thatCellsAreSized {
[self setupWithObjects:@[
genTestObject(@1, @"Foo"),
genTestObject(@2, @"Bar"),

View file

@ -29,7 +29,7 @@
- (void)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]];
self.viewController = [storyboard instantiateViewControllerWithIdentifier:@"testVC"];
[self.window addSubview:self.viewController.view];
@ -67,7 +67,7 @@
XCTAssertEqual([self.collectionView numberOfItemsInSection:2], 1);
}
- (void)DISABLED_test_whenDisplayingCollectionView_thatCellsAreConfigured {
- (void)test_whenDisplayingCollectionView_thatCellsAreConfigured {
[self setupWithObjects:@[
genTestObject(@1, @"Foo"),
genTestObject(@2, @"Bar"),
@ -81,7 +81,7 @@
XCTAssertEqualObjects(cell3.label.text, @"Baz");
}
- (void)DISABLED_test_whenDisplayingCollectionView_thatCellsAreSized {
- (void)test_whenDisplayingCollectionView_thatCellsAreSized {
[self setupWithObjects:@[
genTestObject(@1, @"Foo"),
genTestObject(@2, @"Bar"),