提交 944e6ac1 编写于 作者: H hk_js

fix the fail case and add properties case

Signed-off-by: Nhk_js <hekun18@huawei.com>
上级 1dae22cc
......@@ -176,6 +176,7 @@ describe('window_test', function () {
expect(wnd != null).assertTrue();
wnd.getAvoidArea(window.AvoidAreaType.TYPE_SYSTEM).then((data) => {
console.log('windowTest getAvoidAreaTest1 wnd.getAvoidArea success, data :' + JSON.stringify(data));
expect(data.visible).assertTrue();
expect(data.rightRect != null).assertTrue();
expect(data.topRect != null).assertTrue();
expect(data.bottomRect != null).assertTrue();
......@@ -205,6 +206,7 @@ describe('window_test', function () {
expect(wnd != null).assertTrue();
wnd.getAvoidArea(window.AvoidAreaType.TYPE_CUTOUT).then((data) => {
console.log('windowTest getAvoidAreaTest2 wnd.getAvoidArea success, data :' + JSON.stringify(data));
expect(!data.visible).assertTrue();
expect(data.rightRect != null).assertTrue();
expect(data.topRect != null).assertTrue();
expect(data.bottomRect != null).assertTrue();
......@@ -234,6 +236,7 @@ describe('window_test', function () {
expect(wnd != null).assertTrue();
wnd.getAvoidArea(avoidAreaType).then((data) => {
console.log('windowTest getAvoidAreaTest3 wnd.getAvoidArea success, data :' + JSON.stringify(data));
expect(data.visible).assertTrue();
expect(data.rightRect != null).assertTrue();
expect(data.topRect != null).assertTrue();
expect(data.bottomRect != null).assertTrue();
......@@ -267,6 +270,7 @@ describe('window_test', function () {
expect().assertFail();
done();
} else {
expect(data.visible).assertTrue();
expect(data.topRect != null).assertTrue();
expect(data.rightRect != null).assertTrue();
expect(data.bottomRect != null).assertTrue();
......@@ -293,6 +297,7 @@ describe('window_test', function () {
expect().assertFail();
done();
} else {
expect(!data.visible).assertTrue();
expect(data.topRect != null).assertTrue();
expect(data.rightRect != null).assertTrue();
expect(data.bottomRect != null).assertTrue();
......@@ -324,6 +329,7 @@ describe('window_test', function () {
expect().assertFail();
done();
} else {
expect(data.visible).assertTrue();
expect(data.topRect != null).assertTrue();
expect(data.rightRect != null).assertTrue();
expect(data.bottomRect != null).assertTrue();
......@@ -3489,6 +3495,7 @@ describe('window_test', function () {
expect().assertFail();
done();
} else {
expect(data.visible).assertTrue();
expect(data.topRect != null).assertTrue();
expect(data.rightRect != null).assertTrue();
expect(data.bottomRect != null).assertTrue();
......@@ -3513,13 +3520,10 @@ describe('window_test', function () {
console.info('windowTest getAvoidAreaTestAdd2' + JSON.stringify(data));
if (err.code != 0) {
console.log('windowTest getAvoidAreaTestAdd002 wnd.getAvoidArea callback fail' + JSON.stringify(err));
expect().assertFail();
expect(err.code).assertEqual(1003);
done();
} else {
expect(data.topRect != null).assertTrue();
expect(data.rightRect != null).assertTrue();
expect(data.bottomRect != null).assertTrue();
expect(data.leftRect != null).assertTrue();
expect().assertFail();
done();
}
})
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册