未验证 提交 88339acc 编写于 作者: O openharmony_ci 提交者: Gitee

!5201 【窗口子系统】适配用例 & 增加属性返回值校验

Merge pull request !5201 from hekun/master
......@@ -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.
先完成此消息的编辑!
想要评论请 注册