Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
f4756d19
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看板
未验证
提交
f4756d19
编写于
12月 01, 2022
作者:
O
openharmony_ci
提交者:
Gitee
12月 01, 2022
浏览文件
操作
浏览文件
下载
差异文件
!6727 create 接口windowType为TYPE_APP时给窗口设置大小(400,400)
Merge pull request !6727 from 姚翠/cherry-pick-1669623319
上级
f6704d28
940d68e5
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
112 addition
and
77 deletion
+112
-77
graphic/windowstandard/src/main/js/test/window.test.js
graphic/windowstandard/src/main/js/test/window.test.js
+112
-77
未找到文件。
graphic/windowstandard/src/main/js/test/window.test.js
浏览文件 @
f4756d19
...
@@ -1013,9 +1013,12 @@ describe('window_test', function () {
...
@@ -1013,9 +1013,12 @@ describe('window_test', function () {
* @tc.desc To verify the function of obtaining the display status when a window is hidden and then displayed.
* @tc.desc To verify the function of obtaining the display status when a window is hidden and then displayed.
*/
*/
it
(
'
isShowing_Test_001
'
,
0
,
async
function
(
done
)
{
it
(
'
isShowing_Test_001
'
,
0
,
async
function
(
done
)
{
console
.
log
(
'
windowTest IsShowingTest1 begin
'
);
console
.
log
(
'
windowTest IsShowingTest1 begin
---resetSize
'
);
window
.
create
(
'
subWindow1
'
,
window
.
WindowType
.
TYPE_APP
).
then
(
wnd
=>
{
window
.
create
(
'
subWindow1
'
,
window
.
WindowType
.
TYPE_APP
).
then
(
wnd
=>
{
expect
(
wnd
!=
null
).
assertTrue
();
expect
(
wnd
!=
null
).
assertTrue
();
console
.
log
(
'
IsShowingTest1 wnd.resetSize(400, 400) begin
'
);
wnd
.
resetSize
(
400
,
400
).
then
(()
=>
{
console
.
log
(
'
windowTest IsShowingTest1 wnd.resetSize(400, 400) success
'
);
wnd
.
isShowing
().
then
(
res
=>
{
wnd
.
isShowing
().
then
(
res
=>
{
console
.
log
(
'
windowTest IsShowingTest1 wnd.isShowing data:
'
+
res
);
console
.
log
(
'
windowTest IsShowingTest1 wnd.isShowing data:
'
+
res
);
expect
(
!
res
).
assertTrue
();
expect
(
!
res
).
assertTrue
();
...
@@ -1039,6 +1042,11 @@ describe('window_test', function () {
...
@@ -1039,6 +1042,11 @@ describe('window_test', function () {
expect
().
assertFail
();
expect
().
assertFail
();
done
();
done
();
})
})
},
(
err_resetSize
)
=>
{
console
.
log
(
'
windowTest IsShowingTest1 wnd.resetSize failed, err :
'
+
JSON
.
stringify
(
err_resetSize
));
})
})
})
})
})
...
@@ -1056,6 +1064,8 @@ describe('window_test', function () {
...
@@ -1056,6 +1064,8 @@ describe('window_test', function () {
done
();
done
();
}
else
{
}
else
{
expect
(
data
!=
null
).
assertTrue
();
expect
(
data
!=
null
).
assertTrue
();
data
.
resetSize
(
400
,
400
).
then
(()
=>
{
console
.
log
(
'
windowTest IsShowingTest2 wnd.resetSize(400, 400) success
'
);
data
.
isShowing
((
err
,
res1
)
=>
{
data
.
isShowing
((
err
,
res1
)
=>
{
if
(
err
.
code
)
{
if
(
err
.
code
)
{
console
.
log
(
'
windowTest IsShowingTest2 data.isShowing fail err
'
+
JSON
.
stringify
(
err
));
console
.
log
(
'
windowTest IsShowingTest2 data.isShowing fail err
'
+
JSON
.
stringify
(
err
));
...
@@ -1084,6 +1094,10 @@ describe('window_test', function () {
...
@@ -1084,6 +1094,10 @@ describe('window_test', function () {
})
})
}
}
})
})
},
(
err_resetSize
)
=>
{
console
.
log
(
'
windowTest IsShowingTest2 wnd.resetSize failed, err :
'
+
JSON
.
stringify
(
err_resetSize
));
})
}
}
})
})
})
})
...
@@ -1236,7 +1250,13 @@ describe('window_test', function () {
...
@@ -1236,7 +1250,13 @@ describe('window_test', function () {
window
.
create
(
'
subWindow3
'
,
window
.
WindowType
.
TYPE_APP
).
then
(
wnd
=>
{
window
.
create
(
'
subWindow3
'
,
window
.
WindowType
.
TYPE_APP
).
then
(
wnd
=>
{
console
.
log
(
'
windowTest CreateTest1 create success wnd
'
+
wnd
);
console
.
log
(
'
windowTest CreateTest1 create success wnd
'
+
wnd
);
expect
(
wnd
!=
null
).
assertTrue
();
expect
(
wnd
!=
null
).
assertTrue
();
wnd
.
resetSize
(
400
,
400
).
then
(()
=>
{
console
.
log
(
'
windowTest resetSize wnd.resetSize(400, 400) success
'
);
done
();
done
();
},
(
err_resetSize
)
=>
{
console
.
log
(
'
windowTest resetSize wnd.resetSize failed, err :
'
+
JSON
.
stringify
(
err_resetSize
));
})
},
(
err
)
=>
{
},
(
err
)
=>
{
console
.
log
(
'
windowTest CreateTest1 create failed, err :
'
+
JSON
.
stringify
(
err
));
console
.
log
(
'
windowTest CreateTest1 create failed, err :
'
+
JSON
.
stringify
(
err
));
expect
().
assertFail
();
expect
().
assertFail
();
...
@@ -1259,7 +1279,12 @@ describe('window_test', function () {
...
@@ -1259,7 +1279,12 @@ describe('window_test', function () {
}
else
{
}
else
{
expect
(
data
!=
null
).
assertTrue
();
expect
(
data
!=
null
).
assertTrue
();
console
.
log
(
'
windowTest CreateTest2 callback create success data
'
+
data
);
console
.
log
(
'
windowTest CreateTest2 callback create success data
'
+
data
);
data
.
resetSize
(
400
,
400
).
then
(()
=>
{
console
.
log
(
'
windowTest resetSize wnd.resetSize(400, 400) success
'
);
done
();
done
();
},
(
err_resetSize
)
=>
{
console
.
log
(
'
windowTest resetSize wnd.resetSize failed, err :
'
+
JSON
.
stringify
(
err_resetSize
));
})
}
}
})
})
})
})
...
@@ -1274,6 +1299,8 @@ describe('window_test', function () {
...
@@ -1274,6 +1299,8 @@ describe('window_test', function () {
window
.
create
(
'
subWindow5
'
,
window
.
WindowType
.
TYPE_APP
).
then
(
wnd
=>
{
window
.
create
(
'
subWindow5
'
,
window
.
WindowType
.
TYPE_APP
).
then
(
wnd
=>
{
console
.
log
(
'
windowTest DestroyTest1 create success wnd
'
+
wnd
);
console
.
log
(
'
windowTest DestroyTest1 create success wnd
'
+
wnd
);
expect
(
wnd
!=
null
).
assertTrue
();
expect
(
wnd
!=
null
).
assertTrue
();
wnd
.
resetSize
(
400
,
400
).
then
(()
=>
{
console
.
log
(
'
windowTest resetSize wnd.resetSize(400, 400) success
'
);
wnd
.
destroy
().
then
(()
=>
{
wnd
.
destroy
().
then
(()
=>
{
window
.
find
(
'
subWindow5
'
).
then
((
data
)
=>
{
window
.
find
(
'
subWindow5
'
).
then
((
data
)
=>
{
console
.
log
(
'
windowTest DestroyTest1 window.find success, window :
'
+
JSON
.
stringify
(
data
));
console
.
log
(
'
windowTest DestroyTest1 window.find success, window :
'
+
JSON
.
stringify
(
data
));
...
@@ -1289,14 +1316,16 @@ describe('window_test', function () {
...
@@ -1289,14 +1316,16 @@ describe('window_test', function () {
expect
().
assertFail
();
expect
().
assertFail
();
done
();
done
();
})
})
},
(
err_resetSize
)
=>
{
console
.
log
(
'
windowTest resetSize wnd.resetSize failed, err :
'
+
JSON
.
stringify
(
err_resetSize
));
})
},
(
err
)
=>
{
},
(
err
)
=>
{
console
.
log
(
'
windowTest CreateTest1 create failed, err :
'
+
JSON
.
stringify
(
err
));
console
.
log
(
'
windowTest CreateTest1 create failed, err :
'
+
JSON
.
stringify
(
err
));
expect
().
assertFail
();
expect
().
assertFail
();
done
();
done
();
})
})
})
})
/**
/**
* @tc.number SUB_WMS_DESTROY_JSAPI_002
* @tc.number SUB_WMS_DESTROY_JSAPI_002
* @tc.name Test destroy_Test_002
* @tc.name Test destroy_Test_002
...
@@ -1311,6 +1340,8 @@ describe('window_test', function () {
...
@@ -1311,6 +1340,8 @@ describe('window_test', function () {
done
();
done
();
}
else
{
}
else
{
expect
(
data
!=
null
).
assertTrue
();
expect
(
data
!=
null
).
assertTrue
();
data
.
resetSize
(
400
,
400
).
then
(()
=>
{
console
.
log
(
'
windowTest resetSize wnd.resetSize(400, 400) success
'
);
data
.
destroy
((
err
)
=>
{
data
.
destroy
((
err
)
=>
{
if
(
err
.
code
!=
0
)
{
if
(
err
.
code
!=
0
)
{
console
.
log
(
'
windowTest DestroyTest2 create callback fail
'
+
JSON
.
stringify
(
err
));
console
.
log
(
'
windowTest DestroyTest2 create callback fail
'
+
JSON
.
stringify
(
err
));
...
@@ -1331,6 +1362,10 @@ describe('window_test', function () {
...
@@ -1331,6 +1362,10 @@ describe('window_test', function () {
})
})
}
}
})
})
},
(
err_resetSize
)
=>
{
console
.
log
(
'
windowTest resetSize wnd.resetSize failed, err :
'
+
JSON
.
stringify
(
err_resetSize
));
})
}
}
})
})
})
})
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录