|
@@ -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.titleTextAttributes[@"NSColor"] isEqual:expectedColor]);
|
|
130
|
+ XCTAssertTrue([self.uut.navigationController.navigationBar.standardAppearance.titleTextAttributes[@"NSColor"] isEqual:expectedColor]);
|
131
|
131
|
}
|
132
|
132
|
|
133
|
133
|
-(void)testbackgroundColor_validColor{
|
|
@@ -144,7 +144,7 @@
|
144
|
144
|
self.options.topBar.title.fontFamily = [[Text alloc] initWithValue:inputFont];
|
145
|
145
|
[self.uut viewWillAppear:false];
|
146
|
146
|
UIFont* expectedFont = [UIFont fontWithName:inputFont size:17];
|
147
|
|
- XCTAssertTrue([self.uut.navigationController.navigationBar.titleTextAttributes[@"NSFont"] isEqual:expectedFont]);
|
|
147
|
+ XCTAssertTrue([self.uut.navigationController.navigationBar.standardAppearance.titleTextAttributes[@"NSFont"] isEqual:expectedFont]);
|
148
|
148
|
}
|
149
|
149
|
|
150
|
150
|
-(void)testTopBarHideOnScroll_true {
|
|
@@ -202,10 +202,10 @@
|
202
|
202
|
NSNumber* topBarTextFontSizeInput = @(15);
|
203
|
203
|
self.options.topBar.largeTitle.fontSize = [[Number alloc] initWithValue:topBarTextFontSizeInput];
|
204
|
204
|
__unused RNNStackController* nav = [self createNavigationController];
|
|
205
|
+ UIFont* initialFont = self.uut.navigationController.navigationBar.standardAppearance.largeTitleTextAttributes[@"NSFont"];
|
205
|
206
|
[self.uut viewWillAppear:false];
|
206
|
|
- UIFont* expectedFont = [UIFont systemFontOfSize:15];
|
207
|
|
-
|
208
|
|
- XCTAssertTrue([self.uut.navigationController.navigationBar.largeTitleTextAttributes[@"NSFont"] isEqual:expectedFont]);
|
|
207
|
+ UIFont* expectedFont = [UIFont fontWithDescriptor:initialFont.fontDescriptor size:topBarTextFontSizeInput.floatValue];
|
|
208
|
+ XCTAssertTrue([self.uut.navigationController.navigationBar.standardAppearance.largeTitleTextAttributes[@"NSFont"] isEqual:expectedFont]);
|
209
|
209
|
}
|
210
|
210
|
|
211
|
211
|
-(void)testTopBarLargeTitleFontSize_withoutTextFontFamily_withTextColor {
|
|
@@ -214,11 +214,12 @@
|
214
|
214
|
self.options.topBar.largeTitle.fontSize = [[Number alloc] initWithValue:topBarTextFontSizeInput];
|
215
|
215
|
self.options.topBar.largeTitle.color = [[Color alloc] initWithValue:inputColor];
|
216
|
216
|
__unused RNNStackController* nav = [self createNavigationController];
|
|
217
|
+ UIFont* initialFont = self.uut.navigationController.navigationBar.standardAppearance.largeTitleTextAttributes[@"NSFont"];
|
217
|
218
|
[self.uut viewWillAppear:false];
|
218
|
|
- UIFont* expectedFont = [UIFont systemFontOfSize:15];
|
|
219
|
+ UIFont* expectedFont = [UIFont fontWithDescriptor:initialFont.fontDescriptor size:topBarTextFontSizeInput.floatValue];
|
219
|
220
|
UIColor* expectedColor = [UIColor colorWithRed:1 green:0 blue:0 alpha:1];
|
220
|
|
- XCTAssertTrue([self.uut.navigationController.navigationBar.largeTitleTextAttributes[@"NSFont"] isEqual:expectedFont]);
|
221
|
|
- XCTAssertTrue([self.uut.navigationController.navigationBar.largeTitleTextAttributes[@"NSColor"] isEqual:expectedColor]);
|
|
221
|
+ XCTAssertTrue([self.uut.navigationController.navigationBar.standardAppearance.largeTitleTextAttributes[@"NSFont"] isEqual:expectedFont]);
|
|
222
|
+ XCTAssertTrue([self.uut.navigationController.navigationBar.standardAppearance.largeTitleTextAttributes[@"NSColor"] isEqual:expectedColor]);
|
222
|
223
|
}
|
223
|
224
|
|
224
|
225
|
-(void)testTopBarLargeTitleFontSize_withTextFontFamily_withTextColor {
|
|
@@ -233,8 +234,8 @@
|
233
|
234
|
[self.uut viewWillAppear:false];
|
234
|
235
|
UIColor* expectedColor = [UIColor colorWithRed:1 green:0 blue:0 alpha:1];
|
235
|
236
|
UIFont* expectedFont = [UIFont fontWithName:inputFont size:15];
|
236
|
|
- XCTAssertTrue([self.uut.navigationController.navigationBar.largeTitleTextAttributes[@"NSFont"] isEqual:expectedFont]);
|
237
|
|
- XCTAssertTrue([self.uut.navigationController.navigationBar.largeTitleTextAttributes[@"NSColor"] isEqual:expectedColor]);
|
|
237
|
+ XCTAssertTrue([self.uut.navigationController.navigationBar.standardAppearance.largeTitleTextAttributes[@"NSFont"] isEqual:expectedFont]);
|
|
238
|
+ XCTAssertTrue([self.uut.navigationController.navigationBar.standardAppearance.largeTitleTextAttributes[@"NSColor"] isEqual:expectedColor]);
|
238
|
239
|
}
|
239
|
240
|
|
240
|
241
|
-(void)testTopBarLargeTitleFontSize_withTextFontFamily_withoutTextColor {
|
|
@@ -245,7 +246,7 @@
|
245
|
246
|
__unused RNNStackController* nav = [self createNavigationController];
|
246
|
247
|
[self.uut viewWillAppear:false];
|
247
|
248
|
UIFont* expectedFont = [UIFont fontWithName:inputFont size:15];
|
248
|
|
- XCTAssertTrue([self.uut.navigationController.navigationBar.largeTitleTextAttributes[@"NSFont"] isEqual:expectedFont]);
|
|
249
|
+ XCTAssertTrue([self.uut.navigationController.navigationBar.standardAppearance.largeTitleTextAttributes[@"NSFont"] isEqual:expectedFont]);
|
249
|
250
|
}
|
250
|
251
|
|
251
|
252
|
|
|
@@ -253,9 +254,10 @@
|
253
|
254
|
NSNumber* topBarTextFontSizeInput = @(15);
|
254
|
255
|
self.options.topBar.title.fontSize = [[Number alloc] initWithValue:topBarTextFontSizeInput];
|
255
|
256
|
__unused RNNStackController* nav = [self createNavigationController];
|
|
257
|
+ UIFont* initialFont = self.uut.navigationController.navigationBar.standardAppearance.titleTextAttributes[@"NSFont"];
|
256
|
258
|
[self.uut viewWillAppear:false];
|
257
|
|
- UIFont* expectedFont = [UIFont systemFontOfSize:15];
|
258
|
|
- XCTAssertTrue([self.uut.navigationController.navigationBar.titleTextAttributes[@"NSFont"] isEqual:expectedFont]);
|
|
259
|
+ UIFont* expectedFont = [UIFont fontWithDescriptor:initialFont.fontDescriptor size:topBarTextFontSizeInput.floatValue];
|
|
260
|
+ XCTAssertTrue([self.uut.navigationController.navigationBar.standardAppearance.titleTextAttributes[@"NSFont"] isEqual:expectedFont]);
|
259
|
261
|
}
|
260
|
262
|
|
261
|
263
|
-(void)testTopBarTextFontSize_withoutTextFontFamily_withTextColor {
|
|
@@ -264,11 +266,12 @@
|
264
|
266
|
self.options.topBar.title.fontSize = [[Number alloc] initWithValue:topBarTextFontSizeInput];
|
265
|
267
|
self.options.topBar.title.color = [[Color alloc] initWithValue:inputColor];
|
266
|
268
|
__unused RNNStackController* nav = [self createNavigationController];
|
|
269
|
+ UIFont* initialFont = self.uut.navigationController.navigationBar.standardAppearance.titleTextAttributes[@"NSFont"];
|
267
|
270
|
[self.uut viewWillAppear:false];
|
268
|
|
- UIFont* expectedFont = [UIFont systemFontOfSize:15];
|
|
271
|
+ UIFont* expectedFont = [UIFont fontWithDescriptor:initialFont.fontDescriptor size:topBarTextFontSizeInput.floatValue];
|
269
|
272
|
UIColor* expectedColor = [UIColor colorWithRed:1 green:0 blue:0 alpha:1];
|
270
|
|
- XCTAssertTrue([self.uut.navigationController.navigationBar.titleTextAttributes[@"NSFont"] isEqual:expectedFont]);
|
271
|
|
- XCTAssertTrue([self.uut.navigationController.navigationBar.titleTextAttributes[@"NSColor"] isEqual:expectedColor]);
|
|
273
|
+ XCTAssertTrue([self.uut.navigationController.navigationBar.standardAppearance.titleTextAttributes[@"NSFont"] isEqual:expectedFont]);
|
|
274
|
+ XCTAssertTrue([self.uut.navigationController.navigationBar.standardAppearance.titleTextAttributes[@"NSColor"] isEqual:expectedColor]);
|
272
|
275
|
}
|
273
|
276
|
|
274
|
277
|
-(void)testTopBarTextFontSize_withTextFontFamily_withTextColor {
|
|
@@ -282,8 +285,8 @@
|
282
|
285
|
[self.uut viewWillAppear:false];
|
283
|
286
|
UIColor* expectedColor = [UIColor colorWithRed:1 green:0 blue:0 alpha:1];
|
284
|
287
|
UIFont* expectedFont = [UIFont fontWithName:inputFont size:15];
|
285
|
|
- XCTAssertTrue([self.uut.navigationController.navigationBar.titleTextAttributes[@"NSFont"] isEqual:expectedFont]);
|
286
|
|
- XCTAssertTrue([self.uut.navigationController.navigationBar.titleTextAttributes[@"NSColor"] isEqual:expectedColor]);
|
|
288
|
+ XCTAssertTrue([self.uut.navigationController.navigationBar.standardAppearance.titleTextAttributes[@"NSFont"] isEqual:expectedFont]);
|
|
289
|
+ XCTAssertTrue([self.uut.navigationController.navigationBar.standardAppearance.titleTextAttributes[@"NSColor"] isEqual:expectedColor]);
|
287
|
290
|
}
|
288
|
291
|
|
289
|
292
|
-(void)testTopBarTextFontSize_withTextFontFamily_withoutTextColor {
|
|
@@ -294,7 +297,7 @@
|
294
|
297
|
__unused RNNStackController* nav = [self createNavigationController];
|
295
|
298
|
[self.uut viewWillAppear:false];
|
296
|
299
|
UIFont* expectedFont = [UIFont fontWithName:inputFont size:15];
|
297
|
|
- XCTAssertTrue([self.uut.navigationController.navigationBar.titleTextAttributes[@"NSFont"] isEqual:expectedFont]);
|
|
300
|
+ XCTAssertTrue([self.uut.navigationController.navigationBar.standardAppearance.titleTextAttributes[@"NSFont"] isEqual:expectedFont]);
|
298
|
301
|
}
|
299
|
302
|
|
300
|
303
|
// TODO: Currently not passing
|