未验证 提交 25e109b6 编写于 作者: O openharmony_ci 提交者: Gitee

!9067 【ACE子系统】修复失败用例

Merge pull request !9067 from 张立哲/master
...@@ -21,7 +21,7 @@ struct GridRow_onBreakpoint { ...@@ -21,7 +21,7 @@ struct GridRow_onBreakpoint {
build() { build() {
Column() { Column() {
Text(this.textBreakpoint).fontSize(9).fontColor(0xCCCCCC).key('textBreakpointChange') Text(this.textBreakpoint).fontSize(9).fontColor(0xCCCCCC).key('GridRowText')
GridRow({ GridRow({
columns: { xs: 1, sm: 2, md: 3, lg: 4, xl: 5, xxl: 6}, columns: { xs: 1, sm: 2, md: 3, lg: 4, xl: 5, xxl: 6},
gutter: { gutter: {
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
*/ */
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium';
import {UiComponent, UiDriver, Component, Driver, UiWindow, ON, BY, MatchPattern, DisplayRotation, ResizeDirection, WindowMode, PointerMatrix} from '@ohos.UiTest';
import router from '@ohos.router'; import router from '@ohos.router';
import CommonFunc from '../../../../MainAbility/common/Common'; import CommonFunc from '../../../../MainAbility/common/Common';
export default function GridRow_onBreakpoint() { export default function GridRow_onBreakpoint() {
...@@ -51,8 +50,8 @@ export default function GridRow_onBreakpoint() { ...@@ -51,8 +50,8 @@ export default function GridRow_onBreakpoint() {
* @tc.name testOnBreakChange * @tc.name testOnBreakChange
* @tc.desc Trigger event printing xxl * @tc.desc Trigger event printing xxl
*/ */
it('SUB_ACE_GridRowOnBreakPointChange_0100', 0, async function (done) { it('SUB_ACE_GridRow_onBreakPointChange_0100', 0, async function (done) {
console.info('SUB_ACE_GridRowOnBreakPointChange_0100 START'); console.info('SUB_ACE_GridRow_onBreakPointChange_0100 START');
await CommonFunc.sleep(2000) await CommonFunc.sleep(2000)
let Breakpoint_1 = CommonFunc.getComponentRect('GridRow_onBreakpoint001'); let Breakpoint_1 = CommonFunc.getComponentRect('GridRow_onBreakpoint001');
...@@ -65,11 +64,10 @@ export default function GridRow_onBreakpoint() { ...@@ -65,11 +64,10 @@ export default function GridRow_onBreakpoint() {
let seventhBreakpoint = CommonFunc.getComponentRect('GridRow_onBreakpoint_6'); let seventhBreakpoint = CommonFunc.getComponentRect('GridRow_onBreakpoint_6');
let gridRowBreakpointJson = getInspectorByKey('GridRow_onBreakpoint001'); let gridRowBreakpointJson = getInspectorByKey('GridRow_onBreakpoint001');
let gridRow = JSON.parse(gridRowBreakpointJson); let gridRow = JSON.parse(gridRowBreakpointJson);
let driver = await UiDriver.create() let textComponent2 = getInspectorByKey('GridRowText');
let textComponent2 = await driver.findComponent(BY.key('textBreakpointChange')); let text2 = JSON.parse(textComponent2);
let text2 = await textComponent2.getText();
expect(gridRow.$type).assertEqual('GridRow'); expect(gridRow.$type).assertEqual('GridRow');
expect(text2).assertEqual('xxl'); expect(text2.$attrs.content).assertEqual('xxl');
expect(firstBreakpoint.top).assertEqual(Breakpoint_1.top); expect(firstBreakpoint.top).assertEqual(Breakpoint_1.top);
expect(secondBreakpoint.top).assertEqual(secondBreakpoint.top); expect(secondBreakpoint.top).assertEqual(secondBreakpoint.top);
...@@ -81,7 +79,7 @@ export default function GridRow_onBreakpoint() { ...@@ -81,7 +79,7 @@ export default function GridRow_onBreakpoint() {
expect(Math.round(fourthBreakpoint.left - thirdBreakpoint.right)).assertEqual(vp2px(30)); expect(Math.round(fourthBreakpoint.left - thirdBreakpoint.right)).assertEqual(vp2px(30));
expect(Math.round(seventhBreakpoint.top - firstBreakpoint.bottom)).assertEqual(vp2px(30)); expect(Math.round(seventhBreakpoint.top - firstBreakpoint.bottom)).assertEqual(vp2px(30));
console.info('SUB_ACE_GridRowOnBreakPointChange_0100 END'); console.info('SUB_ACE_GridRow_onBreakPointChange_0100 END');
done(); done();
}); });
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册