Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
0f02e670
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看板
未验证
提交
0f02e670
编写于
7月 04, 2023
作者:
O
openharmony_ci
提交者:
Gitee
7月 04, 2023
浏览文件
操作
浏览文件
下载
差异文件
!9191 swiper补充xts覆盖率
Merge pull request !9191 from sunjiakun/master
上级
77959641
9d79d9d6
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
174 addition
and
0 deletion
+174
-0
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
+56
-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
+118
-0
未找到文件。
arkui/ace_ets_components_ux/ace_ets_component_swiper/src/main/ets/TestAbility/pages/Index.ets
浏览文件 @
0f02e670
...
...
@@ -1932,6 +1932,62 @@ struct SwiperTest {
console.info(index.toString())
})
}
ListItem() {
Swiper(this.swiperController) {
LazyForEach(this.data, (item: string) => {
Text(item)
.width('90%')
.height(160)
.backgroundColor(0xAFEEEE)
.textAlign(TextAlign.Center)
.fontSize(30)
}, item => item)
}
.key("ArkUX_Stage_Swiper_Indicator_0100")
.indicator(Indicator.digit().top(1))
}
ListItem() {
Swiper(this.swiperController) {
LazyForEach(this.data, (item: string) => {
Text(item)
.width('90%')
.height(160)
.backgroundColor(0xAFEEEE)
.textAlign(TextAlign.Center)
.fontSize(30)
}, item => item)
}
.key("ArkUX_Stage_Swiper_Indicator_0200")
.indicator(Indicator.digit().bottom(1))
}
ListItem() {
Swiper(this.swiperController) {
LazyForEach(this.data, (item: string) => {
Text(item)
.width('90%')
.height(160)
.backgroundColor(0xAFEEEE)
.textAlign(TextAlign.Center)
.fontSize(30)
}, item => item)
}
.key("ArkUX_Stage_Swiper_Indicator_0300")
.indicator(Indicator.digit().left(1))
}
ListItem() {
Swiper(this.swiperController) {
LazyForEach(this.data, (item: string) => {
Text(item)
.width('90%')
.height(160)
.backgroundColor(0xAFEEEE)
.textAlign(TextAlign.Center)
.fontSize(30)
}, item => item)
}
.key("ArkUX_Stage_Swiper_Indicator_0400")
.indicator(Indicator.digit().right(1))
}
}
}
.width('100%')
...
...
arkui/ace_ets_components_ux/ace_ets_component_swiper/src/main/ets/test/swiper.ets
浏览文件 @
0f02e670
...
...
@@ -2336,5 +2336,123 @@ export default function swiperTest() {
}
}, 500)
});
/**
* @tc.number ArkUX_Stage_Swiper_Indicator_0100
* @tc.name Tests the digitFont property of the swiper component
* @tc.desc Set the Indicator property parameter to top(1)
*/
it('ArkUX_Stage_Swiper_Indicator_0100', 0, async function (done) {
console.info('ArkUX_Stage_Swiper_Indicator_0100 START');
setTimeout(() => {
try {
let strJson = getInspectorByKey('ArkUX_Stage_Swiper_Indicator_0100');
console.info('ArkUX_Stage_Swiper_Indicator_0100 START :' + JSON.stringify(strJson));
let obj = JSON.parse(strJson);
console.info("ArkUX_Stage_Swiper_Indicator_0100 component obj is: " + JSON.stringify(obj));
console.info("ArkUX_Stage_Swiper_Indicator_0100 component obj.$attrs is: " +
JSON.stringify(obj.$attrs));
let obj2 = JSON.parse(obj.$attrs.indicator);
console.info("ArkUX_Stage_Swiper_Indicator_0100 component obj2 is: " + JSON.stringify(obj2));
expect(parseFloat(obj2.top)).assertEqual(1);
console.info("ArkUX_Stage_Swiper_Indicator_0100 component obj2.indicator.top is: " +
JSON.stringify(obj2.top));
expect(obj2.top.substr(obj2.top.length-2, 2)).assertEqual("vp");
console.info('ArkUX_Stage_Swiper_Indicator_0100 END ');
done();
} catch (err) {
expect().assertFail();
console.info('ArkUX_Stage_Swiper_Indicator_0100 ERR ' + JSON.stringify(err));
done();
}
}, 500)
});
/**
* @tc.number ArkUX_Stage_Swiper_Indicator_0200
* @tc.name Tests the digitFont property of the swiper component
* @tc.desc Set the Indicator property parameter to bottom(1)
*/
it('ArkUX_Stage_Swiper_Indicator_0200', 0, async function (done) {
console.info('ArkUX_Stage_Swiper_Indicator_0200 START');
setTimeout(() => {
try {
let strJson = getInspectorByKey('ArkUX_Stage_Swiper_Indicator_0200');
console.info('ArkUX_Stage_Swiper_Indicator_0200 START :' + JSON.stringify(strJson));
let obj = JSON.parse(strJson);
console.info("ArkUX_Stage_Swiper_Indicator_0200 component obj is: " + JSON.stringify(obj));
console.info("ArkUX_Stage_Swiper_Indicator_0200 component obj.$attrs is: " +
JSON.stringify(obj.$attrs));
let obj2 = JSON.parse(obj.$attrs.indicator);
console.info("ArkUX_Stage_Swiper_Indicator_0200 component obj2 is: " + JSON.stringify(obj2));
expect(parseFloat(obj2.bottom)).assertEqual(1);
expect(obj2.bottom.substr(obj2.bottom.length-2, 2)).assertEqual("vp");
console.info('ArkUX_Stage_Swiper_Indicator_0200 END ');
done();
} catch (err) {
expect().assertFail();
console.info('ArkUX_Stage_Swiper_Indicator_0200 ERR ' + JSON.stringify(err));
done();
}
}, 500)
});
/**
* @tc.number ArkUX_Stage_Swiper_Indicator_0300
* @tc.name Tests the digitFont property of the swiper component
* @tc.desc Set the Indicator property parameter to left(1)
*/
it('ArkUX_Stage_Swiper_Indicator_0300', 0, async function (done) {
console.info('ArkUX_Stage_Swiper_Indicator_0300 START');
setTimeout(() => {
try {
let strJson = getInspectorByKey('ArkUX_Stage_Swiper_Indicator_0300');
console.info('ArkUX_Stage_Swiper_Indicator_0300 START :' + JSON.stringify(strJson));
let obj = JSON.parse(strJson);
console.info("ArkUX_Stage_Swiper_Indicator_0300 component obj is: " + JSON.stringify(obj));
console.info("ArkUX_Stage_Swiper_Indicator_0300 component obj.$attrs is: " +
JSON.stringify(obj.$attrs));
let obj2 = JSON.parse(obj.$attrs.indicator);
console.info("ArkUX_Stage_Swiper_Indicator_0300 component obj2 is: " + JSON.stringify(obj2));
expect(parseFloat(obj2.left)).assertEqual(1);
expect(obj2.left.substr(obj2.left.length-2, 2)).assertEqual("vp");
console.info('ArkUX_Stage_Swiper_Indicator_0300 END ');
done();
} catch (err) {
expect().assertFail();
console.info('ArkUX_Stage_Swiper_Indicator_0300 ERR ' + JSON.stringify(err));
done();
}
}, 500)
});
/**
* @tc.number ArkUX_Stage_Swiper_Indicator_0400
* @tc.name Tests the digitFont property of the swiper component
* @tc.desc Set the Indicator property parameter to right(1)
*/
it('ArkUX_Stage_Swiper_Indicator_0400', 0, async function (done) {
console.info('ArkUX_Stage_Swiper_Indicator_0400 START');
setTimeout(() => {
try {
let strJson = getInspectorByKey('ArkUX_Stage_Swiper_Indicator_0400');
console.info('ArkUX_Stage_Swiper_Indicator_0400 START :' + JSON.stringify(strJson));
let obj = JSON.parse(strJson);
console.info("ArkUX_Stage_Swiper_Indicator_0400 component obj is: " + JSON.stringify(obj));
console.info("ArkUX_Stage_Swiper_Indicator_0400 component obj.$attrs is: " +
JSON.stringify(obj.$attrs));
let obj2 = JSON.parse(obj.$attrs.indicator);
console.info("ArkUX_Stage_Swiper_Indicator_0400 component obj2 is: " + JSON.stringify(obj2));
expect(parseFloat(obj2.right)).assertEqual(1);
expect(obj2.right.substr(obj2.right.length-2, 2)).assertEqual("vp");
console.info('ArkUX_Stage_Swiper_Indicator_0400 END ');
done();
} catch (err) {
expect().assertFail();
console.info('ArkUX_Stage_Swiper_Indicator_0400 ERR ' + JSON.stringify(err));
done();
}
}, 500)
});
})
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录