|
@@ -53,7 +53,7 @@
|
53
|
53
|
self.uut = [[RNNComponentViewController alloc] initWithLayoutInfo:layoutInfo rootViewCreator:self.creator eventEmitter:self.emitter presenter:presenter options:self.options defaultOptions:nil];
|
54
|
54
|
}
|
55
|
55
|
|
56
|
|
--(void)testTopBarBackgroundColor_validColor{
|
|
56
|
+- (void)testTopBarBackgroundColor_validColor {
|
57
|
57
|
NSNumber* inputColor = @(0xFFFF0000);
|
58
|
58
|
self.options.topBar.background.color = [[Color alloc] initWithValue:[RCTConvert UIColor:inputColor]];
|
59
|
59
|
__unused RNNStackController* nav = [self createNavigationController];
|
|
@@ -63,7 +63,7 @@
|
63
|
63
|
XCTAssertTrue([self.uut.navigationController.navigationBar.standardAppearance.backgroundColor isEqual:expectedColor]);
|
64
|
64
|
}
|
65
|
65
|
|
66
|
|
--(void)testTopBarBackgroundColorWithoutNavigationController{
|
|
66
|
+- (void)testTopBarBackgroundColorWithoutNavigationController {
|
67
|
67
|
NSNumber* inputColor = @(0xFFFF0000);
|
68
|
68
|
self.options.topBar.background.color = [[Color alloc] initWithValue:[RCTConvert UIColor:inputColor]];
|
69
|
69
|
|
|
@@ -108,7 +108,7 @@
|
108
|
108
|
XCTAssertTrue([self.uut prefersStatusBarHidden]);
|
109
|
109
|
}
|
110
|
110
|
|
111
|
|
--(void)testTitle_string{
|
|
111
|
+- (void)testTitle_string{
|
112
|
112
|
NSString* title =@"some title";
|
113
|
113
|
self.options.topBar.title.text = [[Text alloc] initWithValue:title];
|
114
|
114
|
|
|
@@ -116,12 +116,12 @@
|
116
|
116
|
XCTAssertTrue([self.uut.navigationItem.title isEqual:title]);
|
117
|
117
|
}
|
118
|
118
|
|
119
|
|
--(void)testTitle_default{
|
|
119
|
+- (void)testTitle_default{
|
120
|
120
|
[self.uut viewWillAppear:false];
|
121
|
121
|
XCTAssertNil(self.uut.navigationItem.title);
|
122
|
122
|
}
|
123
|
123
|
|
124
|
|
--(void)testTopBarTextColor_validColor{
|
|
124
|
+- (void)testTopBarTextColor_validColor{
|
125
|
125
|
UIColor* inputColor = [RCTConvert UIColor:@(0xFFFF0000)];
|
126
|
126
|
self.options.topBar.title.color = [[Color alloc] initWithValue:inputColor];
|
127
|
127
|
__unused RNNStackController* nav = [self createNavigationController];
|
|
@@ -130,7 +130,7 @@
|
130
|
130
|
XCTAssertTrue([self.uut.navigationController.navigationBar.standardAppearance.titleTextAttributes[@"NSColor"] isEqual:expectedColor]);
|
131
|
131
|
}
|
132
|
132
|
|
133
|
|
--(void)testbackgroundColor_validColor{
|
|
133
|
+- (void)testbackgroundColor_validColor{
|
134
|
134
|
UIColor* inputColor = [RCTConvert UIColor:@(0xFFFF0000)];
|
135
|
135
|
self.options.layout.backgroundColor = [[Color alloc] initWithValue:inputColor];
|
136
|
136
|
[self.uut viewWillAppear:false];
|
|
@@ -138,7 +138,7 @@
|
138
|
138
|
XCTAssertTrue([self.uut.view.backgroundColor isEqual:expectedColor]);
|
139
|
139
|
}
|
140
|
140
|
|
141
|
|
--(void)testTopBarTextFontFamily_validFont{
|
|
141
|
+- (void)testTopBarTextFontFamily_validFont{
|
142
|
142
|
NSString* inputFont = @"HelveticaNeue";
|
143
|
143
|
__unused RNNStackController* nav = [self createNavigationController];
|
144
|
144
|
self.options.topBar.title.fontFamily = [[Text alloc] initWithValue:inputFont];
|
|
@@ -147,7 +147,7 @@
|
147
|
147
|
XCTAssertTrue([self.uut.navigationController.navigationBar.standardAppearance.titleTextAttributes[@"NSFont"] isEqual:expectedFont]);
|
148
|
148
|
}
|
149
|
149
|
|
150
|
|
--(void)testTopBarHideOnScroll_true {
|
|
150
|
+- (void)testTopBarHideOnScroll_true {
|
151
|
151
|
NSNumber* hideOnScrollInput = @(1);
|
152
|
152
|
__unused RNNStackController* nav = [self createNavigationController];
|
153
|
153
|
self.options.topBar.hideOnScroll = [[Bool alloc] initWithValue:hideOnScrollInput];;
|
|
@@ -155,15 +155,23 @@
|
155
|
155
|
XCTAssertTrue(self.uut.navigationController.hidesBarsOnSwipe);
|
156
|
156
|
}
|
157
|
157
|
|
158
|
|
--(void)testTopBarTranslucent {
|
|
158
|
+- (void)testTopBarTranslucent {
|
159
|
159
|
NSNumber* topBarTranslucentInput = @(0);
|
160
|
160
|
self.options.topBar.background.translucent = [[Bool alloc] initWithValue:topBarTranslucentInput];
|
161
|
161
|
__unused RNNStackController* nav = [self createNavigationController];
|
162
|
162
|
[self.uut viewWillAppear:false];
|
163
|
|
- XCTAssertFalse(self.uut.navigationController.navigationBar.translucent);
|
|
163
|
+ XCTAssertTrue(CGColorEqualToColor(self.uut.navigationController.navigationBar.standardAppearance.shadowColor.CGColor, [UINavigationBarAppearance new].shadowColor.CGColor));
|
|
164
|
+ XCTAssertTrue(CGColorEqualToColor(self.uut.navigationController.navigationBar.standardAppearance.backgroundColor.CGColor, UIColor.systemBackgroundColor.CGColor));
|
164
|
165
|
}
|
165
|
166
|
|
166
|
|
--(void)testTabBadge {
|
|
167
|
+- (void)testTopBarTransparent {
|
|
168
|
+ self.options.topBar.background.color = [[Color alloc] initWithValue:UIColor.clearColor];
|
|
169
|
+ __unused RNNStackController* nav = [self createNavigationController];
|
|
170
|
+ [self.uut viewWillAppear:false];
|
|
171
|
+ XCTAssertNil(self.uut.navigationController.navigationBar.standardAppearance.backgroundColor);
|
|
172
|
+}
|
|
173
|
+
|
|
174
|
+- (void)testTabBadge {
|
167
|
175
|
NSString* tabBadgeInput = @"5";
|
168
|
176
|
self.options.bottomTab.badge = [[Text alloc] initWithValue:tabBadgeInput];
|
169
|
177
|
__unused RNNBottomTabsController* vc = [[RNNBottomTabsController alloc] init];
|
|
@@ -177,20 +185,20 @@
|
177
|
185
|
|
178
|
186
|
}
|
179
|
187
|
|
180
|
|
--(void)testTopBarLargeTitle_default {
|
|
188
|
+- (void)testTopBarLargeTitle_default {
|
181
|
189
|
[self.uut viewWillAppear:false];
|
182
|
190
|
|
183
|
191
|
XCTAssertEqual(self.uut.navigationItem.largeTitleDisplayMode, UINavigationItemLargeTitleDisplayModeNever);
|
184
|
192
|
}
|
185
|
193
|
|
186
|
|
--(void)testTopBarLargeTitle_true {
|
|
194
|
+- (void)testTopBarLargeTitle_true {
|
187
|
195
|
self.options.topBar.largeTitle.visible = [[Bool alloc] initWithValue:@(1)];
|
188
|
196
|
[self.uut viewWillAppear:false];
|
189
|
197
|
|
190
|
198
|
XCTAssertEqual(self.uut.navigationItem.largeTitleDisplayMode, UINavigationItemLargeTitleDisplayModeAlways);
|
191
|
199
|
}
|
192
|
200
|
|
193
|
|
--(void)testTopBarLargeTitle_false {
|
|
201
|
+- (void)testTopBarLargeTitle_false {
|
194
|
202
|
self.options.topBar.largeTitle.visible = [[Bool alloc] initWithValue:@(0)];
|
195
|
203
|
[self.uut viewWillAppear:false];
|
196
|
204
|
|
|
@@ -198,7 +206,7 @@
|
198
|
206
|
}
|
199
|
207
|
|
200
|
208
|
|
201
|
|
--(void)testTopBarLargeTitleFontSize_withoutTextFontFamily_withoutTextColor {
|
|
209
|
+- (void)testTopBarLargeTitleFontSize_withoutTextFontFamily_withoutTextColor {
|
202
|
210
|
NSNumber* topBarTextFontSizeInput = @(15);
|
203
|
211
|
self.options.topBar.largeTitle.fontSize = [[Number alloc] initWithValue:topBarTextFontSizeInput];
|
204
|
212
|
__unused RNNStackController* nav = [self createNavigationController];
|
|
@@ -208,7 +216,7 @@
|
208
|
216
|
XCTAssertTrue([self.uut.navigationController.navigationBar.standardAppearance.largeTitleTextAttributes[@"NSFont"] isEqual:expectedFont]);
|
209
|
217
|
}
|
210
|
218
|
|
211
|
|
--(void)testTopBarLargeTitleFontSize_withoutTextFontFamily_withTextColor {
|
|
219
|
+- (void)testTopBarLargeTitleFontSize_withoutTextFontFamily_withTextColor {
|
212
|
220
|
NSNumber* topBarTextFontSizeInput = @(15);
|
213
|
221
|
UIColor* inputColor = [RCTConvert UIColor:@(0xFFFF0000)];
|
214
|
222
|
self.options.topBar.largeTitle.fontSize = [[Number alloc] initWithValue:topBarTextFontSizeInput];
|
|
@@ -222,7 +230,7 @@
|
222
|
230
|
XCTAssertTrue([self.uut.navigationController.navigationBar.standardAppearance.largeTitleTextAttributes[@"NSColor"] isEqual:expectedColor]);
|
223
|
231
|
}
|
224
|
232
|
|
225
|
|
--(void)testTopBarLargeTitleFontSize_withTextFontFamily_withTextColor {
|
|
233
|
+- (void)testTopBarLargeTitleFontSize_withTextFontFamily_withTextColor {
|
226
|
234
|
NSNumber* topBarTextFontSizeInput = @(15);
|
227
|
235
|
UIColor* inputColor = [RCTConvert UIColor:@(0xFFFF0000)];
|
228
|
236
|
NSString* inputFont = @"HelveticaNeue";
|
|
@@ -238,7 +246,7 @@
|
238
|
246
|
XCTAssertTrue([self.uut.navigationController.navigationBar.standardAppearance.largeTitleTextAttributes[@"NSColor"] isEqual:expectedColor]);
|
239
|
247
|
}
|
240
|
248
|
|
241
|
|
--(void)testTopBarLargeTitleFontSize_withTextFontFamily_withoutTextColor {
|
|
249
|
+- (void)testTopBarLargeTitleFontSize_withTextFontFamily_withoutTextColor {
|
242
|
250
|
NSNumber* topBarTextFontSizeInput = @(15);
|
243
|
251
|
NSString* inputFont = @"HelveticaNeue";
|
244
|
252
|
self.options.topBar.largeTitle.fontSize = [[Number alloc] initWithValue:topBarTextFontSizeInput];
|
|
@@ -250,7 +258,7 @@
|
250
|
258
|
}
|
251
|
259
|
|
252
|
260
|
|
253
|
|
--(void)testTopBarTextFontSize_withoutTextFontFamily_withoutTextColor {
|
|
261
|
+- (void)testTopBarTextFontSize_withoutTextFontFamily_withoutTextColor {
|
254
|
262
|
NSNumber* topBarTextFontSizeInput = @(15);
|
255
|
263
|
self.options.topBar.title.fontSize = [[Number alloc] initWithValue:topBarTextFontSizeInput];
|
256
|
264
|
__unused RNNStackController* nav = [self createNavigationController];
|
|
@@ -260,7 +268,7 @@
|
260
|
268
|
XCTAssertTrue([self.uut.navigationController.navigationBar.standardAppearance.titleTextAttributes[@"NSFont"] isEqual:expectedFont]);
|
261
|
269
|
}
|
262
|
270
|
|
263
|
|
--(void)testTopBarTextFontSize_withoutTextFontFamily_withTextColor {
|
|
271
|
+- (void)testTopBarTextFontSize_withoutTextFontFamily_withTextColor {
|
264
|
272
|
NSNumber* topBarTextFontSizeInput = @(15);
|
265
|
273
|
UIColor* inputColor = [RCTConvert UIColor:@(0xFFFF0000)];
|
266
|
274
|
self.options.topBar.title.fontSize = [[Number alloc] initWithValue:topBarTextFontSizeInput];
|
|
@@ -274,7 +282,7 @@
|
274
|
282
|
XCTAssertTrue([self.uut.navigationController.navigationBar.standardAppearance.titleTextAttributes[@"NSColor"] isEqual:expectedColor]);
|
275
|
283
|
}
|
276
|
284
|
|
277
|
|
--(void)testTopBarTextFontSize_withTextFontFamily_withTextColor {
|
|
285
|
+- (void)testTopBarTextFontSize_withTextFontFamily_withTextColor {
|
278
|
286
|
NSNumber* topBarTextFontSizeInput = @(15);
|
279
|
287
|
UIColor* inputColor = [RCTConvert UIColor:@(0xFFFF0000)];
|
280
|
288
|
NSString* inputFont = @"HelveticaNeue";
|
|
@@ -289,7 +297,7 @@
|
289
|
297
|
XCTAssertTrue([self.uut.navigationController.navigationBar.standardAppearance.titleTextAttributes[@"NSColor"] isEqual:expectedColor]);
|
290
|
298
|
}
|
291
|
299
|
|
292
|
|
--(void)testTopBarTextFontSize_withTextFontFamily_withoutTextColor {
|
|
300
|
+- (void)testTopBarTextFontSize_withTextFontFamily_withoutTextColor {
|
293
|
301
|
NSNumber* topBarTextFontSizeInput = @(15);
|
294
|
302
|
NSString* inputFont = @"HelveticaNeue";
|
295
|
303
|
self.options.topBar.title.fontSize = [[Number alloc] initWithValue:topBarTextFontSizeInput];
|
|
@@ -301,14 +309,14 @@
|
301
|
309
|
}
|
302
|
310
|
|
303
|
311
|
// TODO: Currently not passing
|
304
|
|
--(void)testTopBarTextFontFamily_invalidFont{
|
|
312
|
+- (void)testTopBarTextFontFamily_invalidFont{
|
305
|
313
|
NSString* inputFont = @"HelveticaNeueeeee";
|
306
|
314
|
__unused RNNStackController* nav = [self createNavigationController];
|
307
|
315
|
self.options.topBar.title.fontFamily = [[Text alloc] initWithValue:inputFont];
|
308
|
316
|
// XCTAssertThrows([self.uut viewWillAppear:false]);
|
309
|
317
|
}
|
310
|
318
|
|
311
|
|
--(void)testOrientation_portrait {
|
|
319
|
+- (void)testOrientation_portrait {
|
312
|
320
|
NSArray* supportedOrientations = @[@"portrait"];
|
313
|
321
|
self.options.layout.orientation = supportedOrientations;
|
314
|
322
|
__unused RNNStackController* nav = [self createNavigationController];
|
|
@@ -317,7 +325,7 @@
|
317
|
325
|
XCTAssertTrue(self.uut.navigationController.supportedInterfaceOrientations == expectedOrientation);
|
318
|
326
|
}
|
319
|
327
|
|
320
|
|
--(void)testOrientation_portraitString {
|
|
328
|
+- (void)testOrientation_portraitString {
|
321
|
329
|
NSString* supportedOrientation = @"portrait";
|
322
|
330
|
self.options.layout.orientation = supportedOrientation;
|
323
|
331
|
__unused RNNStackController* nav = [self createNavigationController];
|
|
@@ -326,7 +334,7 @@
|
326
|
334
|
XCTAssertTrue(self.uut.navigationController.supportedInterfaceOrientations == expectedOrientation);
|
327
|
335
|
}
|
328
|
336
|
|
329
|
|
--(void)testOrientation_portraitAndLandscape {
|
|
337
|
+- (void)testOrientation_portraitAndLandscape {
|
330
|
338
|
NSArray* supportedOrientations = @[@"portrait", @"landscape"];
|
331
|
339
|
self.options.layout.orientation = supportedOrientations;
|
332
|
340
|
__unused RNNStackController* nav = [self createNavigationController];
|
|
@@ -335,7 +343,7 @@
|
335
|
343
|
XCTAssertTrue(self.uut.navigationController.supportedInterfaceOrientations == expectedOrientation);
|
336
|
344
|
}
|
337
|
345
|
|
338
|
|
--(void)testOrientation_all {
|
|
346
|
+- (void)testOrientation_all {
|
339
|
347
|
NSArray* supportedOrientations = @[@"all"];
|
340
|
348
|
self.options.layout.orientation = supportedOrientations;
|
341
|
349
|
__unused RNNStackController* nav = [self createNavigationController];
|
|
@@ -344,7 +352,7 @@
|
344
|
352
|
XCTAssertTrue(self.uut.navigationController.supportedInterfaceOrientations == expectedOrientation);
|
345
|
353
|
}
|
346
|
354
|
|
347
|
|
--(void)testOrientation_default {
|
|
355
|
+- (void)testOrientation_default {
|
348
|
356
|
NSString* supportedOrientations = @"default";
|
349
|
357
|
self.options.layout.orientation = supportedOrientations;
|
350
|
358
|
__unused RNNStackController* nav = [self createNavigationController];
|
|
@@ -354,7 +362,7 @@
|
354
|
362
|
}
|
355
|
363
|
|
356
|
364
|
|
357
|
|
--(void)testOrientationTabsController_portrait {
|
|
365
|
+- (void)testOrientationTabsController_portrait {
|
358
|
366
|
NSArray* supportedOrientations = @[@"portrait"];
|
359
|
367
|
self.options.layout.orientation = supportedOrientations;
|
360
|
368
|
NSMutableArray* controllers = [[NSMutableArray alloc] initWithArray:@[self.uut]];
|
|
@@ -366,7 +374,7 @@
|
366
|
374
|
XCTAssertTrue(self.uut.tabBarController.supportedInterfaceOrientations == expectedOrientation);
|
367
|
375
|
}
|
368
|
376
|
|
369
|
|
--(void)testOrientationTabsController_portraitAndLandscape {
|
|
377
|
+- (void)testOrientationTabsController_portraitAndLandscape {
|
370
|
378
|
NSArray* supportedOrientations = @[@"portrait", @"landscape"];
|
371
|
379
|
self.options.layout.orientation = supportedOrientations;
|
372
|
380
|
NSMutableArray* controllers = [[NSMutableArray alloc] initWithArray:@[self.uut]];
|
|
@@ -378,7 +386,7 @@
|
378
|
386
|
XCTAssertTrue(self.uut.tabBarController.supportedInterfaceOrientations == expectedOrientation);
|
379
|
387
|
}
|
380
|
388
|
|
381
|
|
--(void)testOrientationTabsController_all {
|
|
389
|
+- (void)testOrientationTabsController_all {
|
382
|
390
|
NSArray* supportedOrientations = @[@"all"];
|
383
|
391
|
self.options.layout.orientation = supportedOrientations;
|
384
|
392
|
NSMutableArray* controllers = [[NSMutableArray alloc] initWithArray:@[self.uut]];
|
|
@@ -390,7 +398,7 @@
|
390
|
398
|
XCTAssertTrue(self.uut.tabBarController.supportedInterfaceOrientations == expectedOrientation);
|
391
|
399
|
}
|
392
|
400
|
|
393
|
|
--(void)testRightButtonsWithTitle_withoutStyle {
|
|
401
|
+- (void)testRightButtonsWithTitle_withoutStyle {
|
394
|
402
|
self.options.topBar.rightButtons = @[@{@"id": @"testId", @"text": @"test"}];
|
395
|
403
|
self.uut = [[RNNComponentViewController alloc] initWithLayoutInfo:nil rootViewCreator:nil eventEmitter:nil presenter:[RNNComponentPresenter new] options:self.options defaultOptions:nil];
|
396
|
404
|
RNNStackController* nav = [[RNNStackController alloc] initWithLayoutInfo:nil creator:_creator options:nil defaultOptions:nil presenter:nil eventEmitter:nil childViewControllers:@[self.uut]];
|
|
@@ -403,7 +411,7 @@
|
403
|
411
|
XCTAssertTrue(button.enabled);
|
404
|
412
|
}
|
405
|
413
|
|
406
|
|
--(void)testRightButtonsWithTitle_withStyle {
|
|
414
|
+- (void)testRightButtonsWithTitle_withStyle {
|
407
|
415
|
NSNumber* inputColor = @(0xFFFF0000);
|
408
|
416
|
|
409
|
417
|
self.options.topBar.rightButtons = @[@{@"id": @"testId", @"text": @"test", @"enabled": @false, @"buttonColor": inputColor, @"buttonFontSize": @22, @"buttonFontWeight": @"800"}];
|
|
@@ -420,7 +428,7 @@
|
420
|
428
|
//TODO: Determine how to tests buttonColor,buttonFontSize and buttonFontWeight?
|
421
|
429
|
}
|
422
|
430
|
|
423
|
|
--(void)testLeftButtonsWithTitle_withoutStyle {
|
|
431
|
+- (void)testLeftButtonsWithTitle_withoutStyle {
|
424
|
432
|
self.options.topBar.leftButtons = @[@{@"id": @"testId", @"text": @"test"}];
|
425
|
433
|
self.uut = [[RNNComponentViewController alloc] initWithLayoutInfo:nil rootViewCreator:nil eventEmitter:nil presenter:[RNNComponentPresenter new] options:self.options defaultOptions:nil];
|
426
|
434
|
RNNStackController* nav = [[RNNStackController alloc] initWithLayoutInfo:nil creator:_creator options:nil defaultOptions:nil presenter:nil eventEmitter:nil childViewControllers:@[self.uut]];
|
|
@@ -433,7 +441,7 @@
|
433
|
441
|
XCTAssertTrue(button.enabled);
|
434
|
442
|
}
|
435
|
443
|
|
436
|
|
--(void)testLeftButtonsWithTitle_withStyle {
|
|
444
|
+- (void)testLeftButtonsWithTitle_withStyle {
|
437
|
445
|
NSNumber* inputColor = @(0xFFFF0000);
|
438
|
446
|
|
439
|
447
|
self.options.topBar.leftButtons = @[@{@"id": @"testId", @"text": @"test", @"enabled": @false, @"buttonColor": inputColor, @"buttonFontSize": @22, @"buttonFontWeight": @"800"}];
|
|
@@ -450,7 +458,7 @@
|
450
|
458
|
//TODO: Determine how to tests buttonColor,buttonFontSize and buttonFontWeight?
|
451
|
459
|
}
|
452
|
460
|
|
453
|
|
--(void)testTopBarNoBorderOn {
|
|
461
|
+- (void)testTopBarNoBorderOn {
|
454
|
462
|
NSNumber* topBarNoBorderInput = @(1);
|
455
|
463
|
self.options.topBar.noBorder = [[Bool alloc] initWithValue:topBarNoBorderInput];
|
456
|
464
|
__unused RNNStackController* nav = [self createNavigationController];
|
|
@@ -458,22 +466,22 @@
|
458
|
466
|
XCTAssertNil(self.uut.navigationController.navigationBar.standardAppearance.shadowColor);
|
459
|
467
|
}
|
460
|
468
|
|
461
|
|
--(void)testTopBarNoBorderOff {
|
|
469
|
+- (void)testTopBarNoBorderOff {
|
462
|
470
|
NSNumber* topBarNoBorderInput = @(0);
|
463
|
471
|
self.options.topBar.noBorder = [[Bool alloc] initWithValue:topBarNoBorderInput];
|
464
|
472
|
__unused RNNStackController* nav = [self createNavigationController];
|
465
|
473
|
[self.uut viewWillAppear:false];
|
466
|
|
- XCTAssertEqual(self.uut.navigationController.navigationBar.standardAppearance.shadowColor, [UINavigationBarAppearance new].shadowColor);
|
|
474
|
+ XCTAssertTrue(CGColorEqualToColor(self.uut.navigationController.navigationBar.standardAppearance.shadowColor.CGColor, [UINavigationBarAppearance new].shadowColor.CGColor));
|
467
|
475
|
}
|
468
|
476
|
|
469
|
|
--(void)testStatusBarBlurOn {
|
|
477
|
+- (void)testStatusBarBlurOn {
|
470
|
478
|
NSNumber* statusBarBlurInput = @(1);
|
471
|
479
|
self.options.statusBar.blur = [[Bool alloc] initWithValue:statusBarBlurInput];
|
472
|
480
|
[self.uut viewWillAppear:false];
|
473
|
481
|
XCTAssertNotNil([self.uut.view viewWithTag:BLUR_STATUS_TAG]);
|
474
|
482
|
}
|
475
|
483
|
|
476
|
|
--(void)testStatusBarBlurOff {
|
|
484
|
+- (void)testStatusBarBlurOff {
|
477
|
485
|
NSNumber* statusBarBlurInput = @(0);
|
478
|
486
|
self.options.statusBar.blur = [[Bool alloc] initWithValue:statusBarBlurInput];
|
479
|
487
|
[self.uut viewWillAppear:false];
|
|
@@ -493,13 +501,13 @@
|
493
|
501
|
XCTAssertFalse([self.uut hidesBottomBarWhenPushed]);
|
494
|
502
|
}
|
495
|
503
|
|
496
|
|
--(void)testTopBarBlur_default {
|
|
504
|
+- (void)testTopBarBlur_default {
|
497
|
505
|
__unused RNNStackController* nav = [self createNavigationController];
|
498
|
506
|
[self.uut viewWillAppear:false];
|
499
|
507
|
XCTAssertNil([self.uut.navigationController.navigationBar viewWithTag:BLUR_TOPBAR_TAG]);
|
500
|
508
|
}
|
501
|
509
|
|
502
|
|
--(void)testTopBarBlur_false {
|
|
510
|
+- (void)testTopBarBlur_false {
|
503
|
511
|
NSNumber* topBarBlurInput = @(0);
|
504
|
512
|
self.options.topBar.background.blur = [[Bool alloc] initWithValue:topBarBlurInput];
|
505
|
513
|
__unused RNNStackController* nav = [self createNavigationController];
|
|
@@ -507,7 +515,7 @@
|
507
|
515
|
XCTAssertNil([self.uut.navigationController.navigationBar viewWithTag:BLUR_TOPBAR_TAG]);
|
508
|
516
|
}
|
509
|
517
|
|
510
|
|
--(void)testTopBarBlur_true {
|
|
518
|
+- (void)testTopBarBlur_true {
|
511
|
519
|
NSNumber* topBarBlurInput = @(1);
|
512
|
520
|
self.options.topBar.background.blur = [[Bool alloc] initWithValue:topBarBlurInput];
|
513
|
521
|
__unused RNNStackController* nav = [self createNavigationController];
|
|
@@ -515,7 +523,7 @@
|
515
|
523
|
XCTAssertNotNil([self.uut.navigationController.navigationBar viewWithTag:BLUR_TOPBAR_TAG]);
|
516
|
524
|
}
|
517
|
525
|
|
518
|
|
--(void)testBackgroundImage {
|
|
526
|
+- (void)testBackgroundImage {
|
519
|
527
|
Image* backgroundImage = [[Image alloc] initWithValue:[[UIImage alloc] init]];
|
520
|
528
|
self.options.backgroundImage = backgroundImage;
|
521
|
529
|
[self.uut viewWillAppear:false];
|