Skip to content

Commit

Permalink
Revert "Always resolve dismissAllModals promise (wix#6054)"
Browse files Browse the repository at this point in the history
This reverts commit a193c8f.
  • Loading branch information
pawlitos authored Apr 8, 2020
1 parent d2d94a6 commit 00b09b7
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ public void onSuccess(String childId) {

public void dismissAllModals(ViewController root, Options mergeOptions, CommandListener listener) {
if (modals.isEmpty()) {
listener.onSuccess(root.getId());
return;
}
String topModalId = peek().getId();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,13 +173,6 @@ public void onSuccess(String childId) {
verifyZeroInteractions(listener);
}

@Test
public void dismissAllModals_resolveSuccessfullyIfEmpty() {
CommandListener spy = spy(new CommandListenerAdapter());
uut.dismissAllModals(root, Options.EMPTY, spy);
verify(spy, times(1)).onSuccess(root.getId());
}

@Test
public void dismissAllModals_optionsAreMergedOnTopModal() {
uut.showModal(modal1, root, new CommandListenerAdapter());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,6 @@ public void dismissModal_rejectIfRootIsNotSetAndSingleModalIsDisplayed() {
public void dismissAllModals_onViewAppearedInvokedOnRoot() {
disablePushAnimation(child2);
disableShowModalAnimation(child1);
uut.setRoot(child3, new CommandListenerAdapter(), reactInstanceManager);

uut.dismissAllModals(Options.EMPTY, new CommandListenerAdapter());
verify(parentVisibilityListener, times(0)).onViewAppeared(parentController.getView());
Expand Down

0 comments on commit 00b09b7

Please sign in to comment.