提交 8071bbbd 编写于 作者: E e

修改用例

Signed-off-by: Ne <qianwangdq@isoftstone.com>
上级 605b2dbd
...@@ -48,6 +48,5 @@ struct AlignStart_AddAlign { ...@@ -48,6 +48,5 @@ struct AlignStart_AddAlign {
.align(this.DadAddAlign) .align(this.DadAddAlign)
} }
.width("100%") .width("100%")
.backgroundColor(0xAFEEE)
} }
} }
...@@ -50,8 +50,6 @@ struct AlignStart_AddAllSpace { ...@@ -50,8 +50,6 @@ struct AlignStart_AddAllSpace {
} }
.key("Start_AddAllSpace_01_Box") .key("Start_AddAllSpace_01_Box")
.width("100%") .width("100%")
.height(200)
.backgroundColor(0xAFEEE)
.alignItems(HorizontalAlign.Start) .alignItems(HorizontalAlign.Start)
} }
} }
\ No newline at end of file
...@@ -60,21 +60,6 @@ struct AlignStart_AddLayoutWeight { ...@@ -60,21 +60,6 @@ struct AlignStart_AddLayoutWeight {
.width(500) .width(500)
.height(200) .height(200)
.backgroundColor(0xAFEEEE) .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)
} }
} }
} }
...@@ -48,8 +48,6 @@ struct AlignStart_AddMargin { ...@@ -48,8 +48,6 @@ struct AlignStart_AddMargin {
} }
.key("Start_AddMargin_01_Box") .key("Start_AddMargin_01_Box")
.width("100%") .width("100%")
.height(200)
.backgroundColor(0xAFEEE)
.alignItems(HorizontalAlign.Start) .alignItems(HorizontalAlign.Start)
} }
} }
...@@ -35,7 +35,7 @@ struct AlignStart_AddPadding { ...@@ -35,7 +35,7 @@ struct AlignStart_AddPadding {
@State justifyContent: FlexAlign = FlexAlign.Start @State justifyContent: FlexAlign = FlexAlign.Start
build() { build() {
Column() { Column() {
Text('alignContent:Start').fontSize(9).fontColor(0xCCCCCC).width('100%') Text('justifyContent:FlexAlign.Start').fontSize(9).fontColor(0xCCCCCC).width('90%')
Flex({ justifyContent: this.justifyContent, direction:FlexDirection.Row }) { Flex({ justifyContent: this.justifyContent, direction:FlexDirection.Row }) {
Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("Start_AddPadding_011") Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("Start_AddPadding_011")
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Start_AddPadding_012") Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Start_AddPadding_012")
......
...@@ -90,16 +90,17 @@ export default function AlignStart_AddLayoutWeight() { ...@@ -90,16 +90,17 @@ export default function AlignStart_AddLayoutWeight() {
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1600] START'); console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1600] START');
globalThis.value.message.notify({name:'OneLayoutWeight1', value:1}); globalThis.value.message.notify({name:'OneLayoutWeight1', value:1});
globalThis.value.message.notify({name:'OneLayoutWeight2', value:2}); globalThis.value.message.notify({name:'OneLayoutWeight2', value:2});
globalThis.value.message.notify({name:'OneLayoutWeight3', value:0});
await CommonFunc.sleep(3000); await CommonFunc.sleep(3000);
let strJson = getInspectorByKey('Start_AddLayoutWeight_01'); let strJson = getInspectorByKey('Start_AddLayoutWeight_01');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual('Flex'); expect(obj.$type).assertEqual('Flex');
expect(obj.$attrs.constructor.direction).assertEqual('FlexDirection.Row'); expect(obj.$attrs.constructor.direction).assertEqual('FlexDirection.Row');
expect(obj.$attrs.constructor.justifyContent).assertEqual('FlexAlign.Start'); expect(obj.$attrs.constructor.justifyContent).assertEqual('FlexAlign.Start');
let Start_AddLayoutWeight_011 = CommonFunc.getComponentRect('Start_AddLayoutWeight_021'); let Start_AddLayoutWeight_011 = CommonFunc.getComponentRect('Start_AddLayoutWeight_011');
let Start_AddLayoutWeight_012 = CommonFunc.getComponentRect('Start_AddLayoutWeight_022'); let Start_AddLayoutWeight_012 = CommonFunc.getComponentRect('Start_AddLayoutWeight_012');
let Start_AddLayoutWeight_013 = CommonFunc.getComponentRect('Start_AddLayoutWeight_023'); let Start_AddLayoutWeight_013 = CommonFunc.getComponentRect('Start_AddLayoutWeight_013');
let Start_AddLayoutWeight_01 = CommonFunc.getComponentRect('Start_AddLayoutWeight_02'); let Start_AddLayoutWeight_01 = CommonFunc.getComponentRect('Start_AddLayoutWeight_01');
expect(Start_AddLayoutWeight_011.top).assertEqual(Start_AddLayoutWeight_012.top); expect(Start_AddLayoutWeight_011.top).assertEqual(Start_AddLayoutWeight_012.top);
expect(Start_AddLayoutWeight_013.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.top).assertEqual(Start_AddLayoutWeight_01.top);
......
...@@ -103,12 +103,12 @@ export default function AlignStart_AddOneMargin() { ...@@ -103,12 +103,12 @@ export default function AlignStart_AddOneMargin() {
expect(Start_AddOneMargin_01.top).assertEqual(Start_AddOneMargin_012.top); expect(Start_AddOneMargin_01.top).assertEqual(Start_AddOneMargin_012.top);
expect(Start_AddOneMargin_013.left).assertEqual(Start_AddOneMargin_012.right); expect(Start_AddOneMargin_013.left).assertEqual(Start_AddOneMargin_012.right);
expect(Start_AddOneMargin_013.right).assertEqual(Start_AddOneMargin_01.right); expect(Start_AddOneMargin_013.right).assertEqual(Start_AddOneMargin_01.right);
expect(Start_AddOneMargin_012.left - Start_AddOneMargin_011.right).assertEqual(vp2px(30)); expect(Start_AddOneMargin_012.left - Start_AddOneMargin_011.right).assertEqual(vp2px(500/17));
expect(Start_AddOneMargin_011.top - Start_AddOneMargin_01.top).assertEqual(vp2px(30)); expect(Start_AddOneMargin_011.top - Start_AddOneMargin_01.top).assertEqual(vp2px(30));
expect(Start_AddOneMargin_011.left - Start_AddOneMargin_01.left).assertEqual(vp2px(30)); expect(Start_AddOneMargin_011.left - Start_AddOneMargin_01.left).assertEqual(vp2px(500/17));
expect(Start_AddOneMargin_011.right - Start_AddOneMargin_011.left).assertEqual(vp2px(440/3)); expect(Start_AddOneMargin_011.right - Start_AddOneMargin_011.left).assertEqual(vp2px(2500/17));
expect(Start_AddOneMargin_012.right - Start_AddOneMargin_012.left).assertEqual(vp2px(440/3)); expect(Start_AddOneMargin_012.right - Start_AddOneMargin_012.left).assertEqual(vp2px(2500/17));
expect(Start_AddOneMargin_013.right - Start_AddOneMargin_013.left).assertEqual(vp2px(440/3)); expect(Start_AddOneMargin_013.right - Start_AddOneMargin_013.left).assertEqual(vp2px(2500/17));
expect(Start_AddOneMargin_011.bottom - Start_AddOneMargin_011.top).assertEqual(vp2px(50)); expect(Start_AddOneMargin_011.bottom - Start_AddOneMargin_011.top).assertEqual(vp2px(50));
expect(Start_AddOneMargin_012.bottom - Start_AddOneMargin_012.top).assertEqual(vp2px(100)); expect(Start_AddOneMargin_012.bottom - Start_AddOneMargin_012.top).assertEqual(vp2px(100));
expect(Start_AddOneMargin_013.bottom - Start_AddOneMargin_013.top).assertEqual(vp2px(150)); expect(Start_AddOneMargin_013.bottom - Start_AddOneMargin_013.top).assertEqual(vp2px(150));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册