use of com.reactnativenavigation.options.params.Bool in project react-native-navigation by wix.
the class ButtonPresenterTest method applyColor_shouldChangeDisabledColor.
@Test
public void applyColor_shouldChangeDisabledColor() {
button.enabled = new Bool(false);
MenuItem menuItem = addMenuButton();
uut.applyOptions(titleBar, menuItem, buttonController::getView);
ThemeColour disabledColor = new ThemeColour(new Colour(Color.BLUE), new Colour(Color.BLUE));
uut.applyDisabledColor(titleBar, menuItem, disabledColor);
assertThat(findButtonView().getCurrentTextColor()).isEqualTo(Color.BLUE);
}
use of com.reactnativenavigation.options.params.Bool in project react-native-navigation by wix.
the class TopBarButtonControllerTest method disableIconTint.
@Test
public void disableIconTint() {
setIconButton(false);
button.disableIconTint = new Bool(true);
uut.addToMenu(getTitleBar(), 0);
verify(optionsPresenter, times(0)).tint(any(), anyInt());
}
use of com.reactnativenavigation.options.params.Bool in project react-native-navigation by wix.
the class ModalPresenterTest method showModal_waitForRender.
@Test
public void showModal_waitForRender() {
modal1.options.animations.showModal.setWaitForRender(new Bool(true));
uut.showModal(modal1, root, new CommandListenerAdapter());
verify(modal1).addOnAppearedListener(any());
verifyNoInteractions(animator);
}
use of com.reactnativenavigation.options.params.Bool in project react-native-navigation by wix.
the class NavigatorTest method setRoot_withWaitForRender.
@Test
public void setRoot_withWaitForRender() {
ViewController<?> initialRoot = spy(child2);
uut.setRoot(initialRoot, new CommandListenerAdapter(), reactInstanceManager);
child3.options.animations.setRoot.getEnter().waitForRender = new Bool(true);
ViewController<?> secondRoot = spy(child3);
CommandListenerAdapter listener = spy(new CommandListenerAdapter());
uut.setRoot(secondRoot, listener, reactInstanceManager);
verify(secondRoot).addOnAppearedListener(any());
// make isRendered return true and trigger onViewAppeared
secondRoot.getView().addView(new View(activity));
idleMainLooper();
assertThat(initialRoot.isDestroyed()).isTrue();
assertThat(secondRoot.isViewShown()).isEqualTo(true);
}
use of com.reactnativenavigation.options.params.Bool in project react-native-navigation by wix.
the class ViewControllerTest method isRendered_falseIfViewIsNotCreated.
@Test
public void isRendered_falseIfViewIsNotCreated() {
uut.setWaitForRender(new Bool(true));
assertThat(uut.isRendered()).isFalse();
}
Aggregations