Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
f3b01982
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
f3b01982
编写于
8月 10, 2022
作者:
H
hk_js
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
submit the testcase about invalid interface about window system
Signed-off-by:
N
hk_js
<
hekun18@huawei.com
>
上级
a194e903
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
162 addition
and
0 deletion
+162
-0
graphic/windowstandard/src/main/js/default/test/window.test.js
...ic/windowstandard/src/main/js/default/test/window.test.js
+162
-0
未找到文件。
graphic/windowstandard/src/main/js/default/test/window.test.js
浏览文件 @
f3b01982
...
...
@@ -1018,6 +1018,168 @@ describe('window_test', function () {
})
})
/**
* @tc.number SUB_WMS_setDimBehind_JSAPI_001
* @tc.name Test setDimBehindDeviceNotSupport_Test_001
* @tc.desc Set the setDimBehind interface invalid
*/
it
(
'
setDimBehindDeviceNotSupport_Test_001
'
,
0
,
function
(
done
)
{
console
.
info
(
'
windowTest setDimBehindDeviceNotSupport begin
'
);
window
.
getTopWindow
().
then
(
wnd
=>
{
console
.
info
(
'
windowTest setDimBehindDeviceNotSupport1 getTopWindow wnd
'
+
wnd
);
expect
(
wnd
!=
null
).
assertTrue
();
wnd
.
setDimBehind
(
0.5
).
then
(()
=>
{
console
.
info
(
'
windowTest setDimBehind1 not support success
'
);
expect
().
assertFail
();
done
();
},
err
=>
{
console
.
info
(
'
windowTest setDimBehind1 failed: err
'
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
).
assertEqual
(
801
);
done
();
})
},
(
err
)
=>
{
console
.
log
(
'
windowTest setDimBehind1 getTopWindow failed: err
'
+
JSON
.
stringify
(
err
));
expect
().
assertFail
();
done
();
})
})
/**
* @tc.number SUB_WMS_setDimBehind_JSAPI_002
* @tc.name Test setDimBehindDeviceNotSupport_Test_002
* @tc.desc Set the setDimBehind interface invalid
*/
it
(
'
setDimBehindDeviceNotSupport_Test_002
'
,
0
,
function
(
done
)
{
console
.
info
(
'
windowTest setDimBehindDeviceNotSupport2 begin
'
);
window
.
getTopWindow
().
then
(
wnd
=>
{
console
.
info
(
'
windowTest setDimBehindDeviceNotSupport2 getTopWindow wnd
'
+
wnd
);
expect
(
wnd
!=
null
).
assertTrue
();
wnd
.
setDimBehind
(
0.5
,(
err
,
data
)
=>
{
if
(
err
.
code
)
{
console
.
error
(
'
Failed to set the dimness2. Cause:
'
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
).
assertEqual
(
801
);
done
();
}
else
{
console
.
info
(
'
windowTest setDimBehind2 not support success
'
);
expect
().
assertFail
();
done
();
}
})
},
(
err
)
=>
{
console
.
log
(
'
windowTest setDimBehind2 getTopWindow failed: err
'
+
JSON
.
stringify
(
err
));
expect
().
assertFail
();
done
();
})
})
/**
* @tc.number SUB_WMS_setOutsideTouchable_JSAPI_001
* @tc.name Test setOutsideTouchableDeviceNotSupport_Test_001
* @tc.desc Set the setOutsideTouchable interface invalid
*/
it
(
'
setOutsideTouchable_Test_001
'
,
0
,
function
(
done
)
{
console
.
info
(
'
windowTest setDimBehindDeviceNotSupport1 begin
'
);
window
.
getTopWindow
().
then
(
wnd
=>
{
console
.
info
(
'
windowTest setOutsideTouchable1 getTopWindow wnd
'
+
wnd
);
expect
(
wnd
!=
null
).
assertTrue
();
wnd
.
setOutsideTouchable
(
true
).
then
(()
=>
{
console
.
info
(
'
windowTest setOutsideTouchable1 not support success
'
);
expect
().
assertFail
();
done
();
},
err
=>
{
console
.
info
(
'
windowTest setOutsideTouchable1 failed: err
'
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
).
assertEqual
(
801
);
done
();
})
},
(
err
)
=>
{
console
.
log
(
'
windowTest setOutsideTouchable1 getTopWindow failed: err
'
+
JSON
.
stringify
(
err
));
expect
().
assertFail
();
done
();
})
})
/**
* @tc.number SUB_WMS_setOutsideTouchable__JSAPI_002
* @tc.name Test setOutsideTouchableDeviceNotSupport_Test_002
* @tc.desc Set the setOutsideTouchable interface invalid
*/
it
(
'
setOutsideTouchable_Test_002
'
,
0
,
function
(
done
)
{
console
.
info
(
'
windowTest setDimBehindDeviceNotSupport2 begin
'
);
window
.
getTopWindow
().
then
(
wnd
=>
{
console
.
info
(
'
windowTest setOutsideTouchable2 getTopWindow wnd
'
+
wnd
);
expect
(
wnd
!=
null
).
assertTrue
();
wnd
.
setOutsideTouchable
(
false
).
then
(()
=>
{
console
.
info
(
'
windowTest setOutsideTouchable2 not support success
'
);
expect
().
assertFail
();
done
();
},
err
=>
{
console
.
info
(
'
windowTest setOutsideTouchable2 failed: err
'
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
).
assertEqual
(
801
);
done
();
})
},
(
err
)
=>
{
console
.
log
(
'
windowTest setOutsideTouchable2 getTopWindow failed: err
'
+
JSON
.
stringify
(
err
));
expect
().
assertFail
();
done
();
})
})
/**
* @tc.number SUB_WMS_setOutsideTouchable_JSAPI_003
* @tc.name Test setOutsideTouchable_Test_003
* @tc.desc Set the setOutsideTouchable interface invalid
*/
it
(
'
setOutsideTouchable_Test_003
'
,
0
,
function
(
done
)
{
console
.
info
(
'
windowTest setOutsideTouchable3 begin
'
);
window
.
getTopWindow
().
then
(
wnd
=>
{
console
.
info
(
'
windowTest setOutsideTouchable3 getTopWindow wnd
'
+
wnd
);
expect
(
wnd
!=
null
).
assertTrue
();
wnd
.
setOutsideTouchable
(
true
,
(
err
,
data
)
=>
{
if
(
err
.
code
)
{
console
.
error
(
'
Failed to set the area to be touchable1. Cause:
'
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
).
assertEqual
(
801
);
done
();
}
else
{
console
.
info
(
'
windowTest setOutsideTouchable3 not support success
'
);
expect
().
assertFail
();
done
();
}
})
},
(
err
)
=>
{
console
.
log
(
'
windowTest setOutsideTouchable3 getTopWindow failed: err
'
+
JSON
.
stringify
(
err
));
expect
().
assertFail
();
done
();
})
})
/**
* @tc.number SUB_WMS_setOutsideTouchable_JSAPI_004
* @tc.name Test setOutsideTouchable_Test_004
* @tc.desc Set the setOutsideTouchable interface invalid
*/
it
(
'
setOutsideTouchable_Test_004
'
,
0
,
function
(
done
)
{
console
.
info
(
'
windowTest setOutsideTouchable4 begin
'
);
window
.
getTopWindow
().
then
(
wnd
=>
{
console
.
info
(
'
windowTest setOutsideTouchable4 getTopWindow wnd
'
+
wnd
);
expect
(
wnd
!=
null
).
assertTrue
();
wnd
.
setOutsideTouchable
(
false
,
(
err
,
data
)
=>
{
if
(
err
.
code
)
{
console
.
error
(
'
Failed to set the area to be touchable4. Cause:
'
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
).
assertEqual
(
801
);
done
();
}
else
{
console
.
info
(
'
windowTest setOutsideTouchable4 not support success
'
);
expect
().
assertFail
();
done
();
}
})
},
(
err
)
=>
{
console
.
log
(
'
windowTest setOutsideTouchable4 getTopWindow failed: err
'
+
JSON
.
stringify
(
err
));
expect
().
assertFail
();
done
();
})
})
/**
* @tc.number SUB_WMS_ONOFF_JSAPI_001
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录