Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
6b798bc2
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看板
提交
6b798bc2
编写于
2月 21, 2022
作者:
B
bayanxing
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
change testcase position
Signed-off-by:
N
bayanxing
<
bayanxing@kaihongdigi.com
>
上级
ed5eb721
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
17 addition
and
17 deletion
+17
-17
ace/ace_standard/src/main/js/default/test/switchProps.test.js
...ace_standard/src/main/js/default/test/switchProps.test.js
+17
-17
未找到文件。
ace/ace_standard/src/main/js/default/test/switchProps.test.js
浏览文件 @
6b798bc2
...
@@ -27,25 +27,25 @@ describe('switchPropsJsTest', function () {
...
@@ -27,25 +27,25 @@ describe('switchPropsJsTest', function () {
}).
then
(()
=>
{
}).
then
(()
=>
{
console
.
info
(
`sleep
${
time
}
over...`
)
console
.
info
(
`sleep
${
time
}
over...`
)
})
})
}
;
}
async
function
backToIndex
()
{
async
function
backToIndex
()
{
let
backToIndexPromise
=
new
Promise
((
resolve
,
reject
)
=>
{
let
backToIndexPromise
=
new
Promise
((
resolve
,
reject
)
=>
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
router
.
back
({
router
.
back
({
uri
:
'
pages/index/index
'
uri
:
'
pages/index/index
'
});
});
resolve
()
;
resolve
()
},
500
)
;
},
500
)
})
;
})
let
clearPromise
=
new
Promise
((
resolve
,
reject
)
=>
{
let
clearPromise
=
new
Promise
((
resolve
,
reject
)
=>
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
router
.
clear
()
;
router
.
clear
()
resolve
()
;
resolve
()
},
500
)
;
},
500
)
})
;
})
await
backToIndexPromise
.
then
(()
=>
{
await
backToIndexPromise
.
then
(()
=>
{
return
clearPromise
;
return
clearPromise
})
;
})
}
}
/**
/**
...
@@ -66,16 +66,16 @@ describe('switchPropsJsTest', function () {
...
@@ -66,16 +66,16 @@ describe('switchPropsJsTest', function () {
}
}
await
sleep
(
4000
)
await
sleep
(
4000
)
done
()
done
()
})
;
})
/**
/**
* run after testcase
* run after testcase
*/
*/
afterAll
(
async
function
()
{
afterAll
(
async
function
()
{
console
.
info
(
'
[switchPropsJsTest] after each called
'
)
console
.
info
(
'
[switchPropsJsTest] after each called
'
)
await
backToIndex
()
;
await
backToIndex
()
await
sleep
(
1000
)
await
sleep
(
1000
)
})
;
})
/**
/**
* @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100
* @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100
...
@@ -672,7 +672,7 @@ describe('switchPropsJsTest', function () {
...
@@ -672,7 +672,7 @@ describe('switchPropsJsTest', function () {
expect
(
obj
.
$type
).
assertEqual
(
'
switch
'
)
expect
(
obj
.
$type
).
assertEqual
(
'
switch
'
)
expect
(
obj
.
$attrs
.
id
).
assertEqual
(
'
checkedNone
'
)
expect
(
obj
.
$attrs
.
id
).
assertEqual
(
'
checkedNone
'
)
expect
(
obj
.
$attrs
.
checked
).
assertEqual
(
undefined
)
expect
(
obj
.
$attrs
.
checked
).
assertEqual
(
'
false
'
)
console
.
info
(
"
[switchProps] get checked value is:
"
+
JSON
.
stringify
(
obj
.
$attrs
.
checked
));
console
.
info
(
"
[switchProps] get checked value is:
"
+
JSON
.
stringify
(
obj
.
$attrs
.
checked
));
done
();
done
();
});
});
...
@@ -732,7 +732,7 @@ describe('switchPropsJsTest', function () {
...
@@ -732,7 +732,7 @@ describe('switchPropsJsTest', function () {
expect
(
obj
.
$type
).
assertEqual
(
'
switch
'
)
expect
(
obj
.
$type
).
assertEqual
(
'
switch
'
)
expect
(
obj
.
$attrs
.
id
).
assertEqual
(
'
showTextNone
'
)
expect
(
obj
.
$attrs
.
id
).
assertEqual
(
'
showTextNone
'
)
expect
(
obj
.
$attrs
.
showtext
).
assertEqual
(
undefined
)
expect
(
obj
.
$attrs
.
showtext
).
assertEqual
(
'
false
'
)
console
.
info
(
"
[switchProps] get showtext value is:
"
+
JSON
.
stringify
(
obj
.
$attrs
.
showtext
));
console
.
info
(
"
[switchProps] get showtext value is:
"
+
JSON
.
stringify
(
obj
.
$attrs
.
showtext
));
done
();
done
();
});
});
...
@@ -772,7 +772,7 @@ describe('switchPropsJsTest', function () {
...
@@ -772,7 +772,7 @@ describe('switchPropsJsTest', function () {
expect
(
obj
.
$type
).
assertEqual
(
'
switch
'
)
expect
(
obj
.
$type
).
assertEqual
(
'
switch
'
)
expect
(
obj
.
$attrs
.
id
).
assertEqual
(
'
textOnNone
'
)
expect
(
obj
.
$attrs
.
id
).
assertEqual
(
'
textOnNone
'
)
expect
(
obj
.
$attrs
.
texton
).
assertEqual
(
undefined
)
expect
(
obj
.
$attrs
.
texton
).
assertEqual
(
'
On
'
)
console
.
info
(
"
[switchProps] get texton value is:
"
+
JSON
.
stringify
(
obj
.
$attrs
.
texton
));
console
.
info
(
"
[switchProps] get texton value is:
"
+
JSON
.
stringify
(
obj
.
$attrs
.
texton
));
done
();
done
();
});
});
...
@@ -812,7 +812,7 @@ describe('switchPropsJsTest', function () {
...
@@ -812,7 +812,7 @@ describe('switchPropsJsTest', function () {
expect
(
obj
.
$type
).
assertEqual
(
'
switch
'
)
expect
(
obj
.
$type
).
assertEqual
(
'
switch
'
)
expect
(
obj
.
$attrs
.
id
).
assertEqual
(
'
textOffNone
'
)
expect
(
obj
.
$attrs
.
id
).
assertEqual
(
'
textOffNone
'
)
expect
(
obj
.
$attrs
.
textoff
).
assertEqual
(
undefined
)
expect
(
obj
.
$attrs
.
textoff
).
assertEqual
(
'
Off
'
)
console
.
info
(
"
[switchProps] get textoff value is:
"
+
JSON
.
stringify
(
obj
.
$attrs
.
textoff
));
console
.
info
(
"
[switchProps] get textoff value is:
"
+
JSON
.
stringify
(
obj
.
$attrs
.
textoff
));
done
();
done
();
});
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录