Skip to content

Commit

Permalink
[Chips] Add a snapshot test case for MDCChipView with minimumSize set…
Browse files Browse the repository at this point in the history
… and centerVisible set to YES.

PiperOrigin-RevId: 326545217
  • Loading branch information
attributeshift authored and material-automation committed Aug 13, 2020
1 parent 4a3058d commit 70d7a73
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions components/Chips/tests/snapshot/MDCChipViewSnapshotTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,18 @@ - (void)testChipWithCustomFrameWhenCenterVisibleArea {
[self snapshotVerifyView:snapshotView];
}

- (void)testChipWithMinimumSizeWhenCenterVisibleAreaIsYES {
// When
self.chip.centerVisibleArea = YES;
self.chip.minimumSize = CGSizeMake(80, 44);
self.chip.bounds = CGRectMake(0, 0, 80, 44);
[self.chip layoutIfNeeded];

// Then
UIView *snapshotView = [self.chip mdc_addToBackgroundView];
[self snapshotVerifyView:snapshotView];
}

- (void)testChipWithCustomCornerRadiusAndCustomFrameWhenCenterVisibleArea {
// When
self.chip.centerVisibleArea = YES;
Expand Down

0 comments on commit 70d7a73

Please sign in to comment.