提交 e25c29f7 编写于 作者: Z zhouke

modify.Signed-off-by: <zhouke35@huawei.com>.

Signed-off-by: Nzhouke <zhouke35@huawei.com>
上级 27f41bf6
...@@ -737,9 +737,12 @@ export default function UiTest() { ...@@ -737,9 +737,12 @@ export default function UiTest() {
expect(mode2 == WindowMode.FLOATING).assertTrue() expect(mode2 == WindowMode.FLOATING).assertTrue()
await stopApplication('com.uitestScene.acts') await stopApplication('com.uitestScene.acts')
} }
catch(err: any){ catch (err) {
if (err.message == 'this device can not support this action') {
expect(window1 != null).assertTrue() expect(window1 != null).assertTrue()
await stopApplication('com.uitestScene.acts') } else {
expect(false).assertTrue()
}
} }
}) })
...@@ -795,9 +798,12 @@ export default function UiTest() { ...@@ -795,9 +798,12 @@ export default function UiTest() {
expect(bounds1 != bounds2).assertTrue() expect(bounds1 != bounds2).assertTrue()
await stopApplication('com.uitestScene.acts') await stopApplication('com.uitestScene.acts')
} }
catch(err: any){ catch (err) {
if (err.message == 'this device can not support this action') {
expect(window != null).assertTrue() expect(window != null).assertTrue()
await stopApplication('com.uitestScene.acts') } else {
expect(false).assertTrue()
}
} }
}) })
...@@ -838,9 +844,12 @@ export default function UiTest() { ...@@ -838,9 +844,12 @@ export default function UiTest() {
expect(bounds5 != bounds4).assertTrue() expect(bounds5 != bounds4).assertTrue()
await stopApplication('com.uitestScene.acts') await stopApplication('com.uitestScene.acts')
} }
catch(err: any){ catch (err) {
if (err.message == 'this device can not support this action') {
expect(window != null).assertTrue() expect(window != null).assertTrue()
await stopApplication('com.uitestScene.acts') } else {
expect(false).assertTrue()
}
} }
}) })
...@@ -877,9 +886,12 @@ export default function UiTest() { ...@@ -877,9 +886,12 @@ export default function UiTest() {
await stopApplication('com.uitestScene.acts') await stopApplication('com.uitestScene.acts')
} }
catch(err: any){ catch (err) {
if (err.message == 'this device can not support this action') {
expect(window != null).assertTrue() expect(window != null).assertTrue()
await stopApplication('com.uitestScene.acts') } else {
expect(false).assertTrue()
}
} }
}) })
...@@ -919,9 +931,12 @@ export default function UiTest() { ...@@ -919,9 +931,12 @@ export default function UiTest() {
expect(mode == WindowMode.FULLSCREEN).assertTrue() expect(mode == WindowMode.FULLSCREEN).assertTrue()
await stopApplication('com.uitestScene.acts') await stopApplication('com.uitestScene.acts')
} }
catch(err: any){ catch (err) {
if (err.message == 'this device can not support this action') {
expect(window != null).assertTrue() expect(window != null).assertTrue()
await stopApplication('com.uitestScene.acts') } else {
expect(false).assertTrue()
}
} }
}) })
...@@ -942,9 +957,12 @@ export default function UiTest() { ...@@ -942,9 +957,12 @@ export default function UiTest() {
expect(window1 == null).assertTrue() expect(window1 == null).assertTrue()
await stopApplication('com.uitestScene.acts') await stopApplication('com.uitestScene.acts')
} }
catch(err: any){ catch (err) {
if (err.message == 'this device can not support this action') {
expect(window != null).assertTrue() expect(window != null).assertTrue()
await stopApplication('com.uitestScene.acts') } else {
expect(false).assertTrue()
}
} }
}) })
...@@ -964,9 +982,12 @@ export default function UiTest() { ...@@ -964,9 +982,12 @@ export default function UiTest() {
let window1 = await driver.findWindow({bundleName:'com.uitestScene.acts'}) let window1 = await driver.findWindow({bundleName:'com.uitestScene.acts'})
expect(window1 == null).assertTrue() expect(window1 == null).assertTrue()
} }
catch(err: any){ catch (err) {
if (err.message == 'this device can not support this action') {
expect(window != null).assertTrue() expect(window != null).assertTrue()
await stopApplication('com.uitestScene.acts') } else {
expect(false).assertTrue()
}
} }
}) })
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册