From d921615bd0edb8e1f46ed8cb31de3aaa2dc5eea7 Mon Sep 17 00:00:00 2001 From: chensi10 Date: Fri, 24 Mar 2023 10:42:51 +0800 Subject: [PATCH] badge update Signed-off-by: chensi10 --- .../src/main/ets/test/badge.ets | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/arkui/ace_ets_components_ux/ace_ets_component_badge/src/main/ets/test/badge.ets b/arkui/ace_ets_components_ux/ace_ets_component_badge/src/main/ets/test/badge.ets index 2683a273d..c83d58bbd 100644 --- a/arkui/ace_ets_components_ux/ace_ets_component_badge/src/main/ets/test/badge.ets +++ b/arkui/ace_ets_components_ux/ace_ets_component_badge/src/main/ets/test/badge.ets @@ -73,7 +73,7 @@ export default function badgeTest() { console.info("ArkUX_Stage_Badge_FontWeight_0200 component obj.$attrs.style is: " + JSON.stringify(obj.$attrs.style)); let style = JSON.parse(obj.$attrs.style); - expect(style.fontWeight).assertEqual("FontWeight.400"); + expect(style.fontWeight.replace(/[^\d]/g,"")).assertEqual("400"); console.info('ArkUX_Stage_Badge_FontWeight_0200 END '); done(); } catch (err) { @@ -102,7 +102,7 @@ export default function badgeTest() { console.info("ArkUX_Stage_Badge_FontWeight_0300 component obj.$attrs.style is: " + JSON.stringify(obj.$attrs.style)); let style = JSON.parse(obj.$attrs.style); - expect(style.fontWeight).assertEqual("FontWeight.100"); + expect(style.fontWeight.replace(/[^\d]/g,"")).assertEqual("100"); console.info('ArkUX_Stage_Badge_FontWeight_0300 END '); done(); } catch (err) { @@ -130,7 +130,7 @@ export default function badgeTest() { console.info("ArkUX_Stage_Badge_FontWeight_0400 component obj.$attrs.style is: " + JSON.stringify(obj.$attrs.style)); let style = JSON.parse(obj.$attrs.style); - expect(style.fontWeight).assertEqual("FontWeight.800"); + expect(style.fontWeight.replace(/[^\d]/g,"")).assertEqual("800"); console.info('ArkUX_Stage_Badge_FontWeight_0400 END '); done(); } catch (err) { @@ -158,7 +158,7 @@ export default function badgeTest() { console.info("ArkUX_Stage_Badge_FontWeight_0500 component obj.$attrs.style is: " + JSON.stringify(obj.$attrs.style)); let style = JSON.parse(obj.$attrs.style); - expect(style.fontWeight).assertEqual("FontWeight.200"); + expect(style.fontWeight.replace(/[^\d]/g,"")).assertEqual("200"); console.info('ArkUX_Stage_Badge_FontWeight_0500 END '); done(); } catch (err) { @@ -186,7 +186,7 @@ export default function badgeTest() { console.info("ArkUX_Stage_Badge_FontWeight_0600 component obj.$attrs.style is: " + JSON.stringify(obj.$attrs.style)); let style = JSON.parse(obj.$attrs.style); - expect(style.fontWeight).assertEqual("FontWeight.900"); + expect(style.fontWeight.replace(/[^\d]/g,"")).assertEqual("900"); console.info('ArkUX_Stage_Badge_FontWeight_0600 END '); done(); } catch (err) { @@ -410,7 +410,7 @@ export default function badgeTest() { console.info("ArkUX_Stage_Badge_FontWeight_1400 component obj.$attrs.style is: " + JSON.stringify(obj.$attrs.style)); let style = JSON.parse(obj.$attrs.style); - expect(style.fontWeight).assertEqual("FontWeight.500"); + expect(style.fontWeight.replace(/[^\d]/g,"")).assertEqual("500"); console.info('ArkUX_Stage_Badge_FontWeight_1400 END '); done(); } catch (err) { @@ -467,7 +467,7 @@ export default function badgeTest() { console.info("ArkUX_Stage_Badge_FontWeight_1600 component obj.$attrs.style is: " + JSON.stringify(obj.$attrs.style)); let style = JSON.parse(obj.$attrs.style); - expect(style.fontWeight).assertEqual("FontWeight.600"); + expect(style.fontWeight.replace(/[^\d]/g,"")).assertEqual("600"); console.info('ArkUX_Stage_Badge_FontWeight_1600 END '); done(); } catch (err) { @@ -1146,7 +1146,7 @@ export default function badgeTest() { JSON.stringify(obj.$attrs.style)); let style = JSON.parse(obj.$attrs.style); expect(style.borderWidth).assertEqual("5.00vp"); - expect(style.fontWeight).assertEqual("FontWeight.600"); + expect(style.fontWeight.replace(/[^\d]/g,"")).assertEqual("600"); expect(style.borderColor).assertEqual("#FFFD0000"); console.info('ArkUX_Stage_Badge_BorderWidth_1200 END '); done(); -- GitLab