|
@@ -60,7 +60,7 @@
|
60
|
60
|
[self.uut viewWillAppear:false];
|
61
|
61
|
UIColor* expectedColor = [UIColor colorWithRed:1 green:0 blue:0 alpha:1];
|
62
|
62
|
|
63
|
|
- XCTAssertTrue([self.uut.navigationController.navigationBar.standardAppearance.backgroundColor isEqual:expectedColor]);
|
|
63
|
+ XCTAssertTrue([self.uut.navigationItem.standardAppearance.backgroundColor isEqual:expectedColor]);
|
64
|
64
|
}
|
65
|
65
|
|
66
|
66
|
- (void)testTopBarBackgroundColorWithoutNavigationController {
|
|
@@ -127,7 +127,7 @@
|
127
|
127
|
__unused RNNStackController* nav = [self createNavigationController];
|
128
|
128
|
[self.uut viewWillAppear:false];
|
129
|
129
|
UIColor* expectedColor = [UIColor colorWithRed:1 green:0 blue:0 alpha:1];
|
130
|
|
- XCTAssertTrue([self.uut.navigationController.navigationBar.standardAppearance.titleTextAttributes[@"NSColor"] isEqual:expectedColor]);
|
|
130
|
+ XCTAssertTrue([self.uut.navigationItem.standardAppearance.titleTextAttributes[@"NSColor"] isEqual:expectedColor]);
|
131
|
131
|
}
|
132
|
132
|
|
133
|
133
|
- (void)testBackgroundColor_validColor {
|
|
@@ -149,7 +149,7 @@
|
149
|
149
|
self.options.topBar.title.fontFamily = [[Text alloc] initWithValue:inputFont];
|
150
|
150
|
[self.uut viewWillAppear:false];
|
151
|
151
|
UIFont* expectedFont = [UIFont fontWithName:inputFont size:17];
|
152
|
|
- XCTAssertTrue([self.uut.navigationController.navigationBar.standardAppearance.titleTextAttributes[@"NSFont"] isEqual:expectedFont]);
|
|
152
|
+ XCTAssertTrue([self.uut.navigationItem.standardAppearance.titleTextAttributes[@"NSFont"] isEqual:expectedFont]);
|
153
|
153
|
}
|
154
|
154
|
|
155
|
155
|
- (void)testTopBarHideOnScroll_true {
|
|
@@ -165,8 +165,8 @@
|
165
|
165
|
self.options.topBar.background.translucent = [[Bool alloc] initWithValue:topBarTranslucentInput];
|
166
|
166
|
__unused RNNStackController* nav = [self createNavigationController];
|
167
|
167
|
[self.uut viewWillAppear:false];
|
168
|
|
- XCTAssertTrue(CGColorEqualToColor(self.uut.navigationController.navigationBar.standardAppearance.shadowColor.CGColor, [UINavigationBarAppearance new].shadowColor.CGColor));
|
169
|
|
- XCTAssertTrue(CGColorEqualToColor(self.uut.navigationController.navigationBar.standardAppearance.backgroundColor.CGColor, UIColor.systemBackgroundColor.CGColor));
|
|
168
|
+ XCTAssertTrue(CGColorEqualToColor(self.uut.navigationItem.standardAppearance.shadowColor.CGColor, [UINavigationBarAppearance new].shadowColor.CGColor));
|
|
169
|
+ XCTAssertTrue(CGColorEqualToColor(self.uut.navigationItem.standardAppearance.backgroundColor.CGColor, UIColor.systemBackgroundColor.CGColor));
|
170
|
170
|
}
|
171
|
171
|
|
172
|
172
|
- (void)testTopBarTransparent {
|
|
@@ -218,7 +218,7 @@
|
218
|
218
|
UIFont* initialFont = self.uut.navigationController.navigationBar.standardAppearance.largeTitleTextAttributes[@"NSFont"];
|
219
|
219
|
[self.uut viewWillAppear:false];
|
220
|
220
|
UIFont* expectedFont = [UIFont fontWithDescriptor:initialFont.fontDescriptor size:topBarTextFontSizeInput.floatValue];
|
221
|
|
- XCTAssertTrue([self.uut.navigationController.navigationBar.standardAppearance.largeTitleTextAttributes[@"NSFont"] isEqual:expectedFont]);
|
|
221
|
+ XCTAssertTrue([self.uut.navigationItem.standardAppearance.largeTitleTextAttributes[@"NSFont"] isEqual:expectedFont]);
|
222
|
222
|
}
|
223
|
223
|
|
224
|
224
|
- (void)testTopBarLargeTitleFontSize_withoutTextFontFamily_withTextColor {
|
|
@@ -231,8 +231,8 @@
|
231
|
231
|
[self.uut viewWillAppear:false];
|
232
|
232
|
UIFont* expectedFont = [UIFont fontWithDescriptor:initialFont.fontDescriptor size:topBarTextFontSizeInput.floatValue];
|
233
|
233
|
UIColor* expectedColor = [UIColor colorWithRed:1 green:0 blue:0 alpha:1];
|
234
|
|
- XCTAssertTrue([self.uut.navigationController.navigationBar.standardAppearance.largeTitleTextAttributes[@"NSFont"] isEqual:expectedFont]);
|
235
|
|
- XCTAssertTrue([self.uut.navigationController.navigationBar.standardAppearance.largeTitleTextAttributes[@"NSColor"] isEqual:expectedColor]);
|
|
234
|
+ XCTAssertTrue([self.uut.navigationItem.standardAppearance.largeTitleTextAttributes[@"NSFont"] isEqual:expectedFont]);
|
|
235
|
+ XCTAssertTrue([self.uut.navigationItem.standardAppearance.largeTitleTextAttributes[@"NSColor"] isEqual:expectedColor]);
|
236
|
236
|
}
|
237
|
237
|
|
238
|
238
|
- (void)testTopBarLargeTitleFontSize_withTextFontFamily_withTextColor {
|
|
@@ -247,8 +247,8 @@
|
247
|
247
|
[self.uut viewWillAppear:false];
|
248
|
248
|
UIColor* expectedColor = [UIColor colorWithRed:1 green:0 blue:0 alpha:1];
|
249
|
249
|
UIFont* expectedFont = [UIFont fontWithName:inputFont size:15];
|
250
|
|
- XCTAssertTrue([self.uut.navigationController.navigationBar.standardAppearance.largeTitleTextAttributes[@"NSFont"] isEqual:expectedFont]);
|
251
|
|
- XCTAssertTrue([self.uut.navigationController.navigationBar.standardAppearance.largeTitleTextAttributes[@"NSColor"] isEqual:expectedColor]);
|
|
250
|
+ XCTAssertTrue([self.uut.navigationItem.standardAppearance.largeTitleTextAttributes[@"NSFont"] isEqual:expectedFont]);
|
|
251
|
+ XCTAssertTrue([self.uut.navigationItem.standardAppearance.largeTitleTextAttributes[@"NSColor"] isEqual:expectedColor]);
|
252
|
252
|
}
|
253
|
253
|
|
254
|
254
|
- (void)testTopBarLargeTitleFontSize_withTextFontFamily_withoutTextColor {
|
|
@@ -259,7 +259,7 @@
|
259
|
259
|
__unused RNNStackController* nav = [self createNavigationController];
|
260
|
260
|
[self.uut viewWillAppear:false];
|
261
|
261
|
UIFont* expectedFont = [UIFont fontWithName:inputFont size:15];
|
262
|
|
- XCTAssertTrue([self.uut.navigationController.navigationBar.standardAppearance.largeTitleTextAttributes[@"NSFont"] isEqual:expectedFont]);
|
|
262
|
+ XCTAssertTrue([self.uut.navigationItem.standardAppearance.largeTitleTextAttributes[@"NSFont"] isEqual:expectedFont]);
|
263
|
263
|
}
|
264
|
264
|
|
265
|
265
|
|
|
@@ -270,7 +270,7 @@
|
270
|
270
|
UIFont* initialFont = self.uut.navigationController.navigationBar.standardAppearance.titleTextAttributes[@"NSFont"];
|
271
|
271
|
[self.uut viewWillAppear:false];
|
272
|
272
|
UIFont* expectedFont = [UIFont fontWithDescriptor:initialFont.fontDescriptor size:topBarTextFontSizeInput.floatValue];
|
273
|
|
- XCTAssertTrue([self.uut.navigationController.navigationBar.standardAppearance.titleTextAttributes[@"NSFont"] isEqual:expectedFont]);
|
|
273
|
+ XCTAssertTrue([self.uut.navigationItem.standardAppearance.titleTextAttributes[@"NSFont"] isEqual:expectedFont]);
|
274
|
274
|
}
|
275
|
275
|
|
276
|
276
|
- (void)testTopBarTextFontSize_withoutTextFontFamily_withTextColor {
|
|
@@ -283,8 +283,8 @@
|
283
|
283
|
[self.uut viewWillAppear:false];
|
284
|
284
|
UIFont* expectedFont = [UIFont fontWithDescriptor:initialFont.fontDescriptor size:topBarTextFontSizeInput.floatValue];
|
285
|
285
|
UIColor* expectedColor = [UIColor colorWithRed:1 green:0 blue:0 alpha:1];
|
286
|
|
- XCTAssertTrue([self.uut.navigationController.navigationBar.standardAppearance.titleTextAttributes[@"NSFont"] isEqual:expectedFont]);
|
287
|
|
- XCTAssertTrue([self.uut.navigationController.navigationBar.standardAppearance.titleTextAttributes[@"NSColor"] isEqual:expectedColor]);
|
|
286
|
+ XCTAssertTrue([self.uut.navigationItem.standardAppearance.titleTextAttributes[@"NSFont"] isEqual:expectedFont]);
|
|
287
|
+ XCTAssertTrue([self.uut.navigationItem.standardAppearance.titleTextAttributes[@"NSColor"] isEqual:expectedColor]);
|
288
|
288
|
}
|
289
|
289
|
|
290
|
290
|
- (void)testTopBarTextFontSize_withTextFontFamily_withTextColor {
|
|
@@ -298,8 +298,8 @@
|
298
|
298
|
[self.uut viewWillAppear:false];
|
299
|
299
|
UIColor* expectedColor = [UIColor colorWithRed:1 green:0 blue:0 alpha:1];
|
300
|
300
|
UIFont* expectedFont = [UIFont fontWithName:inputFont size:15];
|
301
|
|
- XCTAssertTrue([self.uut.navigationController.navigationBar.standardAppearance.titleTextAttributes[@"NSFont"] isEqual:expectedFont]);
|
302
|
|
- XCTAssertTrue([self.uut.navigationController.navigationBar.standardAppearance.titleTextAttributes[@"NSColor"] isEqual:expectedColor]);
|
|
301
|
+ XCTAssertTrue([self.uut.navigationItem.standardAppearance.titleTextAttributes[@"NSFont"] isEqual:expectedFont]);
|
|
302
|
+ XCTAssertTrue([self.uut.navigationItem.standardAppearance.titleTextAttributes[@"NSColor"] isEqual:expectedColor]);
|
303
|
303
|
}
|
304
|
304
|
|
305
|
305
|
- (void)testTopBarTextFontSize_withTextFontFamily_withoutTextColor {
|
|
@@ -310,7 +310,7 @@
|
310
|
310
|
__unused RNNStackController* nav = [self createNavigationController];
|
311
|
311
|
[self.uut viewWillAppear:false];
|
312
|
312
|
UIFont* expectedFont = [UIFont fontWithName:inputFont size:15];
|
313
|
|
- XCTAssertTrue([self.uut.navigationController.navigationBar.standardAppearance.titleTextAttributes[@"NSFont"] isEqual:expectedFont]);
|
|
313
|
+ XCTAssertTrue([self.uut.navigationItem.standardAppearance.titleTextAttributes[@"NSFont"] isEqual:expectedFont]);
|
314
|
314
|
}
|
315
|
315
|
|
316
|
316
|
// TODO: Currently not passing
|
|
@@ -468,7 +468,7 @@
|
468
|
468
|
self.options.topBar.noBorder = [[Bool alloc] initWithValue:topBarNoBorderInput];
|
469
|
469
|
__unused RNNStackController* nav = [self createNavigationController];
|
470
|
470
|
[self.uut viewWillAppear:false];
|
471
|
|
- XCTAssertNil(self.uut.navigationController.navigationBar.standardAppearance.shadowColor);
|
|
471
|
+ XCTAssertNil(self.uut.navigationItem.standardAppearance.shadowColor);
|
472
|
472
|
}
|
473
|
473
|
|
474
|
474
|
- (void)testTopBarNoBorderOff {
|