use of com.reactnativenavigation.viewcontrollers.bottomtabs.BottomTabsController in project react-native-navigation by wix.
the class NavigatorTest method popTo_FromCorrectStackUpToChild.
@Test
public void popTo_FromCorrectStackUpToChild() {
disablePushAnimation(child5);
StackController stack1 = newStack(child1);
StackController stack2 = newStack(child2, child3, child4);
BottomTabsController bottomTabsController = newTabs(Arrays.asList(stack1, stack2));
uut.setRoot(bottomTabsController, new CommandListenerAdapter(), reactInstanceManager);
idleMainLooper();
CommandListenerAdapter listener = spy(new CommandListenerAdapter() {
@Override
public void onSuccess(String childId) {
uut.popTo(child2.getId(), Options.EMPTY, new CommandListenerAdapter());
assertThat(stack2.getChildControllers()).containsOnly(child2);
}
});
stack2.push(child5, listener);
verify(listener).onSuccess(child5.getId());
}
Aggregations