Down Triangle type button

This commit is contained in:
Raimon Lapuente
2015-04-18 17:00:25 +01:00
parent 815663a4c5
commit bc5e7da167
3 changed files with 26 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

View File

@@ -436,4 +436,30 @@ describe(@"Up Triangle Button Type", ^{
});
});
describe(@"Down Triangle Button Type", ^{
__block UIView *view;
beforeEach(^{
view = [[UIView alloc] initWithFrame:CGRectMake(0.0, 0.0, 320.0, 480.0)];
view.backgroundColor = [UIColor blueColor];
});
it(@"plain button matches plain button", ^{
VBFPopFlatButton *button = [[VBFPopFlatButton alloc] initWithFrame:CGRectMake(50.0, 50.0, 40.0f, 40.0f) buttonType:buttonDownTriangleType buttonStyle:buttonPlainStyle animateToInitialState:NO];
[view addSubview:button];
// expect(view).to.recordSnapshotNamed(@"downTriangleButtonPlain");
expect(view).to.haveValidSnapshotNamed(@"downTriangleButtonPlain");
});
it(@"round default button matches round default button", ^{
VBFPopFlatButton *button = [[VBFPopFlatButton alloc] initWithFrame:CGRectMake(50.0, 50.0, 40.0f, 40.0f) buttonType:buttonDownTriangleType buttonStyle:buttonRoundedStyle animateToInitialState:NO];
button.roundBackgroundColor = [UIColor whiteColor];
button.tintColor = [UIColor blueColor];
[view addSubview:button];
// expect(view).to.recordSnapshotNamed(@"downTriangleButtonRound");
expect(view).to.haveValidSnapshotNamed(@"downTriangleButtonRound");
});
});
SpecEnd