Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
c4dd162e
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看板
提交
c4dd162e
编写于
4月 13, 2023
作者:
W
wmlih
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
test:add testcase Abnormal protection
Signed-off-by:
N
wmlih
<
wmlih@isoftstone.com
>
上级
e0ec19de
变更
8
显示空白变更内容
内联
并排
Showing
8 changed file
with
699 addition
and
569 deletion
+699
-569
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/Wrap/Wrap/Flex_Wrap_Visibility.test.ets
...ain/ets/test/Flex/Wrap/Wrap/Flex_Wrap_Visibility.test.ets
+103
-76
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_TextVisibility.test.ets
...und/Flex_AlignContent_SpaceAround_TextVisibility.test.ets
+81
-63
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceBeTween/Flex_AlignContent_SpaceBetween_TextVisibility.test.ets
...en/Flex_AlignContent_SpaceBetween_TextVisibility.test.ets
+66
-48
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Auto/FlexVisibilityJsunit.test.ets
...x/alignItems/ItemAlign_Auto/FlexVisibilityJsunit.test.ets
+54
-47
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_AddVisibility.test.ets
.../justifyContent/Center/AlignCenter_AddVisibility.test.ets
+95
-80
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_AddVisibility.test.ets
...t/Flex/justifyContent/End/AlignEnd_AddVisibility.test.ets
+91
-76
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddVisibility.test.ets
...ntent/SpaceEvenly/AlignSpaceEvenly_AddVisibility.test.ets
+118
-103
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddVisibility.test.ets
...ex/justifyContent/Start/AlignStart_AddVisibility.test.ets
+91
-76
未找到文件。
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/Wrap/Wrap/Flex_Wrap_Visibility.test.ets
浏览文件 @
c4dd162e
...
...
@@ -51,6 +51,7 @@ export default function flex_Wrap_VisibilityTest() {
*/
it('testWrapWrapTextVisibilityNoneOverflow', 0, async function (done) {
console.info('[testWrapWrapTextVisibilityNoneOverflow] START');
try{
globalThis.value.message.notify({name:'firstTextWidth', value:250});
globalThis.value.message.notify({name:'secondTextWidth', value:350});
globalThis.value.message.notify({name:'thirdTextWidth', value:350});
...
...
@@ -64,6 +65,10 @@ export default function flex_Wrap_VisibilityTest() {
expect(flexContainerObj.$type).assertEqual('Flex');
expect(flexContainerObj.$attrs.constructor.wrap).assertEqual('FlexWrap.Wrap');
let firstTextStrJson = getInspectorByKey('Wrap_Text_Visibility1');
let firstTextObj = JSON.parse(firstTextStrJson);
expect(firstTextObj.$attrs.visibility).assertEqual("Visibility.None");
expect(secondText.top).assertEqual(flexContainer.top);
expect(secondText.left).assertEqual(flexContainer.left);
...
...
@@ -77,6 +82,10 @@ export default function flex_Wrap_VisibilityTest() {
expect(thirdText.left).assertEqual(secondText.left);
expect(Math.round(thirdText.bottom - flexContainer.bottom)).assertEqual(vp2px(150));
} catch (err) {
console.error('[testWrapWrapTextVisibilityNoneOverflow] failed');
expect().assertFail();
}
console.info('[testWrapWrapTextVisibilityNoneOverflow] END');
done();
});
...
...
@@ -88,6 +97,7 @@ export default function flex_Wrap_VisibilityTest() {
*/
it('testWrapWrapTextVisibilityNoneMeet', 0, async function (done) {
console.info('[testWrapWrapTextVisibilityNoneMeet] START');
try{
globalThis.value.message.notify({name:'firstTextWidth', value:250});
globalThis.value.message.notify({name:'secondTextWidth', value:150});
globalThis.value.message.notify({name:'thirdTextWidth', value:150});
...
...
@@ -101,6 +111,10 @@ export default function flex_Wrap_VisibilityTest() {
expect(flexContainerObj.$type).assertEqual('Flex');
expect(flexContainerObj.$attrs.constructor.wrap).assertEqual('FlexWrap.Wrap');
let firstTextStrJson = getInspectorByKey('Wrap_Text_Visibility1');
let firstTextObj = JSON.parse(firstTextStrJson);
expect(firstTextObj.$attrs.visibility).assertEqual("Visibility.None");
expect(secondText.right).assertEqual(thirdText.left);
expect(secondText.top).assertEqual(thirdText.top);
expect(flexContainer.top).assertEqual(thirdText.top);
...
...
@@ -113,6 +127,10 @@ export default function flex_Wrap_VisibilityTest() {
expect(Math.round(flexContainer.right - thirdText.right)).assertEqual(vp2px(200));
expect(flexContainer.left).assertEqual(secondText.left);
} catch (err) {
console.error('[testWrapWrapTextVisibilityNoneMeet] failed');
expect().assertFail();
}
console.info('[testWrapWrapTextVisibilityNoneMeet] END');
done();
});
...
...
@@ -124,6 +142,7 @@ export default function flex_Wrap_VisibilityTest() {
*/
it('testWrapWrapTextVisibilityHidden', 0, async function (done) {
console.info('[testWrapWrapTextVisibilityHidden] START');
try{
globalThis.value.message.notify({name:'firstTextWidth', value:150});
globalThis.value.message.notify({name:'secondTextWidth', value:150});
globalThis.value.message.notify({name:'thirdTextWidth', value:150});
...
...
@@ -137,6 +156,10 @@ export default function flex_Wrap_VisibilityTest() {
expect(flexContainerObj.$type).assertEqual('Flex');
expect(flexContainerObj.$attrs.constructor.wrap).assertEqual('FlexWrap.Wrap');
let firstTextStrJson = getInspectorByKey('Wrap_Text_Visibility1');
let firstTextObj = JSON.parse(firstTextStrJson);
expect(firstTextObj.$attrs.visibility).assertEqual("Visibility.Hidden");
expect(secondText.right).assertEqual(thirdText.left)
expect(secondText.top).assertEqual(thirdText.top);
expect(flexContainer.top).assertEqual(thirdText.top);
...
...
@@ -149,6 +172,10 @@ export default function flex_Wrap_VisibilityTest() {
expect(Math.round(flexContainer.right - thirdText.right)).assertEqual(vp2px(50));
expect(Math.round(secondText.left - flexContainer.left)).assertEqual(vp2px(150));
} catch (err) {
console.error('[testWrapWrapTextVisibilityHidden] failed');
expect().assertFail();
}
console.info('[testWrapWrapTextVisibilityHidden] END');
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_TextVisibility.test.ets
浏览文件 @
c4dd162e
...
...
@@ -16,7 +16,6 @@
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium';
import router from '@ohos.router';
import CommonFunc from '../../../../MainAbility/common/Common';
import {MessageManager,Callback} from '../../../../MainAbility/common/MessageManager';
export default function flex_AlignContent_SpaceAround_TextVisibilityTest() {
describe('Flex_AlignContent_SpaceAround_TextVisibilityTest', function () {
beforeEach(async function (done) {
...
...
@@ -46,12 +45,13 @@ export default function flex_AlignContent_SpaceAround_TextVisibilityTest() {
});
/**
* @tc.number SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_1300
* @tc.name
alignContent_SpaceAround_TextVisibility
* @tc.name
testFlexAlignContentSpaceAroundTextVisibilityHidden
* @tc.desc The size of the parent component in the cross direction meets the layout
* of the
child components when the visibility of parent component was changed
* of the
subcomponents when the visibility of first subcomponent set to Hidden
*/
it('SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_1300', 0, async function (done) {
console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_1300] START');
it('testFlexAlignContentSpaceAroundTextVisibilityHidden', 0, async function (done) {
console.info('[testFlexAlignContentSpaceAroundTextVisibilityHidden] START');
try {
let firstText = CommonFunc.getComponentRect('AlignContent_SpaceAround_TextVisibility01');
let secondText = CommonFunc.getComponentRect('AlignContent_SpaceAround_TextVisibility02');
let distanceBefore = secondText.top - firstText.bottom;
...
...
@@ -66,31 +66,41 @@ export default function flex_AlignContent_SpaceAround_TextVisibilityTest() {
expect(flexContainerObj.$type).assertEqual('Flex');
expect(flexContainerObj.$attrs.constructor.wrap).assertEqual('FlexWrap.Wrap');
expect(flexContainerObj.$attrs.constructor.alignContent).assertEqual('FlexAlign.SpaceAround');
let firstTextStrJson = getInspectorByKey('AlignContent_SpaceAround_TextVisibility01');
let firstTextObj = JSON.parse(firstTextStrJson);
expect(firstTextObj.$attrs.visibility).assertEqual("Visibility.Hidden");
expect(Math.round(secondText.bottom - secondText.top)).assertEqual(vp2px(100));
expect(Math.round(thirdText.bottom - thirdText.top)).assertEqual(vp2px(50));
expect(Math.round(fourthText.bottom - fourthText.top)).assertEqual(vp2px(100)); //三个子组件的高度分别为100、50、100
expect(Math.round(fourthText.bottom - fourthText.top)).assertEqual(vp2px(100));
expect(secondText.left).assertEqual(thirdText.left);
expect(thirdText.left).assertEqual(fourthText.left);
expect(fourthText.left).assertEqual(flexContainer.left);
expect(Math.round((secondText.top - flexContainer.top)*100)/100)
.assertEqual(Math.round((distanceBefore * 1.5 + vp2px(50))*100)/100); //text1占位
.assertEqual(Math.round((distanceBefore * 1.5 + vp2px(50))*100)/100);
expect(Math.round(thirdText.top - secondText.bottom)).assertEqual(Math.round(fourthText.top - thirdText.bottom)); //剩余子组件行间距相等
expect(Math.round((thirdText.top - secondText.bottom)*10)/10).assertEqual(Math.round(distanceBefore*10)/10); //子组件距离不变
expect(Math.round(thirdText.top - secondText.bottom)).assertEqual(Math.round(fourthText.top - thirdText.bottom));
expect(Math.round((thirdText.top - secondText.bottom)*10)/10).assertEqual(Math.round(distanceBefore*10)/10);
expect(Math.round((flexContainer.bottom -fourthText.bottom)*100)/100)
.assertEqual(Math.round((distanceBefore / 2)*100)/100); //行首距离为子组件距离一半
console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_1300] END');
.assertEqual(Math.round((distanceBefore / 2)*100)/100);
} catch (err) {
console.error('[testFlexAlignContentSpaceAroundTextVisibilityHidden] failed');
expect().assertFail();
}
console.info('[testFlexAlignContentSpaceAroundTextVisibilityHidden] END');
done();
});
/**
* @tc.number SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_1400
* @tc.name
alignContent_SpaceAround_TextVisibility
* @tc.name
testFlexAlignContentSpaceAroundTextVisibilityNone
* @tc.desc The size of the parent component in the cross direction meets the layout
* of the
child components when the visibility of parent component was changed
* of the
subcomponents when the visibility of first subcomponent set to None
*/
it('SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_1400', 0, async function (done) {
console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_1400] START');
it('testFlexAlignContentSpaceAroundTextVisibilityNone', 0, async function (done) {
console.info('[testFlexAlignContentSpaceAroundTextVisibilityNone] START');
try {
let firstText = CommonFunc.getComponentRect('AlignContent_SpaceAround_TextVisibility01');
let secondText = CommonFunc.getComponentRect('AlignContent_SpaceAround_TextVisibility02');
let distanceBefore = Math.round(secondText.top - firstText.bottom);
...
...
@@ -106,22 +116,30 @@ export default function flex_AlignContent_SpaceAround_TextVisibilityTest() {
expect(flexContainerObj.$attrs.constructor.wrap).assertEqual('FlexWrap.Wrap');
expect(flexContainerObj.$attrs.constructor.alignContent).assertEqual('FlexAlign.SpaceAround');
let firstTextStrJson = getInspectorByKey('AlignContent_SpaceAround_TextVisibility01');
let firstTextObj = JSON.parse(firstTextStrJson);
expect(firstTextObj.$attrs.visibility).assertEqual("Visibility.None");
expect(Math.round(secondText.bottom - secondText.top)).assertEqual(vp2px(100));
expect(Math.round(thirdText.bottom - thirdText.top)).assertEqual(vp2px(50));
expect(Math.round(fourthText.bottom - fourthText.top)).assertEqual(vp2px(100)); //三个子组件的高度分别为100、50、100
expect(Math.round(fourthText.bottom - fourthText.top)).assertEqual(vp2px(100));
expect(secondText.left).assertEqual(thirdText.left);
expect(thirdText.left).assertEqual(fourthText.left);
expect(fourthText.left).assertEqual(flexContainer.left);
expect(Math.round(thirdText.top - secondText.bottom)).assertEqual(Math.round(fourthText.top - thirdText.bottom)); //剩余子组件行间距相等
expect(Math.round(thirdText.top - secondText.bottom)).assertEqual(Math.round(fourthText.top - thirdText.bottom));
expect(Math.round(thirdText.top - secondText.bottom)).assertLarger(distanceBefore); //行距大于设置前
expect(Math.round(secondText.top - flexContainer.top))
.assertEqual(Math.round(flexContainer.bottom - fourthText.bottom)); //text1不参与占位
.assertEqual(Math.round(flexContainer.bottom - fourthText.bottom));
expect(Math.round(secondText.top - flexContainer.top))
.assertEqual(Math.round((thirdText.top - secondText.bottom) / 2)); //行首行尾间距为子组件间距一半
console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_1400] END');
.assertEqual(Math.round((thirdText.top - secondText.bottom) / 2));
} catch (err) {
console.error('[testFlexAlignContentSpaceAroundTextVisibilityNone] failed');
expect().assertFail();
}
console.info('[testFlexAlignContentSpaceAroundTextVisibilityNone] END');
done();
});
})
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceBeTween/Flex_AlignContent_SpaceBetween_TextVisibility.test.ets
浏览文件 @
c4dd162e
...
...
@@ -52,6 +52,7 @@ export default function flex_AlignContent_SpaceBetween_TextVisibilityTest() {
*/
it('SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_1300', 0, async function (done) {
console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_1300] START');
try {
let firstText = CommonFunc.getComponentRect('AlignContent_SpaceBetween_TextVisibility01');
let secondText = CommonFunc.getComponentRect('AlignContent_SpaceBetween_TextVisibility02');
let distanceBefore = secondText.top - firstText.bottom;
...
...
@@ -67,6 +68,10 @@ export default function flex_AlignContent_SpaceBetween_TextVisibilityTest() {
expect(flexContainerObj.$attrs.constructor.wrap).assertEqual('FlexWrap.Wrap');
expect(flexContainerObj.$attrs.constructor.alignContent).assertEqual('FlexAlign.SpaceBetween');
let firstTextStrJson = getInspectorByKey('AlignContent_SpaceBetween_TextVisibility01');
let firstTextObj = JSON.parse(firstTextStrJson);
expect(firstTextObj.$attrs.visibility).assertEqual("Visibility.Hidden");
expect(Math.round(secondText.bottom - secondText.top)).assertEqual(vp2px(100));
expect(Math.round(thirdText.bottom - thirdText.top)).assertEqual(vp2px(50));
expect(Math.round(fourthText.bottom - fourthText.top)).assertEqual(vp2px(100)); //三个子组件的高度分别为100、50、100
...
...
@@ -79,6 +84,10 @@ export default function flex_AlignContent_SpaceBetween_TextVisibilityTest() {
expect(Math.round(thirdText.top - secondText.bottom)).assertEqual(Math.round(fourthText.top - thirdText.bottom)); //剩余子组件行间距相等
expect(Math.round(thirdText.top - secondText.bottom)).assertEqual(Math.round(distanceBefore));
} catch (err) {
console.error('[SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_1400] failed');
expect().assertFail();
}
console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_1300] END');
done();
});
...
...
@@ -90,6 +99,7 @@ export default function flex_AlignContent_SpaceBetween_TextVisibilityTest() {
*/
it('SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_1400', 0, async function (done) {
console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_1400] START');
try{
let firstText = CommonFunc.getComponentRect('AlignContent_SpaceBetween_TextVisibility01');
let secondText = CommonFunc.getComponentRect('AlignContent_SpaceBetween_TextVisibility02');
let distanceBefore = secondText.top - firstText.bottom;
...
...
@@ -105,6 +115,10 @@ export default function flex_AlignContent_SpaceBetween_TextVisibilityTest() {
expect(flexContainerObj.$attrs.constructor.wrap).assertEqual('FlexWrap.Wrap');
expect(flexContainerObj.$attrs.constructor.alignContent).assertEqual('FlexAlign.SpaceBetween');
let firstTextStrJson = getInspectorByKey('AlignContent_SpaceBetween_TextVisibility01');
let firstTextObj = JSON.parse(firstTextStrJson);
expect(firstTextObj.$attrs.visibility).assertEqual("Visibility.None");
expect(Math.round(secondText.bottom - secondText.top)).assertEqual(vp2px(100));
expect(Math.round(thirdText.bottom - thirdText.top)).assertEqual(vp2px(50));
expect(Math.round(fourthText.bottom - fourthText.top)).assertEqual(vp2px(100)); //三个子组件的高度分别为100、50、100
...
...
@@ -117,6 +131,10 @@ export default function flex_AlignContent_SpaceBetween_TextVisibilityTest() {
expect(fourthText.bottom).assertEqual(flexContainer.bottom); //行首行尾贴边
expect(Math.round(thirdText.top - secondText.bottom)).assertEqual(Math.round(fourthText.top - thirdText.bottom)); //剩余子组件行间距相等
expect(Math.round(thirdText.top - secondText.bottom)).assertLarger(Math.round(distanceBefore)); //行距大于设置前
} catch (err) {
console.error('[SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_1400] failed');
expect().assertFail();
}
console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_1400] END');
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Auto/FlexVisibilityJsunit.test.ets
浏览文件 @
c4dd162e
...
...
@@ -52,15 +52,14 @@ export default function flexVisibility_AutoJsunit() {
*/
it('SUB_ACE_FLEXALIGNITEMS_AUTO_1100', 0, async function (done) {
console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_1100 START');
try{
globalThis.value.message.notify({name:'visibility', value:Visibility.None})
await CommonFunc.sleep(2000);
let strJson1 = getInspectorByKey('flexVisible');
let obj1 = JSON.parse(strJson1);
setTimeout(() =>{
let strJson2 = getInspectorByKey('textVisible01');
let obj2 = JSON.parse(strJson2);
expect(obj2.$attrs.visibility).assertEqual("Visibility.Hidden");
})
expect(obj2.$attrs.visibility).assertEqual("Visibility.None");
let textVisible01 = CommonFunc.getComponentRect('textVisible01')
let textVisible02 = CommonFunc.getComponentRect('textVisible02')
let textVisible03 = CommonFunc.getComponentRect('textVisible03')
...
...
@@ -78,7 +77,10 @@ export default function flexVisibility_AutoJsunit() {
expect(obj1.$attrs.visibility).assertEqual("Visibility.Visible");
expect(obj1.$attrs.constructor.direction).assertEqual('FlexDirection.Row')
expect(obj1.$attrs.constructor.alignItems).assertEqual('ItemAlign.Auto')
} catch (err) {
console.error('[SUB_ACE_FLEXALIGNITEMS_AUTO_1100] failed');
expect().assertFail();
}
console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_1100 END');
done();
});
...
...
@@ -90,15 +92,16 @@ export default function flexVisibility_AutoJsunit() {
*/
it('SUB_ACE_FLEXALIGNITEMS_AUTO_1200', 0, async function (done) {
console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_1200 START');
try{
globalThis.value.message.notify({name:'visibility', value:Visibility.Hidden});
await CommonFunc.sleep(2000);
let strJson1 = getInspectorByKey('flexVisible');
let obj1 = JSON.parse(strJson1);
setTimeout(() =>{
let strJson2 = getInspectorByKey('textVisible01');
let obj2 = JSON.parse(strJson2);
expect(obj2.$attrs.visibility).assertEqual("Visibility.Hidden");
})
let textVisible01 = CommonFunc.getComponentRect('textVisible01');
let textVisible02 = CommonFunc.getComponentRect('textVisible02');
let textVisible03 = CommonFunc.getComponentRect('textVisible03');
...
...
@@ -116,6 +119,10 @@ export default function flexVisibility_AutoJsunit() {
expect(Math.round(textVisible03.right - textVisible03.left)).assertEqual(vp2px(150))
expect(obj1.$attrs.constructor.direction).assertEqual('FlexDirection.Row')
expect(obj1.$attrs.constructor.alignItems).assertEqual('ItemAlign.Auto')
} catch (err) {
console.error('[SUB_ACE_FLEXALIGNITEMS_AUTO_1200] failed');
expect().assertFail();
}
console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_1200 END');
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_AddVisibility.test.ets
浏览文件 @
c4dd162e
...
...
@@ -52,6 +52,7 @@ export default function AlignCenter_AddVisibility() {
*/
it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_1000', 0, async function (done) {
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_1000] START');
try {
globalThis.value.message.notify({name:'OneVisibility',value:Visibility.None});
await CommonFunc.sleep(3000);
let strJson = getInspectorByKey('Center_AddVisibility_01');
...
...
@@ -74,6 +75,10 @@ export default function AlignCenter_AddVisibility() {
expect(Math.round(Center_AddVisibility_013.right - Center_AddVisibility_013.left)).assertEqual(vp2px(150));
expect(Math.round(Center_AddVisibility_012.bottom - Center_AddVisibility_012.top)).assertEqual(vp2px(100));
expect(Math.round(Center_AddVisibility_013.bottom - Center_AddVisibility_013.top)).assertEqual(vp2px(150));
} catch (err) {
console.error('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_1000] failed');
expect().assertFail();
}
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_1000] END');
done();
});
...
...
@@ -85,6 +90,7 @@ export default function AlignCenter_AddVisibility() {
*/
it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_1100', 0, async function (done) {
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_1100] START');
try{
globalThis.value.message.notify({name:'OneVisibility', value:Visibility.Hidden});
await CommonFunc.sleep(3000);
let strJson = getInspectorByKey('Center_AddVisibility_01');
...
...
@@ -114,6 +120,10 @@ export default function AlignCenter_AddVisibility() {
expect(Math.round(Center_AddVisibility_011.bottom - Center_AddVisibility_011.top)).assertEqual(vp2px(50));
expect(Math.round(Center_AddVisibility_012.bottom - Center_AddVisibility_012.top)).assertEqual(vp2px(100));
expect(Math.round(Center_AddVisibility_013.bottom - Center_AddVisibility_013.top)).assertEqual(vp2px(150));
} catch (err) {
console.error('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_1100] failed');
expect().assertFail();
}
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_1100] END');
done();
});
...
...
@@ -125,6 +135,7 @@ export default function AlignCenter_AddVisibility() {
*/
it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_1700', 0, async function (done) {
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_1700] START');
try{
globalThis.value.message.notify({name:'OneVisibility', value:Visibility.Visible});
await CommonFunc.sleep(3000);
let strJson = getInspectorByKey('Center_AddVisibility_01');
...
...
@@ -154,6 +165,10 @@ export default function AlignCenter_AddVisibility() {
expect(Math.round(Center_AddVisibility_011.bottom - Center_AddVisibility_011.top)).assertEqual(vp2px(50));
expect(Math.round(Center_AddVisibility_012.bottom - Center_AddVisibility_012.top)).assertEqual(vp2px(100));
expect(Math.round(Center_AddVisibility_013.bottom - Center_AddVisibility_013.top)).assertEqual(vp2px(150));
} catch (err) {
console.error('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_1700] failed');
expect().assertFail();
}
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_1700] END');
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_AddVisibility.test.ets
浏览文件 @
c4dd162e
...
...
@@ -52,6 +52,7 @@ export default function AlignEnd_AddVisibility() {
*/
it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_1000', 0, async function (done) {
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_1000] START');
try{
globalThis.value.message.notify({name:'OneVisibility',value:Visibility.None});
await CommonFunc.sleep(3000);
let strJson = getInspectorByKey('End_AddVisibility_01');
...
...
@@ -74,6 +75,10 @@ export default function AlignEnd_AddVisibility() {
expect(Math.round(End_AddVisibility_013.right - End_AddVisibility_013.left)).assertEqual(vp2px(150));
expect(Math.round(End_AddVisibility_012.bottom - End_AddVisibility_012.top)).assertEqual(vp2px(100));
expect(Math.round(End_AddVisibility_013.bottom - End_AddVisibility_013.top)).assertEqual(vp2px(150));
} catch (err) {
console.error('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_1000] failed');
expect().assertFail();
}
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_1000] END');
done();
});
...
...
@@ -85,6 +90,7 @@ export default function AlignEnd_AddVisibility() {
*/
it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_1100', 0, async function (done) {
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_1100] START');
try{
globalThis.value.message.notify({name:'OneVisibility',value:Visibility.Hidden})
await CommonFunc.sleep(3000);
let strJson = getInspectorByKey('End_AddVisibility_01');
...
...
@@ -112,6 +118,10 @@ export default function AlignEnd_AddVisibility() {
expect(Math.round(End_AddVisibility_011.bottom - End_AddVisibility_011.top)).assertEqual(vp2px(50));
expect(Math.round(End_AddVisibility_012.bottom - End_AddVisibility_012.top)).assertEqual(vp2px(100));
expect(Math.round(End_AddVisibility_013.bottom - End_AddVisibility_013.top)).assertEqual(vp2px(150));
} catch (err) {
console.error('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_1100] failed');
expect().assertFail();
}
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_1100] END');
done();
});
...
...
@@ -123,6 +133,7 @@ export default function AlignEnd_AddVisibility() {
*/
it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_1700', 0, async function (done) {
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_1700] START');
try{
globalThis.value.message.notify({name:'OneVisibility',value:Visibility.Visible})
await CommonFunc.sleep(3000);
let strJson = getInspectorByKey('End_AddVisibility_01');
...
...
@@ -150,6 +161,10 @@ export default function AlignEnd_AddVisibility() {
expect(Math.round(End_AddVisibility_011.bottom - End_AddVisibility_011.top)).assertEqual(vp2px(50));
expect(Math.round(End_AddVisibility_012.bottom - End_AddVisibility_012.top)).assertEqual(vp2px(100));
expect(Math.round(End_AddVisibility_013.bottom - End_AddVisibility_013.top)).assertEqual(vp2px(150));
} catch (err) {
console.error('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_1700] failed');
expect().assertFail();
}
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_1700] END');
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddVisibility.test.ets
浏览文件 @
c4dd162e
...
...
@@ -52,6 +52,7 @@ export default function AlignSpaceEvenly_AddVisibility() {
*/
it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_1000', 0, async function (done) {
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_1000] START');
try{
globalThis.value.message.notify({name:'OneVisibility', value:Visibility.None});
await CommonFunc.sleep(3000);
let strJson = getInspectorByKey('SpaceEvenly_AddVisibility_01');
...
...
@@ -81,6 +82,10 @@ export default function AlignSpaceEvenly_AddVisibility() {
.assertEqual(vp2px(100));
expect(Math.round(SpaceEvenly_AddVisibility_013.bottom - SpaceEvenly_AddVisibility_013.top))
.assertEqual(vp2px(150));
} catch (err) {
console.error('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_1000] failed');
expect().assertFail();
}
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_1000] END');
done();
});
...
...
@@ -92,6 +97,7 @@ export default function AlignSpaceEvenly_AddVisibility() {
*/
it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_1100', 0, async function (done) {
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_1100] START');
try{
globalThis.value.message.notify({name:'OneVisibility',value:Visibility.Hidden});
await CommonFunc.sleep(3000);
let strJson = getInspectorByKey('SpaceEvenly_AddVisibility_01');
...
...
@@ -129,6 +135,10 @@ export default function AlignSpaceEvenly_AddVisibility() {
.assertEqual(vp2px(100));
expect(Math.round(SpaceEvenly_AddVisibility_013.bottom - SpaceEvenly_AddVisibility_013.top))
.assertEqual(vp2px(150));
} catch (err) {
console.error('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_1100] failed');
expect().assertFail();
}
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_1100] END');
done();
});
...
...
@@ -140,6 +150,7 @@ export default function AlignSpaceEvenly_AddVisibility() {
*/
it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_1700', 0, async function (done) {
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_1700] START');
try{
globalThis.value.message.notify({name:'OneVisibility',value:Visibility.Visible});
await CommonFunc.sleep(3000);
let strJson = getInspectorByKey('SpaceEvenly_AddVisibility_01');
...
...
@@ -177,6 +188,10 @@ export default function AlignSpaceEvenly_AddVisibility() {
.assertEqual(vp2px(100));
expect(Math.round(SpaceEvenly_AddVisibility_013.bottom - SpaceEvenly_AddVisibility_013.top))
.assertEqual(vp2px(150));
} catch (err) {
console.error('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_1700] failed');
expect().assertFail();
}
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_1700] END');
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddVisibility.test.ets
浏览文件 @
c4dd162e
...
...
@@ -50,6 +50,7 @@ export default function AlignStart_AddVisibility() {
*/
it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1000', 0, async function (done) {
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1000] START');
try{
globalThis.value.message.notify({name:'OneVisibility', value:Visibility.None});
await CommonFunc.sleep(3000);
let strJson = getInspectorByKey('Start_AddVisibility_01');
...
...
@@ -72,6 +73,10 @@ export default function AlignStart_AddVisibility() {
expect(Math.round(Start_AddVisibility_012.bottom - Start_AddVisibility_012.top)).assertEqual(vp2px(100));
expect(Math.round(Start_AddVisibility_013.bottom - Start_AddVisibility_013.top)).assertEqual(vp2px(150));
expect(Math.round(Start_AddVisibility_01.right - Start_AddVisibility_013.right)).assertEqual(vp2px(200));
} catch (err) {
console.error('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1000] failed');
expect().assertFail();
}
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1000] END');
done();
});
...
...
@@ -83,6 +88,7 @@ export default function AlignStart_AddVisibility() {
*/
it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1100', 0, async function (done) {
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1100] START');
try{
globalThis.value.message.notify({name:'OneVisibility', value:Visibility.Hidden});
await CommonFunc.sleep(3000);
let strJson = getInspectorByKey('Start_AddVisibility_01');
...
...
@@ -110,6 +116,10 @@ export default function AlignStart_AddVisibility() {
expect(Math.round(Start_AddVisibility_012.bottom - Start_AddVisibility_012.top)).assertEqual(vp2px(100));
expect(Math.round(Start_AddVisibility_013.bottom - Start_AddVisibility_013.top)).assertEqual(vp2px(150));
expect(Math.round(Start_AddVisibility_012.left - Start_AddVisibility_01.left)).assertEqual(vp2px(150));
} catch (err) {
console.error('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1100] failed');
expect().assertFail();
}
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1100] END');
done();
});
...
...
@@ -121,6 +131,7 @@ export default function AlignStart_AddVisibility() {
*/
it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1700', 0, async function (done) {
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1700] START');
try{
globalThis.value.message.notify({name:'OneVisibility', value:Visibility.Visible});
await CommonFunc.sleep(3000);
let strJson = getInspectorByKey('Start_AddVisibility_01');
...
...
@@ -148,6 +159,10 @@ export default function AlignStart_AddVisibility() {
expect(Math.round(Start_AddVisibility_012.bottom - Start_AddVisibility_012.top)).assertEqual(vp2px(100));
expect(Math.round(Start_AddVisibility_013.bottom - Start_AddVisibility_013.top)).assertEqual(vp2px(150));
expect(Math.round(Start_AddVisibility_012.left - Start_AddVisibility_01.left)).assertEqual(vp2px(150));
} catch (err) {
console.error('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1700] failed');
expect().assertFail();
}
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1700] END');
done();
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录