Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
8d87b736
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
接近 2 年 前同步成功
通知
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看板
提交
8d87b736
编写于
2月 08, 2023
作者:
E
e
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改用例
Signed-off-by:
N
e
<
qianwangdq@isoftstone.com
>
上级
89288f1d
变更
15
隐藏空白更改
内联
并排
Showing
15 changed file
with
139 addition
and
27 deletion
+139
-27
arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Start/AlignStart_AddAllSpace.ets
...ages/Flex/justifyContent/Start/AlignStart_AddAllSpace.ets
+0
-1
arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Start/AlignStart_AddLayoutWeight.ets
.../Flex/justifyContent/Start/AlignStart_AddLayoutWeight.ets
+29
-4
arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Start/AlignStart_AddMargin.ets
.../pages/Flex/justifyContent/Start/AlignStart_AddMargin.ets
+0
-1
arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Start/AlignStart_AddOneMargin.ets
...ges/Flex/justifyContent/Start/AlignStart_AddOneMargin.ets
+0
-1
arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Start/AlignStart_AddVisibility.ets
...es/Flex/justifyContent/Start/AlignStart_AddVisibility.ets
+1
-1
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddAlign.test.ets
...st/Flex/justifyContent/Start/AlignStart_AddAlign.test.ets
+1
-1
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddAllSpace.test.ets
...Flex/justifyContent/Start/AlignStart_AddAllSpace.test.ets
+6
-2
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddLayoutWeight.test.ets
.../justifyContent/Start/AlignStart_AddLayoutWeight.test.ets
+44
-5
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddMargin.test.ets
...t/Flex/justifyContent/Start/AlignStart_AddMargin.test.ets
+3
-1
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddOffset.test.ets
...t/Flex/justifyContent/Start/AlignStart_AddOffset.test.ets
+1
-1
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddOneMargin.test.ets
...lex/justifyContent/Start/AlignStart_AddOneMargin.test.ets
+4
-2
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddOneWidth.test.ets
...Flex/justifyContent/Start/AlignStart_AddOneWidth.test.ets
+1
-1
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddPadding.test.ets
.../Flex/justifyContent/Start/AlignStart_AddPadding.test.ets
+4
-2
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddVisibility.test.ets
...ex/justifyContent/Start/AlignStart_AddVisibility.test.ets
+41
-2
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_NoSpace.test.ets
...est/Flex/justifyContent/Start/AlignStart_NoSpace.test.ets
+4
-2
未找到文件。
arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Start/AlignStart_AddAllSpace.ets
浏览文件 @
8d87b736
...
...
@@ -36,7 +36,6 @@ struct AlignStart_AddAllSpace {
@State justifyContent: FlexAlign = FlexAlign.Start
build() {
Column() {
Text('justifyContent:FlexAlign.Start').fontSize(9).fontColor(0xCCCCCC).width('90%')
Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) {
Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("Start_AddAllSpace_011")
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Start_AddAllSpace_012")
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Start/AlignStart_AddLayoutWeight.ets
浏览文件 @
8d87b736
...
...
@@ -17,7 +17,9 @@ import {MessageManager,Callback} from './../../../../common/MessageManager';
@Entry
@Component
struct AlignStart_AddLayoutWeight {
@State OneLayoutWeight: number = 2
@State OneLayoutWeight1: number = 1;
@State OneLayoutWeight2: number = 1;
@State OneLayoutWeight3: number = 1;
messageManager:MessageManager = new MessageManager()
onPageShow() {
console.info('AlignSpaceEvenly_NoSpace onPageShow');
...
...
@@ -26,8 +28,14 @@ struct AlignStart_AddLayoutWeight {
}
let callback:Callback = (message:any) => {
console.error('message = ' + message.name + "--" + message.value);
if (message.name == 'OneLayoutWeight') {
this.OneLayoutWeight = message.value;
if (message.name == 'OneLayoutWeight1') {
this.OneLayoutWeight1 = message.value;
}
if (message.name == 'OneLayoutWeight2') {
this.OneLayoutWeight2 = message.value;
}
if (message.name == 'OneLayoutWeight3') {
this.OneLayoutWeight3 = message.value;
}
}
this.messageManager.registerCallback(callback);
...
...
@@ -42,14 +50,31 @@ struct AlignStart_AddLayoutWeight {
.height(50)
.backgroundColor(0xF5DEB3)
.key("Start_AddLayoutWeight_011")
.layoutWeight(this.OneLayoutWeight)
.layoutWeight(this.OneLayoutWeight
1
)
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Start_AddLayoutWeight_012")
.layoutWeight(this.OneLayoutWeight2)
Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Start_AddLayoutWeight_013")
.layoutWeight(this.OneLayoutWeight3)
}
.key("Start_AddLayoutWeight_01")
.width(500)
.height(200)
.backgroundColor(0xAFEEEE)
Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) {
Text('1')
.width(150)
.height(50)
.backgroundColor(0xF5DEB3)
.key("Start_AddLayoutWeight_021")
.layoutWeight(this.OneLayoutWeight1)
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Start_AddLayoutWeight_022")
.layoutWeight(this.OneLayoutWeight2)
Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Start_AddLayoutWeight_023")
}
.key("Start_AddLayoutWeight_02")
.width(500)
.height(200)
.backgroundColor(0xAFEEEE)
}
}
}
arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Start/AlignStart_AddMargin.ets
浏览文件 @
8d87b736
...
...
@@ -35,7 +35,6 @@ struct AlignStart_AddMargin {
@State justifyContent: FlexAlign = FlexAlign.Start
build() {
Column() {
Text('justifyContent:FlexAlign.Start').fontSize(9).fontColor(0xCCCCCC).width('90%')
Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) {
Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("Start_AddMargin_011")
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Start_AddMargin_012")
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Start/AlignStart_AddOneMargin.ets
浏览文件 @
8d87b736
...
...
@@ -35,7 +35,6 @@ struct AlignStart_AddOneMargin {
@State justifyContent: FlexAlign = FlexAlign.Start
build() {
Column() {
Text('justifyContent:FlexAlign.Start').fontSize(9).fontColor(0xCCCCCC).width('90%')
Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) {
Text('1')
.width(150)
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Start/AlignStart_AddVisibility.ets
浏览文件 @
8d87b736
...
...
@@ -17,7 +17,7 @@ import {MessageManager,Callback} from './../../../../common/MessageManager';
@Entry
@Component
struct AlignStart_AddVisibility {
@State OneVisibility: number = Visibility.
None
@State OneVisibility: number = Visibility.
Visible;
messageManager: MessageManager = new MessageManager()
onPageShow() {
console.info('AlignSpaceEvenly_AddVisibility onPageShow');
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddAlign.test.ets
浏览文件 @
8d87b736
...
...
@@ -48,7 +48,7 @@ export default function AlignStart_AddAlign() {
/**
* @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0800
* @tc.name Align_Start_Row_AddAlign
* @tc.desc
aceFlexAlignStartTest
* @tc.desc
Setting generic properties does not take effect, and owned properties take precedence
*/
it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0800', 0, async function (done) {
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0800] START');
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddAllSpace.test.ets
浏览文件 @
8d87b736
...
...
@@ -47,7 +47,8 @@ export default function AlignStart_AddAllSpace() {
/**
* @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0600
* @tc.name Align_Start_Row_AddAllSpace
* @tc.desc aceFlexAlignStartTest
* @tc.desc After setting margin, after subtracting the padding from the layout space of the parent component,
* the interface display of the spindle layout that does not meet the sub-component
*/
it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0600', 0, async function (done) {
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0600] START');
...
...
@@ -71,6 +72,7 @@ export default function AlignStart_AddAllSpace() {
expect( Start_AddAllSpace_011.left - Start_AddAllSpace_01.left ).assertEqual(vp2px(30));
expect( Start_AddAllSpace_01.right - Start_AddAllSpace_013.right ).assertEqual(vp2px(30));
expect( Start_AddAllSpace_01.top - Start_AddAllSpace_01_Box.top ).assertEqual(vp2px(10));
expect( Start_AddAllSpace_01.left - Start_AddAllSpace_01_Box.left ).assertEqual(vp2px(10));
expect(Start_AddAllSpace_011.bottom - Start_AddAllSpace_011.top).assertEqual(vp2px(50));
expect(Start_AddAllSpace_012.bottom - Start_AddAllSpace_012.top).assertEqual(vp2px(100));
expect(Start_AddAllSpace_013.bottom - Start_AddAllSpace_013.top).assertEqual(vp2px(150));
...
...
@@ -83,7 +85,8 @@ export default function AlignStart_AddAllSpace() {
/**
* @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0700
* @tc.name Align_Start_Row_AddAllSpace
* @tc.desc aceFlexAlignStartTest
* @tc.desc After setting margin, the interface that satisfies the spindle layout of the child component is
* displayed after subtracting the padding from the layout space of the parent component
*/
it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0700', 0, async function (done) {
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0700] START');
...
...
@@ -106,6 +109,7 @@ export default function AlignStart_AddAllSpace() {
expect( Start_AddAllSpace_011.left - Start_AddAllSpace_01.left ).assertEqual(vp2px(20));
expect( Start_AddAllSpace_01.right - Start_AddAllSpace_013.right ).assertEqual(vp2px(30));
expect( Start_AddAllSpace_011.top - Start_AddAllSpace_01.top ).assertEqual(vp2px(20));
expect( Start_AddAllSpace_01.left - Start_AddAllSpace_01_Box.left ).assertEqual(vp2px(10));
expect( Start_AddAllSpace_01.top - Start_AddAllSpace_01_Box.top ).assertEqual(vp2px(10));
expect(Start_AddAllSpace_011.right - Start_AddAllSpace_011.left).assertEqual(vp2px(150));
expect(Start_AddAllSpace_012.right - Start_AddAllSpace_012.left).assertEqual(vp2px(150));
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddLayoutWeight.test.ets
浏览文件 @
8d87b736
...
...
@@ -48,11 +48,13 @@ export default function AlignStart_AddLayoutWeight() {
/**
* @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1200
* @tc.name Align_Start_Row_AddLayoutWeight
* @tc.desc
aceFlexAlignStartTest
* @tc.desc
The interface displays all subcomponents that set different layoutWeight properties
*/
it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1200', 0, async function (done) {
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1200] START');
globalThis.value.message.notify({name:'OneLayoutWeight', value:1});
globalThis.value.message.notify({name:'OneLayoutWeight1', value:1});
globalThis.value.message.notify({name:'OneLayoutWeight2', value:2});
globalThis.value.message.notify({name:'OneLayoutWeight3', value:2});
await CommonFunc.sleep(3000);
let strJson = getInspectorByKey('Start_AddLayoutWeight_01');
let obj = JSON.parse(strJson);
...
...
@@ -70,14 +72,51 @@ export default function AlignStart_AddLayoutWeight() {
expect(Start_AddLayoutWeight_012.right).assertEqual(Start_AddLayoutWeight_013.left);
expect(Start_AddLayoutWeight_01.left).assertEqual(Start_AddLayoutWeight_011.left);
expect(Start_AddLayoutWeight_013.right).assertEqual(Start_AddLayoutWeight_01.right);
expect(Start_AddLayoutWeight_011.right - Start_AddLayoutWeight_011.left).assertEqual(vp2px(
2
00));
expect(Start_AddLayoutWeight_012.right - Start_AddLayoutWeight_012.left).assertEqual(vp2px(
15
0));
expect(Start_AddLayoutWeight_013.right - Start_AddLayoutWeight_013.left).assertEqual(vp2px(
15
0));
expect(Start_AddLayoutWeight_011.right - Start_AddLayoutWeight_011.left).assertEqual(vp2px(
1
00));
expect(Start_AddLayoutWeight_012.right - Start_AddLayoutWeight_012.left).assertEqual(vp2px(
20
0));
expect(Start_AddLayoutWeight_013.right - Start_AddLayoutWeight_013.left).assertEqual(vp2px(
20
0));
expect(Start_AddLayoutWeight_011.bottom - Start_AddLayoutWeight_011.top).assertEqual(vp2px(50));
expect(Start_AddLayoutWeight_012.bottom - Start_AddLayoutWeight_012.top).assertEqual(vp2px(100));
expect(Start_AddLayoutWeight_013.bottom - Start_AddLayoutWeight_013.top).assertEqual(vp2px(150));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1200] END');
done();
});
/**
* @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1600
* @tc.name Align_Start_Row_AddLayoutWeight
* @tc.desc Some subcomponents are displayed with different layoutWeight properties
*/
it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1600', 0, async function (done) {
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1600] START');
globalThis.value.message.notify({name:'OneLayoutWeight1', value:1});
globalThis.value.message.notify({name:'OneLayoutWeight2', value:2});
await CommonFunc.sleep(3000);
let strJson = getInspectorByKey('Start_AddLayoutWeight_01');
let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual('Flex');
expect(obj.$attrs.constructor.direction).assertEqual('FlexDirection.Row');
expect(obj.$attrs.constructor.justifyContent).assertEqual('FlexAlign.Start');
let Start_AddLayoutWeight_011 = CommonFunc.getComponentRect('Start_AddLayoutWeight_021');
let Start_AddLayoutWeight_012 = CommonFunc.getComponentRect('Start_AddLayoutWeight_022');
let Start_AddLayoutWeight_013 = CommonFunc.getComponentRect('Start_AddLayoutWeight_023');
let Start_AddLayoutWeight_01 = CommonFunc.getComponentRect('Start_AddLayoutWeight_02');
expect(Start_AddLayoutWeight_011.top).assertEqual(Start_AddLayoutWeight_012.top);
expect(Start_AddLayoutWeight_013.top).assertEqual(Start_AddLayoutWeight_012.top);
expect(Start_AddLayoutWeight_011.top).assertEqual(Start_AddLayoutWeight_01.top);
expect(Start_AddLayoutWeight_011.right).assertEqual(Start_AddLayoutWeight_012.left);
expect(Start_AddLayoutWeight_012.right).assertEqual(Start_AddLayoutWeight_013.left);
expect(Start_AddLayoutWeight_01.left).assertEqual(Start_AddLayoutWeight_011.left);
expect(Start_AddLayoutWeight_013.right).assertEqual(Start_AddLayoutWeight_01.right);
let oneWidth = Start_AddLayoutWeight_011.right - Start_AddLayoutWeight_011.left;
let twoWidth = Start_AddLayoutWeight_012.right - Start_AddLayoutWeight_012.left;
expect(twoWidth / oneWidth).assertEqual(2);
expect(twoWidth + oneWidth).assertEqual(vp2px(350));
expect(Start_AddLayoutWeight_013.right - Start_AddLayoutWeight_013.left).assertEqual(vp2px(150));
expect(Start_AddLayoutWeight_011.bottom - Start_AddLayoutWeight_011.top).assertEqual(vp2px(50));
expect(Start_AddLayoutWeight_012.bottom - Start_AddLayoutWeight_012.top).assertEqual(vp2px(100));
expect(Start_AddLayoutWeight_013.bottom - Start_AddLayoutWeight_013.top).assertEqual(vp2px(150));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1600] END');
done();
});
})
}
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddMargin.test.ets
浏览文件 @
8d87b736
...
...
@@ -48,7 +48,8 @@ export default function AlignStart_AddMargin() {
/**
* @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0500
* @tc.name Align_Start_Row_AddMargin
* @tc.desc aceFlexAlignStartTest
* @tc.desc The interface display where the child component is offset by the margin setting of the parent
* component
*/
it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0500', 0, async function (done) {
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0500] START');
...
...
@@ -71,6 +72,7 @@ export default function AlignStart_AddMargin() {
expect(Start_AddMargin_013.left).assertEqual(Start_AddMargin_012.right);
expect(Start_AddMargin_011.left).assertEqual(Start_AddMargin_01.left);
expect(Start_AddMargin_01.top - Start_AddMargin_01_Box.top).assertEqual(vp2px(20));
expect(Start_AddMargin_01.left - Start_AddMargin_01_Box.left).assertEqual(vp2px(20));
expect(Start_AddMargin_011.bottom - Start_AddMargin_011.top).assertEqual(vp2px(50));
expect(Start_AddMargin_012.bottom - Start_AddMargin_012.top).assertEqual(vp2px(100));
expect(Start_AddMargin_013.bottom - Start_AddMargin_013.top).assertEqual(vp2px(150));
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddOffset.test.ets
浏览文件 @
8d87b736
...
...
@@ -48,7 +48,7 @@ export default function AlignStart_AddOffset() {
/**
* @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0900
* @tc.name Align_Start_Row_AddOffset
* @tc.desc
aceFlexAlignStartTest
* @tc.desc
The interface display of the component that sets the offset position when drawing
*/
it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0900', 0, async function (done) {
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0900] START');
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddOneMargin.test.ets
浏览文件 @
8d87b736
...
...
@@ -48,7 +48,8 @@ export default function AlignStart_AddOneMargin() {
/**
* @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1400
* @tc.name Align_Start_Row_AddOneMargin
* @tc.desc aceFlexAlignStartTest
* @tc.desc After setting margin for the first subcomponent, the layout of the parent component's spindle
* meets the interface display of the subcomponent's layout
*/
it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1400', 0, async function (done) {
//await CommonFunc.sleep(2000);
...
...
@@ -82,7 +83,8 @@ export default function AlignStart_AddOneMargin() {
/**
* @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1500
* @tc.name Align_Start_Row_AddOneMargin
* @tc.desc aceFlexAlignStartTest
* @tc.desc After setting margin for the first subcomponent, the layout of the parent component's spindle does
* not meet the interface display of the subcomponent's layout
*/
it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1500', 0, async function (done) {
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1500] START');
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddOneWidth.test.ets
浏览文件 @
8d87b736
...
...
@@ -48,7 +48,7 @@ export default function AlignStart_AddOneWidth() {
/**
* @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1300
* @tc.name Align_Start_Row_ChangeOneWidth
* @tc.desc
aceFlexAlignStartTest
* @tc.desc
The interface is displayed when you change the spindle length (width) of the first subassembly
*/
it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1300', 0, async function (done) {
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1300] START');
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddPadding.test.ets
浏览文件 @
8d87b736
...
...
@@ -48,7 +48,8 @@ export default function AlignStart_AddPadding() {
/**
* @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0300
* @tc.name Align_Start_Row_AddPadding
* @tc.desc aceFlexAlignStartTest
* @tc.desc After subtracting the padding from the parent component layout space, the interface display
* that does not meet the spindle layout of the child component
*/
it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0300', 0, async function (done) {
//await CommonFunc.sleep(2000);
...
...
@@ -83,7 +84,8 @@ export default function AlignStart_AddPadding() {
/**
* @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0400
* @tc.name Align_Start_Row_AddPadding
* @tc.desc aceFlexAlignStartTest
* @tc.desc After subtracting the padding from the parent component layout space, the interface that
* satisfies the spindle layout of the child component is displayed
*/
it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0400', 0, async function (done) {
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0400] START');
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddVisibility.test.ets
浏览文件 @
8d87b736
...
...
@@ -46,7 +46,7 @@ export default function AlignStart_AddVisibility() {
/**
* @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1000
* @tc.name Align_Start_Row_AddVisibility
* @tc.desc
aceFlexAlignStartTest
* @tc.desc
The subcomponent sets the visibility. None, the child components are hidden in the interface display
*/
it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1000', 0, async function (done) {
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1000] START');
...
...
@@ -78,7 +78,8 @@ export default function AlignStart_AddVisibility() {
/**
* @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1100
* @tc.name Align_Start_Row_AddVisibility
* @tc.desc aceFlexAlignStartTest
* @tc.desc When the subcomponent sets visibility.hidden, the interface of the subcomponent does not occupy the
* position
*/
it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1100', 0, async function (done) {
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1100] START');
...
...
@@ -112,5 +113,43 @@ export default function AlignStart_AddVisibility() {
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1100] END');
done();
});
/**
* @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1700
* @tc.name Align_Start_Row_AddVisibility
* @tc.desc The subcomponent sets the visibility. Visible, the subcomponent does not occupy a position in the
* interface display
*/
it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1700', 0, async function (done) {
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1700] START');
globalThis.value.message.notify({name:'OneVisibility', value:Visibility.Visible});
await CommonFunc.sleep(3000);
let strJson = getInspectorByKey('Start_AddVisibility_01');
let obj = JSON.parse(strJson);
let strJson2 = getInspectorByKey('Start_AddVisibility_011');
let obj2 = JSON.parse(strJson2);
expect(obj.$type).assertEqual('Flex');
expect(obj.$attrs.constructor.direction).assertEqual('FlexDirection.Row');
expect(obj.$attrs.constructor.justifyContent).assertEqual('FlexAlign.Start');
expect(obj2.$attrs.visibility).assertEqual("Visibility.Visible");
let Start_AddVisibility_011 = CommonFunc.getComponentRect('Start_AddVisibility_011');
let Start_AddVisibility_012 = CommonFunc.getComponentRect('Start_AddVisibility_012');
let Start_AddVisibility_013 = CommonFunc.getComponentRect('Start_AddVisibility_013');
let Start_AddVisibility_01 = CommonFunc.getComponentRect('Start_AddVisibility_01');
expect(Start_AddVisibility_012.top).assertEqual(Start_AddVisibility_011.top);
expect(Start_AddVisibility_012.top).assertEqual(Start_AddVisibility_013.top);
expect(Start_AddVisibility_012.top).assertEqual(Start_AddVisibility_01.top);
expect(Start_AddVisibility_012.left).assertEqual(Start_AddVisibility_011.right);
expect(Start_AddVisibility_013.left).assertEqual(Start_AddVisibility_012.right);
expect(Start_AddVisibility_01.left).assertEqual(Start_AddVisibility_011.left);
expect(Start_AddVisibility_011.right - Start_AddVisibility_011.left).assertEqual(vp2px(150));
expect(Start_AddVisibility_012.right - Start_AddVisibility_012.left).assertEqual(vp2px(150));
expect(Start_AddVisibility_013.right - Start_AddVisibility_013.left).assertEqual(vp2px(150));
expect(Start_AddVisibility_011.bottom - Start_AddVisibility_011.top).assertEqual(vp2px(50));
expect(Start_AddVisibility_012.bottom - Start_AddVisibility_012.top).assertEqual(vp2px(100));
expect(Start_AddVisibility_013.bottom - Start_AddVisibility_013.top).assertEqual(vp2px(150));
expect(Start_AddVisibility_012.left - Start_AddVisibility_01.left).assertEqual(vp2px(150));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1700] END');
done();
});
})
}
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_NoSpace.test.ets
浏览文件 @
8d87b736
...
...
@@ -48,7 +48,8 @@ export default function AlignStart_NoSpace() {
/**
* @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0100
* @tc.name Align_Start_Row_ChangeWidth
* @tc.desc aceFlexAlignStartTest
* @tc.desc The parent component layout space does not meet the interface display of the spindle layout of
* the child component
*/
it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0100', 0, async function (done) {
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0100] START');
...
...
@@ -82,7 +83,8 @@ export default function AlignStart_NoSpace() {
/**
* @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0200
* @tc.name Align_Start_Row_ChangeWidth
* @tc.desc aceFlexAlignStartTest
* @tc.desc The interface display where the parent component layout space satisfies the spindle layout of
* the child component
*/
it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0200', 0, async function (done) {
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0200] START');
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录