Browse Source

fixed e2e dismissModal #962

Daniel Zlotin 7 years ago
parent
commit
e04d175880
2 changed files with 4 additions and 2 deletions
  1. 1
    1
      e2e/app.test.js
  2. 3
    1
      lib/ios/RNNModalManager.m

+ 1
- 1
e2e/app.test.js View File

@@ -191,7 +191,7 @@ describe('screen style - static', () => {
191 191
     await device.relaunchApp();
192 192
   });
193 193
 
194
-  it.only('declare a navigationStyle on container component', async () => {
194
+  it('declare a navigationStyle on container component', async () => {
195 195
     await elementByLabel('Push').tap();
196 196
     await expect(element(by.label('Static Title').and(by.type('UILabel')))).toBeVisible();
197 197
   });

+ 3
- 1
lib/ios/RNNModalManager.m View File

@@ -39,7 +39,9 @@
39 39
 		return;
40 40
 	}
41 41
 	
42
-	if (modalToDismiss == [self topPresentedVC]) {
42
+	UIViewController* topPresentedVC = [self topPresentedVC];
43
+	
44
+	if (modalToDismiss == topPresentedVC || [[topPresentedVC childViewControllers] containsObject:modalToDismiss]) {
43 45
 		[modalToDismiss dismissViewControllerAnimated:YES completion:^{
44 46
 			[[_store pendingModalIdsToDismiss] removeObject:containerId];
45 47
 			[self removePendingNextModalIfOnTop];