Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
fab8e902
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看板
提交
fab8e902
编写于
6月 02, 2023
作者:
H
hekun
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
submit the test code
Signed-off-by:
N
hekun
<
hekun18@huawei.com
>
上级
583b5665
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
3 addition
and
130 deletion
+3
-130
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Center/FlexExceedJsunit.test.ets
...lex/alignItems/ItemAlign_Center/FlexExceedJsunit.test.ets
+1
-32
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Center/FlexPaddingJsunit.test.ets
...ex/alignItems/ItemAlign_Center/FlexPaddingJsunit.test.ets
+0
-31
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_End/FlexExceedJsunit.test.ets
...t/Flex/alignItems/ItemAlign_End/FlexExceedJsunit.test.ets
+1
-33
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_End/FlexPaddingJsunit.test.ets
.../Flex/alignItems/ItemAlign_End/FlexPaddingJsunit.test.ets
+1
-34
未找到文件。
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Center/FlexExceedJsunit.test.ets
浏览文件 @
fab8e902
...
...
@@ -77,37 +77,6 @@ export default function flexExceed_CenterJsunit() {
done();
});
/**
* @tc.number SUB_ACE_FLEXALIGNITEMS_CENTER_0700
* @tc.name testFlexItemAlignCenterSetMarPadExceed
* @tc.desc Subcomponent outside when parent component set margin and padding.
*/
it('testFlexItemAlignCenterSetMarPadExceed', 0, async function (done) {
console.info('new testFlexItemAlignCenterSetMarPadExceed START');
globalThis.value.message.notify({name:'padding', value:30});
globalThis.value.message.notify({name:'margin', value:30});
await CommonFunc.sleep(2000);
let strJson1 = getInspectorByKey('flexExceed01');
let obj1 = JSON.parse(strJson1);
let textExceed01 = CommonFunc.getComponentRect('textExceed01');
let textExceed02 = CommonFunc.getComponentRect('textExceed02');
let textExceed03 = CommonFunc.getComponentRect('textExceed03');
let flexExceed01 = CommonFunc.getComponentRect('flexExceed01');
expect(Math.round(textExceed01.left - flexExceed01.left)).assertEqual(vp2px(30))
expect(textExceed03.right).assertLess(flexExceed01.right)
expect(textExceed01.top - flexExceed01.top).assertEqual(flexExceed01.bottom - textExceed01.bottom)
expect(textExceed02.top - flexExceed01.top).assertEqual(flexExceed01.bottom - textExceed02.bottom)
expect(textExceed03.top - flexExceed01.top).assertEqual(flexExceed01.bottom - textExceed03.bottom)
expect(Math.round(textExceed01.bottom - textExceed01.top)).assertEqual(vp2px(50))
expect(Math.round(textExceed02.bottom - textExceed02.top)).assertEqual(vp2px(100))
expect(Math.round(textExceed03.bottom - textExceed03.top)).assertEqual(vp2px(150))
expect(Math.round(textExceed01.right - textExceed01.left)).assertEqual(vp2px(440/3))
expect(Math.round(textExceed02.right - textExceed02.left)).assertEqual(vp2px(440/3))
expect(Math.round(textExceed03.right - textExceed03.left)).assertEqual(vp2px(440/3))
expect(obj1.$attrs.constructor.direction).assertEqual('FlexDirection.Row')
expect(obj1.$attrs.constructor.alignItems).assertEqual('ItemAlign.Center')
console.info('new testFlexItemAlignCenterSetMarPadExceed END');
done();
});
})
}
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Center/FlexPaddingJsunit.test.ets
浏览文件 @
fab8e902
...
...
@@ -76,36 +76,5 @@ export default function flexPadding_CenterJsunit() {
done();
});
/**
* @tc.number SUB_ACE_FLEXALIGNITEMS_CENTER_0400
* @tc.name testFlexItemAlignCenterParentSetPaddingExceed
* @tc.desc Parent component set paddding,subcomponent exceedS the parent component.
*/
it('testFlexItemAlignCenterParentSetPaddingExceed', 0, async function (done) {
console.info('new testFlexItemAlignCenterParentSetPaddingExceed START');
globalThis.value.message.notify({name:'padding', value:30});
await CommonFunc.sleep(2000);
let strJson1 = getInspectorByKey('flexPadding01');
let obj1 = JSON.parse(strJson1);
let textFlexPadding01 = CommonFunc.getComponentRect('textFlexPadding01');
let textFlexPadding02 = CommonFunc.getComponentRect('textFlexPadding02');
let textFlexPadding03 = CommonFunc.getComponentRect('textFlexPadding03');
let flexPadding01 = CommonFunc.getComponentRect('flexPadding01');
expect(Math.round(textFlexPadding01.left - flexPadding01.left)).assertEqual(vp2px(30))
expect(Math.round(flexPadding01.right - textFlexPadding03.right)).assertEqual(vp2px(30))
expect(textFlexPadding01.top - flexPadding01.top).assertEqual(flexPadding01.bottom - textFlexPadding01.bottom)
expect(textFlexPadding02.top - flexPadding01.top).assertEqual(flexPadding01.bottom - textFlexPadding02.bottom)
expect(textFlexPadding03.top - flexPadding01.top).assertEqual(flexPadding01.bottom - textFlexPadding03.bottom)
expect(Math.round(textFlexPadding01.bottom - textFlexPadding01.top)).assertEqual(vp2px(50))
expect(Math.round(textFlexPadding02.bottom - textFlexPadding02.top)).assertEqual(vp2px(100))
expect(Math.round(textFlexPadding03.bottom - textFlexPadding03.top)).assertEqual(vp2px(150))
expect(Math.round(textFlexPadding01.right - textFlexPadding01.left)).assertEqual(vp2px(440/3))
expect(Math.round(textFlexPadding02.right - textFlexPadding02.left)).assertEqual(vp2px(440/3))
expect(Math.round(textFlexPadding03.right - textFlexPadding03.left)).assertEqual(vp2px(440/3))
expect(obj1.$attrs.constructor.direction).assertEqual('FlexDirection.Row')
expect(obj1.$attrs.constructor.alignItems).assertEqual('ItemAlign.Center')
console.info('new testFlexItemAlignCenterParentSetPaddingExceed END');
done();
});
})
}
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_End/FlexExceedJsunit.test.ets
浏览文件 @
fab8e902
...
...
@@ -77,38 +77,6 @@ export default function flexExceed_EndJsunit() {
done();
});
/**
* @tc.number SUB_ACE_FLEXALIGNITEMS_END_0700
* @tc.name testFlexItemAlignEndSetMarPadExceed
* @tc.desc Subcomponent outside when parent component set margin and padding.
*/
it('testFlexItemAlignEndSetMarPadExceed', 0, async function (done) {
console.info('new testFlexItemAlignEndSetMarPadExceed START');
globalThis.value.message.notify({name:'padding', value:30});
globalThis.value.message.notify({name:'margin', value:30});
await CommonFunc.sleep(2000);
let strJson1 = getInspectorByKey('flexExceed01');
let obj1 = JSON.parse(strJson1);
let textExceed01 = CommonFunc.getComponentRect('textExceed01');
let textExceed02 = CommonFunc.getComponentRect('textExceed02');
let textExceed03 = CommonFunc.getComponentRect('textExceed03');
let flexExceed01 = CommonFunc.getComponentRect('flexExceed01');
expect(textExceed01.bottom).assertEqual(textExceed02.bottom)
expect(textExceed02.bottom).assertEqual(textExceed03.bottom)
expect(flexExceed01.bottom - textExceed01.bottom).assertEqual(vp2px(30))
expect(textExceed01.left - flexExceed01.left).assertEqual(vp2px(30))
expect(textExceed01.bottom - textExceed01.top).assertEqual(vp2px(50))
expect(textExceed02.bottom - textExceed02.top).assertEqual(vp2px(100))
expect(textExceed03.bottom - textExceed03.top).assertEqual(vp2px(150))
expect(textExceed01.right - textExceed01.left).assertEqual(vp2px(440/3))
expect(textExceed02.right - textExceed02.left).assertEqual(vp2px(440/3))
expect(textExceed03.right - textExceed03.left).assertEqual(vp2px(440/3))
expect(obj1.$attrs.constructor.direction).assertEqual('FlexDirection.Row')
expect(obj1.$attrs.constructor.alignItems).assertEqual('ItemAlign.End')
console.info('new testFlexItemAlignEndSetMarPadExceed END');
done();
});
})
}
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_End/FlexPaddingJsunit.test.ets
浏览文件 @
fab8e902
...
...
@@ -81,39 +81,6 @@ export default function flexPadding_EndJsunit() {
done();
});
/**
* @tc.number SUB_ACE_FLEXALIGNITEMS_END_0400
* @tc.name testFlexItemAlignEndParentSetPaddingExceed
* @tc.desc Parent component set paddding,subcomponent exceedS the parent component.
*/
it('testFlexItemAlignEndParentSetPaddingExceed', 0, async function (done) {
console.info('new testFlexItemAlignEndParentSetPaddingExceed START');
globalThis.value.message.notify({name:'padding', value:30});
await CommonFunc.sleep(2000);
let strJson1 = getInspectorByKey('flexPadding01');
let obj1 = JSON.parse(strJson1);
let strJson2 = getInspectorByKey('textFlexPadding01');
let obj2 = JSON.parse(strJson2);
let textFlexPadding01 = CommonFunc.getComponentRect('textFlexPadding01')
let textFlexPadding02 = CommonFunc.getComponentRect('textFlexPadding02')
let textFlexPadding03 = CommonFunc.getComponentRect('textFlexPadding03')
let flexPadding01 = CommonFunc.getComponentRect('flexPadding01')
expect(textFlexPadding01.bottom).assertEqual(textFlexPadding02.bottom)
expect(textFlexPadding02.bottom).assertEqual(textFlexPadding03.bottom)
expect(Math.round(flexPadding01.bottom - textFlexPadding01.bottom)).assertEqual(vp2px(30))
expect(Math.round(textFlexPadding01.left - flexPadding01.left)).assertEqual(vp2px(30))
expect(textFlexPadding03.right).assertLess(flexPadding01.right)
expect(Math.round(textFlexPadding01.bottom - textFlexPadding01.top)).assertEqual(vp2px(50))
expect(Math.round(textFlexPadding02.bottom - textFlexPadding02.top)).assertEqual(vp2px(100))
expect(Math.round(textFlexPadding03.bottom - textFlexPadding03.top)).assertEqual(vp2px(150))
expect(Math.round(textFlexPadding01.right - textFlexPadding01.left)).assertEqual(vp2px(440/3))
expect(Math.round(textFlexPadding02.right - textFlexPadding02.left)).assertEqual(vp2px(440/3))
expect(Math.round(textFlexPadding03.right - textFlexPadding03.left)).assertEqual(vp2px(440/3))
expect(obj1.$attrs.constructor.direction).assertEqual('FlexDirection.Row')
expect(obj1.$attrs.constructor.alignItems).assertEqual('ItemAlign.End')
console.info('new testFlexItemAlignEndParentSetPaddingExceed END');
done();
});
})
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录