|
@@ -412,6 +412,22 @@ public class NavigatorTest extends BaseTest {
|
412
|
412
|
verify(parentController, times(2)).onViewAppeared();
|
413
|
413
|
}
|
414
|
414
|
|
|
415
|
+ @Test
|
|
416
|
+ public void dismissModal_rootIsAttachedBeforeModalIsDismissed() {
|
|
417
|
+ disableShowModalAnimation(child1, child2);
|
|
418
|
+ disableDismissModalAnimation(child2);
|
|
419
|
+
|
|
420
|
+ uut.setRoot(parentController, new MockPromise());
|
|
421
|
+ uut.showModal(child1, new CommandListenerAdapter());
|
|
422
|
+ uut.showModal(child2, new CommandListenerAdapter());
|
|
423
|
+
|
|
424
|
+ uut.dismissModal(child2.getId(), new CommandListenerAdapter());
|
|
425
|
+ assertThat(parentController.getView().getParent()).isNull();
|
|
426
|
+
|
|
427
|
+ uut.dismissModal(child1.getId(), new CommandListenerAdapter());
|
|
428
|
+ assertThat(parentController.getView().getParent()).isNotNull();
|
|
429
|
+ }
|
|
430
|
+
|
415
|
431
|
@Test
|
416
|
432
|
public void dismissAllModals_onViewAppearedInvokedOnRoot() {
|
417
|
433
|
disableShowModalAnimation(child1);
|