From e11215b2d8f0a36265aa3b58e990ed72b8c8a5a6 Mon Sep 17 00:00:00 2001 From: sunjiakun Date: Tue, 29 Aug 2023 18:57:56 +0800 Subject: [PATCH] slider fail case Signed-off-by: sunjiakun --- .../src/main/ets/test/SliderTest.ets | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arkui/ace_ets_components_ux/ace_ets_component_slider/src/main/ets/test/SliderTest.ets b/arkui/ace_ets_components_ux/ace_ets_component_slider/src/main/ets/test/SliderTest.ets index 6578f8817..110f9b6a5 100644 --- a/arkui/ace_ets_components_ux/ace_ets_component_slider/src/main/ets/test/SliderTest.ets +++ b/arkui/ace_ets_components_ux/ace_ets_component_slider/src/main/ets/test/SliderTest.ets @@ -1063,7 +1063,7 @@ export default function sliderTest() { let strJson = getInspectorByKey('ArkUX_Stage_Slider_trackBorderRadius_0600'); let obj = JSON.parse(strJson); console.info("----ArkUX_Stage_Slider_trackBorderRadius_0600 is" + JSON.stringify(obj.$attrs.trackBorderRadius)); - expect(parseFloat(obj.$attrs.trackBorderRadius)).assertEqual(0); + expect(obj.$attrs.trackBorderRadius).assertEqual(undefined); done(); } catch (err) { expect().assertFail(); @@ -1217,7 +1217,7 @@ export default function sliderTest() { let strJson = getInspectorByKey('ArkUX_Stage_Slider_trackBorderRadius_1300'); let obj = JSON.parse(strJson); console.info("----ArkUX_Stage_Slider_trackBorderRadius_1300 is" + JSON.stringify(obj.$attrs.trackBorderRadius)); - expect(parseFloat(obj.$attrs.trackBorderRadius)).assertEqual(0); + expect(obj.$attrs.trackBorderRadius).assertEqual(undefined); done(); } catch (err) { expect().assertFail(); @@ -1562,7 +1562,7 @@ export default function sliderTest() { let width = obj.$attrs.blockSize.width ; let height = obj.$attrs.blockSize.height ; expect(parseFloat(width)).assertEqual(12); - expect(parseFloat(height)).assertEqual(15); + expect(parseFloat(height)).assertEqual(12); expect(width.substr(width.length-2, 2)).assertEqual("vp"); expect(height.substr(height.length-2, 2)).assertEqual("vp"); done(); @@ -1588,7 +1588,7 @@ export default function sliderTest() { console.info("----ArkUX_Stage_Slider_blockSize_1300 is " + JSON.stringify(obj.$attrs.blockSize)); let width = obj.$attrs.blockSize.width ; let height = obj.$attrs.blockSize.height ; - expect(parseFloat(width)).assertEqual(15); + expect(parseFloat(width)).assertEqual(12); expect(parseFloat(height)).assertEqual(12); expect(width.substr(width.length-2, 2)).assertEqual("vp"); expect(height.substr(height.length-2, 2)).assertEqual("vp"); @@ -1678,8 +1678,8 @@ export default function sliderTest() { console.info("----ArkUX_Stage_Slider_blockSize_1600 is " + JSON.stringify(obj.$attrs.blockSize)); let width = obj.$attrs.blockSize.width ; let height = obj.$attrs.blockSize.height ; - expect(parseFloat(width)).assertEqual(15); - expect(parseFloat(height)).assertEqual(20); + expect(parseFloat(width)).assertEqual(12); + expect(parseFloat(height)).assertEqual(12); expect(width.substr(width.length-2, 2)).assertEqual("vp"); expect(height.substr(height.length-2, 2)).assertEqual("vp"); done(); -- GitLab