From 0b785325182cee467a9a586dac8222e03696034e Mon Sep 17 00:00:00 2001 From: zhouyan Date: Mon, 28 Aug 2023 13:35:44 +0000 Subject: [PATCH] =?UTF-8?q?fixed=20a00cfdd=20from=20https://gitee.com/earn?= =?UTF-8?q?k/xts=5Facts/pulls/9924=20Stack=20ZIndex=20xts=E7=94=A8?= =?UTF-8?q?=E4=BE=8B=E5=A2=9E=E5=8A=A0=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhouyan Change-Id: I8ac523d8c22974c9d93dd328f8bfa03c5ae16af0 --- .../StackItem_change/stack_zIndex.test.ets | 49 ++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) diff --git a/arkui/ace_ets_layout_test/ace_ets_layout_stack_test/entry/src/main/ets/test/Stack/StackItem_change/stack_zIndex.test.ets b/arkui/ace_ets_layout_test/ace_ets_layout_stack_test/entry/src/main/ets/test/Stack/StackItem_change/stack_zIndex.test.ets index c5bef1658..26e3195e6 100644 --- a/arkui/ace_ets_layout_test/ace_ets_layout_stack_test/entry/src/main/ets/test/Stack/StackItem_change/stack_zIndex.test.ets +++ b/arkui/ace_ets_layout_test/ace_ets_layout_stack_test/entry/src/main/ets/test/Stack/StackItem_change/stack_zIndex.test.ets @@ -133,16 +133,24 @@ export default function Stack_ZIndex() { let theTop = Stack_ZIndex_012.top; let num = await imageComparisonAssert(0,theTop); await CommonFunc.sleep(1000); + console.log('num is',+num); expect(num).assertEqual(true); + console.log('Stack_ZIndex_01.left is',+Stack_ZIndex_01.left); expect(Stack_ZIndex_01.left).assertEqual(Stack_ZIndex_011.left); expect(Stack_ZIndex_01.left).assertEqual(Stack_ZIndex_012.left); + console.log('Stack_ZIndex_011.top - Stack_ZIndex_01.top is',+Stack_ZIndex_011.top - Stack_ZIndex_01.top); expect(Math.round(Stack_ZIndex_011.top - Stack_ZIndex_01.top)) .assertEqual(Math.round(Stack_ZIndex_01.bottom - Stack_ZIndex_011.bottom)); + console.log('Stack_ZIndex_012.top - Stack_ZIndex_01.top is',+Stack_ZIndex_012.top - Stack_ZIndex_01.top); expect(Math.round(Stack_ZIndex_012.top - Stack_ZIndex_01.top)) .assertEqual(Math.round(Stack_ZIndex_01.bottom - Stack_ZIndex_012.bottom)); + console.log('Stack_ZIndex_011.bottom - Stack_ZIndex_011.top is',+Stack_ZIndex_011.bottom - Stack_ZIndex_011.top); expect(Math.round(Stack_ZIndex_011.bottom - Stack_ZIndex_011.top)).assertEqual(vp2px(200)); + console.log('Stack_ZIndex_012.bottom - Stack_ZIndex_012.top is',+Stack_ZIndex_012.bottom - Stack_ZIndex_012.top); expect(Math.round(Stack_ZIndex_012.bottom - Stack_ZIndex_012.top)).assertEqual(vp2px(100)); + console.log('Stack_ZIndex_011.right - Stack_ZIndex_011.left is',+Stack_ZIndex_011.right - Stack_ZIndex_011.left); expect(Math.round(Stack_ZIndex_011.right - Stack_ZIndex_011.left)).assertEqual(vp2px(200)); + console.log('Stack_ZIndex_012.right - Stack_ZIndex_012.left is',+Stack_ZIndex_012.right - Stack_ZIndex_012.left); expect(Math.round(Stack_ZIndex_012.right - Stack_ZIndex_012.left)).assertEqual(vp2px(100)); console.info('[testStackZIndexWithAlignmentStart] END'); done(); @@ -168,18 +176,27 @@ export default function Stack_ZIndex() { let theLeft = Stack_ZIndex_012.left; let num = await imageComparisonAssert(theLeft,theTop); await CommonFunc.sleep(1000); + console.log('num is',+num); expect(num).assertEqual(true); + console.log('Stack_ZIndex_011.left - Stack_ZIndex_01.left is',+Stack_ZIndex_011.left - Stack_ZIndex_01.left); expect(Math.round(Stack_ZIndex_011.left - Stack_ZIndex_01.left)) .assertEqual(Math.round(Stack_ZIndex_01.right - Stack_ZIndex_011.right)); + console.log('Stack_ZIndex_012.left - Stack_ZIndex_01.left is',+Stack_ZIndex_012.left - Stack_ZIndex_01.left); expect(Math.round(Stack_ZIndex_012.left - Stack_ZIndex_01.left)) .assertEqual(Math.round(Stack_ZIndex_01.right - Stack_ZIndex_012.right)); + console.log('Stack_ZIndex_011.top - Stack_ZIndex_01.top is',+Stack_ZIndex_011.top - Stack_ZIndex_01.top); expect(Math.round(Stack_ZIndex_011.top - Stack_ZIndex_01.top)) .assertEqual(Math.round(Stack_ZIndex_01.bottom - Stack_ZIndex_011.bottom)); + console.log('Stack_ZIndex_012.top - Stack_ZIndex_01.top is',+Stack_ZIndex_012.top - Stack_ZIndex_01.top); expect(Math.round(Stack_ZIndex_012.top - Stack_ZIndex_01.top)) .assertEqual(Math.round(Stack_ZIndex_01.bottom - Stack_ZIndex_012.bottom)); + console.log('Stack_ZIndex_011.bottom - Stack_ZIndex_011.top is',+Stack_ZIndex_011.bottom - Stack_ZIndex_011.top); expect(Math.round(Stack_ZIndex_011.bottom - Stack_ZIndex_011.top)).assertEqual(vp2px(200)); + console.log('Stack_ZIndex_012.bottom - Stack_ZIndex_012.top is',+Stack_ZIndex_012.bottom - Stack_ZIndex_012.top); expect(Math.round(Stack_ZIndex_012.bottom - Stack_ZIndex_012.top)).assertEqual(vp2px(100)); + console.log('Stack_ZIndex_011.right - Stack_ZIndex_011.left is',+Stack_ZIndex_011.right - Stack_ZIndex_011.left); expect(Math.round(Stack_ZIndex_011.right - Stack_ZIndex_011.left)).assertEqual(vp2px(200)); + console.log('Stack_ZIndex_012.right - Stack_ZIndex_012.left is',+Stack_ZIndex_012.right - Stack_ZIndex_012.left); expect(Math.round(Stack_ZIndex_012.right - Stack_ZIndex_012.left)).assertEqual(vp2px(100)); console.info('[testStackZIndexWithAlignmentCenter] END'); done(); @@ -205,16 +222,24 @@ export default function Stack_ZIndex() { let theLeft = Stack_ZIndex_012.left; let num = await imageComparisonAssert(theLeft,theTop); await CommonFunc.sleep(1000); + console.log('num is',+num); expect(num).assertEqual(true); + console.log('Stack_ZIndex_01.right is',+Stack_ZIndex_01.right); expect(Stack_ZIndex_01.right).assertEqual(Stack_ZIndex_011.right); expect(Stack_ZIndex_01.right).assertEqual(Stack_ZIndex_012.right); + console.log('Stack_ZIndex_011.top - Stack_ZIndex_01.top is',+Stack_ZIndex_011.top - Stack_ZIndex_01.top); expect(Math.round(Stack_ZIndex_011.top - Stack_ZIndex_01.top)) .assertEqual(Math.round(Stack_ZIndex_01.bottom - Stack_ZIndex_011.bottom)); + console.log('Stack_ZIndex_012.top - Stack_ZIndex_01.top is',+Stack_ZIndex_012.top - Stack_ZIndex_01.top); expect(Math.round(Stack_ZIndex_012.top - Stack_ZIndex_01.top)) .assertEqual(Math.round(Stack_ZIndex_01.bottom - Stack_ZIndex_012.bottom)); + console.log('Stack_ZIndex_011.bottom - Stack_ZIndex_011.top is',+Stack_ZIndex_011.bottom - Stack_ZIndex_011.top); expect(Math.round(Stack_ZIndex_011.bottom - Stack_ZIndex_011.top)).assertEqual(vp2px(200)); + console.log('Stack_ZIndex_012.bottom - Stack_ZIndex_012.top is',+Stack_ZIndex_012.bottom - Stack_ZIndex_012.top); expect(Math.round(Stack_ZIndex_012.bottom - Stack_ZIndex_012.top)).assertEqual(vp2px(100)); + console.log('Stack_ZIndex_011.right - Stack_ZIndex_011.left is',+Stack_ZIndex_011.right - Stack_ZIndex_011.left); expect(Math.round(Stack_ZIndex_011.right - Stack_ZIndex_011.left)).assertEqual(vp2px(200)); + console.log('Stack_ZIndex_012.right - Stack_ZIndex_012.left is',+Stack_ZIndex_012.right - Stack_ZIndex_012.left); expect(Math.round(Stack_ZIndex_012.right - Stack_ZIndex_012.left)).assertEqual(vp2px(100)); console.info('[testStackZIndexWithAlignmentEnd] END'); done(); @@ -239,14 +264,21 @@ export default function Stack_ZIndex() { let theTop = Stack_ZIndex_012.top; let num = await imageComparisonAssert(0,theTop); await CommonFunc.sleep(1000); + console.log('num is',+num); expect(num).assertEqual(true); + console.log('Stack_ZIndex_01.left is',+Stack_ZIndex_01.left); expect(Stack_ZIndex_01.left).assertEqual(Stack_ZIndex_011.left); expect(Stack_ZIndex_01.left).assertEqual(Stack_ZIndex_012.left); + console.log('Stack_ZIndex_01.bottom is',+Stack_ZIndex_01.bottom); expect(Stack_ZIndex_01.bottom).assertEqual(Stack_ZIndex_011.bottom); expect(Stack_ZIndex_01.bottom).assertEqual(Stack_ZIndex_012.bottom); + console.log('Stack_ZIndex_011.bottom - Stack_ZIndex_011.top is',+Stack_ZIndex_011.bottom - Stack_ZIndex_011.top); expect(Math.round(Stack_ZIndex_011.bottom - Stack_ZIndex_011.top)).assertEqual(vp2px(200)); + console.log('Stack_ZIndex_012.bottom - Stack_ZIndex_012.top is',+Stack_ZIndex_012.bottom - Stack_ZIndex_012.top); expect(Math.round(Stack_ZIndex_012.bottom - Stack_ZIndex_012.top)).assertEqual(vp2px(100)); + console.log('Stack_ZIndex_011.right - Stack_ZIndex_011.left is',+Stack_ZIndex_011.right - Stack_ZIndex_011.left); expect(Math.round(Stack_ZIndex_011.right - Stack_ZIndex_011.left)).assertEqual(vp2px(200)); + console.log('Stack_ZIndex_012.right - Stack_ZIndex_012.left is',+Stack_ZIndex_012.right - Stack_ZIndex_012.left); expect(Math.round(Stack_ZIndex_012.right - Stack_ZIndex_012.left)).assertEqual(vp2px(100)); console.info('[testStackZIndexWithAlignmentBottomStart] END'); done(); @@ -271,17 +303,25 @@ export default function Stack_ZIndex() { let theTop = Stack_ZIndex_012.top; let theLeft = Stack_ZIndex_012.left; let num = await imageComparisonAssert(theLeft,theTop); - await CommonFunc.sleep(1000); + await CommonFunc.sleep(3000); + console.log('num is',+num); expect(num).assertEqual(true); + console.log('Stack_ZIndex_01.bottom is',+Stack_ZIndex_01.bottom); expect(Stack_ZIndex_01.bottom).assertEqual(Stack_ZIndex_011.bottom); expect(Stack_ZIndex_01.bottom).assertEqual(Stack_ZIndex_012.bottom); + console.log('Stack_ZIndex_011.left - Stack_ZIndex_01.left is',+Stack_ZIndex_011.left - Stack_ZIndex_01.left); expect(Math.round(Stack_ZIndex_011.left - Stack_ZIndex_01.left)) .assertEqual(Math.round(Stack_ZIndex_01.right - Stack_ZIndex_011.right)); + console.log('Stack_ZIndex_012.left - Stack_ZIndex_01.left is',+Stack_ZIndex_012.left - Stack_ZIndex_01.left); expect(Math.round(Stack_ZIndex_012.left - Stack_ZIndex_01.left)) .assertEqual(Math.round(Stack_ZIndex_01.right - Stack_ZIndex_012.right)); + console.log('Stack_ZIndex_011.bottom - Stack_ZIndex_011.top is',+Stack_ZIndex_011.bottom - Stack_ZIndex_011.top); expect(Math.round(Stack_ZIndex_011.bottom - Stack_ZIndex_011.top)).assertEqual(vp2px(200)); + console.log('Stack_ZIndex_012.bottom - Stack_ZIndex_012.top is',+Stack_ZIndex_012.bottom - Stack_ZIndex_012.top); expect(Math.round(Stack_ZIndex_012.bottom - Stack_ZIndex_012.top)).assertEqual(vp2px(100)); + console.log('Stack_ZIndex_011.right - Stack_ZIndex_011.left is',+Stack_ZIndex_011.right - Stack_ZIndex_011.left); expect(Math.round(Stack_ZIndex_011.right - Stack_ZIndex_011.left)).assertEqual(vp2px(200)); + console.log('Stack_ZIndex_012.right - Stack_ZIndex_012.left is',+Stack_ZIndex_012.right - Stack_ZIndex_012.left); expect(Math.round(Stack_ZIndex_012.right - Stack_ZIndex_012.left)).assertEqual(vp2px(100)); console.info('[testStackZIndexWithAlignmentBottom] END'); done(); @@ -307,14 +347,21 @@ export default function Stack_ZIndex() { let theLeft = Stack_ZIndex_012.left; let num = await imageComparisonAssert(theLeft,theTop); await CommonFunc.sleep(3000); + console.log('num is',+num); expect(num).assertEqual(true); + console.log('Stack_ZIndex_01.bottom is',+Stack_ZIndex_01.bottom); expect(Stack_ZIndex_01.bottom).assertEqual(Stack_ZIndex_011.bottom); expect(Stack_ZIndex_01.bottom).assertEqual(Stack_ZIndex_012.bottom); + console.log('Stack_ZIndex_01.right is',+Stack_ZIndex_01.right); expect(Stack_ZIndex_01.right).assertEqual(Stack_ZIndex_011.right); expect(Stack_ZIndex_01.right).assertEqual(Stack_ZIndex_012.right); + console.log('Stack_ZIndex_011.bottom - Stack_ZIndex_011.top is',+Stack_ZIndex_011.bottom - Stack_ZIndex_011.top); expect(Math.round(Stack_ZIndex_011.bottom - Stack_ZIndex_011.top)).assertEqual(vp2px(200)); + console.log('Stack_ZIndex_012.bottom - Stack_ZIndex_012.top is',+Stack_ZIndex_012.bottom - Stack_ZIndex_012.top); expect(Math.round(Stack_ZIndex_012.bottom - Stack_ZIndex_012.top)).assertEqual(vp2px(100)); + console.log('Stack_ZIndex_011.right - Stack_ZIndex_011.left is',+Stack_ZIndex_011.right - Stack_ZIndex_011.left); expect(Math.round(Stack_ZIndex_011.right - Stack_ZIndex_011.left)).assertEqual(vp2px(200)); + console.log('Stack_ZIndex_012.right - Stack_ZIndex_012.left is',+Stack_ZIndex_012.right - Stack_ZIndex_012.left); expect(Math.round(Stack_ZIndex_012.right - Stack_ZIndex_012.left)).assertEqual(vp2px(100)); console.info('[testStackZIndexWithAlignmentBottomEnd] END'); done(); -- GitLab