Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
55bdbb89
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看板
未验证
提交
55bdbb89
编写于
5月 17, 2022
作者:
O
openharmony_ci
提交者:
Gitee
5月 17, 2022
浏览文件
操作
浏览文件
下载
差异文件
!3188 【窗口子系统】整改XTS用例
Merge pull request !3188 from liziqiang/master
上级
f8d517ac
f9d4449a
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
65 addition
and
7 deletion
+65
-7
graphic/windowstandard/src/main/js/default/test/display.test.js
...c/windowstandard/src/main/js/default/test/display.test.js
+36
-0
graphic/windowstandard/src/main/js/default/test/window.test.js
...ic/windowstandard/src/main/js/default/test/window.test.js
+29
-7
未找到文件。
graphic/windowstandard/src/main/js/default/test/display.test.js
浏览文件 @
55bdbb89
...
@@ -41,6 +41,15 @@ describe('display_test', function () {
...
@@ -41,6 +41,15 @@ describe('display_test', function () {
expect
(
dsp
.
refreshRate
!=
null
).
assertTrue
();
expect
(
dsp
.
refreshRate
!=
null
).
assertTrue
();
expect
(
dsp
.
width
!=
null
).
assertTrue
();
expect
(
dsp
.
width
!=
null
).
assertTrue
();
expect
(
dsp
.
height
!=
null
).
assertTrue
();
expect
(
dsp
.
height
!=
null
).
assertTrue
();
expect
(
dsp
.
rotation
!=
null
).
assertTrue
();
expect
(
dsp
.
densityDPI
!=
null
).
assertTrue
();
expect
(
dsp
.
name
).
assertEqual
(
undefined
);
expect
(
dsp
.
alive
).
assertEqual
(
undefined
);
expect
(
dsp
.
state
).
assertEqual
(
undefined
);
expect
(
dsp
.
densityPixels
).
assertEqual
(
undefined
);
expect
(
dsp
.
scaledDensity
).
assertEqual
(
undefined
);
expect
(
dsp
.
xDPI
).
assertEqual
(
undefined
);
expect
(
dsp
.
yDPI
).
assertEqual
(
undefined
);
done
();
done
();
},
(
err
)
=>
{
},
(
err
)
=>
{
console
.
log
(
'
displayTest getDefaultDisplayTest1 getDefaultDisplay failed, err :
'
+
JSON
.
stringify
(
err
));
console
.
log
(
'
displayTest getDefaultDisplayTest1 getDefaultDisplay failed, err :
'
+
JSON
.
stringify
(
err
));
...
@@ -67,6 +76,15 @@ describe('display_test', function () {
...
@@ -67,6 +76,15 @@ describe('display_test', function () {
expect
(
data
.
refreshRate
!=
null
).
assertTrue
();
expect
(
data
.
refreshRate
!=
null
).
assertTrue
();
expect
(
data
.
width
!=
null
).
assertTrue
();
expect
(
data
.
width
!=
null
).
assertTrue
();
expect
(
data
.
height
!=
null
).
assertTrue
();
expect
(
data
.
height
!=
null
).
assertTrue
();
expect
(
data
.
rotation
!=
null
).
assertTrue
();
expect
(
data
.
densityDPI
!=
null
).
assertTrue
();
expect
(
data
.
name
).
assertEqual
(
undefined
);
expect
(
data
.
alive
).
assertEqual
(
undefined
);
expect
(
data
.
state
).
assertEqual
(
undefined
);
expect
(
data
.
densityPixels
).
assertEqual
(
undefined
);
expect
(
data
.
scaledDensity
).
assertEqual
(
undefined
);
expect
(
data
.
xDPI
).
assertEqual
(
undefined
);
expect
(
data
.
yDPI
).
assertEqual
(
undefined
);
done
();
done
();
}
}
})
})
...
@@ -85,6 +103,15 @@ describe('display_test', function () {
...
@@ -85,6 +103,15 @@ describe('display_test', function () {
expect
(
dsp
[
0
].
refreshRate
!=
null
).
assertTrue
();
expect
(
dsp
[
0
].
refreshRate
!=
null
).
assertTrue
();
expect
(
dsp
[
0
].
width
!=
null
).
assertTrue
();
expect
(
dsp
[
0
].
width
!=
null
).
assertTrue
();
expect
(
dsp
[
0
].
height
!=
null
).
assertTrue
();
expect
(
dsp
[
0
].
height
!=
null
).
assertTrue
();
expect
(
dsp
[
0
].
rotation
!=
null
).
assertTrue
();
expect
(
dsp
[
0
].
densityDPI
!=
null
).
assertTrue
();
expect
(
dsp
[
0
].
name
).
assertEqual
(
undefined
);
expect
(
dsp
[
0
].
alive
).
assertEqual
(
undefined
);
expect
(
dsp
[
0
].
state
).
assertEqual
(
undefined
);
expect
(
dsp
[
0
].
densityPixels
).
assertEqual
(
undefined
);
expect
(
dsp
[
0
].
scaledDensity
).
assertEqual
(
undefined
);
expect
(
dsp
[
0
].
xDPI
).
assertEqual
(
undefined
);
expect
(
dsp
[
0
].
yDPI
).
assertEqual
(
undefined
);
done
();
done
();
},
(
err
)
=>
{
},
(
err
)
=>
{
console
.
log
(
'
displayTest getAllDisplayTest1 getAllDisplay failed, err :
'
+
JSON
.
stringify
(
err
));
console
.
log
(
'
displayTest getAllDisplayTest1 getAllDisplay failed, err :
'
+
JSON
.
stringify
(
err
));
...
@@ -110,6 +137,15 @@ describe('display_test', function () {
...
@@ -110,6 +137,15 @@ describe('display_test', function () {
expect
(
data
[
0
].
refreshRate
!=
null
).
assertTrue
();
expect
(
data
[
0
].
refreshRate
!=
null
).
assertTrue
();
expect
(
data
[
0
].
width
!=
null
).
assertTrue
();
expect
(
data
[
0
].
width
!=
null
).
assertTrue
();
expect
(
data
[
0
].
height
!=
null
).
assertTrue
();
expect
(
data
[
0
].
height
!=
null
).
assertTrue
();
expect
(
data
[
0
].
rotation
!=
null
).
assertTrue
();
expect
(
data
[
0
].
densityDPI
!=
null
).
assertTrue
();
expect
(
data
[
0
].
name
).
assertEqual
(
undefined
);
expect
(
data
[
0
].
alive
).
assertEqual
(
undefined
);
expect
(
data
[
0
].
state
).
assertEqual
(
undefined
);
expect
(
data
[
0
].
densityPixels
).
assertEqual
(
undefined
);
expect
(
data
[
0
].
scaledDensity
).
assertEqual
(
undefined
);
expect
(
data
[
0
].
xDPI
).
assertEqual
(
undefined
);
expect
(
data
[
0
].
yDPI
).
assertEqual
(
undefined
);
done
();
done
();
}
}
})
})
...
...
graphic/windowstandard/src/main/js/default/test/window.test.js
浏览文件 @
55bdbb89
...
@@ -106,6 +106,9 @@ describe('window_test', function () {
...
@@ -106,6 +106,9 @@ describe('window_test', function () {
expect
(
!
data
.
isKeepScreenOn
).
assertTrue
();
expect
(
!
data
.
isKeepScreenOn
).
assertTrue
();
expect
(
!
data
.
isTransparent
).
assertTrue
();
expect
(
!
data
.
isTransparent
).
assertTrue
();
expect
(
data
.
brightness
!=
null
).
assertTrue
();
expect
(
data
.
brightness
!=
null
).
assertTrue
();
expect
(
data
.
dimBehindValue
).
assertEqual
(
undefined
);
expect
(
!
data
.
isRoundCorner
).
assertTrue
();
expect
(
!
data
.
isPrivacyMode
).
assertTrue
();
done
();
done
();
},
(
err
)
=>
{
},
(
err
)
=>
{
console
.
log
(
'
windowTest getPropertiesTest1 wnd.getProperties failed, err :
'
+
JSON
.
stringify
(
err
));
console
.
log
(
'
windowTest getPropertiesTest1 wnd.getProperties failed, err :
'
+
JSON
.
stringify
(
err
));
...
@@ -147,6 +150,9 @@ describe('window_test', function () {
...
@@ -147,6 +150,9 @@ describe('window_test', function () {
expect
(
!
data
.
isKeepScreenOn
).
assertTrue
();
expect
(
!
data
.
isKeepScreenOn
).
assertTrue
();
expect
(
!
data
.
isTransparent
).
assertTrue
();
expect
(
!
data
.
isTransparent
).
assertTrue
();
expect
(
data
.
brightness
!=
null
).
assertTrue
();
expect
(
data
.
brightness
!=
null
).
assertTrue
();
expect
(
data
.
dimBehindValue
).
assertEqual
(
undefined
);
expect
(
!
data
.
isRoundCorner
).
assertTrue
();
expect
(
!
data
.
isPrivacyMode
).
assertTrue
();
done
();
done
();
}
}
})
})
...
@@ -1883,7 +1889,7 @@ describe('window_test', function () {
...
@@ -1883,7 +1889,7 @@ describe('window_test', function () {
*/
*/
it
(
'
setScreenActiveMode_Test_001
'
,
0
,
async
function
(
done
)
{
it
(
'
setScreenActiveMode_Test_001
'
,
0
,
async
function
(
done
)
{
console
.
log
(
'
screenshotTest setScreenActiveModeTest1 begin
'
);
console
.
log
(
'
screenshotTest setScreenActiveModeTest1 begin
'
);
screen
.
getAllScreen
().
then
(
src
=>
{
screen
.
getAllScreen
s
().
then
(
src
=>
{
console
.
log
(
'
screenshotTest setScreenActiveModeTest1 getAllScreen src
'
+
src
);
console
.
log
(
'
screenshotTest setScreenActiveModeTest1 getAllScreen src
'
+
src
);
expect
(
src
[
0
]
!=
null
).
assertTrue
();
expect
(
src
[
0
]
!=
null
).
assertTrue
();
let
screenIndex
=
src
[
0
];
let
screenIndex
=
src
[
0
];
...
@@ -1909,7 +1915,7 @@ describe('window_test', function () {
...
@@ -1909,7 +1915,7 @@ describe('window_test', function () {
*/
*/
it
(
'
setScreenActiveMode_Test_002
'
,
0
,
async
function
(
done
)
{
it
(
'
setScreenActiveMode_Test_002
'
,
0
,
async
function
(
done
)
{
console
.
log
(
'
screenshotTest setScreenActiveModeTest2 begin
'
);
console
.
log
(
'
screenshotTest setScreenActiveModeTest2 begin
'
);
screen
.
getAllScreen
().
then
(
src
=>
{
screen
.
getAllScreen
s
().
then
(
src
=>
{
console
.
log
(
'
screenshotTest setScreenActiveModeTest2 getAllScreen src
'
+
src
);
console
.
log
(
'
screenshotTest setScreenActiveModeTest2 getAllScreen src
'
+
src
);
expect
(
src
[
0
]
!=
null
).
assertTrue
();
expect
(
src
[
0
]
!=
null
).
assertTrue
();
let
screenIndex
=
src
[
0
];
let
screenIndex
=
src
[
0
];
...
@@ -1943,6 +1949,22 @@ describe('window_test', function () {
...
@@ -1943,6 +1949,22 @@ describe('window_test', function () {
}
}
})
})
/**
* @tc.number SUB_WMS_ENUM_WINDOWTYPE_JSAPI_001
* @tc.name Test enumWindowType_Test_001.
* @tc.desc To test the enum value of WindowType.
*/
it
(
'
enumWindowType_Test_001
'
,
0
,
async
function
(
done
)
{
console
.
log
(
'
windowTest the enum value of Window begin
'
);
try
{
expect
(
0
).
assertEqual
(
window
.
WindowType
.
TYPE_APP
);
expect
(
1
).
assertEqual
(
window
.
WindowType
.
TYPE_SYSTEM_ALERT
);
done
();
}
catch
(
err
)
{
console
.
log
(
'
windowTest enum value of WindowType error
'
+
JSON
.
stringify
(
err
));
}
})
/**
/**
* @tc.number SUB_WMS_SETFOCUSABLE_JSAPI_001
* @tc.number SUB_WMS_SETFOCUSABLE_JSAPI_001
* @tc.name Test setFocusable_Test_001
* @tc.name Test setFocusable_Test_001
...
@@ -2164,7 +2186,7 @@ describe('window_test', function () {
...
@@ -2164,7 +2186,7 @@ describe('window_test', function () {
done
();
done
();
})
})
},
(
err
)
=>
{
},
(
err
)
=>
{
console
.
log
(
'
windowTest setFocusableTest
4
getTopWindow failed: err
'
+
JSON
.
stringify
(
err
));
console
.
log
(
'
windowTest setFocusableTest
5
getTopWindow failed: err
'
+
JSON
.
stringify
(
err
));
expect
().
assertFail
();
expect
().
assertFail
();
done
();
done
();
})
})
...
@@ -2187,17 +2209,17 @@ describe('window_test', function () {
...
@@ -2187,17 +2209,17 @@ describe('window_test', function () {
wnd
.
getProperties
().
then
(
data
=>
{
wnd
.
getProperties
().
then
(
data
=>
{
expect
(
!
data
.
touchable
).
assertTrue
();
expect
(
!
data
.
touchable
).
assertTrue
();
wnd
.
setTouchable
(
true
).
then
(()
=>
{
wnd
.
setTouchable
(
true
).
then
(()
=>
{
console
.
log
(
'
windowTest setTouchableTest
2
setTouchable(true) success
'
);
console
.
log
(
'
windowTest setTouchableTest
1
setTouchable(true) success
'
);
wnd
.
getProperties
().
then
(
data
=>
{
wnd
.
getProperties
().
then
(
data
=>
{
expect
(
data
.
touchable
).
assertTrue
();
expect
(
data
.
touchable
).
assertTrue
();
done
();
done
();
},
(
err
)
=>
{
},
(
err
)
=>
{
console
.
log
(
'
windowTest setTouchableTest
2
getProperties failed: err
'
+
JSON
.
stringify
(
err
));
console
.
log
(
'
windowTest setTouchableTest
1
getProperties failed: err
'
+
JSON
.
stringify
(
err
));
expect
().
assertFail
();
expect
().
assertFail
();
done
();
done
();
})
})
},
(
err
)
=>
{
},
(
err
)
=>
{
console
.
log
(
'
windowTest setTouchableTest
2
setTouchable failed: err
'
+
JSON
.
stringify
(
err
));
console
.
log
(
'
windowTest setTouchableTest
1
setTouchable failed: err
'
+
JSON
.
stringify
(
err
));
expect
().
assertFail
();
expect
().
assertFail
();
done
();
done
();
})
})
...
@@ -2325,7 +2347,7 @@ describe('window_test', function () {
...
@@ -2325,7 +2347,7 @@ describe('window_test', function () {
}
}
done
();
done
();
},
(
err
)
=>
{
},
(
err
)
=>
{
console
.
log
(
'
windowTest setKeepScreenOnTest
1
getTopWindow failed: err
'
+
JSON
.
stringify
(
err
));
console
.
log
(
'
windowTest setKeepScreenOnTest
2
getTopWindow failed: err
'
+
JSON
.
stringify
(
err
));
expect
().
assertFail
();
expect
().
assertFail
();
done
();
done
();
})
})
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录