提交 7f19e100 编写于 作者: E e

修改用例

Signed-off-by: Ne <qianwangdq@isoftstone.com>
上级 4c6a32d4
......@@ -49,8 +49,6 @@ struct AlignSpaceEvenly_AddAllSpace {
}
.key("SpaceEvenly_AddAllSpace_01_Box")
.width("100%")
.height(200)
.backgroundColor(0xAFEEE)
.alignItems(HorizontalAlign.Start)
}
}
......@@ -67,29 +67,6 @@ struct AlignSpaceEvenly_AddLayoutWeight {
.width(500)
.height(200)
.backgroundColor(0xAFEEEE)
Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) {
Text('1')
.width(150)
.height(50)
.backgroundColor(0xF5DEB3)
.key("SpaceEvenly_AddLayoutWeight_021")
.layoutWeight(this.OneLayoutWeight1)
Text('2')
.width(150)
.height(100)
.backgroundColor(0xD2B48C)
.key("SpaceEvenly_AddLayoutWeight_022")
.layoutWeight(this.OneLayoutWeight2)
Text('3')
.width(150)
.height(150)
.backgroundColor(0xF5DEB3)
.key("SpaceEvenly_AddLayoutWeight_023")
}
.key("SpaceEvenly_AddLayoutWeight_02")
.width(500)
.height(200)
.backgroundColor(0xAFEEEE)
}
}
}
......@@ -48,8 +48,6 @@ struct AlignSpaceEvenly_AddMargin {
}
.key("SpaceEvenly_AddMargin_01_Box")
.width("100%")
.height(200)
.backgroundColor(0xAFEEE)
.alignItems(HorizontalAlign.Start)
}
}
......@@ -90,16 +90,17 @@ export default function AlignSpaceEvenly_AddLayoutWeight() {
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_1300] START');
globalThis.value.message.notify({name:'OneLayoutWeight1', value:1});
globalThis.value.message.notify({name:'OneLayoutWeight2', value:2});
globalThis.value.message.notify({name:'OneLayoutWeight3', value:0});
await CommonFunc.sleep(3000);
let strJson = getInspectorByKey('SpaceEvenly_AddLayoutWeight_02');
let strJson = getInspectorByKey('SpaceEvenly_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.SpaceEvenly');
let SpaceEvenly_AddLayoutWeight_011 = CommonFunc.getComponentRect('SpaceEvenly_AddLayoutWeight_021');
let SpaceEvenly_AddLayoutWeight_012 = CommonFunc.getComponentRect('SpaceEvenly_AddLayoutWeight_022');
let SpaceEvenly_AddLayoutWeight_013 = CommonFunc.getComponentRect('SpaceEvenly_AddLayoutWeight_023');
let SpaceEvenly_AddLayoutWeight_01 = CommonFunc.getComponentRect('SpaceEvenly_AddLayoutWeight_02');
let SpaceEvenly_AddLayoutWeight_011 = CommonFunc.getComponentRect('SpaceEvenly_AddLayoutWeight_011');
let SpaceEvenly_AddLayoutWeight_012 = CommonFunc.getComponentRect('SpaceEvenly_AddLayoutWeight_012');
let SpaceEvenly_AddLayoutWeight_013 = CommonFunc.getComponentRect('SpaceEvenly_AddLayoutWeight_013');
let SpaceEvenly_AddLayoutWeight_01 = CommonFunc.getComponentRect('SpaceEvenly_AddLayoutWeight_01');
expect(SpaceEvenly_AddLayoutWeight_011.top).assertEqual(SpaceEvenly_AddLayoutWeight_012.top);
expect(SpaceEvenly_AddLayoutWeight_013.top).assertEqual(SpaceEvenly_AddLayoutWeight_012.top);
expect(SpaceEvenly_AddLayoutWeight_011.top).assertEqual(SpaceEvenly_AddLayoutWeight_01.top);
......
......@@ -101,7 +101,7 @@ export default function AlignSpaceEvenly_AddOneMargin() {
let SpaceEvenly_AddOneMargin_013 = CommonFunc.getComponentRect('SpaceEvenly_AddOneMargin_013');
let SpaceEvenly_AddOneMargin_01 = CommonFunc.getComponentRect('SpaceEvenly_AddOneMargin_01');
expect(SpaceEvenly_AddOneMargin_011.top - SpaceEvenly_AddOneMargin_01.top).assertEqual(vp2px(30));
expect(SpaceEvenly_AddOneMargin_011.left - SpaceEvenly_AddOneMargin_01.left).assertEqual(vp2px(30));
expect(SpaceEvenly_AddOneMargin_011.left - SpaceEvenly_AddOneMargin_01.left).assertEqual(vp2px(500/17));
expect(SpaceEvenly_AddOneMargin_012.left - SpaceEvenly_AddOneMargin_011.right)
.assertEqual(SpaceEvenly_AddOneMargin_011.left - SpaceEvenly_AddOneMargin_01.left);
expect(SpaceEvenly_AddOneMargin_013.right).assertEqual(SpaceEvenly_AddOneMargin_01.right);
......@@ -111,9 +111,9 @@ export default function AlignSpaceEvenly_AddOneMargin() {
expect(SpaceEvenly_AddOneMargin_011.bottom - SpaceEvenly_AddOneMargin_011.top).assertEqual(vp2px(50));
expect(SpaceEvenly_AddOneMargin_012.bottom - SpaceEvenly_AddOneMargin_012.top).assertEqual(vp2px(100));
expect(SpaceEvenly_AddOneMargin_013.bottom - SpaceEvenly_AddOneMargin_013.top).assertEqual(vp2px(150));
expect(SpaceEvenly_AddOneMargin_011.right - SpaceEvenly_AddOneMargin_011.left).assertEqual(vp2px(440/3));
expect(SpaceEvenly_AddOneMargin_012.right - SpaceEvenly_AddOneMargin_012.left).assertEqual(vp2px(440/3));
expect(SpaceEvenly_AddOneMargin_013.right - SpaceEvenly_AddOneMargin_013.left).assertEqual(vp2px(440/3));
expect(SpaceEvenly_AddOneMargin_011.right - SpaceEvenly_AddOneMargin_011.left).assertEqual(vp2px(2500/17));
expect(SpaceEvenly_AddOneMargin_012.right - SpaceEvenly_AddOneMargin_012.left).assertEqual(vp2px(2500/17));
expect(SpaceEvenly_AddOneMargin_013.right - SpaceEvenly_AddOneMargin_013.left).assertEqual(vp2px(2500/17));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_1600] END');
done();
})
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册