|
@@ -619,13 +619,20 @@
|
619
|
619
|
XCTAssertTrue([self.uut.tabBarController.tabBar.barTintColor isEqual:expectedColor]);
|
620
|
620
|
}
|
621
|
621
|
|
622
|
|
--(void)testTabBarTextColor_validColor{
|
|
622
|
+-(void)testTabBarSelectedColor_validColor{
|
623
|
623
|
NSNumber* inputColor = @(0xFFFF0000);
|
624
|
|
- self.options.bottomTabs.textColor = inputColor;
|
|
624
|
+ self.options.bottomTabs.tabColor = inputColor;
|
625
|
625
|
[self.uut embedInTabBarController];
|
626
|
626
|
UIColor* expectedColor = [UIColor colorWithRed:1 green:0 blue:0 alpha:1];
|
627
|
|
- NSDictionary* attributes = [self.uut.tabBarController.tabBar.items.firstObject titleTextAttributesForState:UIControlStateNormal];
|
628
|
|
- XCTAssertTrue([attributes[@"NSColor"] isEqual:expectedColor]);
|
|
627
|
+ XCTAssertTrue([self.uut.tabBarController.tabBar.unselectedItemTintColor isEqual:expectedColor]);
|
|
628
|
+}
|
|
629
|
+
|
|
630
|
+-(void)testTabBarUnselectedColor_validColor{
|
|
631
|
+ NSNumber* inputColor = @(0xFFFF0000);
|
|
632
|
+ self.options.bottomTabs.selectedTabColor = inputColor;
|
|
633
|
+ [self.uut embedInTabBarController];
|
|
634
|
+ UIColor* expectedColor = [UIColor colorWithRed:1 green:0 blue:0 alpha:1];
|
|
635
|
+ XCTAssertTrue([self.uut.tabBarController.tabBar.tintColor isEqual:expectedColor]);
|
629
|
636
|
}
|
630
|
637
|
|
631
|
638
|
-(void)testTabBarTextFontFamily_validFont{
|
|
@@ -645,28 +652,22 @@
|
645
|
652
|
XCTAssertTrue([attributes[@"NSFont"] isEqual:expectedFont]);
|
646
|
653
|
}
|
647
|
654
|
|
648
|
|
--(void)testTabBarTextFontSize_withoutTextFontFamily_withTextColor {
|
|
655
|
+-(void)testTabBarTextFontSize_withoutTextFontFamily {
|
649
|
656
|
self.options.bottomTabs.fontSize = @(15);
|
650
|
|
- self.options.bottomTabs.textColor = @(0xFFFF0000);
|
651
|
657
|
[self.uut embedInTabBarController];
|
652
|
658
|
UIFont* expectedFont = [UIFont systemFontOfSize:15];
|
653
|
|
- UIColor* expectedColor = [UIColor colorWithRed:1 green:0 blue:0 alpha:1];
|
654
|
659
|
NSDictionary* attributes = [self.uut.tabBarController.tabBar.items.firstObject titleTextAttributesForState:UIControlStateNormal];
|
655
|
660
|
XCTAssertTrue([attributes[@"NSFont"] isEqual:expectedFont]);
|
656
|
|
- XCTAssertTrue([attributes[@"NSColor"] isEqual:expectedColor]);
|
657
|
661
|
}
|
658
|
662
|
|
659
|
663
|
-(void)testTabBarTextFontSize_withTextFontFamily_withTextColor {
|
660
|
664
|
NSString* inputFont = @"HelveticaNeue";
|
661
|
665
|
self.options.bottomTabs.fontSize = @(15);
|
662
|
|
- self.options.bottomTabs.textColor = @(0xFFFF0000);
|
663
|
666
|
self.options.bottomTabs.fontFamily = inputFont;
|
664
|
667
|
[self.uut embedInTabBarController];
|
665
|
|
- UIColor* expectedColor = [UIColor colorWithRed:1 green:0 blue:0 alpha:1];
|
666
|
668
|
UIFont* expectedFont = [UIFont fontWithName:inputFont size:15];
|
667
|
669
|
NSDictionary* attributes = [self.uut.tabBarController.tabBar.items.firstObject titleTextAttributesForState:UIControlStateNormal];
|
668
|
670
|
XCTAssertTrue([attributes[@"NSFont"] isEqual:expectedFont]);
|
669
|
|
- XCTAssertTrue([attributes[@"NSColor"] isEqual:expectedColor]);
|
670
|
671
|
}
|
671
|
672
|
|
672
|
673
|
-(void)testTabBarTextFontSize_withTextFontFamily_withoutTextColor {
|