Browse Source

Fix unit tests Android

Stack related options are applied only if the view is visible, for now this is a reasonable fix.
Guy Carmeli 6 years ago
parent
commit
5d54ed5bf9

+ 6
- 1
lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/OptionsApplyingTest.java View File

66
                 (activity1, componentId, componentName) -> view,
66
                 (activity1, componentId, componentName) -> view,
67
                 initialNavigationOptions,
67
                 initialNavigationOptions,
68
                 new OptionsPresenter(activity, new Options())
68
                 new OptionsPresenter(activity, new Options())
69
-        );
69
+        ) {
70
+            @Override
71
+            public boolean isViewShown() {
72
+                return true;
73
+            }
74
+        };
70
         TopBarController topBarController = new TopBarController() {
75
         TopBarController topBarController = new TopBarController() {
71
             @Override
76
             @Override
72
             protected TopBar createTopBar(Context context, TopBarBackgroundViewController topBarBackgroundViewController, StackLayout stackLayout) {
77
             protected TopBar createTopBar(Context context, TopBarBackgroundViewController topBarBackgroundViewController, StackLayout stackLayout) {