Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
f52e34fd
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看板
未验证
提交
f52e34fd
编写于
5月 25, 2023
作者:
O
openharmony_ci
提交者:
Gitee
5月 25, 2023
浏览文件
操作
浏览文件
下载
差异文件
!8731 修改组件XTS断言 避免主题资源不同 cherry-pick 4.0beta1
Merge pull request !8731 from chensi10/cherry-pick-1684849545
上级
ad485dac
7345758f
变更
16
展开全部
隐藏空白更改
内联
并排
Showing
16 changed file
with
1321 addition
and
1871 deletion
+1321
-1871
arkui/ace_ets_components_ux/ace_ets_component_badge/src/main/ets/TestAbility/pages/Index.ets
..._component_badge/src/main/ets/TestAbility/pages/Index.ets
+6
-0
arkui/ace_ets_components_ux/ace_ets_component_badge/src/main/ets/test/badge.ets
...ts_ux/ace_ets_component_badge/src/main/ets/test/badge.ets
+6
-6
arkui/ace_ets_components_ux/ace_ets_component_checkbox/src/main/ets/TestAbility/pages/CheckBox.ets
...nent_checkbox/src/main/ets/TestAbility/pages/CheckBox.ets
+10
-0
arkui/ace_ets_components_ux/ace_ets_component_checkbox/src/main/ets/TestAbility/pages/CheckBoxGroup.ets
...checkbox/src/main/ets/TestAbility/pages/CheckBoxGroup.ets
+14
-0
arkui/ace_ets_components_ux/ace_ets_component_checkbox/src/main/ets/test/checkBox.ets
...ace_ets_component_checkbox/src/main/ets/test/checkBox.ets
+10
-10
arkui/ace_ets_components_ux/ace_ets_component_checkbox/src/main/ets/test/checkBoxGroup.ets
...ts_component_checkbox/src/main/ets/test/checkBoxGroup.ets
+14
-14
arkui/ace_ets_components_ux/ace_ets_component_datapanel/src/main/ets/TestAbility/pages/Index.ets
...ponent_datapanel/src/main/ets/TestAbility/pages/Index.ets
+5
-63
arkui/ace_ets_components_ux/ace_ets_component_datapanel/src/main/ets/test/datapanel.ets
...e_ets_component_datapanel/src/main/ets/test/datapanel.ets
+5
-590
arkui/ace_ets_components_ux/ace_ets_component_radio/src/main/ets/TestAbility/pages/Index.ets
..._component_radio/src/main/ets/TestAbility/pages/Index.ets
+19
-1
arkui/ace_ets_components_ux/ace_ets_component_radio/src/main/ets/test/radio.ets
...ts_ux/ace_ets_component_radio/src/main/ets/test/radio.ets
+1144
-1144
arkui/ace_ets_components_ux/ace_ets_component_slider/src/main/ets/TestAbility/pages/Index.ets
...component_slider/src/main/ets/TestAbility/pages/Index.ets
+11
-0
arkui/ace_ets_components_ux/ace_ets_component_slider/src/main/ets/test/SliderTest.ets
...ace_ets_component_slider/src/main/ets/test/SliderTest.ets
+47
-28
arkui/ace_ets_components_ux/ace_ets_component_swiper/src/main/ets/TestAbility/pages/Index.ets
...component_swiper/src/main/ets/TestAbility/pages/Index.ets
+10
-0
arkui/ace_ets_components_ux/ace_ets_component_swiper/src/main/ets/test/swiper.ets
..._ux/ace_ets_component_swiper/src/main/ets/test/swiper.ets
+10
-10
arkui/ace_ets_components_ux/ace_ets_component_textinput/src/main/ets/TestAbility/pages/Index.ets
...ponent_textinput/src/main/ets/TestAbility/pages/Index.ets
+5
-0
arkui/ace_ets_components_ux/ace_ets_component_textinput/src/main/ets/test/textinput.ets
...e_ets_component_textinput/src/main/ets/test/textinput.ets
+5
-5
未找到文件。
arkui/ace_ets_components_ux/ace_ets_component_badge/src/main/ets/TestAbility/pages/Index.ets
浏览文件 @
f52e34fd
...
@@ -370,6 +370,7 @@ struct badgeTest {
...
@@ -370,6 +370,7 @@ struct badgeTest {
.width(200).height(50).backgroundColor(0x317aff)
.width(200).height(50).backgroundColor(0x317aff)
}
}
.key("ArkUX_Stage_Badge_BorderColor_0600").height(20)
.key("ArkUX_Stage_Badge_BorderColor_0600").height(20)
.backgroundColor($r("sys.color.ohos_id_color_badge_red"))
.margin({
.margin({
top: 10
top: 10
})
})
...
@@ -387,6 +388,7 @@ struct badgeTest {
...
@@ -387,6 +388,7 @@ struct badgeTest {
.width(200).height(50).backgroundColor(0x317aff)
.width(200).height(50).backgroundColor(0x317aff)
}
}
.key("ArkUX_Stage_Badge_BorderColor_0700").height(20)
.key("ArkUX_Stage_Badge_BorderColor_0700").height(20)
.backgroundColor($r("sys.color.ohos_id_color_badge_red"))
.margin({
.margin({
top: 10
top: 10
})
})
...
@@ -404,6 +406,7 @@ struct badgeTest {
...
@@ -404,6 +406,7 @@ struct badgeTest {
.width(200).height(50).backgroundColor(0x317aff)
.width(200).height(50).backgroundColor(0x317aff)
}
}
.key("ArkUX_Stage_Badge_BorderColor_0800").height(20)
.key("ArkUX_Stage_Badge_BorderColor_0800").height(20)
.backgroundColor($r("sys.color.ohos_id_color_badge_red"))
.margin({
.margin({
top: 10
top: 10
})
})
...
@@ -439,6 +442,7 @@ struct badgeTest {
...
@@ -439,6 +442,7 @@ struct badgeTest {
})
})
.width(200).height(50).backgroundColor(0x317aff)
.width(200).height(50).backgroundColor(0x317aff)
}
}
.backgroundColor($r("sys.color.ohos_id_color_badge_red"))
.key("ArkUX_Stage_Badge_BorderColor_1000").height(20)
.key("ArkUX_Stage_Badge_BorderColor_1000").height(20)
.margin({
.margin({
top: 10
top: 10
...
@@ -457,6 +461,7 @@ struct badgeTest {
...
@@ -457,6 +461,7 @@ struct badgeTest {
})
})
.width(200).height(50).backgroundColor(0x317aff)
.width(200).height(50).backgroundColor(0x317aff)
}
}
.backgroundColor($r("sys.color.ohos_id_color_badge_red"))
.key("ArkUX_Stage_Badge_BorderColor_1100").height(20)
.key("ArkUX_Stage_Badge_BorderColor_1100").height(20)
.margin({
.margin({
top: 10
top: 10
...
@@ -705,6 +710,7 @@ struct badgeTest {
...
@@ -705,6 +710,7 @@ struct badgeTest {
.width(200).height(50).backgroundColor(0x317aff)
.width(200).height(50).backgroundColor(0x317aff)
}
}
.key("ArkUX_Stage_Badge_BorderWidth_1300").height(20)
.key("ArkUX_Stage_Badge_BorderWidth_1300").height(20)
.backgroundColor($r("sys.color.ohos_id_color_badge_red"))
.margin({
.margin({
top: 10
top: 10
})
})
...
...
arkui/ace_ets_components_ux/ace_ets_component_badge/src/main/ets/test/badge.ets
浏览文件 @
f52e34fd
...
@@ -635,7 +635,7 @@ export default function badgeTest() {
...
@@ -635,7 +635,7 @@ export default function badgeTest() {
console.info("ArkUX_Stage_Badge_BorderColor_0600 component obj.$attrs.style is: " +
console.info("ArkUX_Stage_Badge_BorderColor_0600 component obj.$attrs.style is: " +
JSON.stringify(obj.$attrs.style));
JSON.stringify(obj.$attrs.style));
let style = JSON.parse(obj.$attrs.style);
let style = JSON.parse(obj.$attrs.style);
expect(style.borderColor).assertEqual(
"#FFFA2A2D"
);
expect(style.borderColor).assertEqual(
obj.$attrs.backgroundColor
);
console.info('ArkUX_Stage_Badge_BorderColor_0600 END ');
console.info('ArkUX_Stage_Badge_BorderColor_0600 END ');
done();
done();
} catch (err) {
} catch (err) {
...
@@ -663,7 +663,7 @@ export default function badgeTest() {
...
@@ -663,7 +663,7 @@ export default function badgeTest() {
console.info("ArkUX_Stage_Badge_BorderColor_0700 component obj.$attrs.style is: " +
console.info("ArkUX_Stage_Badge_BorderColor_0700 component obj.$attrs.style is: " +
JSON.stringify(obj.$attrs.style));
JSON.stringify(obj.$attrs.style));
let style = JSON.parse(obj.$attrs.style);
let style = JSON.parse(obj.$attrs.style);
expect(style.borderColor).assertEqual(
"#FFFA2A2D"
);
expect(style.borderColor).assertEqual(
obj.$attrs.backgroundColor
);
console.info('ArkUX_Stage_Badge_BorderColor_0700 END ');
console.info('ArkUX_Stage_Badge_BorderColor_0700 END ');
done();
done();
} catch (err) {
} catch (err) {
...
@@ -691,7 +691,7 @@ export default function badgeTest() {
...
@@ -691,7 +691,7 @@ export default function badgeTest() {
console.info("ArkUX_Stage_Badge_BorderColor_0800 component obj.$attrs.style is: " +
console.info("ArkUX_Stage_Badge_BorderColor_0800 component obj.$attrs.style is: " +
JSON.stringify(obj.$attrs.style));
JSON.stringify(obj.$attrs.style));
let style = JSON.parse(obj.$attrs.style);
let style = JSON.parse(obj.$attrs.style);
expect(style.borderColor).assertEqual(
"#FFFA2A2D"
);
expect(style.borderColor).assertEqual(
obj.$attrs.backgroundColor
);
console.info('ArkUX_Stage_Badge_BorderColor_0800 END ');
console.info('ArkUX_Stage_Badge_BorderColor_0800 END ');
done();
done();
} catch (err) {
} catch (err) {
...
@@ -749,7 +749,7 @@ export default function badgeTest() {
...
@@ -749,7 +749,7 @@ export default function badgeTest() {
console.info("ArkUX_Stage_Badge_BorderColor_0900 component obj.$attrs.style is: " +
console.info("ArkUX_Stage_Badge_BorderColor_0900 component obj.$attrs.style is: " +
JSON.stringify(obj.$attrs.style));
JSON.stringify(obj.$attrs.style));
let style = JSON.parse(obj.$attrs.style);
let style = JSON.parse(obj.$attrs.style);
expect(style.borderColor).assertEqual(
"#FFFA2A2D"
);
expect(style.borderColor).assertEqual(
obj.$attrs.backgroundColor
);
console.info('ArkUX_Stage_Badge_BorderColor_1000 END ');
console.info('ArkUX_Stage_Badge_BorderColor_1000 END ');
done();
done();
} catch (err) {
} catch (err) {
...
@@ -777,7 +777,7 @@ export default function badgeTest() {
...
@@ -777,7 +777,7 @@ export default function badgeTest() {
console.info("ArkUX_Stage_Badge_BorderColor_1100 component obj.$attrs.style is: " +
console.info("ArkUX_Stage_Badge_BorderColor_1100 component obj.$attrs.style is: " +
JSON.stringify(obj.$attrs.style));
JSON.stringify(obj.$attrs.style));
let style = JSON.parse(obj.$attrs.style);
let style = JSON.parse(obj.$attrs.style);
expect(style.borderColor).assertEqual(
"#FFFA2A2D"
);
expect(style.borderColor).assertEqual(
obj.$attrs.backgroundColor
);
console.info('ArkUX_Stage_Badge_BorderColor_1100 END ');
console.info('ArkUX_Stage_Badge_BorderColor_1100 END ');
done();
done();
} catch (err) {
} catch (err) {
...
@@ -1177,7 +1177,7 @@ export default function badgeTest() {
...
@@ -1177,7 +1177,7 @@ export default function badgeTest() {
let style = JSON.parse(obj.$attrs.style);
let style = JSON.parse(obj.$attrs.style);
expect(style.borderWidth).assertEqual("1.00vp");
expect(style.borderWidth).assertEqual("1.00vp");
expect(style.fontWeight).assertEqual("FontWeight.Normal");
expect(style.fontWeight).assertEqual("FontWeight.Normal");
expect(style.borderColor).assertEqual(
"#FFFA2A2D"
);
expect(style.borderColor).assertEqual(
obj.$attrs.backgroundColor
);
console.info('ArkUX_Stage_Badge_BorderWidth_1300 END ');
console.info('ArkUX_Stage_Badge_BorderWidth_1300 END ');
done();
done();
} catch (err) {
} catch (err) {
...
...
arkui/ace_ets_components_ux/ace_ets_component_checkbox/src/main/ets/TestAbility/pages/CheckBox.ets
浏览文件 @
f52e34fd
...
@@ -82,6 +82,7 @@ struct checkBoxTest {
...
@@ -82,6 +82,7 @@ struct checkBoxTest {
ListItem(){
ListItem(){
Checkbox({name: 'checkbox6', group: 'checkboxGroup2'})
Checkbox({name: 'checkbox6', group: 'checkboxGroup2'})
.key("ArkUX_Stage_Checkbox_unselectedColor_0600")
.key("ArkUX_Stage_Checkbox_unselectedColor_0600")
.backgroundColor($r("sys.color.ohos_id_color_switch_outline_off"))
.select(false)
.select(false)
.selectedColor(0xed6f21)
.selectedColor(0xed6f21)
.unselectedColor("")
.unselectedColor("")
...
@@ -92,6 +93,7 @@ struct checkBoxTest {
...
@@ -92,6 +93,7 @@ struct checkBoxTest {
ListItem(){
ListItem(){
Checkbox({name: 'checkbox7', group: 'checkboxGroup3'})
Checkbox({name: 'checkbox7', group: 'checkboxGroup3'})
.key("ArkUX_Stage_Checkbox_unselectedColor_0700")
.key("ArkUX_Stage_Checkbox_unselectedColor_0700")
.backgroundColor($r("sys.color.ohos_id_color_switch_outline_off"))
.select(false)
.select(false)
.selectedColor(0xed6f21)
.selectedColor(0xed6f21)
.unselectedColor(null)
.unselectedColor(null)
...
@@ -102,6 +104,7 @@ struct checkBoxTest {
...
@@ -102,6 +104,7 @@ struct checkBoxTest {
ListItem(){
ListItem(){
Checkbox({name: 'checkbox8', group: 'checkboxGroup3'})
Checkbox({name: 'checkbox8', group: 'checkboxGroup3'})
.key("ArkUX_Stage_Checkbox_unselectedColor_0800")
.key("ArkUX_Stage_Checkbox_unselectedColor_0800")
.backgroundColor($r("sys.color.ohos_id_color_switch_outline_off"))
.select(false)
.select(false)
.selectedColor(0xed6f21)
.selectedColor(0xed6f21)
.unselectedColor(undefined)
.unselectedColor(undefined)
...
@@ -123,6 +126,7 @@ struct checkBoxTest {
...
@@ -123,6 +126,7 @@ struct checkBoxTest {
ListItem(){
ListItem(){
Checkbox({name: 'checkbox10', group: 'checkboxGroup13'})
Checkbox({name: 'checkbox10', group: 'checkboxGroup13'})
.key("ArkUX_Stage_Checkbox_unselectedColor_1000")
.key("ArkUX_Stage_Checkbox_unselectedColor_1000")
.backgroundColor($r("sys.color.ohos_id_color_switch_outline_off"))
.select(false)
.select(false)
.selectedColor(0xed6f21)
.selectedColor(0xed6f21)
.unselectedColor(Color.Pink)
.unselectedColor(Color.Pink)
...
@@ -134,6 +138,7 @@ struct checkBoxTest {
...
@@ -134,6 +138,7 @@ struct checkBoxTest {
ListItem(){
ListItem(){
Checkbox({name: 'checkbox11', group: 'checkboxGroup13'})
Checkbox({name: 'checkbox11', group: 'checkboxGroup13'})
.key("ArkUX_Stage_Checkbox_unselectedColor_1100")
.key("ArkUX_Stage_Checkbox_unselectedColor_1100")
.backgroundColor($r("sys.color.ohos_id_color_switch_outline_off"))
.select(false)
.select(false)
.selectedColor(0xed6f21)
.selectedColor(0xed6f21)
.unselectedColor('bgr(138,43,226)')
.unselectedColor('bgr(138,43,226)')
...
@@ -205,6 +210,7 @@ struct checkBoxTest {
...
@@ -205,6 +210,7 @@ struct checkBoxTest {
ListItem(){
ListItem(){
Checkbox({name: 'checkbox18', group: 'checkboxGroup15'})
Checkbox({name: 'checkbox18', group: 'checkboxGroup15'})
.key("ArkUX_Stage_Checkbox_CheckMarkColor_0600")
.key("ArkUX_Stage_Checkbox_CheckMarkColor_0600")
.backgroundColor($r("sys.color.ohos_id_color_foreground_contrary"))
.select(true)
.select(true)
.selectedColor(0xed6f21)
.selectedColor(0xed6f21)
.mark({strokeColor:""})
.mark({strokeColor:""})
...
@@ -215,6 +221,7 @@ struct checkBoxTest {
...
@@ -215,6 +221,7 @@ struct checkBoxTest {
ListItem(){
ListItem(){
Checkbox({name: 'checkbox19', group: 'checkboxGroup25'})
Checkbox({name: 'checkbox19', group: 'checkboxGroup25'})
.key("ArkUX_Stage_Checkbox_CheckMarkColor_0700")
.key("ArkUX_Stage_Checkbox_CheckMarkColor_0700")
.backgroundColor($r("sys.color.ohos_id_color_foreground_contrary"))
.select(true)
.select(true)
.selectedColor(0xed6f21)
.selectedColor(0xed6f21)
.mark({strokeColor:null})
.mark({strokeColor:null})
...
@@ -225,6 +232,7 @@ struct checkBoxTest {
...
@@ -225,6 +232,7 @@ struct checkBoxTest {
ListItem(){
ListItem(){
Checkbox({name: 'checkbox20', group: 'checkboxGroup25'})
Checkbox({name: 'checkbox20', group: 'checkboxGroup25'})
.key("ArkUX_Stage_Checkbox_CheckMarkColor_0800")
.key("ArkUX_Stage_Checkbox_CheckMarkColor_0800")
.backgroundColor($r("sys.color.ohos_id_color_foreground_contrary"))
.select(true)
.select(true)
.selectedColor(0xed6f21)
.selectedColor(0xed6f21)
.mark({strokeColor:undefined})
.mark({strokeColor:undefined})
...
@@ -246,6 +254,7 @@ struct checkBoxTest {
...
@@ -246,6 +254,7 @@ struct checkBoxTest {
ListItem(){
ListItem(){
Checkbox({name: 'checkbox22', group: 'checkboxGroup26'})
Checkbox({name: 'checkbox22', group: 'checkboxGroup26'})
.key("ArkUX_Stage_Checkbox_CheckMarkColor_1000")
.key("ArkUX_Stage_Checkbox_CheckMarkColor_1000")
.backgroundColor($r("sys.color.ohos_id_color_foreground_contrary"))
.select(true)
.select(true)
.selectedColor(0xed6f21)
.selectedColor(0xed6f21)
.mark({strokeColor:Color.Pink})
.mark({strokeColor:Color.Pink})
...
@@ -257,6 +266,7 @@ struct checkBoxTest {
...
@@ -257,6 +266,7 @@ struct checkBoxTest {
ListItem(){
ListItem(){
Checkbox({name: 'checkbox23', group: 'checkboxGroup26'})
Checkbox({name: 'checkbox23', group: 'checkboxGroup26'})
.key("ArkUX_Stage_Checkbox_CheckMarkColor_1100")
.key("ArkUX_Stage_Checkbox_CheckMarkColor_1100")
.backgroundColor($r("sys.color.ohos_id_color_foreground_contrary"))
.select(true)
.select(true)
.selectedColor(0xed6f21)
.selectedColor(0xed6f21)
.mark({strokeColor:'bgr(138,43,226)'})
.mark({strokeColor:'bgr(138,43,226)'})
...
...
arkui/ace_ets_components_ux/ace_ets_component_checkbox/src/main/ets/TestAbility/pages/CheckBoxGroup.ets
浏览文件 @
f52e34fd
...
@@ -97,6 +97,7 @@ struct checkBoxTest {
...
@@ -97,6 +97,7 @@ struct checkBoxTest {
ListItem(){
ListItem(){
CheckboxGroup({group: 'checkboxGroup6'})
CheckboxGroup({group: 'checkboxGroup6'})
.key("ArkUX_Stage_CheckboxGroup_CheckMarkColor_0600")
.key("ArkUX_Stage_CheckboxGroup_CheckMarkColor_0600")
.backgroundColor($r("sys.color.ohos_id_color_foreground_contrary"))
.selectedColor(0xed6f21)
.selectedColor(0xed6f21)
.mark({strokeColor:""})
.mark({strokeColor:""})
.onChange((value: boolean) => {
.onChange((value: boolean) => {
...
@@ -106,6 +107,7 @@ struct checkBoxTest {
...
@@ -106,6 +107,7 @@ struct checkBoxTest {
ListItem(){
ListItem(){
CheckboxGroup({group: 'checkboxGroup7'})
CheckboxGroup({group: 'checkboxGroup7'})
.key("ArkUX_Stage_CheckboxGroup_CheckMarkColor_0700")
.key("ArkUX_Stage_CheckboxGroup_CheckMarkColor_0700")
.backgroundColor($r("sys.color.ohos_id_color_foreground_contrary"))
.selectedColor(0xed6f21)
.selectedColor(0xed6f21)
.mark({strokeColor:null})
.mark({strokeColor:null})
.onChange((value: boolean) => {
.onChange((value: boolean) => {
...
@@ -115,6 +117,7 @@ struct checkBoxTest {
...
@@ -115,6 +117,7 @@ struct checkBoxTest {
ListItem(){
ListItem(){
CheckboxGroup({group: 'checkboxGroup8'})
CheckboxGroup({group: 'checkboxGroup8'})
.key("ArkUX_Stage_CheckboxGroup_CheckMarkColor_0800")
.key("ArkUX_Stage_CheckboxGroup_CheckMarkColor_0800")
.backgroundColor($r("sys.color.ohos_id_color_foreground_contrary"))
.selectedColor(0xed6f21)
.selectedColor(0xed6f21)
.mark({strokeColor:undefined})
.mark({strokeColor:undefined})
.onChange((value: boolean) => {
.onChange((value: boolean) => {
...
@@ -134,6 +137,7 @@ struct checkBoxTest {
...
@@ -134,6 +137,7 @@ struct checkBoxTest {
ListItem(){
ListItem(){
CheckboxGroup({group: 'checkboxGroup10'})
CheckboxGroup({group: 'checkboxGroup10'})
.key("ArkUX_Stage_CheckboxGroup_CheckMarkColor_1000")
.key("ArkUX_Stage_CheckboxGroup_CheckMarkColor_1000")
.backgroundColor($r("sys.color.ohos_id_color_foreground_contrary"))
.selectedColor(0xed6f21)
.selectedColor(0xed6f21)
.mark({strokeColor:Color.Pink})
.mark({strokeColor:Color.Pink})
.mark({strokeColor:'bgr(138,43,226)'})
.mark({strokeColor:'bgr(138,43,226)'})
...
@@ -144,6 +148,7 @@ struct checkBoxTest {
...
@@ -144,6 +148,7 @@ struct checkBoxTest {
ListItem(){
ListItem(){
CheckboxGroup({group: 'checkboxGroup11'})
CheckboxGroup({group: 'checkboxGroup11'})
.key("ArkUX_Stage_CheckboxGroup_CheckMarkColor_1100")
.key("ArkUX_Stage_CheckboxGroup_CheckMarkColor_1100")
.backgroundColor($r("sys.color.ohos_id_color_foreground_contrary"))
.selectedColor(0xed6f21)
.selectedColor(0xed6f21)
.mark({strokeColor:'bgr(138,43,226)'})
.mark({strokeColor:'bgr(138,43,226)'})
.onChange((value: boolean) => {
.onChange((value: boolean) => {
...
@@ -468,6 +473,7 @@ struct checkBoxTest {
...
@@ -468,6 +473,7 @@ struct checkBoxTest {
ListItem(){
ListItem(){
CheckboxGroup({group: 'checkboxGroup43'})
CheckboxGroup({group: 'checkboxGroup43'})
.key("ArkUX_Stage_CheckboxGroup_unselectedColor_0600")
.key("ArkUX_Stage_CheckboxGroup_unselectedColor_0600")
.backgroundColor($r("sys.color.ohos_id_color_switch_outline_off"))
.selectedColor(0xed6f21)
.selectedColor(0xed6f21)
.unselectedColor("")
.unselectedColor("")
.onChange((value: boolean) => {
.onChange((value: boolean) => {
...
@@ -477,6 +483,7 @@ struct checkBoxTest {
...
@@ -477,6 +483,7 @@ struct checkBoxTest {
ListItem(){
ListItem(){
CheckboxGroup({group: 'checkboxGroup44'})
CheckboxGroup({group: 'checkboxGroup44'})
.key("ArkUX_Stage_CheckboxGroup_unselectedColor_0700")
.key("ArkUX_Stage_CheckboxGroup_unselectedColor_0700")
.backgroundColor($r("sys.color.ohos_id_color_switch_outline_off"))
.selectedColor(0xed6f21)
.selectedColor(0xed6f21)
.unselectedColor(null)
.unselectedColor(null)
.onChange((value: boolean) => {
.onChange((value: boolean) => {
...
@@ -486,6 +493,7 @@ struct checkBoxTest {
...
@@ -486,6 +493,7 @@ struct checkBoxTest {
ListItem(){
ListItem(){
CheckboxGroup({group: 'checkboxGroup45'})
CheckboxGroup({group: 'checkboxGroup45'})
.key("ArkUX_Stage_CheckboxGroup_unselectedColor_0800")
.key("ArkUX_Stage_CheckboxGroup_unselectedColor_0800")
.backgroundColor($r("sys.color.ohos_id_color_switch_outline_off"))
.selectedColor(0xed6f21)
.selectedColor(0xed6f21)
.unselectedColor(undefined)
.unselectedColor(undefined)
.onChange((value: boolean) => {
.onChange((value: boolean) => {
...
@@ -505,6 +513,7 @@ struct checkBoxTest {
...
@@ -505,6 +513,7 @@ struct checkBoxTest {
ListItem(){
ListItem(){
CheckboxGroup({group: 'checkboxGroup47'})
CheckboxGroup({group: 'checkboxGroup47'})
.key("ArkUX_Stage_CheckboxGroup_unselectedColor_1000")
.key("ArkUX_Stage_CheckboxGroup_unselectedColor_1000")
.backgroundColor($r("sys.color.ohos_id_color_switch_outline_off"))
.selectedColor(0xed6f21)
.selectedColor(0xed6f21)
.unselectedColor(Color.Pink)
.unselectedColor(Color.Pink)
.unselectedColor(undefined)
.unselectedColor(undefined)
...
@@ -515,6 +524,7 @@ struct checkBoxTest {
...
@@ -515,6 +524,7 @@ struct checkBoxTest {
ListItem(){
ListItem(){
CheckboxGroup({group: 'checkboxGroup48'})
CheckboxGroup({group: 'checkboxGroup48'})
.key("ArkUX_Stage_CheckboxGroup_unselectedColor_1100")
.key("ArkUX_Stage_CheckboxGroup_unselectedColor_1100")
.backgroundColor($r("sys.color.ohos_id_color_switch_outline_off"))
.selectedColor(0xed6f21)
.selectedColor(0xed6f21)
.unselectedColor('bgr(138,43,226)')
.unselectedColor('bgr(138,43,226)')
.onChange((value: boolean) => {
.onChange((value: boolean) => {
...
@@ -543,7 +553,9 @@ struct checkBoxTest {
...
@@ -543,7 +553,9 @@ struct checkBoxTest {
ListItem(){
ListItem(){
CheckboxGroup({group: 'checkboxGroupNO'})
CheckboxGroup({group: 'checkboxGroupNO'})
.key("checkboxGroupNO")
.key("checkboxGroupNO")
.backgroundColor($r("sys.color.ohos_id_color_switch_outline_off"))
.selectedColor(0xed6f21)
.selectedColor(0xed6f21)
.borderColor($r("sys.color.ohos_id_color_foreground_contrary"))
.onChange((value: boolean) => {
.onChange((value: boolean) => {
console.info('Checkbox1 change is'+ value)
console.info('Checkbox1 change is'+ value)
})
})
...
@@ -551,6 +563,8 @@ struct checkBoxTest {
...
@@ -551,6 +563,8 @@ struct checkBoxTest {
ListItem(){
ListItem(){
Checkbox({name: 'checkbox3', group: 'checkboxGroupNO'})
Checkbox({name: 'checkbox3', group: 'checkboxGroupNO'})
.key("checkboxNO")
.key("checkboxNO")
.backgroundColor($r("sys.color.ohos_id_color_switch_outline_off"))
.borderColor($r("sys.color.ohos_id_color_foreground_contrary"))
.select(true)
.select(true)
.selectedColor(0xed6f21)
.selectedColor(0xed6f21)
.onChange((value: boolean) => {
.onChange((value: boolean) => {
...
...
arkui/ace_ets_components_ux/ace_ets_component_checkbox/src/main/ets/test/checkBox.ets
浏览文件 @
f52e34fd
...
@@ -190,7 +190,7 @@ export default function checkBoxTest() {
...
@@ -190,7 +190,7 @@ export default function checkBoxTest() {
JSON.stringify(obj.$attrs));
JSON.stringify(obj.$attrs));
console.info("ArkUX_Stage_Checkbox_unselectedColor_0600 component obj.$attrs.unselectedColor is: " +
console.info("ArkUX_Stage_Checkbox_unselectedColor_0600 component obj.$attrs.unselectedColor is: " +
JSON.stringify(obj.$attrs.unselectedColor));
JSON.stringify(obj.$attrs.unselectedColor));
expect(obj.$attrs.unselectedColor).assertEqual(
"#66182431"
);
expect(obj.$attrs.unselectedColor).assertEqual(
obj.$attrs.backgroundColor
);
console.info('ArkUX_Stage_Checkbox_unselectedColor_0600 END ');
console.info('ArkUX_Stage_Checkbox_unselectedColor_0600 END ');
} catch (err) {
} catch (err) {
expect().assertFail();
expect().assertFail();
...
@@ -217,7 +217,7 @@ export default function checkBoxTest() {
...
@@ -217,7 +217,7 @@ export default function checkBoxTest() {
JSON.stringify(obj.$attrs));
JSON.stringify(obj.$attrs));
console.info("ArkUX_Stage_Checkbox_unselectedColor_0700 component obj.$attrs.unselectedColor is: " +
console.info("ArkUX_Stage_Checkbox_unselectedColor_0700 component obj.$attrs.unselectedColor is: " +
JSON.stringify(obj.$attrs.unselectedColor));
JSON.stringify(obj.$attrs.unselectedColor));
expect(obj.$attrs.unselectedColor).assertEqual(
"#66182431"
);
expect(obj.$attrs.unselectedColor).assertEqual(
obj.$attrs.backgroundColor
);
console.info('ArkUX_Stage_Checkbox_unselectedColor_0700 END ');
console.info('ArkUX_Stage_Checkbox_unselectedColor_0700 END ');
} catch (err) {
} catch (err) {
expect().assertFail();
expect().assertFail();
...
@@ -244,7 +244,7 @@ export default function checkBoxTest() {
...
@@ -244,7 +244,7 @@ export default function checkBoxTest() {
JSON.stringify(obj.$attrs));
JSON.stringify(obj.$attrs));
console.info("ArkUX_Stage_Checkbox_unselectedColor_0800 component obj.$attrs.unselectedColor is: " +
console.info("ArkUX_Stage_Checkbox_unselectedColor_0800 component obj.$attrs.unselectedColor is: " +
JSON.stringify(obj.$attrs.unselectedColor));
JSON.stringify(obj.$attrs.unselectedColor));
expect(obj.$attrs.unselectedColor).assertEqual(
"#66182431"
);
expect(obj.$attrs.unselectedColor).assertEqual(
obj.$attrs.backgroundColor
);
console.info('ArkUX_Stage_Checkbox_unselectedColor_0800 END ');
console.info('ArkUX_Stage_Checkbox_unselectedColor_0800 END ');
} catch (err) {
} catch (err) {
expect().assertFail();
expect().assertFail();
...
@@ -300,7 +300,7 @@ export default function checkBoxTest() {
...
@@ -300,7 +300,7 @@ export default function checkBoxTest() {
JSON.stringify(obj.$attrs));
JSON.stringify(obj.$attrs));
console.info("ArkUX_Stage_Checkbox_unselectedColor_1000 component obj.$attrs.unselectedColor is: " +
console.info("ArkUX_Stage_Checkbox_unselectedColor_1000 component obj.$attrs.unselectedColor is: " +
JSON.stringify(obj.$attrs.unselectedColor));
JSON.stringify(obj.$attrs.unselectedColor));
expect(obj.$attrs.unselectedColor).assertEqual(
"#66182431"
);
expect(obj.$attrs.unselectedColor).assertEqual(
obj.$attrs.backgroundColor
);
console.info('ArkUX_Stage_Checkbox_unselectedColor_1000 END ');
console.info('ArkUX_Stage_Checkbox_unselectedColor_1000 END ');
} catch (err) {
} catch (err) {
expect().assertFail();
expect().assertFail();
...
@@ -327,7 +327,7 @@ export default function checkBoxTest() {
...
@@ -327,7 +327,7 @@ export default function checkBoxTest() {
JSON.stringify(obj.$attrs));
JSON.stringify(obj.$attrs));
console.info("ArkUX_Stage_Checkbox_unselectedColor_1100 component obj.$attrs.unselectedColor is: " +
console.info("ArkUX_Stage_Checkbox_unselectedColor_1100 component obj.$attrs.unselectedColor is: " +
JSON.stringify(obj.$attrs.unselectedColor));
JSON.stringify(obj.$attrs.unselectedColor));
expect(obj.$attrs.unselectedColor).assertEqual(
"#66182431"
);
expect(obj.$attrs.unselectedColor).assertEqual(
obj.$attrs.backgroundColor
);
console.info('ArkUX_Stage_Checkbox_unselectedColor_1100 END ');
console.info('ArkUX_Stage_Checkbox_unselectedColor_1100 END ');
} catch (err) {
} catch (err) {
expect().assertFail();
expect().assertFail();
...
@@ -541,7 +541,7 @@ export default function checkBoxTest() {
...
@@ -541,7 +541,7 @@ export default function checkBoxTest() {
console.info("ArkUX_Stage_Checkbox_CheckMarkColor_0600 component markObj is: " + JSON.stringify(markObj));
console.info("ArkUX_Stage_Checkbox_CheckMarkColor_0600 component markObj is: " + JSON.stringify(markObj));
console.info("ArkUX_Stage_Checkbox_CheckMarkColor_0600 component markObj.strokeColor is: " +
console.info("ArkUX_Stage_Checkbox_CheckMarkColor_0600 component markObj.strokeColor is: " +
JSON.stringify(markObj.strokeColor));
JSON.stringify(markObj.strokeColor));
expect(markObj.strokeColor).assertEqual(
"#FFFFFFFF"
);
expect(markObj.strokeColor).assertEqual(
obj.$attrs.backgroundColor
);
console.info('ArkUX_Stage_Checkbox_CheckMarkColor_0600 END ');
console.info('ArkUX_Stage_Checkbox_CheckMarkColor_0600 END ');
} catch (err) {
} catch (err) {
expect().assertFail();
expect().assertFail();
...
@@ -572,7 +572,7 @@ export default function checkBoxTest() {
...
@@ -572,7 +572,7 @@ export default function checkBoxTest() {
console.info("ArkUX_Stage_Checkbox_CheckMarkColor_0700 component markObj is: " + JSON.stringify(markObj));
console.info("ArkUX_Stage_Checkbox_CheckMarkColor_0700 component markObj is: " + JSON.stringify(markObj));
console.info("ArkUX_Stage_Checkbox_CheckMarkColor_0700 component markObj.strokeColor is: " +
console.info("ArkUX_Stage_Checkbox_CheckMarkColor_0700 component markObj.strokeColor is: " +
JSON.stringify(markObj.strokeColor));
JSON.stringify(markObj.strokeColor));
expect(markObj.strokeColor).assertEqual(
"#FFFFFFFF"
);
expect(markObj.strokeColor).assertEqual(
obj.$attrs.backgroundColor
);
console.info('ArkUX_Stage_Checkbox_CheckMarkColor_0700 END ');
console.info('ArkUX_Stage_Checkbox_CheckMarkColor_0700 END ');
} catch (err) {
} catch (err) {
expect().assertFail();
expect().assertFail();
...
@@ -603,7 +603,7 @@ export default function checkBoxTest() {
...
@@ -603,7 +603,7 @@ export default function checkBoxTest() {
console.info("ArkUX_Stage_Checkbox_CheckMarkColor_0800 component markObj is: " + JSON.stringify(markObj));
console.info("ArkUX_Stage_Checkbox_CheckMarkColor_0800 component markObj is: " + JSON.stringify(markObj));
console.info("ArkUX_Stage_Checkbox_CheckMarkColor_0800 component markObj.strokeColor is: " +
console.info("ArkUX_Stage_Checkbox_CheckMarkColor_0800 component markObj.strokeColor is: " +
JSON.stringify(markObj.strokeColor));
JSON.stringify(markObj.strokeColor));
expect(markObj.strokeColor).assertEqual(
"#FFFFFFFF"
);
expect(markObj.strokeColor).assertEqual(
obj.$attrs.backgroundColor
);
console.info('ArkUX_Stage_Checkbox_CheckMarkColor_0800 END ');
console.info('ArkUX_Stage_Checkbox_CheckMarkColor_0800 END ');
} catch (err) {
} catch (err) {
expect().assertFail();
expect().assertFail();
...
@@ -667,7 +667,7 @@ export default function checkBoxTest() {
...
@@ -667,7 +667,7 @@ export default function checkBoxTest() {
console.info("ArkUX_Stage_Checkbox_CheckMarkColor_1000 component markObj is: " + JSON.stringify(markObj));
console.info("ArkUX_Stage_Checkbox_CheckMarkColor_1000 component markObj is: " + JSON.stringify(markObj));
console.info("ArkUX_Stage_Checkbox_CheckMarkColor_1000 component markObj.strokeColor is: " +
console.info("ArkUX_Stage_Checkbox_CheckMarkColor_1000 component markObj.strokeColor is: " +
JSON.stringify(markObj.strokeColor));
JSON.stringify(markObj.strokeColor));
expect(markObj.strokeColor).assertEqual(
"#FFFFFFFF"
);
expect(markObj.strokeColor).assertEqual(
obj.$attrs.backgroundColor
);
console.info('ArkUX_Stage_Checkbox_CheckMarkColor_1000 END ');
console.info('ArkUX_Stage_Checkbox_CheckMarkColor_1000 END ');
} catch (err) {
} catch (err) {
expect().assertFail();
expect().assertFail();
...
@@ -698,7 +698,7 @@ export default function checkBoxTest() {
...
@@ -698,7 +698,7 @@ export default function checkBoxTest() {
console.info("ArkUX_Stage_Checkbox_CheckMarkColor_1100 component markObj is: " + JSON.stringify(markObj));
console.info("ArkUX_Stage_Checkbox_CheckMarkColor_1100 component markObj is: " + JSON.stringify(markObj));
console.info("ArkUX_Stage_Checkbox_CheckMarkColor_1100 component markObj.strokeColor is: " +
console.info("ArkUX_Stage_Checkbox_CheckMarkColor_1100 component markObj.strokeColor is: " +
JSON.stringify(markObj.strokeColor));
JSON.stringify(markObj.strokeColor));
expect(markObj.strokeColor).assertEqual(
"#FFFFFFFF"
);
expect(markObj.strokeColor).assertEqual(
obj.$attrs.backgroundColor
);
console.info('ArkUX_Stage_Checkbox_CheckMarkColor_1100 END ');
console.info('ArkUX_Stage_Checkbox_CheckMarkColor_1100 END ');
} catch (err) {
} catch (err) {
expect().assertFail();
expect().assertFail();
...
...
arkui/ace_ets_components_ux/ace_ets_component_checkbox/src/main/ets/test/checkBoxGroup.ets
浏览文件 @
f52e34fd
...
@@ -190,7 +190,7 @@ export default function checkBoxGroupTest() {
...
@@ -190,7 +190,7 @@ export default function checkBoxGroupTest() {
JSON.stringify(obj.$attrs));
JSON.stringify(obj.$attrs));
console.info("ArkUX_Stage_CheckboxGroup_unselectedColor_0600 component obj.$attrs.unselectedColor is: " +
console.info("ArkUX_Stage_CheckboxGroup_unselectedColor_0600 component obj.$attrs.unselectedColor is: " +
JSON.stringify(obj.$attrs.unselectedColor));
JSON.stringify(obj.$attrs.unselectedColor));
expect(obj.$attrs.unselectedColor).assertEqual(
"#66182431"
);
expect(obj.$attrs.unselectedColor).assertEqual(
obj.$attrs.backgroundColor
);
console.info('ArkUX_Stage_CheckboxGroup_unselectedColor_0600 END ');
console.info('ArkUX_Stage_CheckboxGroup_unselectedColor_0600 END ');
} catch (err) {
} catch (err) {
expect().assertFail();
expect().assertFail();
...
@@ -217,7 +217,7 @@ export default function checkBoxGroupTest() {
...
@@ -217,7 +217,7 @@ export default function checkBoxGroupTest() {
JSON.stringify(obj.$attrs));
JSON.stringify(obj.$attrs));
console.info("ArkUX_Stage_CheckboxGroup_unselectedColor_0700 component obj.$attrs.unselectedColor is: " +
console.info("ArkUX_Stage_CheckboxGroup_unselectedColor_0700 component obj.$attrs.unselectedColor is: " +
JSON.stringify(obj.$attrs.unselectedColor));
JSON.stringify(obj.$attrs.unselectedColor));
expect(obj.$attrs.unselectedColor).assertEqual(
"#66182431"
);
expect(obj.$attrs.unselectedColor).assertEqual(
obj.$attrs.backgroundColor
);
console.info('ArkUX_Stage_CheckboxGroup_unselectedColor_0700 END ');
console.info('ArkUX_Stage_CheckboxGroup_unselectedColor_0700 END ');
} catch (err) {
} catch (err) {
expect().assertFail();
expect().assertFail();
...
@@ -244,7 +244,7 @@ export default function checkBoxGroupTest() {
...
@@ -244,7 +244,7 @@ export default function checkBoxGroupTest() {
JSON.stringify(obj.$attrs));
JSON.stringify(obj.$attrs));
console.info("ArkUX_Stage_CheckboxGroup_unselectedColor_0800 component obj.$attrs.unselectedColor is: " +
console.info("ArkUX_Stage_CheckboxGroup_unselectedColor_0800 component obj.$attrs.unselectedColor is: " +
JSON.stringify(obj.$attrs.unselectedColor));
JSON.stringify(obj.$attrs.unselectedColor));
expect(obj.$attrs.unselectedColor).assertEqual(
"#66182431"
);
expect(obj.$attrs.unselectedColor).assertEqual(
obj.$attrs.backgroundColor
);
console.info('ArkUX_Stage_CheckboxGroup_unselectedColor_0800 END ');
console.info('ArkUX_Stage_CheckboxGroup_unselectedColor_0800 END ');
} catch (err) {
} catch (err) {
expect().assertFail();
expect().assertFail();
...
@@ -300,7 +300,7 @@ export default function checkBoxGroupTest() {
...
@@ -300,7 +300,7 @@ export default function checkBoxGroupTest() {
JSON.stringify(obj.$attrs));
JSON.stringify(obj.$attrs));
console.info("ArkUX_Stage_CheckboxGroup_unselectedColor_1000 component obj.$attrs.unselectedColor is: " +
console.info("ArkUX_Stage_CheckboxGroup_unselectedColor_1000 component obj.$attrs.unselectedColor is: " +
JSON.stringify(obj.$attrs.unselectedColor));
JSON.stringify(obj.$attrs.unselectedColor));
expect(obj.$attrs.unselectedColor).assertEqual(
"#66182431"
);
expect(obj.$attrs.unselectedColor).assertEqual(
obj.$attrs.backgroundColor
);
console.info('ArkUX_Stage_CheckboxGroup_unselectedColor_1000 END ');
console.info('ArkUX_Stage_CheckboxGroup_unselectedColor_1000 END ');
} catch (err) {
} catch (err) {
expect().assertFail();
expect().assertFail();
...
@@ -327,7 +327,7 @@ export default function checkBoxGroupTest() {
...
@@ -327,7 +327,7 @@ export default function checkBoxGroupTest() {
JSON.stringify(obj.$attrs));
JSON.stringify(obj.$attrs));
console.info("ArkUX_Stage_CheckboxGroup_unselectedColor_1100 component obj.$attrs.unselectedColor is: " +
console.info("ArkUX_Stage_CheckboxGroup_unselectedColor_1100 component obj.$attrs.unselectedColor is: " +
JSON.stringify(obj.$attrs.unselectedColor));
JSON.stringify(obj.$attrs.unselectedColor));
expect(obj.$attrs.unselectedColor).assertEqual(
"#66182431"
);
expect(obj.$attrs.unselectedColor).assertEqual(
obj.$attrs.backgroundColor
);
console.info('ArkUX_Stage_CheckboxGroup_unselectedColor_1100 END ');
console.info('ArkUX_Stage_CheckboxGroup_unselectedColor_1100 END ');
} catch (err) {
} catch (err) {
expect().assertFail();
expect().assertFail();
...
@@ -547,7 +547,7 @@ export default function checkBoxGroupTest() {
...
@@ -547,7 +547,7 @@ export default function checkBoxGroupTest() {
JSON.stringify(markObj));
JSON.stringify(markObj));
console.info("ArkUX_Stage_CheckboxGroup_CheckMarkColor_0600 component markObj.strokeColor is: " +
console.info("ArkUX_Stage_CheckboxGroup_CheckMarkColor_0600 component markObj.strokeColor is: " +
JSON.stringify(markObj.strokeColor));
JSON.stringify(markObj.strokeColor));
expect(markObj.strokeColor).assertEqual(
"#FFFFFFFF"
);
expect(markObj.strokeColor).assertEqual(
obj.$attrs.backgroundColor
);
console.info('ArkUX_Stage_CheckboxGroup_CheckMarkColor_0600 END ');
console.info('ArkUX_Stage_CheckboxGroup_CheckMarkColor_0600 END ');
} catch (err) {
} catch (err) {
expect().assertFail();
expect().assertFail();
...
@@ -579,7 +579,7 @@ export default function checkBoxGroupTest() {
...
@@ -579,7 +579,7 @@ export default function checkBoxGroupTest() {
JSON.stringify(markObj));
JSON.stringify(markObj));
console.info("ArkUX_Stage_CheckboxGroup_CheckMarkColor_0700 component markObj.strokeColor is: " +
console.info("ArkUX_Stage_CheckboxGroup_CheckMarkColor_0700 component markObj.strokeColor is: " +
JSON.stringify(markObj.strokeColor));
JSON.stringify(markObj.strokeColor));
expect(markObj.strokeColor).assertEqual(
"#FFFFFFFF"
);
expect(markObj.strokeColor).assertEqual(
obj.$attrs.backgroundColor
);
console.info('ArkUX_Stage_CheckboxGroup_CheckMarkColor_0700 END ');
console.info('ArkUX_Stage_CheckboxGroup_CheckMarkColor_0700 END ');
} catch (err) {
} catch (err) {
expect().assertFail();
expect().assertFail();
...
@@ -611,7 +611,7 @@ export default function checkBoxGroupTest() {
...
@@ -611,7 +611,7 @@ export default function checkBoxGroupTest() {
JSON.stringify(markObj));
JSON.stringify(markObj));
console.info("ArkUX_Stage_CheckboxGroup_CheckMarkColor_0800 component markObj.strokeColor is: " +
console.info("ArkUX_Stage_CheckboxGroup_CheckMarkColor_0800 component markObj.strokeColor is: " +
JSON.stringify(markObj.strokeColor));
JSON.stringify(markObj.strokeColor));
expect(markObj.strokeColor).assertEqual(
"#FFFFFFFF"
);
expect(markObj.strokeColor).assertEqual(
obj.$attrs.backgroundColor
);
console.info('ArkUX_Stage_CheckboxGroup_CheckMarkColor_0800 END ');
console.info('ArkUX_Stage_CheckboxGroup_CheckMarkColor_0800 END ');
} catch (err) {
} catch (err) {
expect().assertFail();
expect().assertFail();
...
@@ -677,7 +677,7 @@ export default function checkBoxGroupTest() {
...
@@ -677,7 +677,7 @@ export default function checkBoxGroupTest() {
JSON.stringify(markObj));
JSON.stringify(markObj));
console.info("ArkUX_Stage_CheckboxGroup_CheckMarkColor_1000 component markObj.strokeColor is: " +
console.info("ArkUX_Stage_CheckboxGroup_CheckMarkColor_1000 component markObj.strokeColor is: " +
JSON.stringify(markObj.strokeColor));
JSON.stringify(markObj.strokeColor));
expect(markObj.strokeColor).assertEqual(
"#FFFFFFFF"
);
expect(markObj.strokeColor).assertEqual(
obj.$attrs.backgroundColor
);
console.info('ArkUX_Stage_CheckboxGroup_CheckMarkColor_1000 END ');
console.info('ArkUX_Stage_CheckboxGroup_CheckMarkColor_1000 END ');
} catch (err) {
} catch (err) {
expect().assertFail();
expect().assertFail();
...
@@ -709,7 +709,7 @@ export default function checkBoxGroupTest() {
...
@@ -709,7 +709,7 @@ export default function checkBoxGroupTest() {
JSON.stringify(markObj));
JSON.stringify(markObj));
console.info("ArkUX_Stage_CheckboxGroup_CheckMarkColor_1100 component markObj.strokeColor is: " +
console.info("ArkUX_Stage_CheckboxGroup_CheckMarkColor_1100 component markObj.strokeColor is: " +
JSON.stringify(markObj.strokeColor));
JSON.stringify(markObj.strokeColor));
expect(markObj.strokeColor).assertEqual(
"#FFFFFFFF"
);
expect(markObj.strokeColor).assertEqual(
obj.$attrs.backgroundColor
);
console.info('ArkUX_Stage_CheckboxGroup_CheckMarkColor_1100 END ');
console.info('ArkUX_Stage_CheckboxGroup_CheckMarkColor_1100 END ');
} catch (err) {
} catch (err) {
expect().assertFail();
expect().assertFail();
...
@@ -1655,8 +1655,8 @@ export default function checkBoxGroupTest() {
...
@@ -1655,8 +1655,8 @@ export default function checkBoxGroupTest() {
let markObj = JSON.parse(obj.$attrs.mark);
let markObj = JSON.parse(obj.$attrs.mark);
expect(markObj.strokeWidth).assertEqual("2.00vp");
expect(markObj.strokeWidth).assertEqual("2.00vp");
expect(markObj.size).assertEqual("0.00vp");
expect(markObj.size).assertEqual("0.00vp");
expect(markObj.strokeColor).assertEqual(
"#FFFFFFFF"
);
expect(markObj.strokeColor).assertEqual(
obj.$attrs.borderColor
);
expect(obj.$attrs.unselectedColor).assertEqual(
"#66182431"
);
expect(obj.$attrs.unselectedColor).assertEqual(
obj.$attrs.backgroundColor
);
let strJsonGroup = getInspectorByKey('checkboxGroupNO');
let strJsonGroup = getInspectorByKey('checkboxGroupNO');
console.info('ArkUX_Stage_CheckboxGroup_CheckMarkWidth_1500 strJsonGroup :' + JSON.stringify(strJsonGroup));
console.info('ArkUX_Stage_CheckboxGroup_CheckMarkWidth_1500 strJsonGroup :' + JSON.stringify(strJsonGroup));
let objGroup = JSON.parse(strJsonGroup);
let objGroup = JSON.parse(strJsonGroup);
...
@@ -1667,8 +1667,8 @@ export default function checkBoxGroupTest() {
...
@@ -1667,8 +1667,8 @@ export default function checkBoxGroupTest() {
let markObjGroup = JSON.parse(objGroup.$attrs.mark);
let markObjGroup = JSON.parse(objGroup.$attrs.mark);
expect(markObjGroup.strokeWidth).assertEqual("2.00vp");
expect(markObjGroup.strokeWidth).assertEqual("2.00vp");
expect(markObjGroup.size).assertEqual("0.00vp");
expect(markObjGroup.size).assertEqual("0.00vp");
expect(markObjGroup.strokeColor).assertEqual(
"#FFFFFFFF"
);
expect(markObjGroup.strokeColor).assertEqual(
obj.$attrs.borderColor
);
expect(objGroup.$attrs.unselectedColor).assertEqual(
"#66182431"
);
expect(objGroup.$attrs.unselectedColor).assertEqual(
obj.$attrs.backgroundColor
);
console.info('ArkUX_Stage_CheckboxGroup_CheckMarkWidth_1500 END ');
console.info('ArkUX_Stage_CheckboxGroup_CheckMarkWidth_1500 END ');
} catch (err) {
} catch (err) {
expect().assertFail();
expect().assertFail();
...
...
arkui/ace_ets_components_ux/ace_ets_component_datapanel/src/main/ets/TestAbility/pages/Index.ets
浏览文件 @
f52e34fd
...
@@ -377,6 +377,7 @@ struct DatapanelTest {
...
@@ -377,6 +377,7 @@ struct DatapanelTest {
DataPanel({ values: [20, 10, 10], max: 80, type: DataPanelType.Circle })
DataPanel({ values: [20, 10, 10], max: 80, type: DataPanelType.Circle })
.width(200)
.width(200)
.height(200)
.height(200)
.borderColor($r("sys.color.ohos_id_color_subheading_separator"))
.trackBackgroundColor('')
.trackBackgroundColor('')
.key("ArkUX_Stage_DataPanel_TrackBackgroundColor_0700")
.key("ArkUX_Stage_DataPanel_TrackBackgroundColor_0700")
}
}
...
@@ -384,6 +385,7 @@ struct DatapanelTest {
...
@@ -384,6 +385,7 @@ struct DatapanelTest {
DataPanel({ values: [20, 10, 10], max: 80, type: DataPanelType.Circle })
DataPanel({ values: [20, 10, 10], max: 80, type: DataPanelType.Circle })
.width(200)
.width(200)
.height(200)
.height(200)
.borderColor($r("sys.color.ohos_id_color_subheading_separator"))
.trackBackgroundColor(null)
.trackBackgroundColor(null)
.key("ArkUX_Stage_DataPanel_TrackBackgroundColor_0800")
.key("ArkUX_Stage_DataPanel_TrackBackgroundColor_0800")
}
}
...
@@ -391,6 +393,7 @@ struct DatapanelTest {
...
@@ -391,6 +393,7 @@ struct DatapanelTest {
DataPanel({ values: [20, 10, 10], max: 80, type: DataPanelType.Circle })
DataPanel({ values: [20, 10, 10], max: 80, type: DataPanelType.Circle })
.width(200)
.width(200)
.height(200)
.height(200)
.borderColor($r("sys.color.ohos_id_color_subheading_separator"))
.trackBackgroundColor(undefined)
.trackBackgroundColor(undefined)
.key("ArkUX_Stage_DataPanel_TrackBackgroundColor_0900")
.key("ArkUX_Stage_DataPanel_TrackBackgroundColor_0900")
}
}
...
@@ -398,6 +401,7 @@ struct DatapanelTest {
...
@@ -398,6 +401,7 @@ struct DatapanelTest {
DataPanel({ values: [20, 10, 10], max: 80, type: DataPanelType.Circle })
DataPanel({ values: [20, 10, 10], max: 80, type: DataPanelType.Circle })
.width(200)
.width(200)
.height(200)
.height(200)
.borderColor($r("sys.color.ohos_id_color_subheading_separator"))
.trackBackgroundColor("#FF00FF00")
.trackBackgroundColor("#FF00FF00")
.trackBackgroundColor(undefined)
.trackBackgroundColor(undefined)
.key("ArkUX_Stage_DataPanel_TrackBackgroundColor_1000")
.key("ArkUX_Stage_DataPanel_TrackBackgroundColor_1000")
...
@@ -406,6 +410,7 @@ struct DatapanelTest {
...
@@ -406,6 +410,7 @@ struct DatapanelTest {
DataPanel({ values: [20, 10, 10], max: 80, type: DataPanelType.Circle })
DataPanel({ values: [20, 10, 10], max: 80, type: DataPanelType.Circle })
.width(200)
.width(200)
.height(200)
.height(200)
.borderColor($r("sys.color.ohos_id_color_subheading_separator"))
.trackBackgroundColor('color')
.trackBackgroundColor('color')
.key("ArkUX_Stage_DataPanel_TrackBackgroundColor_1100")
.key("ArkUX_Stage_DataPanel_TrackBackgroundColor_1100")
}
}
...
@@ -585,27 +590,6 @@ struct DatapanelTest {
...
@@ -585,27 +590,6 @@ struct DatapanelTest {
$r("app.color.DataPanel_TrackShadow3")] })
$r("app.color.DataPanel_TrackShadow3")] })
.key("ArkUX_Stage_DataPanel_TrackShadow_1900")
.key("ArkUX_Stage_DataPanel_TrackShadow_1900")
}
}
ListItem() {
DataPanel({ values: [20, 10, 10], max: 80, type: DataPanelType.Circle })
.width(200)
.height(200)
.trackShadow({ colors: '' })
.key("ArkUX_Stage_DataPanel_TrackShadow_2000")
}
ListItem() {
DataPanel({ values: [20, 10, 10], max: 80, type: DataPanelType.Circle })
.width(200)
.height(200)
.trackShadow({ colors: null })
.key("ArkUX_Stage_DataPanel_TrackShadow_2100")
}
ListItem() {
DataPanel({ values: [20, 10, 10], max: 80, type: DataPanelType.Circle })
.width(200)
.height(200)
.trackShadow({ colors: undefined })
.key("ArkUX_Stage_DataPanel_TrackShadow_2200")
}
ListItem() {
ListItem() {
DataPanel({ values: [20, 10, 10], max: 80, type: DataPanelType.Circle })
DataPanel({ values: [20, 10, 10], max: 80, type: DataPanelType.Circle })
.width(200)
.width(200)
...
@@ -636,27 +620,6 @@ struct DatapanelTest {
...
@@ -636,27 +620,6 @@ struct DatapanelTest {
$r("app.color.DataPanel_TrackShadow8"), $r("app.color.DataPanel_TrackShadow9")]})
$r("app.color.DataPanel_TrackShadow8"), $r("app.color.DataPanel_TrackShadow9")]})
.key("ArkUX_Stage_DataPanel_TrackShadow_2600")
.key("ArkUX_Stage_DataPanel_TrackShadow_2600")
}
}
ListItem() {
DataPanel({ values: [20, 10, 10], max: 80, type: DataPanelType.Circle })
.width(200)
.height(200)
.trackShadow({ colors: '' })
.key("ArkUX_Stage_DataPanel_TrackShadow_2700")
}
ListItem() {
DataPanel({ values: [20, 10, 10], max: 80, type: DataPanelType.Circle })
.width(200)
.height(200)
.trackShadow({ colors: null })
.key("ArkUX_Stage_DataPanel_TrackShadow_2800")
}
ListItem() {
DataPanel({ values: [20, 10, 10], max: 80, type: DataPanelType.Circle })
.width(200)
.height(200)
.trackShadow({ colors: undefined })
.key("ArkUX_Stage_DataPanel_TrackShadow_2900")
}
ListItem() {
ListItem() {
DataPanel({ values: [20, 10, 10], max: 80, type: DataPanelType.Circle })
DataPanel({ values: [20, 10, 10], max: 80, type: DataPanelType.Circle })
.width(200)
.width(200)
...
@@ -686,27 +649,6 @@ struct DatapanelTest {
...
@@ -686,27 +649,6 @@ struct DatapanelTest {
$r("app.color.DataPanel_TrackShadow12")]})
$r("app.color.DataPanel_TrackShadow12")]})
.key("ArkUX_Stage_DataPanel_TrackShadow_3300")
.key("ArkUX_Stage_DataPanel_TrackShadow_3300")
}
}
ListItem() {
DataPanel({ values: [20, 10, 10], max: 80, type: DataPanelType.Circle })
.width(200)
.height(200)
.trackShadow({ colors: '' })
.key("ArkUX_Stage_DataPanel_TrackShadow_3400")
}
ListItem() {
DataPanel({ values: [20, 10, 10], max: 80, type: DataPanelType.Circle })
.width(200)
.height(200)
.trackShadow({ colors: null })
.key("ArkUX_Stage_DataPanel_TrackShadow_3500")
}
ListItem() {
DataPanel({ values: [20, 10, 10], max: 80, type: DataPanelType.Circle })
.width(200)
.height(200)
.trackShadow({ colors: undefined })
.key("ArkUX_Stage_DataPanel_TrackShadow_3600")
}
}
}
}
}
.width('100%')
.width('100%')
...
...
arkui/ace_ets_components_ux/ace_ets_component_datapanel/src/main/ets/test/datapanel.ets
浏览文件 @
f52e34fd
此差异已折叠。
点击以展开。
arkui/ace_ets_components_ux/ace_ets_component_radio/src/main/ets/TestAbility/pages/Index.ets
浏览文件 @
f52e34fd
...
@@ -120,6 +120,7 @@ struct RadioTest {
...
@@ -120,6 +120,7 @@ struct RadioTest {
.checked(false)
.checked(false)
.width(50)
.width(50)
.height(50)
.height(50)
.borderColor($r("sys.color.ohos_id_color_emphasize"))
.radioStyle({ checkedBackgroundColor: '' })
.radioStyle({ checkedBackgroundColor: '' })
.key("ArkUX_Stage_Radio_CheckedBackgroundColor_0800")
.key("ArkUX_Stage_Radio_CheckedBackgroundColor_0800")
.onChange((isChecked: boolean) => {
.onChange((isChecked: boolean) => {
...
@@ -131,6 +132,7 @@ struct RadioTest {
...
@@ -131,6 +132,7 @@ struct RadioTest {
.checked(false)
.checked(false)
.width(50)
.width(50)
.height(50)
.height(50)
.borderColor($r("sys.color.ohos_id_color_emphasize"))
.radioStyle({ checkedBackgroundColor: null })
.radioStyle({ checkedBackgroundColor: null })
.key("ArkUX_Stage_Radio_CheckedBackgroundColor_0900")
.key("ArkUX_Stage_Radio_CheckedBackgroundColor_0900")
.onChange((isChecked: boolean) => {
.onChange((isChecked: boolean) => {
...
@@ -142,6 +144,7 @@ struct RadioTest {
...
@@ -142,6 +144,7 @@ struct RadioTest {
.checked(false)
.checked(false)
.width(50)
.width(50)
.height(50)
.height(50)
.borderColor($r("sys.color.ohos_id_color_emphasize"))
.radioStyle({ checkedBackgroundColor: undefined })
.radioStyle({ checkedBackgroundColor: undefined })
.key("ArkUX_Stage_Radio_CheckedBackgroundColor_1000")
.key("ArkUX_Stage_Radio_CheckedBackgroundColor_1000")
.onChange((isChecked: boolean) => {
.onChange((isChecked: boolean) => {
...
@@ -153,6 +156,7 @@ struct RadioTest {
...
@@ -153,6 +156,7 @@ struct RadioTest {
.checked(false)
.checked(false)
.width(50)
.width(50)
.height(50)
.height(50)
.borderColor($r("sys.color.ohos_id_color_emphasize"))
.radioStyle({ checkedBackgroundColor: "rgb(255,0,0)" })
.radioStyle({ checkedBackgroundColor: "rgb(255,0,0)" })
.radioStyle({ checkedBackgroundColor: undefined })
.radioStyle({ checkedBackgroundColor: undefined })
.key("ArkUX_Stage_Radio_CheckedBackgroundColor_1100")
.key("ArkUX_Stage_Radio_CheckedBackgroundColor_1100")
...
@@ -165,6 +169,7 @@ struct RadioTest {
...
@@ -165,6 +169,7 @@ struct RadioTest {
.checked(false)
.checked(false)
.width(50)
.width(50)
.height(50)
.height(50)
.borderColor($r("sys.color.ohos_id_color_emphasize"))
.radioStyle({ checkedBackgroundColor: 'color' })
.radioStyle({ checkedBackgroundColor: 'color' })
.key("ArkUX_Stage_Radio_CheckedBackgroundColor_1200")
.key("ArkUX_Stage_Radio_CheckedBackgroundColor_1200")
.onChange((isChecked: boolean) => {
.onChange((isChecked: boolean) => {
...
@@ -232,7 +237,7 @@ struct RadioTest {
...
@@ -232,7 +237,7 @@ struct RadioTest {
.width(50)
.width(50)
.height(50)
.height(50)
.radioStyle({ uncheckedBorderColor: "rgb(138,43,226)" })
.radioStyle({ uncheckedBorderColor: "rgb(138,43,226)" })
.radioStyle({ uncheckedBorderColor: Color.Black
})
.radioStyle({ uncheckedBorderColor: Color.Black })
.key("ArkUX_Stage_Radio_UncheckedBorderColor_0600")
.key("ArkUX_Stage_Radio_UncheckedBorderColor_0600")
.onChange((isChecked: boolean) => {
.onChange((isChecked: boolean) => {
console.log('Radio18 status is' + isChecked)
console.log('Radio18 status is' + isChecked)
...
@@ -255,6 +260,7 @@ struct RadioTest {
...
@@ -255,6 +260,7 @@ struct RadioTest {
.checked(false)
.checked(false)
.width(50)
.width(50)
.height(50)
.height(50)
.borderColor($r("sys.color.ohos_id_color_switch_outline_off"))
.radioStyle({ uncheckedBorderColor: '' })
.radioStyle({ uncheckedBorderColor: '' })
.key("ArkUX_Stage_Radio_UncheckedBorderColor_0800")
.key("ArkUX_Stage_Radio_UncheckedBorderColor_0800")
.onChange((isChecked: boolean) => {
.onChange((isChecked: boolean) => {
...
@@ -266,6 +272,7 @@ struct RadioTest {
...
@@ -266,6 +272,7 @@ struct RadioTest {
.checked(false)
.checked(false)
.width(50)
.width(50)
.height(50)
.height(50)
.borderColor($r("sys.color.ohos_id_color_switch_outline_off"))
.radioStyle({ uncheckedBorderColor: null })
.radioStyle({ uncheckedBorderColor: null })
.key("ArkUX_Stage_Radio_UncheckedBorderColor_0900")
.key("ArkUX_Stage_Radio_UncheckedBorderColor_0900")
.onChange((isChecked: boolean) => {
.onChange((isChecked: boolean) => {
...
@@ -277,6 +284,7 @@ struct RadioTest {
...
@@ -277,6 +284,7 @@ struct RadioTest {
.checked(false)
.checked(false)
.width(50)
.width(50)
.height(50)
.height(50)
.borderColor($r("sys.color.ohos_id_color_switch_outline_off"))
.radioStyle({ uncheckedBorderColor: undefined })
.radioStyle({ uncheckedBorderColor: undefined })
.key("ArkUX_Stage_Radio_UncheckedBorderColor_1000")
.key("ArkUX_Stage_Radio_UncheckedBorderColor_1000")
.onChange((isChecked: boolean) => {
.onChange((isChecked: boolean) => {
...
@@ -288,6 +296,7 @@ struct RadioTest {
...
@@ -288,6 +296,7 @@ struct RadioTest {
.checked(false)
.checked(false)
.width(50)
.width(50)
.height(50)
.height(50)
.borderColor($r("sys.color.ohos_id_color_switch_outline_off"))
.radioStyle({ uncheckedBorderColor: "rgb(255,0,0)" })
.radioStyle({ uncheckedBorderColor: "rgb(255,0,0)" })
.radioStyle({ uncheckedBorderColor: undefined })
.radioStyle({ uncheckedBorderColor: undefined })
.key("ArkUX_Stage_Radio_UncheckedBorderColor_1100")
.key("ArkUX_Stage_Radio_UncheckedBorderColor_1100")
...
@@ -300,6 +309,7 @@ struct RadioTest {
...
@@ -300,6 +309,7 @@ struct RadioTest {
.checked(false)
.checked(false)
.width(50)
.width(50)
.height(50)
.height(50)
.borderColor($r("sys.color.ohos_id_color_switch_outline_off"))
.radioStyle({ uncheckedBorderColor: 'bgr(138,43,226)' })
.radioStyle({ uncheckedBorderColor: 'bgr(138,43,226)' })
.key("ArkUX_Stage_Radio_UncheckedBorderColor_1200")
.key("ArkUX_Stage_Radio_UncheckedBorderColor_1200")
.onChange((isChecked: boolean) => {
.onChange((isChecked: boolean) => {
...
@@ -390,6 +400,7 @@ struct RadioTest {
...
@@ -390,6 +400,7 @@ struct RadioTest {
.checked(false)
.checked(false)
.width(50)
.width(50)
.height(50)
.height(50)
.borderColor($r("sys.color.ohos_id_color_foreground_contrary"))
.radioStyle({ indicatorColor: '' })
.radioStyle({ indicatorColor: '' })
.key("ArkUX_Stage_Radio_IndicatorColor_0800")
.key("ArkUX_Stage_Radio_IndicatorColor_0800")
.onChange((isChecked: boolean) => {
.onChange((isChecked: boolean) => {
...
@@ -401,6 +412,7 @@ struct RadioTest {
...
@@ -401,6 +412,7 @@ struct RadioTest {
.checked(false)
.checked(false)
.width(50)
.width(50)
.height(50)
.height(50)
.borderColor($r("sys.color.ohos_id_color_foreground_contrary"))
.radioStyle({ indicatorColor: null })
.radioStyle({ indicatorColor: null })
.key("ArkUX_Stage_Radio_IndicatorColor_0900")
.key("ArkUX_Stage_Radio_IndicatorColor_0900")
.onChange((isChecked: boolean) => {
.onChange((isChecked: boolean) => {
...
@@ -412,6 +424,7 @@ struct RadioTest {
...
@@ -412,6 +424,7 @@ struct RadioTest {
.checked(false)
.checked(false)
.width(50)
.width(50)
.height(50)
.height(50)
.borderColor($r("sys.color.ohos_id_color_foreground_contrary"))
.radioStyle({ indicatorColor: undefined })
.radioStyle({ indicatorColor: undefined })
.key("ArkUX_Stage_Radio_IndicatorColor_1000")
.key("ArkUX_Stage_Radio_IndicatorColor_1000")
.onChange((isChecked: boolean) => {
.onChange((isChecked: boolean) => {
...
@@ -423,6 +436,7 @@ struct RadioTest {
...
@@ -423,6 +436,7 @@ struct RadioTest {
.checked(false)
.checked(false)
.width(50)
.width(50)
.height(50)
.height(50)
.borderColor($r("sys.color.ohos_id_color_foreground_contrary"))
.radioStyle({ indicatorColor: "rgb(138,43,226)" })
.radioStyle({ indicatorColor: "rgb(138,43,226)" })
.radioStyle({ indicatorColor: undefined })
.radioStyle({ indicatorColor: undefined })
.key("ArkUX_Stage_Radio_IndicatorColor_1100")
.key("ArkUX_Stage_Radio_IndicatorColor_1100")
...
@@ -435,6 +449,7 @@ struct RadioTest {
...
@@ -435,6 +449,7 @@ struct RadioTest {
.checked(false)
.checked(false)
.width(50)
.width(50)
.height(50)
.height(50)
.borderColor($r("sys.color.ohos_id_color_foreground_contrary"))
.radioStyle({ indicatorColor: 'bgr(138,43,226)' })
.radioStyle({ indicatorColor: 'bgr(138,43,226)' })
.key("ArkUX_Stage_Radio_IndicatorColor_1200")
.key("ArkUX_Stage_Radio_IndicatorColor_1200")
.onChange((isChecked: boolean) => {
.onChange((isChecked: boolean) => {
...
@@ -461,6 +476,9 @@ struct RadioTest {
...
@@ -461,6 +476,9 @@ struct RadioTest {
.checked(false)
.checked(false)
.width(50)
.width(50)
.height(50)
.height(50)
.borderColor($r("sys.color.ohos_id_color_emphasize"))
.backgroundColor($r("sys.color.ohos_id_color_switch_outline_off"))
.foregroundColor($r("sys.color.ohos_id_color_foreground_contrary"))
.key("ArkUX_Stage_Radio_0100")
.key("ArkUX_Stage_Radio_0100")
.onChange((isChecked: boolean) => {
.onChange((isChecked: boolean) => {
console.log('Radio38 status is' + isChecked)
console.log('Radio38 status is' + isChecked)
...
...
arkui/ace_ets_components_ux/ace_ets_component_radio/src/main/ets/test/radio.ets
浏览文件 @
f52e34fd
此差异已折叠。
点击以展开。
arkui/ace_ets_components_ux/ace_ets_component_slider/src/main/ets/TestAbility/pages/Index.ets
浏览文件 @
f52e34fd
...
@@ -879,6 +879,17 @@ struct SliderTest {
...
@@ -879,6 +879,17 @@ struct SliderTest {
.stepSize(10)
.stepSize(10)
.stepSize(40)
.stepSize(40)
}
}
ListItem() {
Slider({
value: this.inSetValueOne,
min: 0,
max: 100,
style: SliderStyle.InSet
})
.key('ArkUX_Stage_Slider_stepColor_marker_color_marker_color_aalpha')
.backgroundColor($r("sys.color.ohos_id_color_foreground"))
.opacity($r("sys.float.ohos_id_alpha_normal_bg"))
}
ListItem() {
ListItem() {
Slider({
Slider({
value: this.inSetValueOne,
value: this.inSetValueOne,
...
...
arkui/ace_ets_components_ux/ace_ets_component_slider/src/main/ets/test/SliderTest.ets
浏览文件 @
f52e34fd
...
@@ -705,7 +705,15 @@ export default function sliderTest() {
...
@@ -705,7 +705,15 @@ export default function sliderTest() {
let strJson = getInspectorByKey('ArkUX_Stage_Slider_stepColor_0500');
let strJson = getInspectorByKey('ArkUX_Stage_Slider_stepColor_0500');
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
console.info("----ArkUX_Stage_Slider_stepColor_0500 is" + JSON.stringify(obj.$attrs.stepColor));
console.info("----ArkUX_Stage_Slider_stepColor_0500 is" + JSON.stringify(obj.$attrs.stepColor));
expect(obj.$attrs.stepColor).assertEqual("#19182431");
let strJsonSample = getInspectorByKey('ArkUX_Stage_Slider_stepColor_marker_color_marker_color_aalpha');
let objSample = JSON.parse(strJsonSample);
console.info("----ArkUX_Stage_Slider_stepColor_0500 is" + JSON.stringify(objSample.$attrs.backgroundColor));
console.info("----ArkUX_Stage_Slider_stepColor_0500 is" + JSON.stringify(objSample.$attrs.opacity));
let opacity= Math.floor(Number((parseInt(((objSample.$attrs.backgroundColor).substring(1, 3)), 16)*
(objSample.$attrs.opacity)).toString(16)))
expect(opacity.toString()).assertEqual((obj.$attrs.stepColor).substring(1, 3));
expect((obj.$attrs.stepColor).substr((obj.$attrs.stepColor).length-4, 4)).
assertEqual((objSample.$attrs.backgroundColor).substr((objSample.$attrs.backgroundColor).length-4, 4));
done()
done()
} catch (err) {
} catch (err) {
expect().assertFail();
expect().assertFail();
...
@@ -771,7 +779,15 @@ export default function sliderTest() {
...
@@ -771,7 +779,15 @@ export default function sliderTest() {
let strJson = getInspectorByKey('ArkUX_Stage_Slider_stepColor_0800');
let strJson = getInspectorByKey('ArkUX_Stage_Slider_stepColor_0800');
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
console.info("----ArkUX_Stage_Slider_stepColor_0800 is" + JSON.stringify(obj.$attrs.stepColor));
console.info("----ArkUX_Stage_Slider_stepColor_0800 is" + JSON.stringify(obj.$attrs.stepColor));
expect(obj.$attrs.stepColor).assertEqual("#19182431");
let strJsonSample = getInspectorByKey('ArkUX_Stage_Slider_stepColor_marker_color_marker_color_aalpha');
let objSample = JSON.parse(strJsonSample);
console.info("----ArkUX_Stage_Slider_stepColor_0800 is" + JSON.stringify(objSample.$attrs.backgroundColor));
console.info("----ArkUX_Stage_Slider_stepColor_0800 is" + JSON.stringify(objSample.$attrs.opacity));
let opacity= Math.floor(Number((parseInt(((objSample.$attrs.backgroundColor).substring(1, 3)), 16)*
(objSample.$attrs.opacity)).toString(16)))
expect(opacity.toString()).assertEqual((obj.$attrs.stepColor).substring(1, 3));
expect((obj.$attrs.stepColor).substr((obj.$attrs.stepColor).length-4, 4)).
assertEqual((objSample.$attrs.backgroundColor).substr((objSample.$attrs.backgroundColor).length-4, 4));
done();
done();
} catch (err) {
} catch (err) {
expect().assertFail();
expect().assertFail();
...
@@ -793,7 +809,15 @@ export default function sliderTest() {
...
@@ -793,7 +809,15 @@ export default function sliderTest() {
let strJson = getInspectorByKey('ArkUX_Stage_Slider_stepColor_0900');
let strJson = getInspectorByKey('ArkUX_Stage_Slider_stepColor_0900');
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
console.info("----ArkUX_Stage_Slider_stepColor_0900 is" + JSON.stringify(obj.$attrs.stepColor));
console.info("----ArkUX_Stage_Slider_stepColor_0900 is" + JSON.stringify(obj.$attrs.stepColor));
expect(obj.$attrs.stepColor).assertEqual("#19182431");
let strJsonSample = getInspectorByKey('ArkUX_Stage_Slider_stepColor_marker_color_marker_color_aalpha');
let objSample = JSON.parse(strJsonSample);
console.info("----ArkUX_Stage_Slider_stepColor_0900 is" + JSON.stringify(objSample.$attrs.backgroundColor));
console.info("----ArkUX_Stage_Slider_stepColor_0900 is" + JSON.stringify(objSample.$attrs.opacity));
let opacity= Math.floor(Number((parseInt(((objSample.$attrs.backgroundColor).substring(1, 3)), 16)*
(objSample.$attrs.opacity)).toString(16)))
expect(opacity.toString()).assertEqual((obj.$attrs.stepColor).substring(1, 3));
expect((obj.$attrs.stepColor).substr((obj.$attrs.stepColor).length-4, 4)).
assertEqual((objSample.$attrs.backgroundColor).substr((objSample.$attrs.backgroundColor).length-4, 4));
done();
done();
} catch (err) {
} catch (err) {
expect().assertFail();
expect().assertFail();
...
@@ -815,7 +839,15 @@ export default function sliderTest() {
...
@@ -815,7 +839,15 @@ export default function sliderTest() {
let strJson = getInspectorByKey('ArkUX_Stage_Slider_stepColor_1000');
let strJson = getInspectorByKey('ArkUX_Stage_Slider_stepColor_1000');
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
console.info("----ArkUX_Stage_Slider_stepColor_1000 is" + JSON.stringify(obj.$attrs.stepColor));
console.info("----ArkUX_Stage_Slider_stepColor_1000 is" + JSON.stringify(obj.$attrs.stepColor));
expect(obj.$attrs.stepColor).assertEqual("#19182431");
let strJsonSample = getInspectorByKey('ArkUX_Stage_Slider_stepColor_marker_color_marker_color_aalpha');
let objSample = JSON.parse(strJsonSample);
console.info("----ArkUX_Stage_Slider_stepColor_1000 is" + JSON.stringify(objSample.$attrs.backgroundColor));
console.info("----ArkUX_Stage_Slider_stepColor_1000 is" + JSON.stringify(objSample.$attrs.opacity));
let opacity= Math.floor(Number((parseInt(((objSample.$attrs.backgroundColor).substring(1, 3)), 16)*
(objSample.$attrs.opacity)).toString(16)))
expect(opacity.toString()).assertEqual((obj.$attrs.stepColor).substring(1, 3));
expect((obj.$attrs.stepColor).substr((obj.$attrs.stepColor).length-4, 4)).
assertEqual((objSample.$attrs.backgroundColor).substr((objSample.$attrs.backgroundColor).length-4, 4));
done();
done();
} catch (err) {
} catch (err) {
expect().assertFail();
expect().assertFail();
...
@@ -825,7 +857,7 @@ export default function sliderTest() {
...
@@ -825,7 +857,7 @@ export default function sliderTest() {
}, 500)
}, 500)
})
})
/**
/**
* @tc.number ArkUX_Stage_Slider_stepColor_1100
* @tc.number ArkUX_Stage_Slider_stepColor_1100
* @tc.name Test the stepColor property of the Slider component
* @tc.name Test the stepColor property of the Slider component
* @tc.desc Do not set the stepColor
* @tc.desc Do not set the stepColor
...
@@ -837,7 +869,15 @@ export default function sliderTest() {
...
@@ -837,7 +869,15 @@ export default function sliderTest() {
let strJson = getInspectorByKey('ArkUX_Stage_Slider_stepColor_1100');
let strJson = getInspectorByKey('ArkUX_Stage_Slider_stepColor_1100');
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
console.info("----ArkUX_Stage_Slider_stepColor_1100 is" + JSON.stringify(obj.$attrs.stepColor));
console.info("----ArkUX_Stage_Slider_stepColor_1100 is" + JSON.stringify(obj.$attrs.stepColor));
expect(obj.$attrs.stepColor).assertEqual("#19182431");
let strJsonSample = getInspectorByKey('ArkUX_Stage_Slider_stepColor_marker_color_marker_color_aalpha');
let objSample = JSON.parse(strJsonSample);
console.info("----ArkUX_Stage_Slider_stepColor_1100 is" + JSON.stringify(objSample.$attrs.backgroundColor));
console.info("----ArkUX_Stage_Slider_stepColor_1100 is" + JSON.stringify(objSample.$attrs.opacity));
let opacity= Math.floor(Number((parseInt(((objSample.$attrs.backgroundColor).substring(1, 3)), 16)*
(objSample.$attrs.opacity)).toString(16)))
expect(opacity.toString()).assertEqual((obj.$attrs.stepColor).substring(1, 3));
expect((obj.$attrs.stepColor).substr((obj.$attrs.stepColor).length-4, 4)).
assertEqual((objSample.$attrs.backgroundColor).substr((objSample.$attrs.backgroundColor).length-4, 4));
done();
done();
} catch (err) {
} catch (err) {
expect().assertFail();
expect().assertFail();
...
@@ -847,6 +887,7 @@ export default function sliderTest() {
...
@@ -847,6 +887,7 @@ export default function sliderTest() {
}, 500)
}, 500)
})
})
/**
/**
* @tc.number ArkUX_Stage_Slider_stepColor_1200
* @tc.number ArkUX_Stage_Slider_stepColor_1200
* @tc.name Test the stepColor property of the Slider component
* @tc.name Test the stepColor property of the Slider component
...
@@ -869,28 +910,6 @@ export default function sliderTest() {
...
@@ -869,28 +910,6 @@ export default function sliderTest() {
}, 500)
}, 500)
})
})
/**
* @tc.number: ArkUX_Stage_Slider_stepColor_1300
* @tc.name: Test the stepColor property of the Slider component
* @tc.desc: Set the stepColor attribute to 0xffa500 and then set the stepColor attribute parameter again to "bgr(138,43,226)"
*/
it('ArkUX_Stage_Slider_stepColor_1300', 0, async function (done) {
console.info('[ArkUX_Stage_Slider_stepColor_1300] START');
setTimeout(() => {
try {
let strJson = getInspectorByKey('ArkUX_Stage_Slider_stepColor_1300');
let obj = JSON.parse(strJson);
console.info("----ArkUX_Stage_Slider_stepColor_1300 is" + JSON.stringify(obj.$attrs.stepColor));
expect(obj.$attrs.stepColor).assertEqual("#FFFFA500");
done();
} catch (err) {
expect().assertFail();
console.info('ArkUX_Stage_Slider_stepColor_1300 ERROR: ' + JSON.stringify(err));
done();
}
}, 500)
})
/**
/**
* @tc.number ArkUX_Stage_Slider_trackBorderRadius_0100
* @tc.number ArkUX_Stage_Slider_trackBorderRadius_0100
* @tc.name Test the trackBorderRadius property of the Slider component
* @tc.name Test the trackBorderRadius property of the Slider component
...
...
arkui/ace_ets_components_ux/ace_ets_component_swiper/src/main/ets/TestAbility/pages/Index.ets
浏览文件 @
f52e34fd
...
@@ -908,6 +908,7 @@ struct SwiperTest {
...
@@ -908,6 +908,7 @@ struct SwiperTest {
.loop(true)
.loop(true)
.duration(1000)
.duration(1000)
.itemSpace(0)
.itemSpace(0)
.borderColor($r("sys.color.ohos_id_color_text_primary"))
.key("ArkUX_Stage_Swiper_SelectedFontColor_0500")
.key("ArkUX_Stage_Swiper_SelectedFontColor_0500")
.curve(Curve.Linear)
.curve(Curve.Linear)
.indicator(Indicator.digit()
.indicator(Indicator.digit()
...
@@ -932,6 +933,7 @@ struct SwiperTest {
...
@@ -932,6 +933,7 @@ struct SwiperTest {
.loop(true)
.loop(true)
.duration(1000)
.duration(1000)
.itemSpace(0)
.itemSpace(0)
.borderColor($r("sys.color.ohos_id_color_text_primary"))
.key("ArkUX_Stage_Swiper_SelectedFontColor_0600")
.key("ArkUX_Stage_Swiper_SelectedFontColor_0600")
.curve(Curve.Linear)
.curve(Curve.Linear)
.indicator(Indicator.digit()
.indicator(Indicator.digit()
...
@@ -980,6 +982,7 @@ struct SwiperTest {
...
@@ -980,6 +982,7 @@ struct SwiperTest {
.loop(true)
.loop(true)
.duration(1000)
.duration(1000)
.itemSpace(0)
.itemSpace(0)
.borderColor($r("sys.color.ohos_id_color_text_primary"))
.key("ArkUX_Stage_Swiper_SelectedFontColor_0800")
.key("ArkUX_Stage_Swiper_SelectedFontColor_0800")
.curve(Curve.Linear)
.curve(Curve.Linear)
.indicator(Indicator.digit()
.indicator(Indicator.digit()
...
@@ -1004,6 +1007,7 @@ struct SwiperTest {
...
@@ -1004,6 +1007,7 @@ struct SwiperTest {
.loop(true)
.loop(true)
.duration(1000)
.duration(1000)
.itemSpace(0)
.itemSpace(0)
.borderColor($r("sys.color.ohos_id_color_text_primary"))
.key("ArkUX_Stage_Swiper_SelectedFontColor_0900")
.key("ArkUX_Stage_Swiper_SelectedFontColor_0900")
.curve(Curve.Linear)
.curve(Curve.Linear)
.indicator(Indicator.digit()
.indicator(Indicator.digit()
...
@@ -1079,6 +1083,7 @@ struct SwiperTest {
...
@@ -1079,6 +1083,7 @@ struct SwiperTest {
.loop(true)
.loop(true)
.duration(1000)
.duration(1000)
.itemSpace(0)
.itemSpace(0)
.borderColor($r("sys.color.ohos_id_color_text_primary"))
.key("ArkUX_Stage_Swiper_SelectedFontColor_1200")
.key("ArkUX_Stage_Swiper_SelectedFontColor_1200")
.curve(Curve.Linear)
.curve(Curve.Linear)
.indicator(Indicator.digit()
.indicator(Indicator.digit()
...
@@ -1201,6 +1206,7 @@ struct SwiperTest {
...
@@ -1201,6 +1206,7 @@ struct SwiperTest {
.loop(true)
.loop(true)
.duration(1000)
.duration(1000)
.itemSpace(0)
.itemSpace(0)
.borderColor($r("sys.color.ohos_id_color_text_primary"))
.key("ArkUX_Stage_Swiper_FontColor_0500")
.key("ArkUX_Stage_Swiper_FontColor_0500")
.curve(Curve.Linear)
.curve(Curve.Linear)
.indicator(Indicator.digit()
.indicator(Indicator.digit()
...
@@ -1225,6 +1231,7 @@ struct SwiperTest {
...
@@ -1225,6 +1231,7 @@ struct SwiperTest {
.loop(true)
.loop(true)
.duration(1000)
.duration(1000)
.itemSpace(0)
.itemSpace(0)
.borderColor($r("sys.color.ohos_id_color_text_primary"))
.key("ArkUX_Stage_Swiper_FontColor_0600")
.key("ArkUX_Stage_Swiper_FontColor_0600")
.curve(Curve.Linear)
.curve(Curve.Linear)
.indicator(Indicator.digit()
.indicator(Indicator.digit()
...
@@ -1273,6 +1280,7 @@ struct SwiperTest {
...
@@ -1273,6 +1280,7 @@ struct SwiperTest {
.loop(true)
.loop(true)
.duration(1000)
.duration(1000)
.itemSpace(0)
.itemSpace(0)
.borderColor($r("sys.color.ohos_id_color_text_primary"))
.key("ArkUX_Stage_Swiper_FontColor_0800")
.key("ArkUX_Stage_Swiper_FontColor_0800")
.curve(Curve.Linear)
.curve(Curve.Linear)
.indicator(Indicator.digit()
.indicator(Indicator.digit()
...
@@ -1297,6 +1305,7 @@ struct SwiperTest {
...
@@ -1297,6 +1305,7 @@ struct SwiperTest {
.loop(true)
.loop(true)
.duration(1000)
.duration(1000)
.itemSpace(0)
.itemSpace(0)
.borderColor($r("sys.color.ohos_id_color_text_primary"))
.key("ArkUX_Stage_Swiper_FontColor_0900")
.key("ArkUX_Stage_Swiper_FontColor_0900")
.curve(Curve.Linear)
.curve(Curve.Linear)
.indicator(Indicator.digit()
.indicator(Indicator.digit()
...
@@ -1372,6 +1381,7 @@ struct SwiperTest {
...
@@ -1372,6 +1381,7 @@ struct SwiperTest {
.loop(true)
.loop(true)
.duration(1000)
.duration(1000)
.itemSpace(0)
.itemSpace(0)
.borderColor($r("sys.color.ohos_id_color_text_primary"))
.key("ArkUX_Stage_Swiper_FontColor_1200")
.key("ArkUX_Stage_Swiper_FontColor_1200")
.curve(Curve.Linear)
.curve(Curve.Linear)
.indicator(Indicator.digit()
.indicator(Indicator.digit()
...
...
arkui/ace_ets_components_ux/ace_ets_component_swiper/src/main/ets/test/swiper.ets
浏览文件 @
f52e34fd
...
@@ -1060,7 +1060,7 @@ export default function swiperTest() {
...
@@ -1060,7 +1060,7 @@ export default function swiperTest() {
JSON.stringify(obj.$attrs.selectedFontColor));
JSON.stringify(obj.$attrs.selectedFontColor));
let obj2 = JSON.parse(obj.$attrs.indicator);
let obj2 = JSON.parse(obj.$attrs.indicator);
console.info("ArkUX_Stage_Swiper_SelectedFontColor_0500 component obj2 is: " + JSON.stringify(obj2));
console.info("ArkUX_Stage_Swiper_SelectedFontColor_0500 component obj2 is: " + JSON.stringify(obj2));
expect(obj2.selectedFontColor).assertEqual(
"#FF182431"
);
expect(obj2.selectedFontColor).assertEqual(
obj.$attrs.borderColor
);
console.info('ArkUX_Stage_Swiper_SelectedFontColor_0500 END ');
console.info('ArkUX_Stage_Swiper_SelectedFontColor_0500 END ');
done();
done();
} catch (err) {
} catch (err) {
...
@@ -1090,7 +1090,7 @@ export default function swiperTest() {
...
@@ -1090,7 +1090,7 @@ export default function swiperTest() {
JSON.stringify(obj.$attrs.selectedFontColor));
JSON.stringify(obj.$attrs.selectedFontColor));
let obj2 = JSON.parse(obj.$attrs.indicator);
let obj2 = JSON.parse(obj.$attrs.indicator);
console.info("ArkUX_Stage_Swiper_SelectedFontColor_0600 component obj2 is: " + JSON.stringify(obj2));
console.info("ArkUX_Stage_Swiper_SelectedFontColor_0600 component obj2 is: " + JSON.stringify(obj2));
expect(obj2.selectedFontColor).assertEqual(
"#FF182431"
);
expect(obj2.selectedFontColor).assertEqual(
obj.$attrs.borderColor
);
console.info('ArkUX_Stage_Swiper_SelectedFontColor_0600 END ');
console.info('ArkUX_Stage_Swiper_SelectedFontColor_0600 END ');
done();
done();
} catch (err) {
} catch (err) {
...
@@ -1151,7 +1151,7 @@ export default function swiperTest() {
...
@@ -1151,7 +1151,7 @@ export default function swiperTest() {
JSON.stringify(obj.$attrs.selectedFontColor));
JSON.stringify(obj.$attrs.selectedFontColor));
let obj2 = JSON.parse(obj.$attrs.indicator);
let obj2 = JSON.parse(obj.$attrs.indicator);
console.info("ArkUX_Stage_Swiper_SelectedFontColor_0800 component obj2 is: " + JSON.stringify(obj2));
console.info("ArkUX_Stage_Swiper_SelectedFontColor_0800 component obj2 is: " + JSON.stringify(obj2));
expect(obj2.selectedFontColor).assertEqual(
"#FF182431"
);
expect(obj2.selectedFontColor).assertEqual(
obj.$attrs.borderColor
);
console.info('ArkUX_Stage_Swiper_SelectedFontColor_0800 END ');
console.info('ArkUX_Stage_Swiper_SelectedFontColor_0800 END ');
done();
done();
} catch (err) {
} catch (err) {
...
@@ -1181,7 +1181,7 @@ export default function swiperTest() {
...
@@ -1181,7 +1181,7 @@ export default function swiperTest() {
JSON.stringify(obj.$attrs.selectedFontColor));
JSON.stringify(obj.$attrs.selectedFontColor));
let obj2 = JSON.parse(obj.$attrs.indicator);
let obj2 = JSON.parse(obj.$attrs.indicator);
console.info("ArkUX_Stage_Swiper_SelectedFontColor_0900 component obj2 is: " + JSON.stringify(obj2));
console.info("ArkUX_Stage_Swiper_SelectedFontColor_0900 component obj2 is: " + JSON.stringify(obj2));
expect(obj2.selectedFontColor).assertEqual(
"#FF182431"
);
expect(obj2.selectedFontColor).assertEqual(
obj.$attrs.borderColor
);
console.info('ArkUX_Stage_Swiper_SelectedFontColor_0900 END ');
console.info('ArkUX_Stage_Swiper_SelectedFontColor_0900 END ');
done();
done();
} catch (err) {
} catch (err) {
...
@@ -1274,7 +1274,7 @@ export default function swiperTest() {
...
@@ -1274,7 +1274,7 @@ export default function swiperTest() {
JSON.stringify(obj.$attrs.selectedFontColor));
JSON.stringify(obj.$attrs.selectedFontColor));
let obj2 = JSON.parse(obj.$attrs.indicator);
let obj2 = JSON.parse(obj.$attrs.indicator);
console.info("ArkUX_Stage_Swiper_SelectedFontColor_1200 component obj2 is: " + JSON.stringify(obj2));
console.info("ArkUX_Stage_Swiper_SelectedFontColor_1200 component obj2 is: " + JSON.stringify(obj2));
expect(obj2.selectedFontColor).assertEqual(
"#FF182431"
);
expect(obj2.selectedFontColor).assertEqual(
obj.$attrs.borderColor
);
console.info('ArkUX_Stage_Swiper_SelectedFontColor_1200 END ');
console.info('ArkUX_Stage_Swiper_SelectedFontColor_1200 END ');
done();
done();
} catch (err) {
} catch (err) {
...
@@ -1424,7 +1424,7 @@ export default function swiperTest() {
...
@@ -1424,7 +1424,7 @@ export default function swiperTest() {
JSON.stringify(obj.$attrs.fontColor));
JSON.stringify(obj.$attrs.fontColor));
let obj2 = JSON.parse(obj.$attrs.indicator);
let obj2 = JSON.parse(obj.$attrs.indicator);
console.info("ArkUX_Stage_Swiper_FontColor_0500 component obj2 is: " + JSON.stringify(obj2));
console.info("ArkUX_Stage_Swiper_FontColor_0500 component obj2 is: " + JSON.stringify(obj2));
expect(obj2.fontColor).assertEqual(
"#FF182431"
);
expect(obj2.fontColor).assertEqual(
obj.$attrs.borderColor
);
console.info('ArkUX_Stage_Swiper_FontColor_0500 END ');
console.info('ArkUX_Stage_Swiper_FontColor_0500 END ');
done();
done();
} catch (err) {
} catch (err) {
...
@@ -1454,7 +1454,7 @@ export default function swiperTest() {
...
@@ -1454,7 +1454,7 @@ export default function swiperTest() {
JSON.stringify(obj.$attrs.fontColor));
JSON.stringify(obj.$attrs.fontColor));
let obj2 = JSON.parse(obj.$attrs.indicator);
let obj2 = JSON.parse(obj.$attrs.indicator);
console.info("ArkUX_Stage_Swiper_FontColor_0600 component obj2 is: " + JSON.stringify(obj2));
console.info("ArkUX_Stage_Swiper_FontColor_0600 component obj2 is: " + JSON.stringify(obj2));
expect(obj2.fontColor).assertEqual(
"#FF182431"
);
expect(obj2.fontColor).assertEqual(
obj.$attrs.borderColor
);
console.info('ArkUX_Stage_Swiper_FontColor_0600 END ');
console.info('ArkUX_Stage_Swiper_FontColor_0600 END ');
done();
done();
} catch (err) {
} catch (err) {
...
@@ -1515,7 +1515,7 @@ export default function swiperTest() {
...
@@ -1515,7 +1515,7 @@ export default function swiperTest() {
JSON.stringify(obj.$attrs.fontColor));
JSON.stringify(obj.$attrs.fontColor));
let obj2 = JSON.parse(obj.$attrs.indicator);
let obj2 = JSON.parse(obj.$attrs.indicator);
console.info("ArkUX_Stage_Swiper_FontColor_0800 component obj2 is: " + JSON.stringify(obj2));
console.info("ArkUX_Stage_Swiper_FontColor_0800 component obj2 is: " + JSON.stringify(obj2));
expect(obj2.fontColor).assertEqual(
"#FF182431"
);
expect(obj2.fontColor).assertEqual(
obj.$attrs.borderColor
);
console.info('ArkUX_Stage_Swiper_FontColor_0800 END ');
console.info('ArkUX_Stage_Swiper_FontColor_0800 END ');
done();
done();
} catch (err) {
} catch (err) {
...
@@ -1545,7 +1545,7 @@ export default function swiperTest() {
...
@@ -1545,7 +1545,7 @@ export default function swiperTest() {
JSON.stringify(obj.$attrs.fontColor));
JSON.stringify(obj.$attrs.fontColor));
let obj2 = JSON.parse(obj.$attrs.indicator);
let obj2 = JSON.parse(obj.$attrs.indicator);
console.info("ArkUX_Stage_Swiper_FontColor_0900 component obj2 is: " + JSON.stringify(obj2));
console.info("ArkUX_Stage_Swiper_FontColor_0900 component obj2 is: " + JSON.stringify(obj2));
expect(obj2.fontColor).assertEqual(
"#FF182431"
);
expect(obj2.fontColor).assertEqual(
obj.$attrs.borderColor
);
console.info('ArkUX_Stage_Swiper_FontColor_0900 END ');
console.info('ArkUX_Stage_Swiper_FontColor_0900 END ');
done();
done();
} catch (err) {
} catch (err) {
...
@@ -1638,7 +1638,7 @@ export default function swiperTest() {
...
@@ -1638,7 +1638,7 @@ export default function swiperTest() {
JSON.stringify(obj.$attrs.fontColor));
JSON.stringify(obj.$attrs.fontColor));
let obj2 = JSON.parse(obj.$attrs.indicator);
let obj2 = JSON.parse(obj.$attrs.indicator);
console.info("ArkUX_Stage_Swiper_FontColor_1200 component obj2 is: " + JSON.stringify(obj2));
console.info("ArkUX_Stage_Swiper_FontColor_1200 component obj2 is: " + JSON.stringify(obj2));
expect(obj2.fontColor).assertEqual(
"#FF182431"
);
expect(obj2.fontColor).assertEqual(
obj.$attrs.borderColor
);
console.info('ArkUX_Stage_Swiper_FontColor_1200 END ');
console.info('ArkUX_Stage_Swiper_FontColor_1200 END ');
done();
done();
} catch (err) {
} catch (err) {
...
...
arkui/ace_ets_components_ux/ace_ets_component_textinput/src/main/ets/TestAbility/pages/Index.ets
浏览文件 @
f52e34fd
...
@@ -481,6 +481,7 @@ struct textInputTest {
...
@@ -481,6 +481,7 @@ struct textInputTest {
TextInput({ text: "input your word...", controller: this.controller })
TextInput({ text: "input your word...", controller: this.controller })
.key("ArkUX_Stage_TextInput_selectedColor_0600")
.key("ArkUX_Stage_TextInput_selectedColor_0600")
.placeholderColor(Color.Grey)
.placeholderColor(Color.Grey)
.backgroundColor($r("sys.color.ohos_id_color_text_highlight_bg"))
.placeholderFont({ size: 14, weight: 400 })
.placeholderFont({ size: 14, weight: 400 })
.caretColor(Color.Blue)
.caretColor(Color.Blue)
.selectedBackgroundColor("")
.selectedBackgroundColor("")
...
@@ -496,6 +497,7 @@ struct textInputTest {
...
@@ -496,6 +497,7 @@ struct textInputTest {
.key("ArkUX_Stage_TextInput_selectedColor_0700")
.key("ArkUX_Stage_TextInput_selectedColor_0700")
.placeholderColor(Color.Grey)
.placeholderColor(Color.Grey)
.placeholderFont({ size: 14, weight: 400 })
.placeholderFont({ size: 14, weight: 400 })
.backgroundColor($r("sys.color.ohos_id_color_text_highlight_bg"))
.caretColor(Color.Blue)
.caretColor(Color.Blue)
.selectedBackgroundColor(null)
.selectedBackgroundColor(null)
.margin(20)
.margin(20)
...
@@ -510,6 +512,7 @@ struct textInputTest {
...
@@ -510,6 +512,7 @@ struct textInputTest {
.key("ArkUX_Stage_TextInput_selectedColor_0800")
.key("ArkUX_Stage_TextInput_selectedColor_0800")
.placeholderColor(Color.Grey)
.placeholderColor(Color.Grey)
.placeholderFont({ size: 14, weight: 400 })
.placeholderFont({ size: 14, weight: 400 })
.backgroundColor($r("sys.color.ohos_id_color_text_highlight_bg"))
.caretColor(Color.Blue)
.caretColor(Color.Blue)
.selectedBackgroundColor(undefined)
.selectedBackgroundColor(undefined)
.margin(20)
.margin(20)
...
@@ -539,6 +542,7 @@ struct textInputTest {
...
@@ -539,6 +542,7 @@ struct textInputTest {
.key("ArkUX_Stage_TextInput_selectedColor_1000")
.key("ArkUX_Stage_TextInput_selectedColor_1000")
.placeholderColor(Color.Grey)
.placeholderColor(Color.Grey)
.placeholderFont({ size: 14, weight: 400 })
.placeholderFont({ size: 14, weight: 400 })
.backgroundColor($r("sys.color.ohos_id_color_text_highlight_bg"))
.caretColor(Color.Blue)
.caretColor(Color.Blue)
.selectedBackgroundColor(Color.Pink)
.selectedBackgroundColor(Color.Pink)
.selectedBackgroundColor(undefined)
.selectedBackgroundColor(undefined)
...
@@ -585,6 +589,7 @@ struct textInputTest {
...
@@ -585,6 +589,7 @@ struct textInputTest {
.key("ArkUX_Stage_TextInput_selectedColor_1300")
.key("ArkUX_Stage_TextInput_selectedColor_1300")
.placeholderColor(Color.Grey)
.placeholderColor(Color.Grey)
.placeholderFont({ size: 14, weight: 400 })
.placeholderFont({ size: 14, weight: 400 })
.backgroundColor($r("sys.color.ohos_id_color_text_highlight_bg"))
.caretColor(Color.Blue)
.caretColor(Color.Blue)
.margin(20)
.margin(20)
.fontSize(14)
.fontSize(14)
...
...
arkui/ace_ets_components_ux/ace_ets_component_textinput/src/main/ets/test/textinput.ets
浏览文件 @
f52e34fd
...
@@ -793,7 +793,7 @@ export default function textInputTest() {
...
@@ -793,7 +793,7 @@ export default function textInputTest() {
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
console.info("ArkUX_Stage_TextInput_selectedColor_0600 component obj.$attrs.selectedBackgroundColor is: " +
console.info("ArkUX_Stage_TextInput_selectedColor_0600 component obj.$attrs.selectedBackgroundColor is: " +
JSON.stringify(obj.$attrs.selectedBackgroundColor));
JSON.stringify(obj.$attrs.selectedBackgroundColor));
expect(obj.$attrs.selectedBackgroundColor).assertEqual(
"#33007DFF"
);
expect(obj.$attrs.selectedBackgroundColor).assertEqual(
obj.$attrs.backgroundColor
);
console.info('ArkUX_Stage_TextInput_selectedColor_0600 END ');
console.info('ArkUX_Stage_TextInput_selectedColor_0600 END ');
} catch (err) {
} catch (err) {
expect().assertFail();
expect().assertFail();
...
@@ -817,7 +817,7 @@ export default function textInputTest() {
...
@@ -817,7 +817,7 @@ export default function textInputTest() {
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
console.info("ArkUX_Stage_TextInput_selectedColor_0700 component obj.$attrs.selectedBackgroundColor is: " +
console.info("ArkUX_Stage_TextInput_selectedColor_0700 component obj.$attrs.selectedBackgroundColor is: " +
JSON.stringify(obj.$attrs.selectedBackgroundColor));
JSON.stringify(obj.$attrs.selectedBackgroundColor));
expect(obj.$attrs.selectedBackgroundColor).assertEqual(
"#33007DFF"
);
expect(obj.$attrs.selectedBackgroundColor).assertEqual(
obj.$attrs.backgroundColor
);
console.info('ArkUX_Stage_TextInput_selectedColor_0700 END ');
console.info('ArkUX_Stage_TextInput_selectedColor_0700 END ');
} catch (err) {
} catch (err) {
expect().assertFail();
expect().assertFail();
...
@@ -841,7 +841,7 @@ export default function textInputTest() {
...
@@ -841,7 +841,7 @@ export default function textInputTest() {
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
console.info("ArkUX_Stage_TextInput_selectedColor_0800 component obj.$attrs.selectedBackgroundColor is: " +
console.info("ArkUX_Stage_TextInput_selectedColor_0800 component obj.$attrs.selectedBackgroundColor is: " +
JSON.stringify(obj.$attrs.selectedBackgroundColor));
JSON.stringify(obj.$attrs.selectedBackgroundColor));
expect(obj.$attrs.selectedBackgroundColor).assertEqual(
"#33007DFF"
);
expect(obj.$attrs.selectedBackgroundColor).assertEqual(
obj.$attrs.backgroundColor
);
console.info('ArkUX_Stage_TextInput_selectedColor_0800 END ');
console.info('ArkUX_Stage_TextInput_selectedColor_0800 END ');
} catch (err) {
} catch (err) {
expect().assertFail();
expect().assertFail();
...
@@ -891,7 +891,7 @@ export default function textInputTest() {
...
@@ -891,7 +891,7 @@ export default function textInputTest() {
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
console.info("ArkUX_Stage_TextInput_selectedColor_1000 component obj.$attrs.selectedBackgroundColor is: " +
console.info("ArkUX_Stage_TextInput_selectedColor_1000 component obj.$attrs.selectedBackgroundColor is: " +
JSON.stringify(obj.$attrs.selectedBackgroundColor));
JSON.stringify(obj.$attrs.selectedBackgroundColor));
expect(obj.$attrs.selectedBackgroundColor).assertEqual(
"#33007DFF"
);
expect(obj.$attrs.selectedBackgroundColor).assertEqual(
obj.$attrs.backgroundColor
);
console.info('ArkUX_Stage_TextInput_selectedColor_1000 END ');
console.info('ArkUX_Stage_TextInput_selectedColor_1000 END ');
} catch (err) {
} catch (err) {
expect().assertFail();
expect().assertFail();
...
@@ -977,7 +977,7 @@ export default function textInputTest() {
...
@@ -977,7 +977,7 @@ export default function textInputTest() {
console.info("ArkUX_Stage_TextInput_selectedColor_1300 component obj.$attrs.caretStyle is: " +
console.info("ArkUX_Stage_TextInput_selectedColor_1300 component obj.$attrs.caretStyle is: " +
JSON.stringify(obj.$attrs.caretStyle));
JSON.stringify(obj.$attrs.caretStyle));
let cursorStyle = JSON.parse(obj.$attrs.caretStyle);
let cursorStyle = JSON.parse(obj.$attrs.caretStyle);
expect(obj.$attrs.selectedBackgroundColor).assertEqual(
"#33007DFF"
);
expect(obj.$attrs.selectedBackgroundColor).assertEqual(
obj.$attrs.backgroundColor
);
expect(obj.$attrs.caretPosition).assertEqual("0");
expect(obj.$attrs.caretPosition).assertEqual("0");
expect(cursorStyle.width ).assertEqual("1.50vp");
expect(cursorStyle.width ).assertEqual("1.50vp");
console.info('ArkUX_Stage_TextInput_selectedColor_1300 END ');
console.info('ArkUX_Stage_TextInput_selectedColor_1300 END ');
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录