|
@@ -5,6 +5,7 @@ import android.app.Activity;
|
5
|
5
|
import android.content.Context;
|
6
|
6
|
import android.view.View;
|
7
|
7
|
import android.view.ViewGroup;
|
|
8
|
+import android.widget.FrameLayout;
|
8
|
9
|
|
9
|
10
|
import com.reactnativenavigation.BaseTest;
|
10
|
11
|
import com.reactnativenavigation.TestUtils;
|
|
@@ -915,6 +916,21 @@ public class StackControllerTest extends BaseTest {
|
915
|
916
|
verify(presenter, times(0)).mergeChildOptions(any(), any(), any());
|
916
|
917
|
}
|
917
|
918
|
|
|
919
|
+ @Test
|
|
920
|
+ public void resolvedOptionsAreAppliedWhenStackIsAttachedToParentAndNotVisible() {
|
|
921
|
+ FrameLayout parent = new FrameLayout(activity);
|
|
922
|
+ activity.setContentView(parent);
|
|
923
|
+
|
|
924
|
+ ViewController child = new SimpleViewController(activity, childRegistry, "child1", new Options());
|
|
925
|
+ StackController stack = createStack(Collections.singletonList(child));
|
|
926
|
+ stack.getView().setVisibility(View.INVISIBLE);
|
|
927
|
+
|
|
928
|
+ parent.addView(stack.getView());
|
|
929
|
+
|
|
930
|
+ Component component = (Component) child.getView();
|
|
931
|
+ verify(presenter).applyChildOptions(any(), eq(component));
|
|
932
|
+ }
|
|
933
|
+
|
918
|
934
|
@Test
|
919
|
935
|
public void destroy() {
|
920
|
936
|
uut.ensureViewIsCreated();
|