Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
233f205d
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看板
未验证
提交
233f205d
编写于
4月 03, 2023
作者:
O
openharmony_ci
提交者:
Gitee
4月 03, 2023
浏览文件
操作
浏览文件
下载
差异文件
!8339 【ACE子系统】兼容用例
Merge pull request !8339 from hekun/master
上级
4abef492
eaa70481
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
40 addition
and
26 deletion
+40
-26
arkui/ace_ets_component_ui/entry/src/main/ets/test/GridItemJsunit.test.ets
...ponent_ui/entry/src/main/ets/test/GridItemJsunit.test.ets
+15
-19
arkui/ace_ets_component_ui/entry/src/main/ets/test/GridRowJsunit.test.ets
...mponent_ui/entry/src/main/ets/test/GridRowJsunit.test.ets
+25
-7
未找到文件。
arkui/ace_ets_component_ui/entry/src/main/ets/test/GridItemJsunit.test.ets
浏览文件 @
233f205d
...
...
@@ -166,14 +166,12 @@ export default function GridItemJsunit() {
it('GridJsunit_0500', 0, async function (done) {
// Verify the columnsTemplate of Grid component
console.info('[GridJsunit_0500] START');
let gridItem1 = CommonFunc.getComponentRect('gridItem1');
let left1 = gridItem1.left
let gridItem2 = CommonFunc.getComponentRect('gridItem1');
let right1 = gridItem2.right
let gridItem1 = CommonFunc.getComponentRect('0');
let right1 = gridItem1.right;
await CommonFunc.sleep(1000);
let gridItem3 = CommonFunc.getComponentRect('
3
');
let
right2 = gridItem3.right
expect(
right2 - left1 - 4 * 6).assertEqual((right1 - left1) * 5
);
let gridItem3 = CommonFunc.getComponentRect('
1
');
let
left3 = gridItem3.left;
expect(
left3 - right1).assertEqual(vp2px(4)
);
console.info('[GridJsunit_0500] END');
done();
});
...
...
@@ -183,12 +181,10 @@ export default function GridItemJsunit() {
console.info('[GridJsunit_0600] START');
await CommonFunc.sleep(1000);
let gridItem1 = CommonFunc.getComponentRect('0');
let top1 = gridItem1.top
let gridItem2 = CommonFunc.getComponentRect('gridItem3');
let top2 = gridItem2.top
let gridItem3 = CommonFunc.getComponentRect('gridItem3');
let bottom2 = gridItem3.bottom
expect((bottom2 - top2) * 4 + 7.5).assertEqual(bottom2 - top1 - 5 * 3);
let bottom1 = gridItem1.bottom;
let gridItem3 = CommonFunc.getComponentRect('4');
let top3 = gridItem3.top;
expect(top3 - bottom1).assertEqual(vp2px(5));
console.info('[GridJsunit_0600] END');
done();
});
...
...
@@ -199,10 +195,10 @@ export default function GridItemJsunit() {
await CommonFunc.sleep(1000);
let driver = await UiDriver.create()
let gridItem1 = CommonFunc.getComponentRect('gridItem1');
let right1 = gridItem1.right
let right1 = gridItem1.right
;
let gridItem2 = CommonFunc.getComponentRect('0');
let left1 = gridItem2.left
expect(left1 - right1).assertEqual(
6
);
let left1 = gridItem2.left
;
expect(left1 - right1).assertEqual(
vp2px(4)
);
console.info('[GridJsunit_0700] END');
done();
});
...
...
@@ -216,10 +212,10 @@ export default function GridItemJsunit() {
await CommonFunc.sleep(1000);
let driver = await UiDriver.create()
let gridItem1 = CommonFunc.getComponentRect('gridItem1');
let bottom1 = gridItem1.bottom
let bottom1 = gridItem1.bottom
;
let gridItem2 = CommonFunc.getComponentRect('gridItem3');
let top1 = gridItem2.top
expect(top1 - bottom1).assertEqual(
7.5
);
let top1 = gridItem2.top
;
expect(top1 - bottom1).assertEqual(
vp2px(5)
);
console.info('[GridJsunit_0800] END');
done();
});
...
...
arkui/ace_ets_component_ui/entry/src/main/ets/test/GridRowJsunit.test.ets
浏览文件 @
233f205d
...
...
@@ -57,7 +57,11 @@ export default function GridRowJsunit() {
expect(obj.$attrs.columns).assertEqual('4');
expect(obj.$attrs.breakpoints).assertEqual('4');
expect(obj.$attrs.direction).assertEqual('4');
expect(obj.$attrs.gutter).assertEqual('<7.500000, 15.000000');
// fix the vp2px
let x = vp2px(5).toFixed(6);
let y = vp2px(10).toFixed(6);
let str = '<' + x + ', '+y;
expect(obj.$attrs.gutter).assertEqual(str);
console.info('[GridRowJsunit_0100] END');
done();
});
...
...
@@ -65,13 +69,15 @@ export default function GridRowJsunit() {
it('GridRowJsunit_0200', 0, async function (done) {
// Modify the properties of component GridRow
console.info('[GridRowJsunit_0200] START');
globalThis.value.message.notify({name:'columns',value:
12
})
globalThis.value.message.notify({name:'columns',value:
'12'
})
await CommonFunc.sleep(2000);
globalThis.value.message.notify({name:'gutter',value:
{ x: 12, y: 27}
})
globalThis.value.message.notify({name:'gutter',value:
'x: 7.5, y: 15'
})
await CommonFunc.sleep(2000);
globalThis.value.message.notify({name:'breakpoints',value:
{ value: ["200vp", "400vp", "600vp"], reference: BreakpointsReference.ComponentSize }
})
globalThis.value.message.notify({name:'breakpoints',value:
'12'
})
await CommonFunc.sleep(2000);
globalThis.value.message.notify({name:'grDirection',value:GridRowDirection.RowReverse })
globalThis.value.message.notify({name:'grDirection',value:'12'})
await CommonFunc.sleep(2000);
globalThis.value.message.notify({name:'currentBp',value:'sm'})
await CommonFunc.sleep(2000);
// Get the propoties value of the GridRow component
...
...
@@ -83,9 +89,12 @@ export default function GridRowJsunit() {
console.info("[GridRowJsunit_0200] direction: " + JSON.stringify(obj.$attrs.direction));
console.info("[GridRowJsunit_0200] gutter: " + JSON.stringify(obj.$attrs.gutter));
expect(obj.$attrs.columns).assertEqual('12');
expect(obj.$attrs.gutter).assertEqual('<18.000000, 40.500000');
expect(obj.$attrs.breakpoints).assertEqual('12');
expect(obj.$attrs.direction).assertEqual('12');
let x = vp2px(5).toFixed(6);
let y = vp2px(10).toFixed(6);
let str = '<' + x + ', '+y;
expect(obj.$attrs.gutter).assertEqual(str);
console.info('[GridRowJsunit_0200] END');
done();
});
...
...
@@ -113,9 +122,12 @@ export default function GridRowJsunit() {
console.info("[GridRowJsunit_0300] direction: " + JSON.stringify(obj.$attrs.direction));
console.info("[GridRowJsunit_0300] gutter: " + JSON.stringify(obj.$attrs.gutter));
expect(obj.$attrs.columns).assertEqual('12');
expect(obj.$attrs.gutter).assertEqual('<18.000000, 40.500000');
expect(obj.$attrs.breakpoints).assertEqual('12');
expect(obj.$attrs.direction).assertEqual('12');
let x = vp2px(5).toFixed(6);
let y = vp2px(10).toFixed(6);
let str = '<' + x + ', '+y;
expect(obj.$attrs.gutter).assertEqual(str);
console.info('[GridRowJsunit_0300] END');
done();
});
...
...
@@ -126,8 +138,14 @@ export default function GridRowJsunit() {
let strJson = getInspectorByKey('gridRow_default');
let obj = JSON.parse(strJson);
console.info("[GridRowJsunit_0400] component obj is: " + JSON.stringify(obj));
console.info("[GridRowJsunit_0400] columns: " + JSON.stringify(obj.$attrs.columns));
console.info("[GridRowJsunit_0400] breakpoints: " + JSON.stringify(obj.$attrs.breakpoints));
console.info("[GridRowJsunit_0400] direction: " + JSON.stringify(obj.$attrs.direction));
console.info("[GridRowJsunit_0400] gutter: " + JSON.stringify(obj.$attrs.gutter));
expect(obj.$attrs.columns).assertEqual('12');
expect(obj.$attrs.gutter).assertEqual('<0.000000, 0.000000');
expect(obj.$attrs.breakpoints).assertEqual('12');
expect(obj.$attrs.direction).assertEqual('12');
console.info('[GridRowJsunit_0400] END');
done();
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录