From f278c969e617e9b276dc10ebd6f5cae27dfa4704 Mon Sep 17 00:00:00 2001 From: jinzhao Date: Fri, 8 Aug 2025 17:19:01 +0800 Subject: [PATCH 1/3] add uicompare cases1 Signed-off-by: jinzhao --- .../UIComponentTextChipInterface.test.ets | 1925 +++++++++++++++++ 1 file changed, 1925 insertions(+) diff --git a/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/test/UIComponentTextChipInterfaceTest/UIComponentTextChipInterface.test.ets b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/test/UIComponentTextChipInterfaceTest/UIComponentTextChipInterface.test.ets index 3277a2f66..731bfcdf4 100644 --- a/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/test/UIComponentTextChipInterfaceTest/UIComponentTextChipInterface.test.ets +++ b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/test/UIComponentTextChipInterfaceTest/UIComponentTextChipInterface.test.ets @@ -945,5 +945,1930 @@ export default function UIComponentTextChipInterface() { done(); }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0450 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0450 + * @tc.desc Set chip's prefixIcon size height to 20px + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0450', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0450'; + let pageName = 'UIComponentTextChipInterface0450'; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0460 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0460 + * @tc.desc Set chip's prefixIcon size height to '50%' + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0460', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0460'; + let pageName = 'UIComponentTextChipInterface0460'; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0470 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0470 + * @tc.desc Set chip's prefixIcon size height to 10vp + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0470', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0470'; + let pageName = 'UIComponentTextChipInterface0470'; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0480 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0480 + * @tc.desc Set chip's prefixIcon size height to 10fp + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0480', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0480'; + let pageName = 'UIComponentTextChipInterface0480'; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0490 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0490 + * @tc.desc Set chip's prefixIcon size height to 10lpx + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0490', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0490'; + let pageName = 'UIComponentTextChipInterface0490'; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0500 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0500 + * @tc.desc Set chip's prefixIcon size height to 0 + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0500', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0500'; + let pageName = 'UIComponentTextChipInterface0500'; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0510 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0510 + * @tc.desc Set chip's prefixIcon size height to -10vp + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0510', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0510'; + let pageName = 'UIComponentTextChipInterface0510'; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0520 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0520 + * @tc.desc Set chip's prefixIcon size height to $r('app.integer.name') + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0520', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0520'; + let pageName = 'UIComponentTextChipInterface0520'; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0530 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0530 + * @tc.desc Set chip's prefixIcon size height to aaa + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0530', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0530'; + let pageName = 'UIComponentTextChipInterface0530'; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0540 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0540 + * @tc.desc Not set chip's prefixIcon size height + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0540', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0540'; + let pageName = 'UIComponentTextChipInterface0540'; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0550 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0550 + * @tc.desc Set chip's prefixIcon size width to 10lpx and height to 10lpx + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0550', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0550'; + let pageName = 'UIComponentTextChipInterface0550'; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0560 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0560 + * @tc.desc Set chip's prefixIcon fillColor to Color Red for SVG image + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0560', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0560'; + let pageName = 'UIComponentTextChipInterface0560'; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0570 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0570 + * @tc.desc Set chip's prefixIcon fillColor to 0xff0000 for SVG image + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0570', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0570'; + let pageName = 'UIComponentTextChipInterface0570'; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0580 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0580 + * @tc.desc Set chip's prefixIcon fillColor to '#ff000000 for SVG image + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0580', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0580'; + let pageName = 'UIComponentTextChipInterface0580'; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0590 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0590 + * @tc.desc Set chip's prefixIcon fillColor to $r(app.color.yellow) for SVG image + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0590', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0590'; + let pageName = 'UIComponentTextChipInterface0590'; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0600 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0600 + * @tc.desc Leave chip's prefixIcon fillColor unset for SVG image + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0600', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0600'; + let pageName = 'UIComponentTextChipInterface0600'; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0610 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0610 + * @tc.desc Leave chip's suffixIcon property unset + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0610', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0610'; + let pageName = 'UIComponentTextChipInterface0610'; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0620 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0620 + * @tc.desc Set chip's suffixIcon src to a JPG image + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0620', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0620'; + let pageName = 'UIComponentTextChipInterface0620'; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0630 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0630 + * @tc.desc Set chip's suffixIcon src to a PNG image + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0630', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0630'; + let pageName = 'UIComponentTextChipInterface0630'; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0640 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0640 + * @tc.desc Set chip's suffixIcon src to a BMP image + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0640', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0640'; + let pageName = 'UIComponentTextChipInterface0640'; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0650 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0650 + * @tc.desc Set chip's suffixIcon src to a SVG image + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0650', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0650'; + let pageName = 'UIComponentTextChipInterface0650'; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0660 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0660 + * @tc.desc Set chip's suffixIcon src to a gif image + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0660', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0660'; + let pageName = 'UIComponentTextChipInterface0660'; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0670 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0670 + * @tc.desc Set chip's suffixIcon src to $r image + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0670', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0670'; + let pageName = 'UIComponentTextChipInterface0670'; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0680 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0680 + * @tc.desc Set chip's suffixIcon size width to 10px + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0680', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0680'; + let pageName = 'UIComponentTextChipInterface0680'; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0690 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0690 + * @tc.desc Set chip's suffixIcon size width to '50%' + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0690', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0690'; + let pageName = 'UIComponentTextChipInterface0690'; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0700 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0700 + * @tc.desc Set chip's suffixIcon size width to 10vp + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0700', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0700'; + let pageName = 'UIComponentTextChipInterface0700'; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0710 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0710 + * @tc.desc Set chip's suffixIcon size width to 10fp + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0710', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0710'; + let pageName = 'UIComponentTextChipInterface0710'; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0720 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0720 + * @tc.desc Set chip's suffixIcon size width to 10lpx + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0720', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0720'; + let pageName = 'UIComponentTextChipInterface0720'; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0730 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0730 + * @tc.desc Set chip's suffixIcon size width to 0 + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0730', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0730'; + let pageName = 'UIComponentTextChipInterface0730'; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0740 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0740 + * @tc.desc Set chip's suffixIcon size width to -10vp + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0740', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0740'; + let pageName = 'UIComponentTextChipInterface0740'; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0750 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0750 + * @tc.desc Set chip's suffixIcon size width to $r('app.integer.name') + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0750', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0750'; + let pageName = 'UIComponentTextChipInterface0750'; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0760 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0760 + * @tc.desc Set chip's suffixIcon size width to aaa + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0760', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0760'; + let pageName = 'UIComponentTextChipInterface0760'; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0770 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0770 + * @tc.desc Not set chip's suffixIcon size width + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0770', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0770'; + let pageName = 'UIComponentTextChipInterface0770'; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0780 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0780 + * @tc.desc Set chip's suffixIcon size height to 20px + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0780', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0780'; + let pageName = 'UIComponentTextChipInterface0780'; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0790 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0790 + * @tc.desc Set chip's suffixIcon size height to '50%' + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0790', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0790'; + let pageName = 'UIComponentTextChipInterface0790'; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0800 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0800 + * @tc.desc Set chip's suffixIcon size height to 10vp + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0800', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0800'; + let pageName = 'UIComponentTextChipInterface0800'; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0810 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0810 + * @tc.desc Set chip's suffixIcon size height to 10fp + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0810', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0810'; + let pageName = 'UIComponentTextChipInterface0810'; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0820 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0820 + * @tc.desc Set chip's suffixIcon size height to 10lpx + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0820', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0820'; + let pageName = 'UIComponentTextChipInterface0820'; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0830 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0830 + * @tc.desc Set chip's suffixIcon size height to 0 + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0830', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0830'; + let pageName = 'UIComponentTextChipInterface0830'; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0840 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0840 + * @tc.desc Set chip's suffixIcon size height to -10vp + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0840', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0840'; + let pageName = 'UIComponentTextChipInterface0840'; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0850 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0850 + * @tc.desc Set chip's suffixIcon size height to $r('app.integer.name') + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0850', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0850'; + let pageName = 'UIComponentTextChipInterface0850'; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0860 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0860 + * @tc.desc Set chip's suffixIcon size height to aaa + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0860', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0860'; + let pageName = 'UIComponentTextChipInterface0860'; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0870 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0870 + * @tc.desc Not set chip's suffixIcon size height + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0870', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0870'; + let pageName = 'UIComponentTextChipInterface0870'; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0880 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0880 + * @tc.desc Set chip's suffixIcon size width to 10fp and height to 10fp + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0880', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0880'; + let pageName = 'UIComponentTextChipInterface0880'; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0890 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0890 + * @tc.desc Set chip suffixIcon fillColor to Color Red for SVG image + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0890', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0890'; + let pageName = "UIComponentTextChipInterface0890"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0900 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0900 + * @tc.desc Set chip suffixIcon fillColor to 0xff0000 for SVG image + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0900', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0900'; + let pageName = "UIComponentTextChipInterface0900"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0910 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0910 + * @tc.desc Set chip suffixIcon fillColor to #ff000000 for SVG image + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0910', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0910'; + let pageName = "UIComponentTextChipInterface0910"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0920 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0920 + * @tc.desc Set chip suffixIcon fillColor to $r('app.color.yellow') for SVG image + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0920', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0920'; + let pageName = "UIComponentTextChipInterface0920"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0930 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0930 + * @tc.desc Not set chip suffixIcon fillColor for SVG image + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0930', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0930'; + let pageName = "UIComponentTextChipInterface0930"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0950 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0950 + * @tc.desc Set chip label text to "操作块" + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0950', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0950'; + let pageName = "UIComponentTextChipInterface0950"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0960 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0960 + * @tc.desc Dynamically increase text length in chip label + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0960', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0960'; + let pageName = "UIComponentTextChipInterface0960"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + let button: Component = await driver.waitForComponent(ON.id(pageName + '_01'), 1000) + await driver.waitForIdle(500, 1000); + await button.click(); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0970 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0970 + * @tc.desc Set chip label fontSize to 20px + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0970', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0970'; + let pageName = "UIComponentTextChipInterface0970"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0980 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0980 + * @tc.desc Set chip label fontSize to '50%' + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0980', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0980'; + let pageName = "UIComponentTextChipInterface0980"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0990 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0990 + * @tc.desc Set chip label fontSize to 10vp + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0990', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_0990'; + let pageName = "UIComponentTextChipInterface0990"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1000 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1000 + * @tc.desc Set chip label fontSize to 10fp + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1000', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1000'; + let pageName = "UIComponentTextChipInterface1000"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1010 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1010 + * @tc.desc Set chip label fontSize to 10lpx + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1010', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1010'; + let pageName = "UIComponentTextChipInterface1010"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1020 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1020 + * @tc.desc Set chip label fontSize to 0 + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1020', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1020'; + let pageName = "UIComponentTextChipInterface1020"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1030 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1030 + * @tc.desc Set chip label fontSize to -10vp + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1030', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1030'; + let pageName = "UIComponentTextChipInterface1030"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1040 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1040 + * @tc.desc Set chip label fontSize to $r('app.integer.name') + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1040', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1040'; + let pageName = "UIComponentTextChipInterface1040"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1060 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1060 + * @tc.desc Not set chip label fontSize + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1060', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1060'; + let pageName = "UIComponentTextChipInterface1060"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1070 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1070 + * @tc.desc Set 20px spacing between text and left icon + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1070', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1070'; + let pageName = "UIComponentTextChipInterface1070"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1080 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1080 + * @tc.desc Set 50% spacing between text and left icon + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1080', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1080'; + let pageName = "UIComponentTextChipInterface1080"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1090 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1090 + * @tc.desc Set 10vp spacing between text and left icon + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1090', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1090'; + let pageName = "UIComponentTextChipInterface1090"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1100 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1100 + * @tc.desc Set 10fp spacing between text and left icon + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1100', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1100'; + let pageName = "UIComponentTextChipInterface1100"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1110 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1110 + * @tc.desc Set 10lpx spacing between text and left icon + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1110', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1110'; + let pageName = "UIComponentTextChipInterface1110"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1120 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1120 + * @tc.desc Set 0 spacing between text and left icon + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1120', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1120'; + let pageName = "UIComponentTextChipInterface1120"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1130 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1130 + * @tc.desc Set -10vp spacing between text and left icon + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1130', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1130'; + let pageName = "UIComponentTextChipInterface1130"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1140 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1140 + * @tc.desc Set $r('app.integer.name') spacing between text and left icon + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1140', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1140'; + let pageName = "UIComponentTextChipInterface1140"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1160 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1160 + * @tc.desc Not set spacing between text and left icon + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1160', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1160'; + let pageName = "UIComponentTextChipInterface1160"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1170 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1170 + * @tc.desc Set 20px spacing between text and right icon + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1170', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1170'; + let pageName = "UIComponentTextChipInterface1170"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1180 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1180 + * @tc.desc Set 50% spacing between text and right icon + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1180', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1180'; + let pageName = "UIComponentTextChipInterface1180"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1190 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1190 + * @tc.desc Set 10vp spacing between text and right icon + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1190', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1190'; + let pageName = "UIComponentTextChipInterface1190"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1200 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1200 + * @tc.desc Set 10fp spacing between text and right icon + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1200', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1200'; + let pageName = "UIComponentTextChipInterface1200"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1210 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1210 + * @tc.desc Set 10lpx spacing between text and right icon + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1210', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1210'; + let pageName = "UIComponentTextChipInterface1210"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1220 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1220 + * @tc.desc Set 0 spacing between text and right icon + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1220', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1220'; + let pageName = "UIComponentTextChipInterface1220"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1230 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1230 + * @tc.desc Set -10vp spacing between text and right icon + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1230', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1230'; + let pageName = "UIComponentTextChipInterface1230"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1240 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1240 + * @tc.desc Set $r('app.integer.name') spacing between text and right icon + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1240', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1240'; + let pageName = "UIComponentTextChipInterface1240"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1260 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1260 + * @tc.desc Not set 10lpx spacing between text and right icon + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1260', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1260'; + let pageName = "UIComponentTextChipInterface1260"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1270 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1270 + * @tc.desc Set 10lpx spacing between text and right icon, 10lpx spacing between text and left icon + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1270', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1270'; + let pageName = "UIComponentTextChipInterface1270"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1280 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1280 + * @tc.desc Set chip label fontColor to Color.Red + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1280', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1280'; + let pageName = "UIComponentTextChipInterface1280"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1290 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1290 + * @tc.desc Set chip label fontColor to 0xffffff + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1290', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1290'; + let pageName = "UIComponentTextChipInterface1290"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1300 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1300 + * @tc.desc Set chip label fontColor to '#ffffff' + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1300', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1300'; + let pageName = "UIComponentTextChipInterface1300"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1310 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1310 + * @tc.desc Set chip label fontColor to $r('app.color.yellow') + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1310', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1310'; + let pageName = "UIComponentTextChipInterface1310"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1320 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1320 + * @tc.desc Not set chip label fontColor + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1320', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1320'; + let pageName = "UIComponentTextChipInterface1320"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1330 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1330 + * @tc.desc Set chip label fontFamily to 'HarmonyOS Sans' + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1330', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1330'; + let pageName = "UIComponentTextChipInterface1330"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1340 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1340 + * @tc.desc Not set chip label fontFamily + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1340', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1340'; + let pageName = "UIComponentTextChipInterface1340"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1350 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1350 + * @tc.desc Set chip label backgroundColor to Color.Red + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1350', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1350'; + let pageName = "UIComponentTextChipInterface1350"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1360 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1360 + * @tc.desc Set chip label backgroundColor to 0xffffff + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1360', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1360'; + let pageName = "UIComponentTextChipInterface1360"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1370 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1370 + * @tc.desc Set chip label backgroundColor to '#ffffff' + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1370', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1370'; + let pageName = "UIComponentTextChipInterface1370"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1380 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1380 + * @tc.desc Set chip label backgroundColor to $r('app.color.yellow') + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1380', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1380'; + let pageName = "UIComponentTextChipInterface1380"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1390 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1390 + * @tc.desc Not set chip label backgroundColor + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1390', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1390'; + let pageName = "UIComponentTextChipInterface1390"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1400 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1400 + * @tc.desc Set chip label borderRadius to 50px + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1400', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1400'; + let pageName = "UIComponentTextChipInterface1400"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1410 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1410 + * @tc.desc Set chip label borderRadius to 50% + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1410', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1410'; + let pageName = "UIComponentTextChipInterface1410"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1420 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1420 + * @tc.desc Set chip label borderRadius to 10vp + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1420', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1420'; + let pageName = "UIComponentTextChipInterface1420"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1430 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1430 + * @tc.desc Set chip label borderRadius to 10fp + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1430', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1430'; + let pageName = "UIComponentTextChipInterface1430"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1440 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1440 + * @tc.desc Set chip label borderRadius to 10lpx + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1440', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1440'; + let pageName = "UIComponentTextChipInterface1440"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + + }) } \ No newline at end of file -- Gitee From 71a288711a0dcb211e691864e5ea00dd09edeec6 Mon Sep 17 00:00:00 2001 From: jinzhao Date: Fri, 8 Aug 2025 17:24:14 +0800 Subject: [PATCH 2/3] add uicompare cases2 Signed-off-by: jinzhao --- .../UIComponentTextChipInterface.test.ets | 186 +++++++++++++++++- .../UIComponentTextChipInterface1070.ets | 139 +++++++++++++ .../UIComponentTextChipInterface1080.ets | 139 +++++++++++++ .../UIComponentTextChipInterface1090.ets | 139 +++++++++++++ .../UIComponentTextChipInterface1100.ets | 139 +++++++++++++ .../UIComponentTextChipInterface1110.ets | 139 +++++++++++++ .../UIComponentTextChipInterface1120.ets | 139 +++++++++++++ .../UIComponentTextChipInterface1130.ets | 139 +++++++++++++ .../UIComponentTextChipInterface1140.ets | 139 +++++++++++++ .../UIComponentTextChipInterface1160.ets | 138 +++++++++++++ .../UIComponentTextChipInterface1170.ets | 139 +++++++++++++ .../UIComponentTextChipInterface1180.ets | 139 +++++++++++++ .../UIComponentTextChipInterface1190.ets | 139 +++++++++++++ .../UIComponentTextChipInterface1200.ets | 139 +++++++++++++ 14 files changed, 1991 insertions(+), 1 deletion(-) create mode 100644 sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface1070.ets create mode 100644 sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface1080.ets create mode 100644 sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface1090.ets create mode 100644 sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface1100.ets create mode 100644 sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface1110.ets create mode 100644 sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface1120.ets create mode 100644 sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface1130.ets create mode 100644 sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface1140.ets create mode 100644 sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface1160.ets create mode 100644 sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface1170.ets create mode 100644 sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface1180.ets create mode 100644 sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface1190.ets create mode 100644 sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface1200.ets diff --git a/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/test/UIComponentTextChipInterfaceTest/UIComponentTextChipInterface.test.ets b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/test/UIComponentTextChipInterfaceTest/UIComponentTextChipInterface.test.ets index 731bfcdf4..21a789219 100644 --- a/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/test/UIComponentTextChipInterfaceTest/UIComponentTextChipInterface.test.ets +++ b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/test/UIComponentTextChipInterfaceTest/UIComponentTextChipInterface.test.ets @@ -2868,7 +2868,191 @@ export default function UIComponentTextChipInterface() { done(); }) - + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1450 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1450 + * @tc.desc Set chip label borderRadius to 0 + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1450', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1450'; + let pageName = "UIComponentTextChipInterface1450"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1460 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1460 + * @tc.desc Set chip label borderRadius to -10vp + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1460', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1460'; + let pageName = "UIComponentTextChipInterface1460"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1470 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1470 + * @tc.desc Set chip label borderRadius to $r('app.integer.name') + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1470', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1470'; + let pageName = "UIComponentTextChipInterface1470"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1490 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1490 + * @tc.desc Not set chip label borderRadius + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1490', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1490'; + let pageName = "UIComponentTextChipInterface1490"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1500 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1500 + * @tc.desc Set operation block dimensions smaller than combined prefix icon text and suffix icon widths + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1500', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1500'; + let pageName = "UIComponentTextChipInterface1500"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1510 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1510 + * @tc.desc Dynamically adjust operation block and three child component dimensions + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1510', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1510'; + let pageName = "UIComponentTextChipInterface1510"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + let switchButton: Component = await driver.waitForComponent(ON.text('switch size'), 1000); + await driver.waitForIdle(500, 1000); + await switchButton.click(); + await driver.waitForIdle(1000, 2000); + await windowSnap.snapShot(); + await switchButton.click(); + await driver.waitForIdle(1000, 2000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1520 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1520 + * @tc.desc Operation block contains three components with mismatched heights + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1520', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1520'; + let pageName = "UIComponentTextChipInterface1520"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1530 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1530 + * @tc.desc Operation block holds three width-mismatched components exceeding chip dimensions + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1530', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1530'; + let pageName = "UIComponentTextChipInterface1530"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1540 + * @tc.name SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1540 + * @tc.desc Operation block contains three width-mismatched components smaller than chip size + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1540', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_TEXT_CHIP_INTERFACE_1540'; + let pageName = "UIComponentTextChipInterface1540"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentTextChipInterface/' + pageName); + let driver: Driver = Driver.create(); + let chip: Component = await driver.waitForComponent(ON.text('操作块'), 1000); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) }) } \ No newline at end of file diff --git a/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface1070.ets b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface1070.ets new file mode 100644 index 000000000..101b74ae2 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface1070.ets @@ -0,0 +1,139 @@ +/* + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { Chip, ChipOptions, ChipSize } from '@kit.ArkUI'; + +@Entry +@Component +struct UIComponentTextChipInterface1070 { + @State name: string = 'UIComponentTextChipInterface1070'; + @State message: string = this.name + ' message:'; + @State isActivated: boolean = false; + + build() { + Column() { + Text(this.name) + .fontSize(20) + .fontColor(Color.Pink) + .fontWeight(FontWeight.Medium) + .fontStyle(FontStyle.Italic) + .textAlign(TextAlign.Center) + .width('90%') + .height(100) + .border({ width: 1 }) + .lineHeight(20) + .maxLines(2) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Chip({ + prefixIcon: { + src: '/images/start.svg', + fillColor: Color.Brown, + activatedFillColor: Color.Pink, + size: { + width: 16, + height: 16 + }, + }, + label: { + text: "操作块", + fontSize: 12, + fontColor: Color.Blue, + labelMargin: { + left: '20px', + right: 30 + } + }, + suffixIcon: { + src: '/images/end.svg', + fillColor: Color.Brown, + activatedFillColor: Color.Pink, + size: { + width: 16, + height: 16 + }, + }, + size: ChipSize.NORMAL, + activated: this.isActivated, + backgroundColor: '#F7F7F7', + borderRadius: $r('sys.float.ohos_id_corner_radius_button'), + activatedBackgroundColor: '#007DFF', + enabled: true, + onClose: () => { + console.log("Chip onClose."); + this.message += '\nChip onClose.'; + }, + onClicked: () => { + console.log("Chip onClicked."); + this.message += '\nChip onClicked.'; + } + }) + + Button('change activated') + .id(this.name + '_01') + .borderRadius(20) + .backgroundColor(0x317aff) + .fontWeight(FontWeight.Bold) + .margin(10) + .labelStyle({ overflow: TextOverflow.Clip, + maxLines: 1, + minFontSize: 10, + maxFontSize: 20, + font: { + size: 14, + weight: FontWeight.Bolder, + family: 'cursive', + style: FontStyle.Italic + } + }) + .onClick(() => { + this.isActivated = !this.isActivated; + this.message += '\nChip activated: ' + this.isActivated; + }) + + Scroll() { + Text(this.message) + .fontSize(10) + .fontColor(Color.Red) + .fontWeight(FontWeight.Medium) + .fontStyle(FontStyle.Normal) + .textAlign(TextAlign.Center) + .width('100%') + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + } + .id(this.name + '_02') + .friction(0.6) + .backgroundColor(Color.Yellow) + .edgeEffect(EdgeEffect.Spring) + .width('90%') + .height(200) + .margin(10) + + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('100%') + } +} + diff --git a/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface1080.ets b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface1080.ets new file mode 100644 index 000000000..bf634d022 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface1080.ets @@ -0,0 +1,139 @@ +/* + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { Chip, ChipOptions, ChipSize } from '@kit.ArkUI'; + +@Entry +@Component +struct UIComponentTextChipInterface1080 { + @State name: string = 'UIComponentTextChipInterface1080'; + @State message: string = this.name + ' message:'; + @State isActivated: boolean = false; + + build() { + Column() { + Text(this.name) + .fontSize(20) + .fontColor(Color.Pink) + .fontWeight(FontWeight.Medium) + .fontStyle(FontStyle.Italic) + .textAlign(TextAlign.Center) + .width('90%') + .height(100) + .border({ width: 1 }) + .lineHeight(20) + .maxLines(2) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Chip({ + prefixIcon: { + src: '/images/start.svg', + fillColor: Color.Brown, + activatedFillColor: Color.Pink, + size: { + width: 16, + height: 16 + }, + }, + label: { + text: "操作块", + fontSize: 12, + fontColor: Color.Blue, + labelMargin: { + left: '50%', + right: 30 + } + }, + suffixIcon: { + src: '/images/end.svg', + fillColor: Color.Brown, + activatedFillColor: Color.Pink, + size: { + width: 16, + height: 16 + }, + }, + size: ChipSize.NORMAL, + activated: this.isActivated, + backgroundColor: '#F7F7F7', + borderRadius: $r('sys.float.ohos_id_corner_radius_button'), + activatedBackgroundColor: '#007DFF', + enabled: true, + onClose: () => { + console.log("Chip onClose."); + this.message += '\nChip onClose.'; + }, + onClicked: () => { + console.log("Chip onClicked."); + this.message += '\nChip onClicked.'; + } + }) + + Button('change activated') + .id(this.name + '_01') + .borderRadius(20) + .backgroundColor(0x317aff) + .fontWeight(FontWeight.Bold) + .margin(10) + .labelStyle({ overflow: TextOverflow.Clip, + maxLines: 1, + minFontSize: 10, + maxFontSize: 20, + font: { + size: 14, + weight: FontWeight.Bolder, + family: 'cursive', + style: FontStyle.Italic + } + }) + .onClick(() => { + this.isActivated = !this.isActivated; + this.message += '\nChip activated: ' + this.isActivated; + }) + + Scroll() { + Text(this.message) + .fontSize(10) + .fontColor(Color.Red) + .fontWeight(FontWeight.Medium) + .fontStyle(FontStyle.Normal) + .textAlign(TextAlign.Center) + .width('100%') + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + } + .id(this.name + '_02') + .friction(0.6) + .backgroundColor(Color.Yellow) + .edgeEffect(EdgeEffect.Spring) + .width('90%') + .height(200) + .margin(10) + + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('100%') + } +} + diff --git a/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface1090.ets b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface1090.ets new file mode 100644 index 000000000..a06e100f0 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface1090.ets @@ -0,0 +1,139 @@ +/* + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { Chip, ChipOptions, ChipSize } from '@kit.ArkUI'; + +@Entry +@Component +struct UIComponentTextChipInterface1090 { + @State name: string = 'UIComponentTextChipInterface1090'; + @State message: string = this.name + ' message:'; + @State isActivated: boolean = false; + + build() { + Column() { + Text(this.name) + .fontSize(20) + .fontColor(Color.Pink) + .fontWeight(FontWeight.Medium) + .fontStyle(FontStyle.Italic) + .textAlign(TextAlign.Center) + .width('90%') + .height(100) + .border({ width: 1 }) + .lineHeight(20) + .maxLines(2) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Chip({ + prefixIcon: { + src: '/images/start.svg', + fillColor: Color.Brown, + activatedFillColor: Color.Pink, + size: { + width: 16, + height: 16 + }, + }, + label: { + text: "操作块", + fontSize: 12, + fontColor: Color.Blue, + labelMargin: { + left: '10vp', + right: 30 + } + }, + suffixIcon: { + src: '/images/end.svg', + fillColor: Color.Brown, + activatedFillColor: Color.Pink, + size: { + width: 16, + height: 16 + }, + }, + size: ChipSize.NORMAL, + activated: this.isActivated, + backgroundColor: '#F7F7F7', + borderRadius: $r('sys.float.ohos_id_corner_radius_button'), + activatedBackgroundColor: '#007DFF', + enabled: true, + onClose: () => { + console.log("Chip onClose."); + this.message += '\nChip onClose.'; + }, + onClicked: () => { + console.log("Chip onClicked."); + this.message += '\nChip onClicked.'; + } + }) + + Button('change activated') + .id(this.name + '_01') + .borderRadius(20) + .backgroundColor(0x317aff) + .fontWeight(FontWeight.Bold) + .margin(10) + .labelStyle({ overflow: TextOverflow.Clip, + maxLines: 1, + minFontSize: 10, + maxFontSize: 20, + font: { + size: 14, + weight: FontWeight.Bolder, + family: 'cursive', + style: FontStyle.Italic + } + }) + .onClick(() => { + this.isActivated = !this.isActivated; + this.message += '\nChip activated: ' + this.isActivated; + }) + + Scroll() { + Text(this.message) + .fontSize(10) + .fontColor(Color.Red) + .fontWeight(FontWeight.Medium) + .fontStyle(FontStyle.Normal) + .textAlign(TextAlign.Center) + .width('100%') + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + } + .id(this.name + '_02') + .friction(0.6) + .backgroundColor(Color.Yellow) + .edgeEffect(EdgeEffect.Spring) + .width('90%') + .height(200) + .margin(10) + + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('100%') + } +} + diff --git a/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface1100.ets b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface1100.ets new file mode 100644 index 000000000..f019efdfb --- /dev/null +++ b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface1100.ets @@ -0,0 +1,139 @@ +/* + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { Chip, ChipOptions, ChipSize } from '@kit.ArkUI'; + +@Entry +@Component +struct UIComponentTextChipInterface1100 { + @State name: string = 'UIComponentTextChipInterface1100'; + @State message: string = this.name + ' message:'; + @State isActivated: boolean = false; + + build() { + Column() { + Text(this.name) + .fontSize(20) + .fontColor(Color.Pink) + .fontWeight(FontWeight.Medium) + .fontStyle(FontStyle.Italic) + .textAlign(TextAlign.Center) + .width('90%') + .height(100) + .border({ width: 1 }) + .lineHeight(20) + .maxLines(2) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Chip({ + prefixIcon: { + src: '/images/start.svg', + fillColor: Color.Brown, + activatedFillColor: Color.Pink, + size: { + width: 16, + height: 16 + }, + }, + label: { + text: "操作块", + fontSize: 12, + fontColor: Color.Blue, + labelMargin: { + left: '10fp', + right: 30 + } + }, + suffixIcon: { + src: '/images/end.svg', + fillColor: Color.Brown, + activatedFillColor: Color.Pink, + size: { + width: 16, + height: 16 + }, + }, + size: ChipSize.NORMAL, + activated: this.isActivated, + backgroundColor: '#F7F7F7', + borderRadius: $r('sys.float.ohos_id_corner_radius_button'), + activatedBackgroundColor: '#007DFF', + enabled: true, + onClose: () => { + console.log("Chip onClose."); + this.message += '\nChip onClose.'; + }, + onClicked: () => { + console.log("Chip onClicked."); + this.message += '\nChip onClicked.'; + } + }) + + Button('change activated') + .id(this.name + '_01') + .borderRadius(20) + .backgroundColor(0x317aff) + .fontWeight(FontWeight.Bold) + .margin(10) + .labelStyle({ overflow: TextOverflow.Clip, + maxLines: 1, + minFontSize: 10, + maxFontSize: 20, + font: { + size: 14, + weight: FontWeight.Bolder, + family: 'cursive', + style: FontStyle.Italic + } + }) + .onClick(() => { + this.isActivated = !this.isActivated; + this.message += '\nChip activated: ' + this.isActivated; + }) + + Scroll() { + Text(this.message) + .fontSize(10) + .fontColor(Color.Red) + .fontWeight(FontWeight.Medium) + .fontStyle(FontStyle.Normal) + .textAlign(TextAlign.Center) + .width('100%') + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + } + .id(this.name + '_02') + .friction(0.6) + .backgroundColor(Color.Yellow) + .edgeEffect(EdgeEffect.Spring) + .width('90%') + .height(200) + .margin(10) + + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('100%') + } +} + diff --git a/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface1110.ets b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface1110.ets new file mode 100644 index 000000000..0a82fc1d8 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface1110.ets @@ -0,0 +1,139 @@ +/* + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { Chip, ChipOptions, ChipSize } from '@kit.ArkUI'; + +@Entry +@Component +struct UIComponentTextChipInterface1110 { + @State name: string = 'UIComponentTextChipInterface1110'; + @State message: string = this.name + ' message:'; + @State isActivated: boolean = false; + + build() { + Column() { + Text(this.name) + .fontSize(20) + .fontColor(Color.Pink) + .fontWeight(FontWeight.Medium) + .fontStyle(FontStyle.Italic) + .textAlign(TextAlign.Center) + .width('90%') + .height(100) + .border({ width: 1 }) + .lineHeight(20) + .maxLines(2) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Chip({ + prefixIcon: { + src: '/images/start.svg', + fillColor: Color.Brown, + activatedFillColor: Color.Pink, + size: { + width: 16, + height: 16 + }, + }, + label: { + text: "操作块", + fontSize: 12, + fontColor: Color.Blue, + labelMargin: { + left: '10lpx', + right: 30 + } + }, + suffixIcon: { + src: '/images/end.svg', + fillColor: Color.Brown, + activatedFillColor: Color.Pink, + size: { + width: 16, + height: 16 + }, + }, + size: ChipSize.NORMAL, + activated: this.isActivated, + backgroundColor: '#F7F7F7', + borderRadius: $r('sys.float.ohos_id_corner_radius_button'), + activatedBackgroundColor: '#007DFF', + enabled: true, + onClose: () => { + console.log("Chip onClose."); + this.message += '\nChip onClose.'; + }, + onClicked: () => { + console.log("Chip onClicked."); + this.message += '\nChip onClicked.'; + } + }) + + Button('change activated') + .id(this.name + '_01') + .borderRadius(20) + .backgroundColor(0x317aff) + .fontWeight(FontWeight.Bold) + .margin(10) + .labelStyle({ overflow: TextOverflow.Clip, + maxLines: 1, + minFontSize: 10, + maxFontSize: 20, + font: { + size: 14, + weight: FontWeight.Bolder, + family: 'cursive', + style: FontStyle.Italic + } + }) + .onClick(() => { + this.isActivated = !this.isActivated; + this.message += '\nChip activated: ' + this.isActivated; + }) + + Scroll() { + Text(this.message) + .fontSize(10) + .fontColor(Color.Red) + .fontWeight(FontWeight.Medium) + .fontStyle(FontStyle.Normal) + .textAlign(TextAlign.Center) + .width('100%') + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + } + .id(this.name + '_02') + .friction(0.6) + .backgroundColor(Color.Yellow) + .edgeEffect(EdgeEffect.Spring) + .width('90%') + .height(200) + .margin(10) + + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('100%') + } +} + diff --git a/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface1120.ets b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface1120.ets new file mode 100644 index 000000000..61eac0a80 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface1120.ets @@ -0,0 +1,139 @@ +/* + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { Chip, ChipOptions, ChipSize } from '@kit.ArkUI'; + +@Entry +@Component +struct UIComponentTextChipInterface1120 { + @State name: string = 'UIComponentTextChipInterface1120'; + @State message: string = this.name + ' message:'; + @State isActivated: boolean = false; + + build() { + Column() { + Text(this.name) + .fontSize(20) + .fontColor(Color.Pink) + .fontWeight(FontWeight.Medium) + .fontStyle(FontStyle.Italic) + .textAlign(TextAlign.Center) + .width('90%') + .height(100) + .border({ width: 1 }) + .lineHeight(20) + .maxLines(2) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Chip({ + prefixIcon: { + src: '/images/start.svg', + fillColor: Color.Brown, + activatedFillColor: Color.Pink, + size: { + width: 16, + height: 16 + }, + }, + label: { + text: "操作块", + fontSize: 12, + fontColor: Color.Blue, + labelMargin: { + left: 0, + right: 30 + } + }, + suffixIcon: { + src: '/images/end.svg', + fillColor: Color.Brown, + activatedFillColor: Color.Pink, + size: { + width: 16, + height: 16 + }, + }, + size: ChipSize.NORMAL, + activated: this.isActivated, + backgroundColor: '#F7F7F7', + borderRadius: $r('sys.float.ohos_id_corner_radius_button'), + activatedBackgroundColor: '#007DFF', + enabled: true, + onClose: () => { + console.log("Chip onClose."); + this.message += '\nChip onClose.'; + }, + onClicked: () => { + console.log("Chip onClicked."); + this.message += '\nChip onClicked.'; + } + }) + + Button('change activated') + .id(this.name + '_01') + .borderRadius(20) + .backgroundColor(0x317aff) + .fontWeight(FontWeight.Bold) + .margin(10) + .labelStyle({ overflow: TextOverflow.Clip, + maxLines: 1, + minFontSize: 10, + maxFontSize: 20, + font: { + size: 14, + weight: FontWeight.Bolder, + family: 'cursive', + style: FontStyle.Italic + } + }) + .onClick(() => { + this.isActivated = !this.isActivated; + this.message += '\nChip activated: ' + this.isActivated; + }) + + Scroll() { + Text(this.message) + .fontSize(10) + .fontColor(Color.Red) + .fontWeight(FontWeight.Medium) + .fontStyle(FontStyle.Normal) + .textAlign(TextAlign.Center) + .width('100%') + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + } + .id(this.name + '_02') + .friction(0.6) + .backgroundColor(Color.Yellow) + .edgeEffect(EdgeEffect.Spring) + .width('90%') + .height(200) + .margin(10) + + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('100%') + } +} + diff --git a/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface1130.ets b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface1130.ets new file mode 100644 index 000000000..0f03f4a45 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface1130.ets @@ -0,0 +1,139 @@ +/* + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { Chip, ChipOptions, ChipSize } from '@kit.ArkUI'; + +@Entry +@Component +struct UIComponentTextChipInterface1130 { + @State name: string = 'UIComponentTextChipInterface1130'; + @State message: string = this.name + ' message:'; + @State isActivated: boolean = false; + + build() { + Column() { + Text(this.name) + .fontSize(20) + .fontColor(Color.Pink) + .fontWeight(FontWeight.Medium) + .fontStyle(FontStyle.Italic) + .textAlign(TextAlign.Center) + .width('90%') + .height(100) + .border({ width: 1 }) + .lineHeight(20) + .maxLines(2) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Chip({ + prefixIcon: { + src: '/images/start.svg', + fillColor: Color.Brown, + activatedFillColor: Color.Pink, + size: { + width: 16, + height: 16 + }, + }, + label: { + text: "操作块", + fontSize: 12, + fontColor: Color.Blue, + labelMargin: { + left: -10, + right: 30 + } + }, + suffixIcon: { + src: '/images/end.svg', + fillColor: Color.Brown, + activatedFillColor: Color.Pink, + size: { + width: 16, + height: 16 + }, + }, + size: ChipSize.NORMAL, + activated: this.isActivated, + backgroundColor: '#F7F7F7', + borderRadius: $r('sys.float.ohos_id_corner_radius_button'), + activatedBackgroundColor: '#007DFF', + enabled: true, + onClose: () => { + console.log("Chip onClose."); + this.message += '\nChip onClose.'; + }, + onClicked: () => { + console.log("Chip onClicked."); + this.message += '\nChip onClicked.'; + } + }) + + Button('change activated') + .id(this.name + '_01') + .borderRadius(20) + .backgroundColor(0x317aff) + .fontWeight(FontWeight.Bold) + .margin(10) + .labelStyle({ overflow: TextOverflow.Clip, + maxLines: 1, + minFontSize: 10, + maxFontSize: 20, + font: { + size: 14, + weight: FontWeight.Bolder, + family: 'cursive', + style: FontStyle.Italic + } + }) + .onClick(() => { + this.isActivated = !this.isActivated; + this.message += '\nChip activated: ' + this.isActivated; + }) + + Scroll() { + Text(this.message) + .fontSize(10) + .fontColor(Color.Red) + .fontWeight(FontWeight.Medium) + .fontStyle(FontStyle.Normal) + .textAlign(TextAlign.Center) + .width('100%') + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + } + .id(this.name + '_02') + .friction(0.6) + .backgroundColor(Color.Yellow) + .edgeEffect(EdgeEffect.Spring) + .width('90%') + .height(200) + .margin(10) + + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('100%') + } +} + diff --git a/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface1140.ets b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface1140.ets new file mode 100644 index 000000000..e4a582872 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface1140.ets @@ -0,0 +1,139 @@ +/* + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { Chip, ChipOptions, ChipSize } from '@kit.ArkUI'; + +@Entry +@Component +struct UIComponentTextChipInterface1140 { + @State name: string = 'UIComponentTextChipInterface1140'; + @State message: string = this.name + ' message:'; + @State isActivated: boolean = false; + + build() { + Column() { + Text(this.name) + .fontSize(20) + .fontColor(Color.Pink) + .fontWeight(FontWeight.Medium) + .fontStyle(FontStyle.Italic) + .textAlign(TextAlign.Center) + .width('90%') + .height(100) + .border({ width: 1 }) + .lineHeight(20) + .maxLines(2) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Chip({ + prefixIcon: { + src: '/images/start.svg', + fillColor: Color.Brown, + activatedFillColor: Color.Pink, + size: { + width: 16, + height: 16 + }, + }, + label: { + text: "操作块", + fontSize: 12, + fontColor: Color.Blue, + labelMargin: { + left: $r('app.integer.name'), + right: 30 + } + }, + suffixIcon: { + src: '/images/end.svg', + fillColor: Color.Brown, + activatedFillColor: Color.Pink, + size: { + width: 16, + height: 16 + }, + }, + size: ChipSize.NORMAL, + activated: this.isActivated, + backgroundColor: '#F7F7F7', + borderRadius: $r('sys.float.ohos_id_corner_radius_button'), + activatedBackgroundColor: '#007DFF', + enabled: true, + onClose: () => { + console.log("Chip onClose."); + this.message += '\nChip onClose.'; + }, + onClicked: () => { + console.log("Chip onClicked."); + this.message += '\nChip onClicked.'; + } + }) + + Button('change activated') + .id(this.name + '_01') + .borderRadius(20) + .backgroundColor(0x317aff) + .fontWeight(FontWeight.Bold) + .margin(10) + .labelStyle({ overflow: TextOverflow.Clip, + maxLines: 1, + minFontSize: 10, + maxFontSize: 20, + font: { + size: 14, + weight: FontWeight.Bolder, + family: 'cursive', + style: FontStyle.Italic + } + }) + .onClick(() => { + this.isActivated = !this.isActivated; + this.message += '\nChip activated: ' + this.isActivated; + }) + + Scroll() { + Text(this.message) + .fontSize(10) + .fontColor(Color.Red) + .fontWeight(FontWeight.Medium) + .fontStyle(FontStyle.Normal) + .textAlign(TextAlign.Center) + .width('100%') + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + } + .id(this.name + '_02') + .friction(0.6) + .backgroundColor(Color.Yellow) + .edgeEffect(EdgeEffect.Spring) + .width('90%') + .height(200) + .margin(10) + + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('100%') + } +} + diff --git a/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface1160.ets b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface1160.ets new file mode 100644 index 000000000..56478d341 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface1160.ets @@ -0,0 +1,138 @@ +/* + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { Chip, ChipOptions, ChipSize } from '@kit.ArkUI'; + +@Entry +@Component +struct UIComponentTextChipInterface1160 { + @State name: string = 'UIComponentTextChipInterface1160'; + @State message: string = this.name + ' message:'; + @State isActivated: boolean = false; + + build() { + Column() { + Text(this.name) + .fontSize(20) + .fontColor(Color.Pink) + .fontWeight(FontWeight.Medium) + .fontStyle(FontStyle.Italic) + .textAlign(TextAlign.Center) + .width('90%') + .height(100) + .border({ width: 1 }) + .lineHeight(20) + .maxLines(2) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Chip({ + prefixIcon: { + src: '/images/start.svg', + fillColor: Color.Brown, + activatedFillColor: Color.Pink, + size: { + width: 16, + height: 16 + }, + }, + label: { + text: "操作块", + fontSize: 12, + fontColor: Color.Blue, + labelMargin: { + right: 30 + } + }, + suffixIcon: { + src: '/images/end.svg', + fillColor: Color.Brown, + activatedFillColor: Color.Pink, + size: { + width: 16, + height: 16 + }, + }, + size: ChipSize.NORMAL, + activated: this.isActivated, + backgroundColor: '#F7F7F7', + borderRadius: $r('sys.float.ohos_id_corner_radius_button'), + activatedBackgroundColor: '#007DFF', + enabled: true, + onClose: () => { + console.log("Chip onClose."); + this.message += '\nChip onClose.'; + }, + onClicked: () => { + console.log("Chip onClicked."); + this.message += '\nChip onClicked.'; + } + }) + + Button('change activated') + .id(this.name + '_01') + .borderRadius(20) + .backgroundColor(0x317aff) + .fontWeight(FontWeight.Bold) + .margin(10) + .labelStyle({ overflow: TextOverflow.Clip, + maxLines: 1, + minFontSize: 10, + maxFontSize: 20, + font: { + size: 14, + weight: FontWeight.Bolder, + family: 'cursive', + style: FontStyle.Italic + } + }) + .onClick(() => { + this.isActivated = !this.isActivated; + this.message += '\nChip activated: ' + this.isActivated; + }) + + Scroll() { + Text(this.message) + .fontSize(10) + .fontColor(Color.Red) + .fontWeight(FontWeight.Medium) + .fontStyle(FontStyle.Normal) + .textAlign(TextAlign.Center) + .width('100%') + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + } + .id(this.name + '_02') + .friction(0.6) + .backgroundColor(Color.Yellow) + .edgeEffect(EdgeEffect.Spring) + .width('90%') + .height(200) + .margin(10) + + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('100%') + } +} + diff --git a/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface1170.ets b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface1170.ets new file mode 100644 index 000000000..6c82c5e12 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface1170.ets @@ -0,0 +1,139 @@ +/* + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { Chip, ChipOptions, ChipSize } from '@kit.ArkUI'; + +@Entry +@Component +struct UIComponentTextChipInterface1170 { + @State name: string = 'UIComponentTextChipInterface1170'; + @State message: string = this.name + ' message:'; + @State isActivated: boolean = false; + + build() { + Column() { + Text(this.name) + .fontSize(20) + .fontColor(Color.Pink) + .fontWeight(FontWeight.Medium) + .fontStyle(FontStyle.Italic) + .textAlign(TextAlign.Center) + .width('90%') + .height(100) + .border({ width: 1 }) + .lineHeight(20) + .maxLines(2) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Chip({ + prefixIcon: { + src: '/images/start.svg', + fillColor: Color.Brown, + activatedFillColor: Color.Pink, + size: { + width: 16, + height: 16 + }, + }, + label: { + text: "操作块", + fontSize: 12, + fontColor: Color.Blue, + labelMargin: { + left: 20, + right: '20px' + } + }, + suffixIcon: { + src: '/images/end.svg', + fillColor: Color.Brown, + activatedFillColor: Color.Pink, + size: { + width: 16, + height: 16 + }, + }, + size: ChipSize.NORMAL, + activated: this.isActivated, + backgroundColor: '#F7F7F7', + borderRadius: $r('sys.float.ohos_id_corner_radius_button'), + activatedBackgroundColor: '#007DFF', + enabled: true, + onClose: () => { + console.log("Chip onClose."); + this.message += '\nChip onClose.'; + }, + onClicked: () => { + console.log("Chip onClicked."); + this.message += '\nChip onClicked.'; + } + }) + + Button('change activated') + .id(this.name + '_01') + .borderRadius(20) + .backgroundColor(0x317aff) + .fontWeight(FontWeight.Bold) + .margin(10) + .labelStyle({ overflow: TextOverflow.Clip, + maxLines: 1, + minFontSize: 10, + maxFontSize: 20, + font: { + size: 14, + weight: FontWeight.Bolder, + family: 'cursive', + style: FontStyle.Italic + } + }) + .onClick(() => { + this.isActivated = !this.isActivated; + this.message += '\nChip activated: ' + this.isActivated; + }) + + Scroll() { + Text(this.message) + .fontSize(10) + .fontColor(Color.Red) + .fontWeight(FontWeight.Medium) + .fontStyle(FontStyle.Normal) + .textAlign(TextAlign.Center) + .width('100%') + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + } + .id(this.name + '_02') + .friction(0.6) + .backgroundColor(Color.Yellow) + .edgeEffect(EdgeEffect.Spring) + .width('90%') + .height(200) + .margin(10) + + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('100%') + } +} + diff --git a/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface1180.ets b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface1180.ets new file mode 100644 index 000000000..ce3ee8157 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface1180.ets @@ -0,0 +1,139 @@ +/* + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { Chip, ChipOptions, ChipSize } from '@kit.ArkUI'; + +@Entry +@Component +struct UIComponentTextChipInterface1180 { + @State name: string = 'UIComponentTextChipInterface1180'; + @State message: string = this.name + ' message:'; + @State isActivated: boolean = false; + + build() { + Column() { + Text(this.name) + .fontSize(20) + .fontColor(Color.Pink) + .fontWeight(FontWeight.Medium) + .fontStyle(FontStyle.Italic) + .textAlign(TextAlign.Center) + .width('90%') + .height(100) + .border({ width: 1 }) + .lineHeight(20) + .maxLines(2) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Chip({ + prefixIcon: { + src: '/images/start.svg', + fillColor: Color.Brown, + activatedFillColor: Color.Pink, + size: { + width: 16, + height: 16 + }, + }, + label: { + text: "操作块", + fontSize: 12, + fontColor: Color.Blue, + labelMargin: { + left: 20, + right: '50%' + } + }, + suffixIcon: { + src: '/images/end.svg', + fillColor: Color.Brown, + activatedFillColor: Color.Pink, + size: { + width: 16, + height: 16 + }, + }, + size: ChipSize.NORMAL, + activated: this.isActivated, + backgroundColor: '#F7F7F7', + borderRadius: $r('sys.float.ohos_id_corner_radius_button'), + activatedBackgroundColor: '#007DFF', + enabled: true, + onClose: () => { + console.log("Chip onClose."); + this.message += '\nChip onClose.'; + }, + onClicked: () => { + console.log("Chip onClicked."); + this.message += '\nChip onClicked.'; + } + }) + + Button('change activated') + .id(this.name + '_01') + .borderRadius(20) + .backgroundColor(0x317aff) + .fontWeight(FontWeight.Bold) + .margin(10) + .labelStyle({ overflow: TextOverflow.Clip, + maxLines: 1, + minFontSize: 10, + maxFontSize: 20, + font: { + size: 14, + weight: FontWeight.Bolder, + family: 'cursive', + style: FontStyle.Italic + } + }) + .onClick(() => { + this.isActivated = !this.isActivated; + this.message += '\nChip activated: ' + this.isActivated; + }) + + Scroll() { + Text(this.message) + .fontSize(10) + .fontColor(Color.Red) + .fontWeight(FontWeight.Medium) + .fontStyle(FontStyle.Normal) + .textAlign(TextAlign.Center) + .width('100%') + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + } + .id(this.name + '_02') + .friction(0.6) + .backgroundColor(Color.Yellow) + .edgeEffect(EdgeEffect.Spring) + .width('90%') + .height(200) + .margin(10) + + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('100%') + } +} + diff --git a/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface1190.ets b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface1190.ets new file mode 100644 index 000000000..43c5da3d9 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface1190.ets @@ -0,0 +1,139 @@ +/* + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { Chip, ChipOptions, ChipSize } from '@kit.ArkUI'; + +@Entry +@Component +struct UIComponentTextChipInterface1190 { + @State name: string = 'UIComponentTextChipInterface1190'; + @State message: string = this.name + ' message:'; + @State isActivated: boolean = false; + + build() { + Column() { + Text(this.name) + .fontSize(20) + .fontColor(Color.Pink) + .fontWeight(FontWeight.Medium) + .fontStyle(FontStyle.Italic) + .textAlign(TextAlign.Center) + .width('90%') + .height(100) + .border({ width: 1 }) + .lineHeight(20) + .maxLines(2) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Chip({ + prefixIcon: { + src: '/images/start.svg', + fillColor: Color.Brown, + activatedFillColor: Color.Pink, + size: { + width: 16, + height: 16 + }, + }, + label: { + text: "操作块", + fontSize: 12, + fontColor: Color.Blue, + labelMargin: { + left: 20, + right: 10 + } + }, + suffixIcon: { + src: '/images/end.svg', + fillColor: Color.Brown, + activatedFillColor: Color.Pink, + size: { + width: 16, + height: 16 + }, + }, + size: ChipSize.NORMAL, + activated: this.isActivated, + backgroundColor: '#F7F7F7', + borderRadius: $r('sys.float.ohos_id_corner_radius_button'), + activatedBackgroundColor: '#007DFF', + enabled: true, + onClose: () => { + console.log("Chip onClose."); + this.message += '\nChip onClose.'; + }, + onClicked: () => { + console.log("Chip onClicked."); + this.message += '\nChip onClicked.'; + } + }) + + Button('change activated') + .id(this.name + '_01') + .borderRadius(20) + .backgroundColor(0x317aff) + .fontWeight(FontWeight.Bold) + .margin(10) + .labelStyle({ overflow: TextOverflow.Clip, + maxLines: 1, + minFontSize: 10, + maxFontSize: 20, + font: { + size: 14, + weight: FontWeight.Bolder, + family: 'cursive', + style: FontStyle.Italic + } + }) + .onClick(() => { + this.isActivated = !this.isActivated; + this.message += '\nChip activated: ' + this.isActivated; + }) + + Scroll() { + Text(this.message) + .fontSize(10) + .fontColor(Color.Red) + .fontWeight(FontWeight.Medium) + .fontStyle(FontStyle.Normal) + .textAlign(TextAlign.Center) + .width('100%') + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + } + .id(this.name + '_02') + .friction(0.6) + .backgroundColor(Color.Yellow) + .edgeEffect(EdgeEffect.Spring) + .width('90%') + .height(200) + .margin(10) + + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('100%') + } +} + diff --git a/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface1200.ets b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface1200.ets new file mode 100644 index 000000000..5b0f6e876 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface1200.ets @@ -0,0 +1,139 @@ +/* + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { Chip, ChipOptions, ChipSize } from '@kit.ArkUI'; + +@Entry +@Component +struct UIComponentTextChipInterface1200 { + @State name: string = 'UIComponentTextChipInterface1200'; + @State message: string = this.name + ' message:'; + @State isActivated: boolean = false; + + build() { + Column() { + Text(this.name) + .fontSize(20) + .fontColor(Color.Pink) + .fontWeight(FontWeight.Medium) + .fontStyle(FontStyle.Italic) + .textAlign(TextAlign.Center) + .width('90%') + .height(100) + .border({ width: 1 }) + .lineHeight(20) + .maxLines(2) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Chip({ + prefixIcon: { + src: '/images/start.svg', + fillColor: Color.Brown, + activatedFillColor: Color.Pink, + size: { + width: 16, + height: 16 + }, + }, + label: { + text: "操作块", + fontSize: 12, + fontColor: Color.Blue, + labelMargin: { + left: 20, + right: '10fp' + } + }, + suffixIcon: { + src: '/images/end.svg', + fillColor: Color.Brown, + activatedFillColor: Color.Pink, + size: { + width: 16, + height: 16 + }, + }, + size: ChipSize.NORMAL, + activated: this.isActivated, + backgroundColor: '#F7F7F7', + borderRadius: $r('sys.float.ohos_id_corner_radius_button'), + activatedBackgroundColor: '#007DFF', + enabled: true, + onClose: () => { + console.log("Chip onClose."); + this.message += '\nChip onClose.'; + }, + onClicked: () => { + console.log("Chip onClicked."); + this.message += '\nChip onClicked.'; + } + }) + + Button('change activated') + .id(this.name + '_01') + .borderRadius(20) + .backgroundColor(0x317aff) + .fontWeight(FontWeight.Bold) + .margin(10) + .labelStyle({ overflow: TextOverflow.Clip, + maxLines: 1, + minFontSize: 10, + maxFontSize: 20, + font: { + size: 14, + weight: FontWeight.Bolder, + family: 'cursive', + style: FontStyle.Italic + } + }) + .onClick(() => { + this.isActivated = !this.isActivated; + this.message += '\nChip activated: ' + this.isActivated; + }) + + Scroll() { + Text(this.message) + .fontSize(10) + .fontColor(Color.Red) + .fontWeight(FontWeight.Medium) + .fontStyle(FontStyle.Normal) + .textAlign(TextAlign.Center) + .width('100%') + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + } + .id(this.name + '_02') + .friction(0.6) + .backgroundColor(Color.Yellow) + .edgeEffect(EdgeEffect.Spring) + .width('90%') + .height(200) + .margin(10) + + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('100%') + } +} + -- Gitee From 6d95d63903e53766b7e1e3831fed65c58b4fead6 Mon Sep 17 00:00:00 2001 From: jinzhao Date: Thu, 21 Aug 2025 15:55:47 +0800 Subject: [PATCH 3/3] add uicompare cases3 Signed-off-by: jinzhao --- .../UIComponentTextChipInterface1330.ets | 140 ++++++++++++++++++ 1 file changed, 140 insertions(+) create mode 100644 sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface1330.ets diff --git a/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface1330.ets b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface1330.ets new file mode 100644 index 000000000..61a7ea7c1 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface1330.ets @@ -0,0 +1,140 @@ +/* + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { Chip, ChipOptions, ChipSize } from '@kit.ArkUI'; + +@Entry +@Component +struct UIComponentTextChipInterface1330 { + @State name: string = 'UIComponentTextChipInterface1330'; + @State message: string = this.name + ' message:'; + @State isActivated: boolean = false; + + build() { + Column() { + Text(this.name) + .fontSize(20) + .fontColor(Color.Pink) + .fontWeight(FontWeight.Medium) + .fontStyle(FontStyle.Italic) + .textAlign(TextAlign.Center) + .width('90%') + .height(100) + .border({ width: 1 }) + .lineHeight(20) + .maxLines(2) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Chip({ + prefixIcon: { + src: '/images/start.svg', + fillColor: Color.Brown, + activatedFillColor: Color.Pink, + size: { + width: 16, + height: 16 + }, + }, + label: { + text: "操作块", + fontSize: 12, + fontColor: Color.Blue, + fontFamily: 'HarmonyOS Sans', + labelMargin: { + left: 20, + right: 30 + } + }, + suffixIcon: { + src: '/images/end.svg', + fillColor: Color.Brown, + activatedFillColor: Color.Pink, + size: { + width: 16, + height: 16 + }, + }, + size: ChipSize.NORMAL, + activated: this.isActivated, + backgroundColor: '#F7F7F7', + borderRadius: $r('sys.float.ohos_id_corner_radius_button'), + activatedBackgroundColor: '#007DFF', + enabled: true, + onClose: () => { + console.log("Chip onClose."); + this.message += '\nChip onClose.'; + }, + onClicked: () => { + console.log("Chip onClicked."); + this.message += '\nChip onClicked.'; + } + }) + + Button('change activated') + .id(this.name + '_01') + .borderRadius(20) + .backgroundColor(0x317aff) + .fontWeight(FontWeight.Bold) + .margin(10) + .labelStyle({ overflow: TextOverflow.Clip, + maxLines: 1, + minFontSize: 10, + maxFontSize: 20, + font: { + size: 14, + weight: FontWeight.Bolder, + family: 'cursive', + style: FontStyle.Italic + } + }) + .onClick(() => { + this.isActivated = !this.isActivated; + this.message += '\nChip activated: ' + this.isActivated; + }) + + Scroll() { + Text(this.message) + .fontSize(10) + .fontColor(Color.Red) + .fontWeight(FontWeight.Medium) + .fontStyle(FontStyle.Normal) + .textAlign(TextAlign.Center) + .width('100%') + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + } + .id(this.name + '_02') + .friction(0.6) + .backgroundColor(Color.Yellow) + .edgeEffect(EdgeEffect.Spring) + .width('90%') + .height(200) + .margin(10) + + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('100%') + } +} + -- Gitee