Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
c3e9d57b
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看板
提交
c3e9d57b
编写于
2月 23, 2023
作者:
W
wang-xupeng2
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update Grid and Rating
Signed-off-by:
N
wang-xupeng2
<
wangxupeng2@huawei.com
>
上级
874ba95b
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
15 addition
and
6 deletion
+15
-6
arkui/ace_ets_component_ui/entry/src/main/ets/test/GridJsunit.test.ets
..._component_ui/entry/src/main/ets/test/GridJsunit.test.ets
+5
-0
arkui/ace_ets_component_ui/entry/src/main/ets/test/RatingJsunit.test.ets
...omponent_ui/entry/src/main/ets/test/RatingJsunit.test.ets
+10
-6
未找到文件。
arkui/ace_ets_component_ui/entry/src/main/ets/test/GridJsunit.test.ets
浏览文件 @
c3e9d57b
...
@@ -180,6 +180,11 @@ export default function GridJsunit() {
...
@@ -180,6 +180,11 @@ export default function GridJsunit() {
let strJson1 = getInspectorByKey('grid_default');
let strJson1 = getInspectorByKey('grid_default');
let obj = JSON.parse(strJson1);
let obj = JSON.parse(strJson1);
console.info("[GridJsunit_0500] component obj is: " + JSON.stringify(obj));
console.info("[GridJsunit_0500] component obj is: " + JSON.stringify(obj));
console.info("[GridJsunit_0500] columnsGap: " + JSON.stringify(obj.$attrs.columnsGap));
console.info("[GridJsunit_0500] rowsGap: " + JSON.stringify(obj.$attrs.rowsGap));
console.info("[GridJsunit_0500] scrollBar: " + JSON.stringify(obj.$attrs.scrollBar));
console.info("[GridJsunit_0500] cachedCount: " + JSON.stringify(obj.$attrs.cachedCount));
console.info("[GridJsunit_0500] supportAnimation: " + JSON.stringify(obj.$attrs.supportAnimation));
expect(obj.$attrs.columnsGap).assertEqual('0.00vp');
expect(obj.$attrs.columnsGap).assertEqual('0.00vp');
expect(obj.$attrs.rowsGap).assertEqual('0.00vp');
expect(obj.$attrs.rowsGap).assertEqual('0.00vp');
expect(obj.$attrs.scrollBar).assertEqual('BarState.Off');
expect(obj.$attrs.scrollBar).assertEqual('BarState.Off');
...
...
arkui/ace_ets_component_ui/entry/src/main/ets/test/RatingJsunit.test.ets
浏览文件 @
c3e9d57b
...
@@ -105,6 +105,7 @@ export default function RatingJsunit() {
...
@@ -105,6 +105,7 @@ export default function RatingJsunit() {
console.info('[RatingJsunit_0400] START');
console.info('[RatingJsunit_0400] START');
await CommonFunc.sleep(1000);
await CommonFunc.sleep(1000);
globalThis.value.message.notify({name:'stars',value:7})
globalThis.value.message.notify({name:'stars',value:7})
await CommonFunc.sleep(2000);
// Get the stars value of the Rating component
// Get the stars value of the Rating component
let strJson = getInspectorByKey('rating1');
let strJson = getInspectorByKey('rating1');
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
...
@@ -140,12 +141,12 @@ export default function RatingJsunit() {
...
@@ -140,12 +141,12 @@ export default function RatingJsunit() {
let driver = await UiDriver.create()
let driver = await UiDriver.create()
let textComponent1 = await driver.findComponent(BY.key('text'));
let textComponent1 = await driver.findComponent(BY.key('text'));
let text1 = await textComponent1.getText();
let text1 = await textComponent1.getText();
console.info("[
TimePickerJsunit_01
00] text1: " + JSON.stringify(text1));
console.info("[
RatingJsunit_06
00] text1: " + JSON.stringify(text1));
expect(text1).assertEqual('no change');
expect(text1).assertEqual('no change');
// Get the rating value of the Rating component
// Get the rating value of the Rating component
let strJson = getInspectorByKey('rating1');
let strJson
1
= getInspectorByKey('rating1');
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson
1
);
console.info("[RatingJsunit_0600] component obj is: " + JSON.stringify(obj));
console.info("[RatingJsunit_0600] component obj is: " + JSON.stringify(obj));
let rating1 = obj.$attrs.rating
let rating1 = obj.$attrs.rating
console.info("[RatingJsunit_0600] rating1: " + JSON.stringify(rating1));
console.info("[RatingJsunit_0600] rating1: " + JSON.stringify(rating1));
...
@@ -154,12 +155,15 @@ export default function RatingJsunit() {
...
@@ -154,12 +155,15 @@ export default function RatingJsunit() {
let textComponent = await driver.findComponent(BY.key('rating1'));
let textComponent = await driver.findComponent(BY.key('rating1'));
await textComponent.click();
await textComponent.click();
await CommonFunc.sleep(1000);
await CommonFunc.sleep(1000);
let rating2 = obj.$attrs.rating
let strJson2 = getInspectorByKey('rating1');
let obj2 = JSON.parse(strJson2);
let rating2 = obj2.$attrs.rating
console.info("[RatingJsunit_0600] rating2: " + JSON.stringify(rating2));
console.info("[RatingJsunit_0600] rating2: " + JSON.stringify(rating2));
expect(rating1 == rating2).assertFalse();
expect(rating1 == rating2).assertFalse();
let text2 = await textComponent1.getText();
let textComponent2 = await driver.findComponent(BY.key('text'));
console.info("[TimePickerJsunit_0100] text2: " + JSON.stringify(text2));
let text2 = await textComponent2.getText();
console.info("[RatingJsunit_0600] text2: " + JSON.stringify(text2));
expect(text2).assertEqual('change succ');
expect(text2).assertEqual('change succ');
console.info('[RatingJsunit_0600] END');
console.info('[RatingJsunit_0600] END');
done();
done();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录