Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
e0d9a359
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看板
提交
e0d9a359
编写于
2月 21, 2022
作者:
B
bayanxing
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add button attrs testcase
Signed-off-by:
N
bayanxing
<
bayanxing@kaihongdigi.com
>
上级
26957f03
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
35 addition
and
29 deletion
+35
-29
ace/ace_standard/src/main/js/default/pages/button/router/index.js
...standard/src/main/js/default/pages/button/router/index.js
+1
-1
ace/ace_standard/src/main/js/default/pages/button/style/index.js
..._standard/src/main/js/default/pages/button/style/index.js
+14
-0
ace/ace_standard/src/main/js/default/pages/divider/prop/index.hml
...standard/src/main/js/default/pages/divider/prop/index.hml
+0
-7
ace/ace_standard/src/main/js/default/pages/divider/prop/index.js
..._standard/src/main/js/default/pages/divider/prop/index.js
+2
-10
ace/ace_standard/src/main/js/default/pages/divider/router/index.js
...tandard/src/main/js/default/pages/divider/router/index.js
+1
-1
ace/ace_standard/src/main/js/default/test/buttonProps.test.js
...ace_standard/src/main/js/default/test/buttonProps.test.js
+17
-10
未找到文件。
ace/ace_standard/src/main/js/default/pages/button/router/index.js
浏览文件 @
e0d9a359
/**
* Copyright (c) 2022 Shenzhen
kaiH
ong Digital Industry Development Co., Ltd.
* Copyright (c) 2022 Shenzhen
Kaih
ong Digital Industry Development Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
...
...
ace/ace_standard/src/main/js/default/pages/button/style/index.js
浏览文件 @
e0d9a359
/**
* Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
\ No newline at end of file
ace/ace_standard/src/main/js/default/pages/divider/prop/index.hml
浏览文件 @
e0d9a359
...
...
@@ -140,13 +140,6 @@
<divider id="ifPropTrue"
if="true">
</divider>
<divider id="ifPropFalse"
if="false">
</divider>
<divider id="ifPropNone"
if="">
</divider>
<text class="sub-title">
渲染属性 -- show
</text>
...
...
ace/ace_standard/src/main/js/default/pages/divider/prop/index.js
浏览文件 @
e0d9a359
...
...
@@ -45,8 +45,6 @@ export default {
forPropOne
:
null
,
forPropThree
:
null
,
ifPropTrue
:
null
,
ifPropFalse
:
null
,
ifPropNone
:
null
,
showPropTrue
:
null
,
showPropFalse
:
null
,
showPropNone
:
null
,
...
...
@@ -84,8 +82,6 @@ export default {
forPropOne
:
this
.
forPropOne
,
forPropThree
:
this
.
forPropThree
,
ifPropTrue
:
this
.
ifPropTrue
,
ifPropFalse
:
this
.
ifPropFalse
,
ifPropNone
:
this
.
ifPropNone
,
showPropTrue
:
this
.
showPropTrue
,
showPropFalse
:
this
.
showPropFalse
,
showPropNone
:
this
.
showPropNone
,
...
...
@@ -121,16 +117,12 @@ export default {
this
.
forPropOne
=
this
.
$element
(
"
forPropOne
"
).
getInspector
()
this
.
forPropThree
=
this
.
$element
(
"
forPropThree
"
).
getInspector
()
this
.
ifPropTrue
=
this
.
$element
(
"
ifPropTrue
"
).
getInspector
()
this
.
ifPropFalse
=
this
.
$element
(
"
ifPropFalse
"
).
getInspector
()
this
.
ifPropNone
=
this
.
$element
(
"
ifPropNone
"
).
getInspector
()
this
.
showPropTrue
=
this
.
$element
(
"
showPropTrue
"
).
getInspector
()
this
.
showPropFalse
=
this
.
$element
(
"
showPropFalse
"
).
getInspector
()
this
.
showPropNone
=
this
.
$element
(
"
showPropNone
"
).
getInspector
()
return
},
getSpecificPropValues
()
{
this
.
verticalTrue
=
this
.
$element
(
"
showPropNone
"
).
getInspector
()
this
.
verticalTrue
=
this
.
$element
(
"
showPropNone
"
).
getInspector
()
return
this
.
verticalTrue
=
this
.
$element
(
"
verticalTrue
"
).
getInspector
()
this
.
verticalFalse
=
this
.
$element
(
"
verticalFalse
"
).
getInspector
()
}
}
ace/ace_standard/src/main/js/default/pages/divider/router/index.js
浏览文件 @
e0d9a359
/**
* Copyright (c) 2022 Shenzhen
kaiH
ong Digital Industry Development Co., Ltd.
* Copyright (c) 2022 Shenzhen
Kaih
ong Digital Industry Development Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
...
...
ace/ace_standard/src/main/js/default/test/buttonProps.test.js
浏览文件 @
e0d9a359
/*
* Copyright (
C) 2021 Huawei Device
Co., Ltd.
/*
*
* Copyright (
c) 2022 Shenzhen Kaihong Digital Industry Development
Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
...
...
@@ -32,7 +32,7 @@ describe('buttonPropsJsTest', function () {
let
backToIndexPromise
=
new
Promise
((
resolve
,
reject
)
=>
{
setTimeout
(()
=>
{
router
.
back
({
uri
:
'
pages/
button/prop
/index
'
uri
:
'
pages/
index
/index
'
});
resolve
();
},
500
);
...
...
@@ -47,6 +47,7 @@ describe('buttonPropsJsTest', function () {
return
clearPromise
;
});
}
/**
* run before testcase
*/
...
...
@@ -77,6 +78,7 @@ describe('buttonPropsJsTest', function () {
});
// 通用属性
/**
* @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100
* @tc.name testButtonIdProp
...
...
@@ -95,6 +97,11 @@ describe('buttonPropsJsTest', function () {
done
();
});
/**
* @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100
* @tc.name testButtonClassProp
* @tc.desc ACE
*/
it
(
'
testButtonClassProp
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
testButtonClassProp START
'
);
console
.
info
(
"
[buttonProps] get globalThis.value is:
"
+
JSON
.
stringify
(
globalThis
.
value
));
...
...
@@ -610,7 +617,7 @@ describe('buttonPropsJsTest', function () {
expect
(
obj
.
$type
).
assertEqual
(
'
button
'
)
expect
(
obj
.
$attrs
.
id
).
assertEqual
(
'
showPropNone
'
)
expect
(
obj
.
$attrs
.
show
).
assertEqual
(
'
fals
e
'
)
expect
(
obj
.
$attrs
.
show
).
assertEqual
(
'
tru
e
'
)
console
.
info
(
"
[buttonProps] get show value is:
"
+
JSON
.
stringify
(
obj
.
$attrs
.
show
));
done
();
});
...
...
@@ -732,7 +739,7 @@ describe('buttonPropsJsTest', function () {
expect
(
obj
.
$type
).
assertEqual
(
'
button
'
)
expect
(
obj
.
$attrs
.
id
).
assertEqual
(
'
typeNone
'
)
expect
(
obj
.
$attrs
.
type
).
assertEqual
(
undefined
)
expect
(
obj
.
$attrs
.
type
).
assertEqual
(
'
capsule
'
)
console
.
info
(
"
[buttonProps] get type value is:
"
+
JSON
.
stringify
(
obj
.
$attrs
.
type
));
done
();
});
...
...
@@ -912,7 +919,7 @@ describe('buttonPropsJsTest', function () {
expect
(
obj
.
$type
).
assertEqual
(
'
button
'
)
expect
(
obj
.
$attrs
.
id
).
assertEqual
(
'
placementNone
'
)
expect
(
obj
.
$attrs
.
placement
).
assertEqual
(
undefined
)
expect
(
obj
.
$attrs
.
placement
).
assertEqual
(
'
end
'
)
console
.
info
(
"
[buttonProps] get placement value is:
"
+
JSON
.
stringify
(
obj
.
$attrs
.
placement
));
done
();
});
...
...
@@ -932,7 +939,7 @@ describe('buttonPropsJsTest', function () {
expect
(
obj
.
$type
).
assertEqual
(
'
button
'
)
expect
(
obj
.
$attrs
.
id
).
assertEqual
(
'
waitingTrue
'
)
expect
(
obj
.
$attrs
.
waiting
).
assertEqual
(
true
)
expect
(
obj
.
$attrs
.
waiting
).
assertEqual
(
'
true
'
)
console
.
info
(
"
[buttonProps] get waiting value is:
"
+
JSON
.
stringify
(
obj
.
$attrs
.
waiting
));
done
();
});
...
...
@@ -952,7 +959,7 @@ describe('buttonPropsJsTest', function () {
expect
(
obj
.
$type
).
assertEqual
(
'
button
'
)
expect
(
obj
.
$attrs
.
id
).
assertEqual
(
'
waitingFalse
'
)
expect
(
obj
.
$attrs
.
waiting
).
assertEqual
(
false
)
expect
(
obj
.
$attrs
.
waiting
).
assertEqual
(
'
false
'
)
console
.
info
(
"
[buttonProps] get waiting value is:
"
+
JSON
.
stringify
(
obj
.
$attrs
.
waiting
));
done
();
});
...
...
@@ -972,7 +979,7 @@ describe('buttonPropsJsTest', function () {
expect
(
obj
.
$type
).
assertEqual
(
'
button
'
)
expect
(
obj
.
$attrs
.
id
).
assertEqual
(
'
waitingNone
'
)
expect
(
obj
.
$attrs
.
waiting
).
assertEqual
(
undefined
)
expect
(
obj
.
$attrs
.
waiting
).
assertEqual
(
'
false
'
)
console
.
info
(
"
[buttonProps] get waiting value is:
"
+
JSON
.
stringify
(
obj
.
$attrs
.
waiting
));
done
();
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录