浏览代码

support for iOS 11

Daniel Zlotin 8 年前
父节点
当前提交
df1ee59b48
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5
    1
      e2e/TopLevelApi.test.js

+ 5
- 1
e2e/TopLevelApi.test.js 查看文件

34
   it('unmount is called on pop', async () => {
34
   it('unmount is called on pop', async () => {
35
     await elementByLabel('Push Lifecycle Screen').tap();
35
     await elementByLabel('Push Lifecycle Screen').tap();
36
     await expect(elementByLabel('didAppear')).toBeVisible();
36
     await expect(elementByLabel('didAppear')).toBeVisible();
37
-    await element(by.traits(['button']).and(by.label('Back'))).tap();
37
+    try {
38
+      await element(by.trait(['button']).and(by.label('Back'))).tap();
39
+    } catch (err) {
40
+      await element(by.type('_UIModernBarButton').and(by.label('Back'))).tap();
41
+    }
38
     await expect(elementByLabel('didDisappear')).toBeVisible();
42
     await expect(elementByLabel('didDisappear')).toBeVisible();
39
     await expect(elementByLabel('componentWillUnmount')).toBeVisible();
43
     await expect(elementByLabel('componentWillUnmount')).toBeVisible();
40
   });
44
   });