diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ComponentButtonSelectMenuItemContentModifier/ComponentButtonSelectMenuItemContentModifier.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ComponentButtonSelectMenuItemContentModifier/ComponentButtonSelectMenuItemContentModifier.test.ets index fb08934275a671425dda4118e6d454c7c05935b2..6f6d1228d53f60b48715528b3a660b9fc0e092a3 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ComponentButtonSelectMenuItemContentModifier/ComponentButtonSelectMenuItemContentModifier.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ComponentButtonSelectMenuItemContentModifier/ComponentButtonSelectMenuItemContentModifier.test.ets @@ -18,7 +18,7 @@ import Settings from '../model/Settings' import windowSnap from '../model/snapShot' import Logger from '../model/Logger' import Utils from '../model/Utils' -import { Component, Driver , On, ON } from '@ohos.UiTest' +import { Component, Driver , MouseButton, ON } from '@ohos.UiTest' /* * ComponentButtonSelectMenuItemContentModifier @@ -39,7 +39,21 @@ import { Component, Driver , On, ON } from '@ohos.UiTest' export default function ComponentButtonSelectMenuItemContentModifier() { describe('ComponentButtonSelectMenuItemContentModifier', () => { + afterEach(async (done: Function) => { + if (Settings.windowClass == undefined) { + return + } + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`) + return; + } + Logger.info('TEST', `Succeeded in destroy the window.`); + }) + await Utils.sleep(1000); + done() + }) /* * @tc.number : SUB_ACE_UI_COMPONENT_BUTTON_SELECT_MENUITEMCONTENTMODIFIER_0010 @@ -61,7 +75,7 @@ export default function ComponentButtonSelectMenuItemContentModifier() { await Utils.sleep(1000); await driver.fling({x: 100, y: 1000}, {x: 100, y: 500}, 5, 600); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_MENUITEMCONTENTMODIFIER_0010 finish.`); done() @@ -87,7 +101,7 @@ export default function ComponentButtonSelectMenuItemContentModifier() { await Utils.sleep(1000); await driver.fling({x: 100, y: 1000}, {x: 100, y: 500}, 5, 600); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_MENUITEMCONTENTMODIFIER_0011 finish.`); done() @@ -113,7 +127,7 @@ export default function ComponentButtonSelectMenuItemContentModifier() { await Utils.sleep(1000); await driver.fling({x: 100, y: 1000}, {x: 100, y: 500}, 5, 600); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_MENUITEMCONTENTMODIFIER_0013 finish.`); done() @@ -139,7 +153,7 @@ export default function ComponentButtonSelectMenuItemContentModifier() { await Utils.sleep(1000); await driver.fling({x: 100, y: 1000}, {x: 100, y: 500}, 5, 600); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_MENUITEMCONTENTMODIFIER_0015 finish.`); done() @@ -165,7 +179,7 @@ export default function ComponentButtonSelectMenuItemContentModifier() { await Utils.sleep(1000); await driver.fling({x: 100, y: 1000}, {x: 100, y: 500}, 5, 600); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_MENUITEMCONTENTMODIFIER_0016 finish.`); done() @@ -191,7 +205,7 @@ export default function ComponentButtonSelectMenuItemContentModifier() { await Utils.sleep(1000); await driver.fling({x: 500, y: 300}, {x: 500, y: 100}, 5, 600); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_MENUITEMCONTENTMODIFIER_0017 finish.`); done() @@ -217,7 +231,7 @@ export default function ComponentButtonSelectMenuItemContentModifier() { await Utils.sleep(1000); await driver.fling({x: 100, y: 1000}, {x: 100, y: 500}, 5, 600); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_MENUITEMCONTENTMODIFIER_0018 finish.`); done() @@ -243,7 +257,7 @@ export default function ComponentButtonSelectMenuItemContentModifier() { await Utils.sleep(1000); await driver.fling({x: 100, y: 1000}, {x: 100, y: 500}, 5, 600); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_MENUITEMCONTENTMODIFIER_0023 finish.`); done() @@ -269,7 +283,7 @@ export default function ComponentButtonSelectMenuItemContentModifier() { await Utils.sleep(1000); await driver.fling({x: 100, y: 1000}, {x: 100, y: 500}, 5, 600); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_MENUITEMCONTENTMODIFIER_0025 finish.`); done() @@ -295,7 +309,7 @@ export default function ComponentButtonSelectMenuItemContentModifier() { await Utils.sleep(1000); await driver.fling({x: 100, y: 1000}, {x: 100, y: 500}, 5, 600); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_MENUITEMCONTENTMODIFIER_0026 finish.`); done() @@ -321,10 +335,230 @@ export default function ComponentButtonSelectMenuItemContentModifier() { await Utils.sleep(1000); await driver.fling({x: 100, y: 1000}, {x: 100, y: 500}, 5, 600); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_MENUITEMCONTENTMODIFIER_0027 finish.`); done() }) + it('SUB_ACE_UI_COMPONENT_BUTTON_SELECT_MENUITEMCONTENTMODIFIER_0012', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_MENUITEMCONTENTMODIFIER_0012 start.`); + Settings.createWindow("testability/pages/ComponentButtonSelectMenuItemContentModifier/" + + "ComponentButtonSelectMenuItemContentModifier0012") + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ComponentButtonSelectMenuItemContentModifier0012_001')); + await button.click(); + await Utils.sleep(1000); + let button2: Component = await driver.findComponent(ON.id('ComponentButtonSelectMenuItemContentModifier0012_002')); + await button2.click(); + await Utils.sleep(1000); + let button4: Component = await driver.findComponent(ON.id('ComponentButtonSelectMenuItemContentModifier0012_004')); + await button4.click(); + await Utils.sleep(1000); + let menu: Component = await driver.findComponent(ON.type('Menu')); + let point = await menu.getBounds(); + let centerX = (point.left+point.right)/2 + let centerY = (point.top+point.bottom)/2 + await driver.mouseClick({x:centerX,y:centerY}, MouseButton.MOUSE_BUTTON_LEFT); + await Utils.sleep(1000); + let selectBuilder: Component = await driver.findComponent(ON.id('' + + 'ComponentButtonSelectMenuItemContentModifier0012_003')); + await selectBuilder.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_MENUITEMCONTENTMODIFIER_0012 finish.`); + done(); + }) + /* + * @tc.number : SUB_ACE_UI_COMPONENT_BUTTON_SELECT_MENUITEMCONTENTMODIFIER_0014 + * @tc.name : SUB_ACE_UI_COMPONENT_BUTTON_SELECT_MENUITEMCONTENTMODIFIER_0014 + * @tc.desc : Selected is set to number:undefined. + */ + it('SUB_ACE_UI_COMPONENT_BUTTON_SELECT_MENUITEMCONTENTMODIFIER_0014', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_MENUITEMCONTENTMODIFIER_0014 start.`); + Settings.createWindow("testability/pages/ComponentButtonSelectMenuItemContentModifier/" + + "ComponentButtonSelectMenuItemContentModifier0012") + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ComponentButtonSelectMenuItemContentModifier0012_001')); + await button.click(); + await Utils.sleep(1000); + let button4: Component = await driver.findComponent(ON.id('ComponentButtonSelectMenuItemContentModifier0012_004')); + await button4.click(); + await Utils.sleep(1000); + let menu: Component = await driver.findComponent(ON.type('Menu')); + let point = await menu.getBounds(); + let centerX = (point.left+point.right)/2 + let centerY = (point.top+point.bottom)/2 + await driver.mouseClick({x:centerX,y:centerY}, MouseButton.MOUSE_BUTTON_LEFT); + await Utils.sleep(1000); + let selectBuilder: Component = await driver.findComponent(ON.id('' + + 'ComponentButtonSelectMenuItemContentModifier0012_003')); + await selectBuilder.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_MENUITEMCONTENTMODIFIER_0014 finish.`); + done(); + }) + /* + * @tc.number : SUB_ACE_UI_COMPONENT_BUTTON_SELECT_MENUITEMCONTENTMODIFIER_0020_1 + * @tc.name : SUB_ACE_UI_COMPONENT_BUTTON_SELECT_MENUITEMCONTENTMODIFIER_0020_1 + * @tc.desc : menultemContentModifier:undefined. + */ + it('SUB_ACE_UI_COMPONENT_BUTTON_SELECT_MENUITEMCONTENTMODIFIER_0020_1', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_MENUITEMCONTENTMODIFIER_0020_1 start.`); + Settings.createWindow("testability/pages/ComponentButtonSelectMenuItemContentModifier/" + + "ComponentButtonSelectMenuItemContentModifier0012") + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ComponentButtonSelectMenuItemContentModifier0012_001')); + await button.click(); + await Utils.sleep(1000); + let button4: Component = await driver.findComponent(ON.id('ComponentButtonSelectMenuItemContentModifier0012_004')); + await button4.click(); + await Utils.sleep(1000); + let menu: Component = await driver.findComponent(ON.type('Menu')); + let point = await menu.getBounds(); + let center = (point.left+point.right)/2 + await driver.mouseClick({x:center,y:point.top+20}, MouseButton.MOUSE_BUTTON_LEFT); + await Utils.sleep(1000); + let selectBuilder: Component = await driver.findComponent(ON.id('' + + 'ComponentButtonSelectMenuItemContentModifier0012_003')); + await selectBuilder.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_MENUITEMCONTENTMODIFIER_0020_1 finish.`); + done(); + }) + /* + * @tc.number : SUB_ACE_UI_COMPONENT_BUTTON_SELECT_MENUITEMCONTENTMODIFIER_0020_2 + * @tc.name : SUB_ACE_UI_COMPONENT_BUTTON_SELECT_MENUITEMCONTENTMODIFIER_0020_2 + * @tc.desc : menultemContentModifier:customBuilder,Selected is set to number:undefined. + */ + it('SUB_ACE_UI_COMPONENT_BUTTON_SELECT_MENUITEMCONTENTMODIFIER_0020_2', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_MENUITEMCONTENTMODIFIER_0020_2 start.`); + Settings.createWindow("testability/pages/ComponentButtonSelectMenuItemContentModifier/" + + "ComponentButtonSelectMenuItemContentModifier0012") + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ComponentButtonSelectMenuItemContentModifier0012_001')); + await button.click(); + await Utils.sleep(1000); + let button2: Component = await driver.findComponent(ON.id('ComponentButtonSelectMenuItemContentModifier0012_002')); + await button2.click(); + await Utils.sleep(1000); + let button4: Component = await driver.findComponent(ON.id('ComponentButtonSelectMenuItemContentModifier0012_004')); + await button4.click(); + await Utils.sleep(1000); + let menu: Component = await driver.findComponent(ON.type('Menu')); + let point = await menu.getBounds(); + let centerX = (point.left+point.right)/2 + let centerY = (point.top+point.bottom)/2 + await driver.mouseClick({x:centerX,y:centerY}, MouseButton.MOUSE_BUTTON_LEFT); + await Utils.sleep(1000); + let selectBuilder: Component = await driver.findComponent(ON.id('' + + 'ComponentButtonSelectMenuItemContentModifier0012_003')); + await selectBuilder.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_MENUITEMCONTENTMODIFIER_0020_2 finish.`); + done(); + }) + /* + * @tc.number : SUB_ACE_UI_COMPONENT_BUTTON_SELECT_MENUITEMCONTENTMODIFIER_0022 + * @tc.name : SUB_ACE_UI_COMPONENT_BUTTON_SELECT_MENUITEMCONTENTMODIFIER_0022 + * @tc.desc : menultemContentModifier:customBuilder,Selected is set to number:null. + */ + it('SUB_ACE_UI_COMPONENT_BUTTON_SELECT_MENUITEMCONTENTMODIFIER_0022', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_MENUITEMCONTENTMODIFIER_0022 start.`); + Settings.createWindow("testability/pages/ComponentButtonSelectMenuItemContentModifier/" + + "ComponentButtonSelectMenuItemContentModifier0012") + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ComponentButtonSelectMenuItemContentModifier0012_001')); + await button.click(); + await Utils.sleep(1000); + let button2: Component = await driver.findComponent(ON.id('ComponentButtonSelectMenuItemContentModifier0012_002')); + await button2.click(); + await Utils.sleep(1000); + let button4: Component = await driver.findComponent(ON.id('ComponentButtonSelectMenuItemContentModifier0012_004')); + await button4.click(); + await Utils.sleep(1000); + let menu: Component = await driver.findComponent(ON.type('Menu')); + let point = await menu.getBounds(); + let centerX = (point.left+point.right)/2 + await driver.mouseClick({x:centerX,y:point.bottom-20}, MouseButton.MOUSE_BUTTON_LEFT); + await Utils.sleep(1000); + let selectBuilder: Component = await driver.findComponent(ON.id('' + + 'ComponentButtonSelectMenuItemContentModifier0012_003')); + await selectBuilder.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_MENUITEMCONTENTMODIFIER_0022 finish.`); + done(); + }) + /* + * @tc.number : SUB_ACE_UI_COMPONENT_BUTTON_SELECT_MENUITEMCONTENTMODIFIER_0024 + * @tc.name : SUB_ACE_UI_COMPONENT_BUTTON_SELECT_MENUITEMCONTENTMODIFIER_0024 + * @tc.desc : menultemContentModifier:null builder + */ + it('SUB_ACE_UI_COMPONENT_BUTTON_SELECT_MENUITEMCONTENTMODIFIER_0024', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_MENUITEMCONTENTMODIFIER_0024 start.`); + Settings.createWindow("testability/pages/ComponentButtonSelectMenuItemContentModifier/" + + "ComponentButtonSelectMenuItemContentModifier0012") + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ComponentButtonSelectMenuItemContentModifier0012_001')); + await button.click(); + await Utils.sleep(1000); + let button2: Component = await driver.findComponent(ON.id('ComponentButtonSelectMenuItemContentModifier0012_005')); + await button2.click(); + await Utils.sleep(1000); + let selectBuilder: Component = await driver.findComponent(ON.id('' + + 'ComponentButtonSelectMenuItemContentModifier0012_003')); + await selectBuilder.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_MENUITEMCONTENTMODIFIER_0024 finish.`); + done(); + }) + /* + * @tc.number : SUB_ACE_UI_COMPONENT_BUTTON_SELECT_MENUITEMCONTENTMODIFIER_0028 + * @tc.name : SUB_ACE_UI_COMPONENT_BUTTON_SELECT_MENUITEMCONTENTMODIFIER_0028 + * @tc.desc : menultemContentModifier:undefined,Selected is set to number:undefined. + */ + it('SUB_ACE_UI_COMPONENT_BUTTON_SELECT_MENUITEMCONTENTMODIFIER_0028', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_MENUITEMCONTENTMODIFIER_0024 start.`); + Settings.createWindow("testability/pages/ComponentButtonSelectMenuItemContentModifier/" + + "ComponentButtonSelectMenuItemContentModifier0012") + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ComponentButtonSelectMenuItemContentModifier0012_001')); + await button.click(); + await Utils.sleep(1000); + let button4: Component = await driver.findComponent(ON.id('ComponentButtonSelectMenuItemContentModifier0012_004')); + await button4.click(); + await Utils.sleep(1000); + let menu: Component = await driver.findComponent(ON.type('Menu')); + let point = await menu.getBounds(); + let centerX = (point.left+point.right)/2 + let centerY = (point.top+point.bottom)/2 + await driver.mouseClick({x:centerX,y:centerY}, MouseButton.MOUSE_BUTTON_LEFT); + await Utils.sleep(1000); + let selectBuilder: Component = await driver.findComponent(ON.id('' + + 'ComponentButtonSelectMenuItemContentModifier0012_003')); + await selectBuilder.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_MENUITEMCONTENTMODIFIER_0028 finish.`); + done(); + }) }) } diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ComponentFunctionLAdvancedComponentsPopupInterfaceTest/ComponentFunctionLAdvancedComponentsPopupInterface.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ComponentFunctionLAdvancedComponentsPopupInterfaceTest/ComponentFunctionLAdvancedComponentsPopupInterface.test.ets index 0af58cfb277aee2bfc0fc8dcfc3c40233943d15c..1712fd713cd3d3646f96a5689300f2099c2dfc99 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ComponentFunctionLAdvancedComponentsPopupInterfaceTest/ComponentFunctionLAdvancedComponentsPopupInterface.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ComponentFunctionLAdvancedComponentsPopupInterfaceTest/ComponentFunctionLAdvancedComponentsPopupInterface.test.ets @@ -1,4 +1,4 @@ -/* +g/* * Copyright (C) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the 'License') * you may not use this file except in compliance with the License. @@ -37,7 +37,20 @@ import { Driver, ON } from '@ohos.UiTest' export default function ComponentFunctionLAdvancedComponentsPopupInterface() { describe('ComponentFunctionLAdvancedComponentsPopupInterface', () => { - + afterEach(async (done: Function) => { + if (Settings.windowClass == undefined) { + return; + } + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`); + return; + } + Logger.info('TEST', `Succeeded in destroy the window.`); + }) + await Utils.sleep(1000); + done(); + }) /* * @tc.number ARKUI_COMPONENTFUNCTION_ADVANCEDCOMPONENTS_POPUP_INTERFACE_0178 @@ -73,10 +86,36 @@ export default function ComponentFunctionLAdvancedComponentsPopupInterface() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(3000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_ADVANCEDCOMPONENTS_POPUP_INTERFACE_01780 finish.`); done(); }) + + /* + * @tc.number SUB_ACE_ANALYSE_UI_COMPONENT_POPUPBOX_POPUP_BACKWARDANALYSIS_0020 + * @tc.name SUB_ACE_ANALYSE_UI_COMPONENT_POPUPBOX_POPUP_BACKWARDANALYSIS_0020 + * @tc.desc Verify that the popup configuration on the bottom and half mode can popup normally in the straight-board environment + */ + it('SUB_ACE_ANALYSE_UI_COMPONENT_POPUPBOX_POPUP_BACKWARDANALYSIS_0020', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ANALYSE_UI_COMPONENT_POPUPBOX_POPUP_BACKWARDANALYSIS_0020 start.`); + Settings.createWindow("testability/pages/ComponentFunctionLAdvancedComponentsPopupInterface/UIComponentPopupBoxPopupBackwardAnalysis002"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button = await driver.findComponent(ON.id("UIComponentPopupBoxPopupBackwardAnalysis0020")); + let buttonPointCenter = await button.getBoundsCenter(); + await driver.click(buttonPointCenter.x, buttonPointCenter.y); + await Utils.sleep(1000); + let popupButton = await driver.findComponent(ON.id("UIComponentPopupBoxPopupBackwardAnalysis0021")); + let popupButtonPointCenter = await popupButton.getBoundsCenter(); + await driver.click(popupButtonPointCenter.x, popupButtonPointCenter.y); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_ANALYSE_UI_COMPONENT_POPUPBOX_POPUP_BACKWARDANALYSIS_0020 finish.`); + done(); + }) + + }) } diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/FunctionJiChuSR000HUB4KTest/FunctionJiChuSR000HUB4K.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/FunctionJiChuSR000HUB4KTest/FunctionJiChuSR000HUB4K.test.ets index 29b6f449b96ef01b33ea44107f15f38ca6116e83..345b413cc30756e4e27b399ad294b1c8dc058d28 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/FunctionJiChuSR000HUB4KTest/FunctionJiChuSR000HUB4K.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/FunctionJiChuSR000HUB4KTest/FunctionJiChuSR000HUB4K.test.ets @@ -37,7 +37,21 @@ import { Driver, ON } from '@ohos.UiTest' export default function FunctionJiChuSR000HUB4K() { describe('FunctionJiChuSR000HUB4K', () => { + afterEach(async (done: Function) => { + if (Settings.windowClass == undefined) { + return; + } + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`); + return; + } + Logger.info('TEST', `Succeeded in destroy the window.`); + }) + await Utils.sleep(1000); + done(); + }) /* * @tc.number SUB_ACE_FUNCTION_JICHU_SR000HUB4K_0120 @@ -53,7 +67,7 @@ export default function FunctionJiChuSR000HUB4K() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_FUNCTION_JICHU_SR000HUB4K_0120 finish.`); done(); @@ -73,7 +87,7 @@ export default function FunctionJiChuSR000HUB4K() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_FUNCTION_JICHU_SR000HUB4K_0130 finish.`); done(); @@ -93,7 +107,7 @@ export default function FunctionJiChuSR000HUB4K() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_FUNCTION_JICHU_SR000HUB4K_0140 finish.`); done(); @@ -113,7 +127,7 @@ export default function FunctionJiChuSR000HUB4K() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_FUNCTION_JICHU_SR000HUB4K_0150 finish.`); done(); @@ -133,7 +147,7 @@ export default function FunctionJiChuSR000HUB4K() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_FUNCTION_JICHU_SR000HUB4K_0160 finish.`); done(); @@ -153,7 +167,7 @@ export default function FunctionJiChuSR000HUB4K() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_FUNCTION_JICHU_SR000HUB4K_0170 finish.`); done(); @@ -173,7 +187,7 @@ export default function FunctionJiChuSR000HUB4K() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_FUNCTION_JICHU_SR000HUB4K_0180 finish.`); done(); @@ -193,7 +207,7 @@ export default function FunctionJiChuSR000HUB4K() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_FUNCTION_JICHU_SR000HUB4K_0190 finish.`); done(); @@ -213,7 +227,7 @@ export default function FunctionJiChuSR000HUB4K() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_FUNCTION_JICHU_SR000HUB4K_0250 finish.`); done(); @@ -233,7 +247,7 @@ export default function FunctionJiChuSR000HUB4K() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_FUNCTION_JICHU_SR000HUB4K_0200 finish.`); done(); @@ -253,7 +267,7 @@ export default function FunctionJiChuSR000HUB4K() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_FUNCTION_JICHU_SR000HUB4K_0620 finish.`); done(); @@ -273,7 +287,7 @@ export default function FunctionJiChuSR000HUB4K() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_FUNCTION_JICHU_SR000HUB4K_0260 finish.`); done(); @@ -293,7 +307,7 @@ export default function FunctionJiChuSR000HUB4K() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_FUNCTION_JICHU_SR000HUB4K_0610 finish.`); done(); @@ -313,7 +327,7 @@ export default function FunctionJiChuSR000HUB4K() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_FUNCTION_JICHU_SR000HUB4K_0230 finish.`); done(); @@ -333,7 +347,7 @@ export default function FunctionJiChuSR000HUB4K() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_FUNCTION_JICHU_SR000HUB4K_0210 finish.`); done(); @@ -353,7 +367,7 @@ export default function FunctionJiChuSR000HUB4K() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_FUNCTION_JICHU_SR000HUB4K_0220 finish.`); done(); @@ -373,7 +387,7 @@ export default function FunctionJiChuSR000HUB4K() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_FUNCTION_JICHU_SR000HUB4K_0240 finish.`); done(); @@ -393,7 +407,7 @@ export default function FunctionJiChuSR000HUB4K() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_FUNCTION_JICHU_SR000HUB4K_0270 finish.`); done(); @@ -413,7 +427,7 @@ export default function FunctionJiChuSR000HUB4K() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_FUNCTION_JICHU_SR000HUB4K_0280 finish.`); done(); @@ -433,7 +447,7 @@ export default function FunctionJiChuSR000HUB4K() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_FUNCTION_JICHU_SR000HUB4K_0290 finish.`); done(); @@ -453,7 +467,7 @@ export default function FunctionJiChuSR000HUB4K() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_FUNCTION_JICHU_SR000HUB4K_0320 finish.`); done(); @@ -473,7 +487,7 @@ export default function FunctionJiChuSR000HUB4K() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_FUNCTION_JICHU_SR000HUB4K_0310 finish.`); done(); @@ -493,7 +507,7 @@ export default function FunctionJiChuSR000HUB4K() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_FUNCTION_JICHU_SR000HUB4K_0300 finish.`); done(); @@ -513,7 +527,7 @@ export default function FunctionJiChuSR000HUB4K() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_FUNCTION_JICHU_SR000HUB4K_0330 finish.`); done(); @@ -533,7 +547,7 @@ export default function FunctionJiChuSR000HUB4K() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_FUNCTION_JICHU_SR000HUB4K_0370 finish.`); done(); @@ -553,7 +567,7 @@ export default function FunctionJiChuSR000HUB4K() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_FUNCTION_JICHU_SR000HUB4K_0380 finish.`); done(); @@ -573,7 +587,7 @@ export default function FunctionJiChuSR000HUB4K() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_FUNCTION_JICHU_SR000HUB4K_0340 finish.`); done(); @@ -593,7 +607,7 @@ export default function FunctionJiChuSR000HUB4K() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_FUNCTION_JICHU_SR000HUB4K_0360 finish.`); done(); @@ -613,7 +627,7 @@ export default function FunctionJiChuSR000HUB4K() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_FUNCTION_JICHU_SR000HUB4K_0350 finish.`); done(); @@ -633,7 +647,7 @@ export default function FunctionJiChuSR000HUB4K() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_FUNCTION_JICHU_SR000HUB4K_0560 finish.`); done(); @@ -653,7 +667,7 @@ export default function FunctionJiChuSR000HUB4K() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_FUNCTION_JICHU_SR000HUB4K_0390 finish.`); done(); @@ -673,7 +687,7 @@ export default function FunctionJiChuSR000HUB4K() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_FUNCTION_JICHU_SR000HUB4K_0400 finish.`); done(); @@ -693,7 +707,7 @@ export default function FunctionJiChuSR000HUB4K() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_FUNCTION_JICHU_SR000HUB4K_0420 finish.`); done(); @@ -713,7 +727,7 @@ export default function FunctionJiChuSR000HUB4K() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_FUNCTION_JICHU_SR000HUB4K_0410 finish.`); done(); @@ -733,7 +747,7 @@ export default function FunctionJiChuSR000HUB4K() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_FUNCTION_JICHU_SR000HUB4K_0430 finish.`); done(); @@ -753,7 +767,7 @@ export default function FunctionJiChuSR000HUB4K() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_FUNCTION_JICHU_SR000HUB4K_0450 finish.`); done(); @@ -773,7 +787,7 @@ export default function FunctionJiChuSR000HUB4K() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_FUNCTION_JICHU_SR000HUB4K_0440 finish.`); done(); @@ -793,7 +807,7 @@ export default function FunctionJiChuSR000HUB4K() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_FUNCTION_JICHU_SR000HUB4K_0470 finish.`); done(); @@ -813,7 +827,7 @@ export default function FunctionJiChuSR000HUB4K() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_FUNCTION_JICHU_SR000HUB4K_0480 finish.`); done(); @@ -833,7 +847,7 @@ export default function FunctionJiChuSR000HUB4K() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_FUNCTION_JICHU_SR000HUB4K_0460 finish.`); done(); @@ -853,7 +867,7 @@ export default function FunctionJiChuSR000HUB4K() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_FUNCTION_JICHU_SR000HUB4K_0490 finish.`); done(); @@ -873,7 +887,7 @@ export default function FunctionJiChuSR000HUB4K() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_FUNCTION_JICHU_SR000HUB4K_0500 finish.`); done(); @@ -893,7 +907,7 @@ export default function FunctionJiChuSR000HUB4K() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_FUNCTION_JICHU_SR000HUB4K_0520 finish.`); done(); @@ -913,7 +927,7 @@ export default function FunctionJiChuSR000HUB4K() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_FUNCTION_JICHU_SR000HUB4K_0510 finish.`); done(); @@ -933,7 +947,7 @@ export default function FunctionJiChuSR000HUB4K() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_FUNCTION_JICHU_SR000HUB4K_0530 finish.`); done(); @@ -953,7 +967,7 @@ export default function FunctionJiChuSR000HUB4K() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_FUNCTION_JICHU_SR000HUB4K_0540 finish.`); done(); @@ -973,7 +987,7 @@ export default function FunctionJiChuSR000HUB4K() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_FUNCTION_JICHU_SR000HUB4K_0550 finish.`); done(); @@ -993,7 +1007,7 @@ export default function FunctionJiChuSR000HUB4K() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_FUNCTION_JICHU_SR000HUB4K_0580 finish.`); done(); @@ -1013,7 +1027,7 @@ export default function FunctionJiChuSR000HUB4K() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_FUNCTION_JICHU_SR000HUB4K_0570 finish.`); done(); @@ -1033,7 +1047,7 @@ export default function FunctionJiChuSR000HUB4K() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_FUNCTION_JICHU_SR000HUB4K_0590 finish.`); done(); @@ -1053,7 +1067,7 @@ export default function FunctionJiChuSR000HUB4K() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_FUNCTION_JICHU_SR000HUB4K_0600 finish.`); done(); diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/List.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/List.test.ets index 0860e1238b7d5125d3247205585c174e61e3e827..3d0a98601510561a509fdb765134d9852003828f 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/List.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/List.test.ets @@ -149,7 +149,21 @@ import UIComponentPopupBoxToastStyleInterface001 from './UIComponentPopupBoxToastStyleInterfaceTest/UIComponentPopupBoxToastStyleInterface001.test'; import UIComponentPopupBoxFullDialogInterface001 from './UIComponentPopupBoxFullDialogInterfaceTest/UIComponentPopupBoxFullDialogInterface001.test'; - +import UIComponentPopupBoxAttributeInterface001 + from './UIComponentPopupBoxAttributeInterfaceTest/UIComponentPopupBoxAttributeInterface001.test'; +import UIComponentfunctionSpecialComponentsDialogDataInterface + from './UIComponentfunctionSpecialComponentsDialogDataInterfaceTest/UIComponentfunctionSpecialComponentsDialogDataInterface.test'; +import UIComponentPopupBoxCalendarPickerFeature + from './UIComponentPopupBoxCalendarPickerFeatureTest/UIComponentPopupBoxCalendarPickerFeature.test'; +import UIComponentPopupBoxPopupOnWillDisMissBoolean + from './UIComponentPopupBoxPopupOnWillDisMissBooleanTest/UIComponentPopupBoxPopupOnWillDisMissBoolean.test'; +import UIComponentPopupBoxStyleStrong from './UIComponentPopupBoxStyleStrongTest/UIComponentPopupBoxStyleStrong.test'; +import UIComponentPopupBoxConsistencyScene + from './UIComponentPopupBoxConsistencySceneTest/UIComponentPopupBoxConsistencyScene.test'; +import UIComponentPopupBoxPopupFollowTransformofTarget + from './UIComponentPopupBoxPopupFollowTransformOfTarget/UIComponentPopupBoxPopupFollowTransformofTarget.test'; + + export default function testsuite() { ComponentTextRicheditorFontfeatures(); ComponentTextRicheditorCustomColors(); @@ -239,6 +253,12 @@ export default function testsuite() { UIComponentPopupBoxAttribute(); UIComponentPopupBoxPromptToastSequence(); UIComponentPopupBoxSpecificationsPopup(); + UIComponentfunctionSpecialComponentsDialogDataInterface(); + UIComponentPopupBoxCalendarPickerFeature(); + UIComponentPopupBoxPopupOnWillDisMissBoolean(); + UIComponentPopupBoxStyleStrong(); + UIComponentPopupBoxConsistencyScene(); + UIComponentPopupBoxPopupFollowTransformofTarget(); } diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/TsComponentSR000HRP34Test/TsComponentSR000HRP34Test.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/TsComponentSR000HRP34Test/TsComponentSR000HRP34Test.test.ets index 598039d5eecc36bea43452748148796b6d1280ff..b985d5c9e7eed056eab564911c30a4b033b8b38a 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/TsComponentSR000HRP34Test/TsComponentSR000HRP34Test.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/TsComponentSR000HRP34Test/TsComponentSR000HRP34Test.test.ets @@ -40,7 +40,21 @@ import { KeyCode } from '@kit.InputKit' export default function TsComponentSR000HRP34() { describe('TsComponentSR000HRP34', () => { + afterEach(async (done: Function) => { + if (Settings.windowClass == undefined) { + return + } + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`) + return; + } + Logger.info('TEST', `Succeeded in destroy the window.`); + }) + await Utils.sleep(1000); + done() + }) /* * @tc.number SUB_ACE_TS_COMPONENT_SR000HRP34_124 @@ -55,7 +69,7 @@ export default function TsComponentSR000HRP34() { let datePickerButton = await driver.findComponent(ON.id('TsComponentSR000HRP34_124_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_TS_COMPONENT_SR000HRP34_124 finish.`); done() @@ -74,7 +88,7 @@ export default function TsComponentSR000HRP34() { let datePickerButton = await driver.findComponent(ON.id('TsComponentSR000HRP34_125_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_TS_COMPONENT_SR000HRP34_125 finish.`); done() @@ -93,7 +107,7 @@ export default function TsComponentSR000HRP34() { let datePickerButton = await driver.findComponent(ON.id('TsComponentSR000HRP34_126_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_TS_COMPONENT_SR000HRP34_126 finish.`); done() @@ -112,7 +126,7 @@ export default function TsComponentSR000HRP34() { let datePickerButton = await driver.findComponent(ON.id('TsComponentSR000HRP34_127_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_TS_COMPONENT_SR000HRP34_127 finish.`); done() diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentButtonCommonButtonTest/UIComponentButtonCommonButton.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentButtonCommonButtonTest/UIComponentButtonCommonButton.test.ets index f0efa3c97bfacd96c3d9e5e209bda39d486bd476..a47bf85a6d517b0fa58247ccc9907aa89b57a9f3 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentButtonCommonButtonTest/UIComponentButtonCommonButton.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentButtonCommonButtonTest/UIComponentButtonCommonButton.test.ets @@ -39,6 +39,21 @@ import { Driver, ON } from '@ohos.UiTest' export default function UIComponentButtonCommonButton() { describe('UIComponentButtonCommonButton', () => { + afterEach(async (done: Function) => { + if (Settings.windowClass == undefined) { + return; + } + + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`) + return; + } + Logger.info('TEST', `Succeeded in destroy the window.`); + }) + await Utils.sleep(1000); + done(); + }) /* * @tc.number : SUB_ACE_UI_COMPONENT_BUTTON_COMMON_BUTTON_0330 diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentButtonRadioCheckMarkTest/UIComponentButtonRadioCheckMark.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentButtonRadioCheckMarkTest/UIComponentButtonRadioCheckMark.test.ets index 733cd861823dfc0c13becfe22e5d7a38edf581b5..825000c6edaaee911ddd5e55e0e0189a78e58889 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentButtonRadioCheckMarkTest/UIComponentButtonRadioCheckMark.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentButtonRadioCheckMarkTest/UIComponentButtonRadioCheckMark.test.ets @@ -37,15 +37,29 @@ import { Driver, ON } from '@ohos.UiTest' export default function UIComponentButtonRadioCheckMark() { describe('UIComponentButtonRadioCheckMark', () => { + afterEach(async (done: Function) => { + if (Settings.windowClass == undefined) { + return; + } + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`); + return; + } + Logger.info('TEST', `Succeeded in destroy the window.`); + }) + await Utils.sleep(1000); + done(); + }) /* - * @tc.number SUB_ACE_UI_COMPONENT_BUTTON_RADI0_CHECKMARK_0030 - * @tc.name SUB_ACE_UI_COMPONENT_BUTTON_RADI0_CHECKMARK_0030 + * @tc.number SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CHECKMARK_0030 + * @tc.name SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CHECKMARK_0030 * @tc.desc Radio Indicates the selected type and the press state */ it('SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CHECKMARK_0030', 0, async (done: Function) => { - Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADI0_CHECKMARK_0030 start.`); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CHECKMARK_0030 start.`); Settings.createWindow("testability/pages/UIComponentButtonRadioCheckMark/UIComponentButtonRadioCheckMark003"); await Utils.sleep(2000); let driver: Driver = Driver.create(); @@ -53,34 +67,34 @@ export default function UIComponentButtonRadioCheckMark() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.longClick(pointButtonCenter.x, pointButtonCenter.y) await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); - Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADI0_CHECKMARK_0030 finish.`); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CHECKMARK_0030 finish.`); done(); }) /* - * @tc.number SUB_ACE_UI_COMPONENT_BUTTON_RADI0_CHECKMARK_0010 - * @tc.name SUB_ACE_UI_COMPONENT_BUTTON_RADI0_CHECKMARK_0010 + * @tc.number SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CHECKMARK_0010 + * @tc.name SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CHECKMARK_0010 * @tc.desc Radio is selected for the selected type */ it('SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CHECKMARK_0010', 0, async (done: Function) => { - Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADI0_CHECKMARK_0010 start.`); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CHECKMARK_0010 start.`); Settings.createWindow("testability/pages/UIComponentButtonRadioCheckMark/UIComponentButtonRadioCheckMark001"); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); - Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADI0_CHECKMARK_0010 finish.`); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CHECKMARK_0010 finish.`); done(); }) /* - * @tc.number SUB_ACE_UI_COMPONENT_BUTTON_RADI0_CHECKMARK_0080 - * @tc.name SUB_ACE_UI_COMPONENT_BUTTON_RADI0_CHECKMARK_0080 + * @tc.number SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CHECKMARK_0080 + * @tc.name SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CHECKMARK_0080 * @tc.desc Radio Indicates the selected type and the press state */ it('SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CHECKMARK_0080', 0, async (done: Function) => { - Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADI0_CHECKMARK_0080 start.`); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CHECKMARK_0080 start.`); Settings.createWindow("testability/pages/UIComponentButtonRadioCheckMark/UIComponentButtonRadioCheckMark008"); await Utils.sleep(2000); let driver: Driver = Driver.create(); @@ -88,64 +102,64 @@ export default function UIComponentButtonRadioCheckMark() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.longClick(pointButtonCenter.x, pointButtonCenter.y) await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); - Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADI0_CHECKMARK_0080 finish.`); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CHECKMARK_0080 finish.`); done(); }) /* - * @tc.number SUB_ACE_UI_COMPONENT_BUTTON_RADI0_CHECKMARK_0060 - * @tc.name SUB_ACE_UI_COMPONENT_BUTTON_RADI0_CHECKMARK_0060 + * @tc.number SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CHECKMARK_0060 + * @tc.name SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CHECKMARK_0060 * @tc.desc Radio is selected for the selected type */ it('SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CHECKMARK_0060', 0, async (done: Function) => { - Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADI0_CHECKMARK_0060 start.`); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CHECKMARK_0060 start.`); Settings.createWindow("testability/pages/UIComponentButtonRadioCheckMark/UIComponentButtonRadioCheckMark006"); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); - Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADI0_CHECKMARK_0060 finish.`); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CHECKMARK_0060 finish.`); done(); }) /* - * @tc.number SUB_ACE_UI_COMPONENT_BUTTON_RADI0_CHECKMARK_0050 - * @tc.name SUB_ACE_UI_COMPONENT_BUTTON_RADI0_CHECKMARK_0050 + * @tc.number SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CHECKMARK_0050 + * @tc.name SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CHECKMARK_0050 * @tc.desc Radio is selected for the selected type */ it('SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CHECKMARK_0050', 0, async (done: Function) => { - Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADI0_CHECKMARK_0050 start.`); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CHECKMARK_0050 start.`); Settings.createWindow("testability/pages/UIComponentButtonRadioCheckMark/UIComponentButtonRadioCheckMark005"); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); - Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADI0_CHECKMARK_0050 finish.`); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CHECKMARK_0050 finish.`); done(); }) /* - * @tc.number SUB_ACE_UI_COMPONENT_BUTTON_RADI0_CHECKMARK_0100 - * @tc.name SUB_ACE_UI_COMPONENT_BUTTON_RADI0_CHECKMARK_0100 + * @tc.number SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CHECKMARK_0100 + * @tc.name SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CHECKMARK_0100 * @tc.desc Radio is selected for the selected type */ it('SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CHECKMARK_0100', 0, async (done: Function) => { - Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADI0_CHECKMARK_0100 start.`); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CHECKMARK_0100 start.`); Settings.createWindow("testability/pages/UIComponentButtonRadioCheckMark/UIComponentButtonRadioCheckMark010"); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); - Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADI0_CHECKMARK_0100 finish.`); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CHECKMARK_0100 finish.`); done(); }) /* - * @tc.number SUB_ACE_UI_COMPONENT_BUTTON_RADI0_CHECKMARK_0130 - * @tc.name SUB_ACE_UI_COMPONENT_BUTTON_RADI0_CHECKMARK_0130 + * @tc.number SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CHECKMARK_0130 + * @tc.name SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CHECKMARK_0130 * @tc.desc Radio is selected for the selected type */ it('SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CHECKMARK_0130', 0, async (done: Function) => { - Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADI0_CHECKMARK_0130 start.`); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CHECKMARK_0130 start.`); Settings.createWindow("testability/pages/UIComponentButtonRadioCheckMark/UIComponentButtonRadioCheckMark013"); await Utils.sleep(2000); let driver: Driver = Driver.create(); @@ -161,19 +175,19 @@ export default function UIComponentButtonRadioCheckMark() { await Utils.sleep(1000); await driver.click(indicatorColorButtonCenter.x, indicatorColorButtonCenter.y) await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); - Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADI0_CHECKMARK_0130 finish.`); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CHECKMARK_0130 finish.`); done(); }) /* - * @tc.number SUB_ACE_UI_COMPONENT_BUTTON_RADI0_CHECKMARK_0140 - * @tc.name SUB_ACE_UI_COMPONENT_BUTTON_RADI0_CHECKMARK_0140 + * @tc.number SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CHECKMARK_0140 + * @tc.name SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CHECKMARK_0140 * @tc.desc Radio Left unchecked for check type, non-select status Stroke color */ it('SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CHECKMARK_0140', 0, async (done: Function) => { - Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADI0_CHECKMARK_0140 start.`); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CHECKMARK_0140 start.`); Settings.createWindow("testability/pages/UIComponentButtonRadioCheckMark/UIComponentButtonRadioCheckMark014"); await Utils.sleep(2000); let driver: Driver = Driver.create(); @@ -189,39 +203,39 @@ export default function UIComponentButtonRadioCheckMark() { await Utils.sleep(1000); await driver.click(indicatorColorButtonCenter.x, indicatorColorButtonCenter.y) await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); - Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADI0_CHECKMARK_0140 finish.`); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CHECKMARK_0140 finish.`); done(); }) /* - * @tc.number SUB_ACE_UI_COMPONENT_BUTTON_RADI0_CHECKMARK_0110 - * @tc.name SUB_ACE_UI_COMPONENT_BUTTON_RADI0_CHECKMARK_0110 + * @tc.number SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CHECKMARK_0110 + * @tc.name SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CHECKMARK_0110 * @tc.desc Radio component. Set the checked property to true */ it('SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CHECKMARK_0110', 0, async (done: Function) => { - Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADI0_CHECKMARK_0110 start.`); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CHECKMARK_0110 start.`); Settings.createWindow("testability/pages/UIComponentButtonRadioCheckMark/UIComponentButtonRadioCheckMark011"); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); - Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADI0_CHECKMARK_0110 finish.`); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CHECKMARK_0110 finish.`); done(); }) /* - * @tc.number SUB_ACE_UI_COMPONENT_BUTTON_RADI0_CHECKMARK_0120 - * @tc.name SUB_ACE_UI_COMPONENT_BUTTON_RADI0_CHECKMARK_0120 + * @tc.number SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CHECKMARK_0120 + * @tc.name SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CHECKMARK_0120 * @tc.desc Radio component. Set the checked property to false */ it('SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CHECKMARK_0120', 0, async (done: Function) => { - Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADI0_CHECKMARK_0120 start.`); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CHECKMARK_0120 start.`); Settings.createWindow("testability/pages/UIComponentButtonRadioCheckMark/UIComponentButtonRadioCheckMark012"); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); - Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADI0_CHECKMARK_0120 finish.`); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CHECKMARK_0120 finish.`); done(); }) }) diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentButtonRadioCustonmizingTest/UIComponentButtonRadioCustonmizing.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentButtonRadioCustonmizingTest/UIComponentButtonRadioCustonmizing.test.ets index 7bb67ae5dd534e63672608028d4fb1292b804d54..1a253b6dfa1a91ca86a4afaffa35a4b3dfe58fb4 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentButtonRadioCustonmizingTest/UIComponentButtonRadioCustonmizing.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentButtonRadioCustonmizingTest/UIComponentButtonRadioCustonmizing.test.ets @@ -39,7 +39,21 @@ import { BusinessError, screenLock } from '@kit.BasicServicesKit' export default function UIComponentButtonRadioCustonmizing() { describe('UIComponentButtonRadioCustonmizing', () => { + afterEach(async (done: Function) => { + if (Settings.windowClass == undefined) { + return; + } + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`); + return; + } + Logger.info('TEST', `Succeeded in destroy the window.`); + }) + await Utils.sleep(1000); + done(); + }) /* * @tc.number SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CUSTONMIZING_003 @@ -55,7 +69,7 @@ export default function UIComponentButtonRadioCustonmizing() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CUSTONMIZING_003 finish.`); done(); @@ -75,7 +89,7 @@ export default function UIComponentButtonRadioCustonmizing() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CUSTONMIZING_008 finish.`); done(); @@ -95,7 +109,7 @@ export default function UIComponentButtonRadioCustonmizing() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CUSTONMIZING_002 finish.`); done(); @@ -115,7 +129,7 @@ export default function UIComponentButtonRadioCustonmizing() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(3000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CUSTONMIZING_006 finish.`); done(); @@ -135,7 +149,7 @@ export default function UIComponentButtonRadioCustonmizing() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CUSTONMIZING_009 finish.`); done(); @@ -155,7 +169,7 @@ export default function UIComponentButtonRadioCustonmizing() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CUSTONMIZING_001 finish.`); done(); @@ -176,11 +190,11 @@ export default function UIComponentButtonRadioCustonmizing() { let pointButtonCenter = await buttonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); await circleCom.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CUSTONMIZING_007 finish.`); done(); @@ -200,7 +214,7 @@ export default function UIComponentButtonRadioCustonmizing() { let pointButtonCenter = await buttonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CUSTONMIZING_005 finish.`); done(); @@ -220,7 +234,7 @@ export default function UIComponentButtonRadioCustonmizing() { let pointButtonCenter = await buttonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CUSTONMIZING_004 finish.`); done(); @@ -240,7 +254,7 @@ export default function UIComponentButtonRadioCustonmizing() { let pointButtonCenter = await buttonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CUSTONMIZING_012 finish.`); done(); @@ -260,7 +274,7 @@ export default function UIComponentButtonRadioCustonmizing() { let pointButtonCenter = await buttonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CUSTONMIZING_010 finish.`); done(); @@ -280,7 +294,7 @@ export default function UIComponentButtonRadioCustonmizing() { let pointButtonCenter = await buttonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CUSTONMIZING_011 finish.`); done(); @@ -295,7 +309,7 @@ export default function UIComponentButtonRadioCustonmizing() { Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CUSTONMIZING_017 start.`); Settings.createWindow("testability/pages/UIComponentButtonRadioCustonmizing/UIComponentButtonRadioCustonmizing017"); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CUSTONMIZING_017 finish.`); done(); @@ -319,15 +333,15 @@ export default function UIComponentButtonRadioCustonmizing() { await currentWindow.showWindow(); } await Utils.sleep(3000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CUSTONMIZING_016 finish.`); done(); }) /* - * @tc.number SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CUSTONMIZING_016 - * @tc.name SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CUSTONMIZING_016 + * @tc.number SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CUSTONMIZING_013 + * @tc.name SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CUSTONMIZING_013 * @tc.desc Custom buildRadio to verify how the Radio component looks when the screen is lit up after the breath screen */ it('SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CUSTONMIZING_013', 0, async (done: Function) => { @@ -336,24 +350,9 @@ export default function UIComponentButtonRadioCustonmizing() { await Utils.sleep(2000); let driver: Driver = Driver.create(); await Utils.sleep(1000); - await screenLock.lock((err: BusinessError, data: Boolean) => { - if (err) { - console.error(`Failed to lock the screen, Code: ${err.code}, message: ${err.message}`); - return; - } - console.info(`Succeeded in locking the screen. result: ${data}`); - }); - await Utils.sleep(2000); - await screenLock.unlock((err: BusinessError) => { - if (err) { - console.error(`Failed to unlock the screen, Code: ${err.code}, message: ${err.message}`); - return; - } - console.info(`Succeeded unlocking the screen.`); - }); - await driver.drag(100, 900, 100, 1, 1000); + Utils.lockAndUnlock(driver); await Utils.sleep(3000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADIO_CUSTONMIZING_013 finish.`); done(); diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentButtonRadioLConicTest/UIComponentButtonRadioLConic.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentButtonRadioLConicTest/UIComponentButtonRadioLConic.test.ets index 9eb3d8b32cf50994d20f21728f5625f9d2599524..49ef098b610d6e3c3d79ad61faca600fb6982e59 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentButtonRadioLConicTest/UIComponentButtonRadioLConic.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentButtonRadioLConicTest/UIComponentButtonRadioLConic.test.ets @@ -39,7 +39,20 @@ import { KeyCode } from '@kit.InputKit' export default function UIComponentButtonRadioLConic() { describe('UIComponentButtonRadioLConic', () => { - + afterEach(async (done: Function) => { + if (Settings.windowClass == undefined) { + return; + } + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`); + return; + } + Logger.info('TEST', `Succeeded in destroy the window.`); + }) + await Utils.sleep(1000); + done(); + }) /* * @tc.number SUB_ACE_UI_COMPONENT_BUTTON_RADIO_LCONIC_013 @@ -55,7 +68,7 @@ export default function UIComponentButtonRadioLConic() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADIO_LCONIC_013 finish.`); done(); @@ -75,7 +88,7 @@ export default function UIComponentButtonRadioLConic() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADIO_LCONIC_025 finish.`); done(); @@ -95,7 +108,7 @@ export default function UIComponentButtonRadioLConic() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADIO_LCONIC_020 finish.`); done(); @@ -115,7 +128,7 @@ export default function UIComponentButtonRadioLConic() { let pointRadioCenter = await RadioCom.getBoundsCenter(); await driver.click(pointRadioCenter.x, pointRadioCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADIO_LCONIC_022 finish.`); done(); @@ -135,7 +148,7 @@ export default function UIComponentButtonRadioLConic() { let pointRadioCenter = await RadioCom.getBoundsCenter(); await driver.click(pointRadioCenter.x, pointRadioCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADIO_LCONIC_008 finish.`); done(); @@ -155,7 +168,7 @@ export default function UIComponentButtonRadioLConic() { let pointRadioCenter = await RadioCom.getBoundsCenter(); await driver.click(pointRadioCenter.x, pointRadioCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADIO_LCONIC_024 finish.`); done(); @@ -175,7 +188,7 @@ export default function UIComponentButtonRadioLConic() { let pointRadioCenter = await RadioCom.getBoundsCenter(); await driver.click(pointRadioCenter.x, pointRadioCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADIO_LCONIC_019 finish.`); done(); @@ -195,7 +208,7 @@ export default function UIComponentButtonRadioLConic() { let pointRadioCenter = await RadioCom.getBoundsCenter(); await driver.click(pointRadioCenter.x, pointRadioCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADIO_LCONIC_009 finish.`); done(); @@ -215,7 +228,7 @@ export default function UIComponentButtonRadioLConic() { let pointRadioCenter = await RadioCom.getBoundsCenter(); await driver.click(pointRadioCenter.x, pointRadioCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADIO_LCONIC_030 finish.`); done(); @@ -235,7 +248,7 @@ export default function UIComponentButtonRadioLConic() { let pointRadioCenter = await RadioCom.getBoundsCenter(); await driver.click(pointRadioCenter.x, pointRadioCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADIO_LCONIC_031 finish.`); done(); @@ -260,7 +273,7 @@ export default function UIComponentButtonRadioLConic() { await currentWindow.showWindow(); } await Utils.sleep(3000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADIO_LCONIC_028 finish.`); done(); @@ -294,7 +307,7 @@ export default function UIComponentButtonRadioLConic() { }); await driver.drag(100, 900, 100, 1, 1000); await Utils.sleep(3000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADIO_LCONIC_027 finish.`); done(); @@ -318,10 +331,30 @@ export default function UIComponentButtonRadioLConic() { await Utils.sleep(1000); await driver.click(pointRadioCenter1.x, pointRadioCenter1.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADIO_LCONIC_004 finish.`); done(); }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_BUTTON_RADIO_LCONIC_005 + * @tc.name SUB_ACE_UI_COMPONENT_BUTTON_RADIO_LCONIC_005 + * @tc.desc indicatorBuilder is set to image,Radio does not set the size, image is 100 + */ + it('SUB_ACE_UI_COMPONENT_BUTTON_RADIO_LCONIC_005', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADIO_LCONIC_005 start.`); + Settings.createWindow("testability/pages/UIComponentButtonRadioLConic/UIComponentButtonRadioLConic005"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let RadioCom = await driver.findComponent(ON.id("UIComponentButtonRadioLConic0050")); + let pointRadioCenter = await RadioCom.getBoundsCenter(); + await driver.click(pointRadioCenter.x, pointRadioCenter.y); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_RADIO_LCONIC_005 finish.`); + done(); + }) }) } diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentButtonSelectAttributeTest/UIComponentButtonSelectAttribute.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentButtonSelectAttributeTest/UIComponentButtonSelectAttribute.test.ets index 4829146bb2250917c0b73161b49b8de7038b2d58..831a2c9841c1683e0eeac093efeb730300da2feb 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentButtonSelectAttributeTest/UIComponentButtonSelectAttribute.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentButtonSelectAttributeTest/UIComponentButtonSelectAttribute.test.ets @@ -37,7 +37,20 @@ import { Driver, ON } from '@ohos.UiTest' export default function UIComponentButtonSelectAttribute() { describe('UIComponentButtonSelectAttribute', () => { - + afterEach(async (done: Function) => { + if (Settings.windowClass == undefined) { + return; + } + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`); + return; + } + Logger.info('TEST', `Succeeded in destroy the window.`); + }) + await Utils.sleep(1000); + done(); + }) /* * @tc.number SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ATTRIBUTE_0320_1 @@ -53,7 +66,7 @@ export default function UIComponentButtonSelectAttribute() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ATTRIBUTE_0320_1 finish.`); done(); @@ -73,7 +86,7 @@ export default function UIComponentButtonSelectAttribute() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ATTRIBUTE_0320_2 finish.`); done(); @@ -93,7 +106,7 @@ export default function UIComponentButtonSelectAttribute() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ATTRIBUTE_0340_1 finish.`); done(); @@ -111,9 +124,11 @@ export default function UIComponentButtonSelectAttribute() { let driver: Driver = Driver.create(); let ButtonCom = await driver.findComponent(ON.id("UIComponentButtonSelectAttribute0340")); let pointButtonCenter = await ButtonCom.getBoundsCenter(); - await driver.click(pointButtonCenter.x, pointButtonCenter.y); - await Utils.sleep(2000); - windowSnap.snapShot(); + await ButtonCom.click(); + await Utils.sleep(1000); + await driver.click(pointButtonCenter.x, pointButtonCenter.y - 50); + await Utils.sleep(1000); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ATTRIBUTE_0340_2 finish.`); done(); @@ -133,7 +148,7 @@ export default function UIComponentButtonSelectAttribute() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ATTRIBUTE_0310_1 finish.`); done(); @@ -151,9 +166,11 @@ export default function UIComponentButtonSelectAttribute() { let driver: Driver = Driver.create(); let ButtonCom = await driver.findComponent(ON.id("UIComponentButtonSelectAttribute0310")); let pointButtonCenter = await ButtonCom.getBoundsCenter(); - await driver.click(pointButtonCenter.x, pointButtonCenter.y); - await Utils.sleep(2000); - windowSnap.snapShot(); + await ButtonCom.click(); + await Utils.sleep(1000); + await driver.click(pointButtonCenter.x, pointButtonCenter.y - 50); + await Utils.sleep(1000); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ATTRIBUTE_0310_2 finish.`); done(); @@ -173,7 +190,7 @@ export default function UIComponentButtonSelectAttribute() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ATTRIBUTE_0330_1 finish.`); done(); @@ -191,9 +208,11 @@ export default function UIComponentButtonSelectAttribute() { let driver: Driver = Driver.create(); let ButtonCom = await driver.findComponent(ON.id("UIComponentButtonSelectAttribute0330")); let pointButtonCenter = await ButtonCom.getBoundsCenter(); - await driver.click(pointButtonCenter.x, pointButtonCenter.y); - await Utils.sleep(2000); - windowSnap.snapShot(); + await ButtonCom.click(); + await Utils.sleep(1000); + await driver.click(pointButtonCenter.x, pointButtonCenter.y - 50); + await Utils.sleep(1000); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ATTRIBUTE_0330_2 finish.`); done(); @@ -213,7 +232,7 @@ export default function UIComponentButtonSelectAttribute() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ATTRIBUTE_0350_1 finish.`); done(); @@ -231,9 +250,11 @@ export default function UIComponentButtonSelectAttribute() { let driver: Driver = Driver.create(); let ButtonCom = await driver.findComponent(ON.id("UIComponentButtonSelectAttribute0350")); let pointButtonCenter = await ButtonCom.getBoundsCenter(); - await driver.click(pointButtonCenter.x, pointButtonCenter.y); - await Utils.sleep(2000); - windowSnap.snapShot(); + await ButtonCom.click(); + await Utils.sleep(1000); + await driver.click(pointButtonCenter.x, pointButtonCenter.y - 50); + await Utils.sleep(1000); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ATTRIBUTE_0350_2 finish.`); done(); @@ -247,11 +268,89 @@ export default function UIComponentButtonSelectAttribute() { it('SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ATTRIBUTE_0040', 0, async (done: Function) => { Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ATTRIBUTE_0040 start.`); Settings.createWindow("testability/pages/UIComponentButtonSelectAttribute/UIComponentButtonSelectAttribute004"); - await Utils.sleep(2000); - windowSnap.snapShot(); + let driver: Driver = Driver.create(); + let ButtonCom = await driver.findComponent(ON.id("UIComponentButtonSelectAttribute0040")); + await ButtonCom.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ATTRIBUTE_0040 finish.`); done(); }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ATTRIBUTE_0050_1 + * @tc.name SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ATTRIBUTE_0050_1 + * @tc.desc The attribute font-size is set to number + */ + it('SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ATTRIBUTE_0050_1', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ATTRIBUTE_0050_1 start.`); + Settings.createWindow("testability/pages/UIComponentButtonSelectAttribute/UIComponentButtonSelectAttribute005"); + await Utils.sleep(500); + let driver: Driver = Driver.create(); + let ButtonCom = await driver.findComponent(ON.id("UIComponentButtonSelectAttribute0050_1")); + await ButtonCom.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ATTRIBUTE_0050_1 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ATTRIBUTE_0050_2 + * @tc.name SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ATTRIBUTE_0050_2 + * @tc.desc The attribute font-size is set to number + */ + it('SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ATTRIBUTE_0050_2', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ATTRIBUTE_0050_2 start.`); + Settings.createWindow("testability/pages/UIComponentButtonSelectAttribute/UIComponentButtonSelectAttribute005"); + await Utils.sleep(500); + let driver: Driver = Driver.create(); + let ButtonCom = await driver.findComponent(ON.id("UIComponentButtonSelectAttribute0050_2")); + await ButtonCom.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ATTRIBUTE_0050_2 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ATTRIBUTE_0050_3 + * @tc.name SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ATTRIBUTE_0050_3 + * @tc.desc The attribute font-size is set to number + */ + it('SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ATTRIBUTE_0050_3', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ATTRIBUTE_0050_3 start.`); + Settings.createWindow("testability/pages/UIComponentButtonSelectAttribute/UIComponentButtonSelectAttribute005"); + await Utils.sleep(500); + let driver: Driver = Driver.create(); + let ButtonCom = await driver.findComponent(ON.id("UIComponentButtonSelectAttribute0050_3")); + await ButtonCom.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ATTRIBUTE_0050_3 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_BUTTON_SELECT_INTERFACE_0240 + * @tc.name SUB_ACE_UI_COMPONENT_BUTTON_SELECT_INTERFACE_0240 + * @tc.desc width('100') + */ + it('SUB_ACE_UI_COMPONENT_BUTTON_SELECT_INTERFACE_0240', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_INTERFACE_0240 start.`); + Settings.createWindow("testability/pages/UIComponentButtonSelectAttribute/UIComponentButtonSelectInterface"); + await Utils.sleep(500); + let driver: Driver = Driver.create(); + let ButtonCom = await driver.findComponent(ON.id("UIComponentButtonSelectInterface")); + await ButtonCom.click(); + await Utils.sleep(1000); + await driver.pressBack() + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_INTERFACE_0240 finish.`); + done(); + }) + }) } diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentButtonSelectControlSize/UIComponentButtonSelectControlSize.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentButtonSelectControlSize/UIComponentButtonSelectControlSize.test.ets index b9bf9012ec41351d96528bd05ca298b03a970b1f..7d4c5ee559bda651ae4d018c6e593c245d7feeda 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentButtonSelectControlSize/UIComponentButtonSelectControlSize.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentButtonSelectControlSize/UIComponentButtonSelectControlSize.test.ets @@ -39,6 +39,21 @@ import { Component, Driver, ON } from '@ohos.UiTest' export default function UIComponentButtonSelectControlSize() { describe('UIComponentButtonSelectControlSize', () => { + afterEach(async (done: Function) => { + if (Settings.windowClass == undefined) { + return; + } + + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`) + return; + } + Logger.info('TEST', `Succeeded in destroy the window.`); + }) + await Utils.sleep(1000); + done(); + }) /* * @tc.number : SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0020 @@ -50,7 +65,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0020") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0020 finish.`); done(); @@ -66,7 +81,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0030") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0030 finish.`); done(); @@ -82,7 +97,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0040") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0040 finish.`); done(); @@ -98,7 +113,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0050") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0050 finish.`); done(); @@ -114,7 +129,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0060") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0060 finish.`); done(); @@ -130,7 +145,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0070") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0070 finish.`); done(); @@ -146,7 +161,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0080") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0080 finish.`); done(); @@ -162,7 +177,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0090") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0090 finish.`); done(); @@ -178,7 +193,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0100") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0100 finish.`); done(); @@ -194,7 +209,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0110") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0110 finish.`); done(); @@ -210,7 +225,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0120") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0120 finish.`); done(); @@ -226,7 +241,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0130") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0130 finish.`); done(); @@ -242,7 +257,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0140") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0140 finish.`); done(); @@ -258,7 +273,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0150") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0150 finish.`); done(); @@ -274,7 +289,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0160") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0160 finish.`); done(); @@ -290,7 +305,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0170") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0170 finish.`); done(); @@ -306,7 +321,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0180") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0180 finish.`); done(); @@ -322,7 +337,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0190") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0190 finish.`); done(); @@ -338,7 +353,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0200") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0200 finish.`); done(); @@ -354,7 +369,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0210") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0210 finish.`); done(); @@ -370,7 +385,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0220") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0220 finish.`); done(); @@ -386,7 +401,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0230") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0230 finish.`); done(); @@ -402,7 +417,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0240") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0240 finish.`); done(); @@ -418,7 +433,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0250") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0250 finish.`); done(); @@ -434,7 +449,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0260") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0260 finish.`); done(); @@ -450,7 +465,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0270") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0270 finish.`); done(); @@ -466,7 +481,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0280") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0280 finish.`); done(); @@ -482,7 +497,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0290") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0290 finish.`); done(); @@ -498,7 +513,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0300") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0300 finish.`); done(); @@ -514,7 +529,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0310") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0310 finish.`); done(); @@ -530,7 +545,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0320") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0320 finish.`); done(); @@ -546,7 +561,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0330") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0330 finish.`); done(); @@ -562,7 +577,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0340") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0340 finish.`); done(); @@ -578,7 +593,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0350") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0350 finish.`); done(); @@ -594,7 +609,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0360") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0360 finish.`); done(); @@ -610,7 +625,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0370") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0370 finish.`); done(); @@ -626,7 +641,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0380") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0380 finish.`); done(); @@ -642,7 +657,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0390") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0390 finish.`); done(); @@ -658,7 +673,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0400") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0400 finish.`); done(); @@ -674,7 +689,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0410") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0410 finish.`); done(); @@ -690,7 +705,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0420") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0420 finish.`); done(); @@ -706,7 +721,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0430") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0430 finish.`); done(); @@ -729,7 +744,7 @@ export default function UIComponentButtonSelectControlSize() { let select: Component = await driver.findComponent(ON.id('UIComponentButtonSelectControlSize0450_002')); await select.longClick(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0450 finish.`); done(); @@ -745,7 +760,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0470") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0470 finish.`); done(); @@ -761,7 +776,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0480") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0480 finish.`); done(); @@ -777,7 +792,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0490") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0490 finish.`); done(); @@ -793,7 +808,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0500") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0500 finish.`); done(); @@ -809,7 +824,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0510") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0510 finish.`); done(); @@ -825,7 +840,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0520") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0520 finish.`); done(); @@ -841,7 +856,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0530") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0530 finish.`); done(); @@ -857,7 +872,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0540") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0540 finish.`); done(); @@ -873,7 +888,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0550") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0550 finish.`); done(); @@ -889,7 +904,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0560") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0560 finish.`); done(); @@ -905,7 +920,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0570") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0570 finish.`); done(); @@ -921,7 +936,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0580") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0580 finish.`); done(); @@ -937,7 +952,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0590") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0590 finish.`); done(); @@ -953,7 +968,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0600") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0600 finish.`); done(); @@ -969,7 +984,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0610") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0610 finish.`); done(); @@ -985,7 +1000,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0620") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0620 finish.`); done(); @@ -1001,7 +1016,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0630") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0630 finish.`); done(); @@ -1017,7 +1032,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0640") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0640 finish.`); done(); @@ -1033,7 +1048,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0650") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0650 finish.`); done(); @@ -1049,7 +1064,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0660") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0660 finish.`); done(); @@ -1065,7 +1080,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0670") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0670 finish.`); done(); @@ -1081,7 +1096,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0680") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0680 finish.`); done(); @@ -1097,7 +1112,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0690") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0690 finish.`); done(); @@ -1113,7 +1128,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0700") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0700 finish.`); done(); @@ -1129,7 +1144,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0710") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0710 finish.`); done(); @@ -1145,7 +1160,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0720") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0720 finish.`); done(); @@ -1161,7 +1176,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0730") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0730 finish.`); done(); @@ -1177,7 +1192,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0740") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0740 finish.`); done(); @@ -1193,7 +1208,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0750") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0750 finish.`); done(); @@ -1209,7 +1224,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0760") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0760 finish.`); done(); @@ -1225,7 +1240,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0770") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0770 finish.`); done(); @@ -1241,7 +1256,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0780") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0780 finish.`); done(); @@ -1257,7 +1272,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0790") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0790 finish.`); done(); @@ -1273,7 +1288,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0800") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0800 finish.`); done(); @@ -1289,7 +1304,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0810") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0810 finish.`); done(); @@ -1305,7 +1320,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0820") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0820 finish.`); done(); @@ -1321,7 +1336,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0830") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0830 finish.`); done(); @@ -1337,7 +1352,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize0840") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0840 finish.`); done(); @@ -1363,7 +1378,7 @@ export default function UIComponentButtonSelectControlSize() { let select: Component = await driver.findComponent(ON.id('UIComponentButtonSelectControlSize0860_003')); await select.longClick(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0860 finish.`); done(); @@ -1386,7 +1401,7 @@ export default function UIComponentButtonSelectControlSize() { let button2: Component = await driver.findComponent(ON.id('UIComponentButtonSelectControlSize0880_002')); await button2.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0880 finish.`); done(); @@ -1409,7 +1424,7 @@ export default function UIComponentButtonSelectControlSize() { let button2: Component = await driver.findComponent(ON.id('UIComponentButtonSelectControlSize0890_002')); await button2.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0890 finish.`); done(); @@ -1432,7 +1447,7 @@ export default function UIComponentButtonSelectControlSize() { let button2: Component = await driver.findComponent(ON.id('UIComponentButtonSelectControlSize0900_002')); await button2.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0900 finish.`); done(); @@ -1455,7 +1470,7 @@ export default function UIComponentButtonSelectControlSize() { let button2: Component = await driver.findComponent(ON.id('UIComponentButtonSelectControlSize0910_002')); await button2.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0910 finish.`); done(); @@ -1478,7 +1493,7 @@ export default function UIComponentButtonSelectControlSize() { let button2: Component = await driver.findComponent(ON.id('UIComponentButtonSelectControlSize0920_002')); await button2.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0920 finish.`); done(); @@ -1501,7 +1516,7 @@ export default function UIComponentButtonSelectControlSize() { let button2: Component = await driver.findComponent(ON.id('UIComponentButtonSelectControlSize0930_002')); await button2.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0930 finish.`); done(); @@ -1524,7 +1539,7 @@ export default function UIComponentButtonSelectControlSize() { let button2: Component = await driver.findComponent(ON.id('UIComponentButtonSelectControlSize0940_002')); await button2.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0940 finish.`); done(); @@ -1547,7 +1562,7 @@ export default function UIComponentButtonSelectControlSize() { let button2: Component = await driver.findComponent(ON.id('UIComponentButtonSelectControlSize0950_002')); await button2.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0950 finish.`); done(); @@ -1570,7 +1585,7 @@ export default function UIComponentButtonSelectControlSize() { let button2: Component = await driver.findComponent(ON.id('UIComponentButtonSelectControlSize0960_002')); await button2.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0960 finish.`); done(); @@ -1593,7 +1608,7 @@ export default function UIComponentButtonSelectControlSize() { let button2: Component = await driver.findComponent(ON.id('UIComponentButtonSelectControlSize0970_002')); await button2.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0970 finish.`); done(); @@ -1616,7 +1631,7 @@ export default function UIComponentButtonSelectControlSize() { let button2: Component = await driver.findComponent(ON.id('UIComponentButtonSelectControlSize0980_002')); await button2.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0980 finish.`); done(); @@ -1639,7 +1654,7 @@ export default function UIComponentButtonSelectControlSize() { let button2: Component = await driver.findComponent(ON.id('UIComponentButtonSelectControlSize0990_002')); await button2.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_0990 finish.`); done(); @@ -1662,7 +1677,7 @@ export default function UIComponentButtonSelectControlSize() { let button2: Component = await driver.findComponent(ON.id('UIComponentButtonSelectControlSize1000_002')); await button2.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_1000 finish.`); done(); @@ -1678,7 +1693,7 @@ export default function UIComponentButtonSelectControlSize() { Settings.createWindow("testability/pages/UIComponentButtonSelectControlSize/" + "UIComponentButtonSelectControlSize1010") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_CONTROLSIZE_1010 finish.`); done(); diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentButtonSelectDivider/UIComponentButtonSelectDivider.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentButtonSelectDivider/UIComponentButtonSelectDivider.test.ets index 333000e8dcb33e1575f39d4ad703240f558fab92..b51ceb02e6d8954e2cf7a0f1036fe61aaddc55e7 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentButtonSelectDivider/UIComponentButtonSelectDivider.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentButtonSelectDivider/UIComponentButtonSelectDivider.test.ets @@ -39,6 +39,21 @@ import { Component, Driver, ON } from '@ohos.UiTest' export default function UIComponentButtonSelectDivider() { describe('UIComponentButtonSelectDivider', () => { + afterEach(async (done: Function) => { + if (Settings.windowClass == undefined) { + return; + } + + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`) + return; + } + Logger.info('TEST', `Succeeded in destroy the window.`); + }) + await Utils.sleep(1000); + done(); + }) /* * @tc.number : SUB_ACE_UI_COMPONENT_BUTTON_SELECT_DIVIDER_0010 @@ -59,7 +74,7 @@ export default function UIComponentButtonSelectDivider() { let select: Component = await driver.findComponent(ON.id('UIComponentButtonSelectDivider0010_003')); await select.click(); await Utils.sleep(500); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(500); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_DIVIDER_0010 finish.`); done(); @@ -81,8 +96,8 @@ export default function UIComponentButtonSelectDivider() { let select: Component = await driver.findComponent(ON.id('UIComponentButtonSelectDivider0020_002')); await select.click(); await Utils.sleep(500); - windowSnap.snapShot(); - await Utils.sleep(500); + await windowSnap.snapShot(); + await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_DIVIDER_0020 finish.`); done(); }) @@ -106,7 +121,7 @@ export default function UIComponentButtonSelectDivider() { let select: Component = await driver.findComponent(ON.id('UIComponentButtonSelectDivider0030_003')); await select.click(); await Utils.sleep(500); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(500); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_DIVIDER_0030 finish.`); done(); @@ -131,7 +146,7 @@ export default function UIComponentButtonSelectDivider() { let select: Component = await driver.findComponent(ON.id('UIComponentButtonSelectDivider0040_003')); await select.click(); await Utils.sleep(500); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(500); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_DIVIDER_0040 finish.`); done(); @@ -156,7 +171,7 @@ export default function UIComponentButtonSelectDivider() { let select: Component = await driver.findComponent(ON.id('UIComponentButtonSelectDivider0050_003')); await select.click(); await Utils.sleep(500); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(500); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_DIVIDER_0050 finish.`); done(); @@ -181,7 +196,7 @@ export default function UIComponentButtonSelectDivider() { let select: Component = await driver.findComponent(ON.id('UIComponentButtonSelectDivider0060_003')); await select.click(); await Utils.sleep(500); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(500); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_DIVIDER_0060 finish.`); done(); @@ -206,7 +221,7 @@ export default function UIComponentButtonSelectDivider() { let select: Component = await driver.findComponent(ON.id('UIComponentButtonSelectDivider0070_003')); await select.click(); await Utils.sleep(500); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(500); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_DIVIDER_0070 finish.`); done(); @@ -228,7 +243,7 @@ export default function UIComponentButtonSelectDivider() { let select: Component = await driver.findComponent(ON.id('UIComponentButtonSelectDivider0080_002')); await select.click(); await Utils.sleep(500); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(500); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_DIVIDER_0080 finish.`); done(); @@ -253,7 +268,7 @@ export default function UIComponentButtonSelectDivider() { let select: Component = await driver.findComponent(ON.id('UIComponentButtonSelectDivider0090_003')); await select.click(); await Utils.sleep(500); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(500); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_DIVIDER_0090 finish.`); done(); @@ -278,7 +293,7 @@ export default function UIComponentButtonSelectDivider() { let select: Component = await driver.findComponent(ON.id('UIComponentButtonSelectDivider0100_003')); await select.click(); await Utils.sleep(500); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(500); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_DIVIDER_0100 finish.`); done(); @@ -303,7 +318,7 @@ export default function UIComponentButtonSelectDivider() { let select: Component = await driver.findComponent(ON.id('UIComponentButtonSelectDivider0110_003')); await select.click(); await Utils.sleep(500); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(500); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_DIVIDER_0110 finish.`); done(); @@ -328,7 +343,7 @@ export default function UIComponentButtonSelectDivider() { let select: Component = await driver.findComponent(ON.id('UIComponentButtonSelectDivider0120_003')); await select.click(); await Utils.sleep(500); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(500); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_DIVIDER_0120 finish.`); done(); @@ -355,7 +370,7 @@ export default function UIComponentButtonSelectDivider() { await Utils.sleep(500); await select.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(500); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_DIVIDER_0130 finish.`); done(); @@ -380,7 +395,7 @@ export default function UIComponentButtonSelectDivider() { let select: Component = await driver.findComponent(ON.id('UIComponentButtonSelectDivider0140_003')); await select.click(); await Utils.sleep(500); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(500); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_DIVIDER_0140 finish.`); done(); @@ -405,7 +420,7 @@ export default function UIComponentButtonSelectDivider() { let select: Component = await driver.findComponent(ON.id('UIComponentButtonSelectDivider0150_003')); await select.click(); await Utils.sleep(500); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(500); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_DIVIDER_0150 finish.`); done(); @@ -430,7 +445,7 @@ export default function UIComponentButtonSelectDivider() { let select: Component = await driver.findComponent(ON.id('UIComponentButtonSelectDivider0160_003')); await select.click(); await Utils.sleep(500); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(500); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_DIVIDER_0160 finish.`); done(); diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentButtonStyleTest/UIComponentButtonStyle.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentButtonStyleTest/UIComponentButtonStyle.test.ets index 2a1735642225454f0b6c2f4d37c91715d145b1e2..e41f8a33e137715b3ce42d85df44e7176c064700 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentButtonStyleTest/UIComponentButtonStyle.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentButtonStyleTest/UIComponentButtonStyle.test.ets @@ -37,7 +37,21 @@ import { Driver, ON } from '@ohos.UiTest' export default function UIComponentButtonStyle() { describe('UIComponentButtonStyle', () => { + afterEach(async (done: Function) => { + if (Settings.windowClass == undefined) { + return; + } + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`); + return; + } + Logger.info('TEST', `Succeeded in destroy the window.`); + }) + await Utils.sleep(1000); + done(); + }) /* * @tc.number SUB_ACE_UI_COMPONENT_BUTTON_STYLE_0540 @@ -53,7 +67,7 @@ export default function UIComponentButtonStyle() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_STYLE_0540 finish.`); done(); @@ -73,7 +87,7 @@ export default function UIComponentButtonStyle() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_STYLE_0530 finish.`); done(); @@ -93,7 +107,7 @@ export default function UIComponentButtonStyle() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_STYLE_0510 finish.`); done(); @@ -113,7 +127,7 @@ export default function UIComponentButtonStyle() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_STYLE_0520 finish.`); done(); @@ -133,7 +147,7 @@ export default function UIComponentButtonStyle() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_STYLE_0570 finish.`); done(); @@ -153,7 +167,7 @@ export default function UIComponentButtonStyle() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_STYLE_0550 finish.`); done(); @@ -173,7 +187,7 @@ export default function UIComponentButtonStyle() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_STYLE_0560 finish.`); done(); diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentFunctionSelectSymbol/UIComponentFunctionSelectSymbol.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentFunctionSelectSymbol/UIComponentFunctionSelectSymbol.test.ets index 9be823c88a86c47cdb06cd67549fd16ee28fc402..663621546046dec4e4faba3b526c7abebd58f1e3 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentFunctionSelectSymbol/UIComponentFunctionSelectSymbol.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentFunctionSelectSymbol/UIComponentFunctionSelectSymbol.test.ets @@ -41,6 +41,21 @@ import { BusinessError } from '@kit.BasicServicesKit' export default function UIComponentFunctionSelectSymbol() { describe('UIComponentFunctionSelectSymbol', () => { + afterEach(async (done: Function) => { + if (Settings.windowClass == undefined) { + return; + } + + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`) + return; + } + Logger.info('TEST', `Succeeded in destroy the window.`); + }) + await Utils.sleep(1000); + done(); + }) /* * @tc.number : ARKUI_COMPONENTFUNCTION_SELECT_SYMBOL_0010 @@ -58,7 +73,7 @@ export default function UIComponentFunctionSelectSymbol() { let select: Component = await driver.findComponent(ON.id('UIComponentFunctionSelectSymbol0010_002')); await select.click(); await Utils.sleep(500); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(500); Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SELECT_SYMBOL_0010 finish.`); done(); @@ -83,7 +98,7 @@ export default function UIComponentFunctionSelectSymbol() { let select: Component = await driver.findComponent(ON.id('UIComponentFunctionSelectSymbol0020_003')); await select.click(); await Utils.sleep(500); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(500); Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SELECT_SYMBOL_0020 finish.`); done(); @@ -105,7 +120,7 @@ export default function UIComponentFunctionSelectSymbol() { let select: Component = await driver.findComponent(ON.id('UIComponentFunctionSelectSymbol0030_002')); await select.click(); await Utils.sleep(500); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(500); Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SELECT_SYMBOL_0030 finish.`); done(); @@ -127,7 +142,7 @@ export default function UIComponentFunctionSelectSymbol() { let select: Component = await driver.findComponent(ON.id('UIComponentFunctionSelectSymbol0040_002')); await select.click(); await Utils.sleep(500); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(500); Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SELECT_SYMBOL_0040 finish.`); done(); @@ -149,7 +164,7 @@ export default function UIComponentFunctionSelectSymbol() { let select: Component = await driver.findComponent(ON.id('UIComponentFunctionSelectSymbol0050_002')); await select.click(); await Utils.sleep(500); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(500); Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SELECT_SYMBOL_0050 finish.`); done(); @@ -171,7 +186,7 @@ export default function UIComponentFunctionSelectSymbol() { let select: Component = await driver.findComponent(ON.id('UIComponentFunctionSelectSymbol0060_002')); await select.click(); await Utils.sleep(500); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(500); Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SELECT_SYMBOL_0060 finish.`); done(); @@ -193,7 +208,7 @@ export default function UIComponentFunctionSelectSymbol() { let select: Component = await driver.findComponent(ON.id('UIComponentFunctionSelectSymbol0070_002')); await select.click(); await Utils.sleep(500); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(500); Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SELECT_SYMBOL_0070 finish.`); done(); @@ -215,7 +230,7 @@ export default function UIComponentFunctionSelectSymbol() { let select: Component = await driver.findComponent(ON.id('UIComponentFunctionSelectSymbol0090_002')); await select.click(); await Utils.sleep(500); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(500); Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SELECT_SYMBOL_0090 finish.`); done(); @@ -237,7 +252,7 @@ export default function UIComponentFunctionSelectSymbol() { let select: Component = await driver.findComponent(ON.id('UIComponentFunctionSelectSymbol0110_002')); await select.click(); await Utils.sleep(500); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(500); Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SELECT_SYMBOL_0110 finish.`); done(); @@ -259,11 +274,10 @@ export default function UIComponentFunctionSelectSymbol() { let select: Component = await driver.findComponent(ON.id('UIComponentFunctionSelectSymbol0120_002')); await select.click(); await Utils.sleep(500); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(500); Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SELECT_SYMBOL_0120 finish.`); done(); }) - }) } diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupBoxAttributeInterfaceTest/UIComponentPopupBoxAttributeInterface001.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupBoxAttributeInterfaceTest/UIComponentPopupBoxAttributeInterface001.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..4e8a29bcf24dcc9cdbab89748ec506bc38cd1b42 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupBoxAttributeInterfaceTest/UIComponentPopupBoxAttributeInterface001.test.ets @@ -0,0 +1,469 @@ +/* + * Copyright (C) 2024 Huawei Device 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 { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' +import Settings from '../model/Settings' +import windowSnap from '../model/snapShot' +import Logger from '../model/Logger' +import Utils from '../model/Utils' +import { Component, Driver, MouseButton, ON } from '@ohos.UiTest' + +/* + * + * Settings.createWindow(config.url): + * 创建窗口,更改窗口基本配置,更改方式详见model/Settings createWindow方法 + * + * windowSnap.snapShot(globalThis.context): + * 窗口截屏&图片文件保存,存储在设备端 + * 存储文件固定,单挑用例执行后覆盖,用于自动化UI对比 + * 支持调试更改文件名为时间戳格式,更改model/snapShot createAndGetFile方法 注释L35,放开L32,L33 + * + * Logger日志使用方法: + * import Logger form './model/Logger' + * Logger.info(TAG,`config = ${config}, err = ${JSON.stringify(exception)}`) + * */ + +export default function UIComponentPopupBoxAttributeInterface001() { + + describe('UIComponentPopupBoxAttributeInterface001', () => { + afterEach(async (done: Function) => { + if (Settings.windowClass == undefined) { + return + } + + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`) + return; + } + Logger.info('TEST', `Succeeded in destroy the window.`); + }) + await Utils.sleep(1000); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0060 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0060 + * @tc.desc offset + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0060', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0060 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface001") + await Utils.sleep(500) + let driver: Driver = Driver.create() + let button: Component = + await driver.findComponent(ON.id('UIComponentPopupBoxAttributeInterface001_button_001')) + await Utils.sleep(500) + for (let index = 0; index < 5; index++) { + await Utils.sleep(500) + await button?.click() + await Utils.sleep(500) + await driver?.click(50, 100) + } + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0060 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0070 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0070 + * @tc.desc change Dialog Content + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0070', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0070 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface002") + await Utils.sleep(500) + let driver: Driver = Driver.create() + let button: Component = + await driver.findComponent(ON.id('UIComponentPopupBoxAttributeInterface002_button_001')) + await Utils.sleep(500) + await button?.click() + let buttonTwo: Component = + await driver.findComponent(ON.id('UIComponentPopupBoxAttributeInterface002_button_002')) + await Utils.sleep(500) + await buttonTwo?.click() + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0070 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0080 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0080 + * @tc.desc open twoDialog & showInSubWindow为true + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0080', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0080 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface005") + await Utils.sleep(500) + let driver: Driver = Driver.create() + let button: Component = + await driver.findComponent(ON.id('UIComponentPopupBoxAttributeInterface005_button_001')) + await Utils.sleep(500) + await button?.click() + let buttonTwo: Component = + await driver.findComponent(ON.id('UIComponentPopupBoxAttributeInterface005_button_002')) + await Utils.sleep(500) + await buttonTwo?.click() + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0080 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0090 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0090 + * @tc.desc open twoDialog + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0090', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0090 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface004") + await Utils.sleep(500) + let driver: Driver = Driver.create() + let button: Component = + await driver.findComponent(ON.id('UIComponentPopupBoxAttributeInterface004_button_001')) + await Utils.sleep(500) + await button?.click() + let buttonTwo: Component = + await driver.findComponent(ON.id('UIComponentPopupBoxAttributeInterface004_button_002')) + await Utils.sleep(500) + await buttonTwo?.click() + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0090 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0020 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0020 + * @tc.desc change alignment + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0020', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0020 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface003") + await Utils.sleep(500) + let driver: Driver = Driver.create() + let button: Component = + await driver.findComponent(ON.id('UIComponentPopupBoxAttributeInterface003_button_001')) + await Utils.sleep(500) + for (let index = 0; index < 5; index++) { + await Utils.sleep(500) + await button?.click() + await Utils.sleep(500) + await driver?.click(50, 100) + } + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0020 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0040 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0040 + * @tc.desc change autoCancel + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0040', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0040 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface006") + await Utils.sleep(500) + let driver: Driver = Driver.create() + let button: Component = + await driver.findComponent(ON.id('UIComponentPopupBoxAttributeInterface006_button_001')) + await Utils.sleep(500) + for (let index = 0; index < 2; index++) { + await Utils.sleep(500) + await button?.click() + await Utils.sleep(500) + await driver?.click(50, 100) + } + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0040 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0050 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0050 + * @tc.desc change maskColor + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0050', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0050 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface007") + await Utils.sleep(500) + let driver: Driver = Driver.create() + let button: Component = + await driver.findComponent(ON.id('UIComponentPopupBoxAttributeInterface007_button_001')) + await Utils.sleep(500) + for (let index = 0; index < 4; index++) { + await Utils.sleep(500) + await button?.click() + await Utils.sleep(500) + await driver?.click(50, 100) + } + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0050 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0350 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0350 + * @tc.desc customDialog test isModal = false + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0350', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0350 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface008") + await Utils.sleep(500) + let driver: Driver = Driver.create() + let button: Component = + await driver.findComponent(ON.id('UIComponentPopupBoxAttributeInterface008_button_001')) + await Utils.sleep(500) + await button?.click() + await Utils.sleep(500) + await driver?.click(50, 100) + await Utils.sleep(500) + await button?.click() + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0350 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0360 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0360 + * @tc.desc customDialog test isModal = true + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0360', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0360 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface008") + await Utils.sleep(500) + let driver: Driver = Driver.create() + let button: Component = + await driver.findComponent(ON.id('UIComponentPopupBoxAttributeInterface008_button_001')) + await Utils.sleep(500) + await button?.click() + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0360 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0370 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0370 + * @tc.desc customDialog test maskRect: {x: 20, y: '20px', width: '300px', height: '80%' } + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0370', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0370 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface009") + await Utils.sleep(500) + let driver: Driver = Driver.create() + let button: Component = + await driver.findComponent(ON.id('UIComponentPopupBoxAttributeInterface009_button_001')) + await Utils.sleep(500) + await button?.click() + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0370 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0390 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0390 + * @tc.desc customDialog test showlnSubWindow为true + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0390', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0390 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface0010") + await Utils.sleep(500) + let driver: Driver = Driver.create() + let button: Component = + await driver.findComponent(ON.id('UIComponentPopupBoxAttributeInterface0010_button_001')) + await Utils.sleep(500) + await button?.click() + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0390 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0380 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0380 + * @tc.desc customDialog test default + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0380', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0380 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface0011") + await Utils.sleep(500) + let driver: Driver = Driver.create() + let button: Component = + await driver.findComponent(ON.id('UIComponentPopupBoxAttributeInterface0011_button_001')) + await Utils.sleep(500) + await button?.click() + await Utils.sleep(1000) + await driver?.click(50, 100) + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0380 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_AITRIBUTE_0400 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_AITRIBUTE_0400 + * @tc.desc customDialog test change content height + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_AITRIBUTE_0400', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_AITRIBUTE_0400 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface0012") + await Utils.sleep(500) + let driver: Driver = Driver.create() + let button: Component = + await driver.findComponent(ON.id('UIComponentPopupBoxAttributeInterface0012_button_001')) + await Utils.sleep(500) + await button?.click() + await Utils.sleep(500) + let buttonTwo: Component = + await driver.findComponent(ON.id('UIComponentPopupBoxAttributeInterface0012_button_002')) + await buttonTwo?.click() + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_AITRIBUTE_0400 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0450 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0450 + * @tc.desc customDialog test change content + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0450', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0450 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface0013") + await Utils.sleep(500) + let driver: Driver = Driver.create() + let button: Component = + await driver.findComponent(ON.id('UIComponentPopupBoxAttributeInterface0013_button_001')) + await Utils.sleep(500) + await button?.click() + await Utils.sleep(500) + let buttonTwo: Component = + await driver.findComponent(ON.id('UIComponentPopupBoxAttributeInterface0013_button_002')) + await buttonTwo?.click() + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0450 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0480 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0480 + * @tc.desc customDialog test change content & add list组件 + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0480', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0480 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface0014") + await Utils.sleep(500) + let driver: Driver = Driver.create() + let button: Component = + await driver.findComponent(ON.id('UIComponentPopupBoxAttributeInterface0014_button_001')) + await Utils.sleep(500) + await button?.click() + await Utils.sleep(500) + let buttonTwo: Component = + await driver.findComponent(ON.id('UIComponentPopupBoxAttributeInterface0014_button_002')) + await buttonTwo?.click() + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0480 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0470 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0470 + * @tc.desc customDialog test change content & add list组件 + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0470', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0470 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface0015") + await Utils.sleep(500) + let driver: Driver = Driver.create() + let button: Component = + await driver.findComponent(ON.id('UIComponentPopupBoxAttributeInterface0015_button_001')) + await Utils.sleep(500) + await button?.click() + await Utils.sleep(500) + let buttonTwo: Component = + await driver.findComponent(ON.id('UIComponentPopupBoxAttributeInterface0015_button_002')) + await buttonTwo?.click() + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0470 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0030 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0030 + * @tc.desc customDialog test page A->B + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0030', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0030 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface0016") + await Utils.sleep(500) + let driver: Driver = Driver.create() + let button: Component = + await driver.findComponent(ON.id('UIComponentPopupBoxAttributeInterface0016_button_001')) + await Utils.sleep(500) + await button?.click() + await Utils.sleep(500) + let buttonTwo: Component = + await driver.findComponent(ON.id('UIComponentPopupBoxAttributeInterface0016_button_002')) + await Utils.sleep(500) + await buttonTwo?.click() + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0030 finish.`); + done() + }) + + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupBoxAttributeTest/UIComponentPopupBoxAttribute.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupBoxAttributeTest/UIComponentPopupBoxAttribute.test.ets index 6a9868b22c0ccbf3c0ab3d0e84df9218e05bf226..3b782ced23020cfe9b19e5615f99633ef850df31 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupBoxAttributeTest/UIComponentPopupBoxAttribute.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupBoxAttributeTest/UIComponentPopupBoxAttribute.test.ets @@ -18,7 +18,7 @@ import Settings from '../model/Settings' import windowSnap from '../model/snapShot' import Logger from '../model/Logger' import Utils from '../model/Utils' -import { Driver, ON } from '@ohos.UiTest' +import { Component, Driver, ON } from '@ohos.UiTest' /* * Settings.createWindow(config.url): @@ -37,8 +37,40 @@ import { Driver, ON } from '@ohos.UiTest' export default function UIComponentPopupBoxAttribute() { describe('UIComponentPopupBoxAttribute', () => { + afterEach(async (done: Function) => { + if (Settings.windowClass == undefined) { + return; + } - + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`); + return; + } + Logger.info('TEST', `Succeeded in destroy the window.`); + }) + await Utils.sleep(1000); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0110 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0110 + * @tc.desc offset + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0110', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0110 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxAttribute/UIComponentPopupBoxAttribute011") + await Utils.sleep(500) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentPopupBoxAttributeInterface001_button_001')) + await Utils.sleep(500) + await button?.click() + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0110 finish.`); + done() + }) /* * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0510 * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0510 @@ -59,7 +91,7 @@ export default function UIComponentPopupBoxAttribute() { Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0510 error.`); done(); } - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0510 finish.`); done(); @@ -85,7 +117,7 @@ export default function UIComponentPopupBoxAttribute() { Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0500 error.`); done(); } - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ATTRIBUTE_0500 finish.`); done(); diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupBoxCalendarPickerFeatureTest/UIComponentPopupBoxCalendarPickerFeature.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupBoxCalendarPickerFeatureTest/UIComponentPopupBoxCalendarPickerFeature.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..fc51759a22890739ef048dbc59b034c197a6c7cf --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupBoxCalendarPickerFeatureTest/UIComponentPopupBoxCalendarPickerFeature.test.ets @@ -0,0 +1,127 @@ +/* + * Copyright (C) 2024 Huawei Device 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 { afterEach, describe, expect, it } from '@ohos/hypium' +import Settings from '../model/Settings' +import windowSnap from '../model/snapShot' +import Logger from '../model/Logger' +import Utils from '../model/Utils' +import { Driver, ON } from '@ohos.UiTest' + +/* + * Settings.createWindow(config.url): + * 创建窗口,更改窗口基本配置,更改方式详见model/Settings createWindow方法 + * + * windowSnap.snapShot(globalThis.context): + * 窗口截屏&图片文件保存,存储在设备端 + * 存储文件固定,单挑用例执行后覆盖,用于自动化UI对比 + * 支持调试更改文件名为时间戳格式,更改model/snapShot createAndGetFile方法 注释L35,放开L32,L33 + * + * Logger日志使用方法: + * import Logger form './model/Logger' + * Logger.info(TAG,`config = ${config}, err = ${JSON.stringify(exception)}`) + * */ + +export default function UIComponentPopupBoxCalendarPickerFeature() { + + describe('UIComponentPopupBoxCalendarPickerFeature', () => { + afterEach(async (done: Function) => { + if (Settings.windowClass == undefined) { + return; + } + + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`); + return; + } + Logger.info('TEST', `Succeeded in destroy the window.`); + }) + await Utils.sleep(1000); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_CALENDARPICKER_FEATURE_0010 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_CALENDARPICKER_FEATURE_0010 + * @tc.desc Calendar + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_CALENDARPICKER_FEATURE_0010', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_CALENDARPICKER_FEATURE_0010 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxCalendarPickerFeature/UIComponentPopupBoxCalendarPickerFeature003") + await Utils.sleep(2000) + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_CALENDARPICKER_FEATURE_0030 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_CALENDARPICKER_FEATURE_0020 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_CALENDARPICKER_FEATURE_0020 + * @tc.desc Calendar + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_CALENDARPICKER_FEATURE_0020', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_CALENDARPICKER_FEATURE_0020 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxCalendarPickerFeature/UIComponentPopupBoxCalendarPickerFeature003") + await Utils.sleep(2000) + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_CALENDARPICKER_FEATURE_0020 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_CALENDARPICKER_FEATURE_0030 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_CALENDARPICKER_FEATURE_0030 + * @tc.desc Calendar component features are enhanced to see today's distribution + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_CALENDARPICKER_FEATURE_0030', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_CALENDARPICKER_FEATURE_0030 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxCalendarPickerFeature/UIComponentPopupBoxCalendarPickerFeature003") + await Utils.sleep(2000) + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_CALENDARPICKER_FEATURE_0030 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_CALENDARPICKER_FEATURE_0040 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_CALENDARPICKER_FEATURE_0040 + * @tc.desc Calendar + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_CALENDARPICKER_FEATURE_0040', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_CALENDARPICKER_FEATURE_0040 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxCalendarPickerFeature/UIComponentPopupBoxCalendarPickerFeature003") + await Utils.sleep(2000) + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_CALENDARPICKER_FEATURE_0040 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_CALENDARPICKER_FEATURE_0050 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_CALENDARPICKER_FEATURE_0050 + * @tc.desc Calendar + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_CALENDARPICKER_FEATURE_0050', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_CALENDARPICKER_FEATURE_0050 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxCalendarPickerFeature/UIComponentPopupBoxCalendarPickerFeature003") + await Utils.sleep(2000) + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_CALENDARPICKER_FEATURE_0050 finish.`); + done(); + }) + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupBoxConsistencySceneTest/UIComponentPopupBoxConsistencyScene.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupBoxConsistencySceneTest/UIComponentPopupBoxConsistencyScene.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..2671f7bddca82454d06e8acdeee3466b1a5d1029 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupBoxConsistencySceneTest/UIComponentPopupBoxConsistencyScene.test.ets @@ -0,0 +1,97 @@ +/* + * Copyright (C) 2024 Huawei Device 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 { afterEach, describe, it } from '@ohos/hypium'; +import Settings from '../model/Settings'; +import windowSnap from '../model/snapShot'; +import Logger from '../model/Logger'; +import Utils from '../model/Utils'; +import { Component, Driver, ON } from '@ohos.UiTest'; + +/* + * + * Settings.createWindow(config.url): + * 创建窗口,更改窗口基本配置,更改方式详见model/Settings createWindow方法 + * + * windowSnap.snapShot(globalThis.context): + * 窗口截屏&图片文件保存,存储在设备端 + * 存储文件固定,单挑用例执行后覆盖,用于自动化UI对比 + * 支持调试更改文件名为时间戳格式,更改model/snapShot createAndGetFile方法 注释L35,放开L32,L33 + * + * Logger日志使用方法: + * import Logger form './model/Logger' + * Logger.info(TAG,`config = ${config}, err = ${JSON.stringify(exception)}`) + * */ + +export default function UIComponentPopupBoxConsistencyScene() { + + describe('UIComponentPopupBoxConsistencyScene', () => { + afterEach(async (done: Function) => { + if (Settings.windowClass == undefined) { + return; + } + + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`); + return; + } + Logger.info('TEST', `Succeeded in destroy the window.`); + }) + await Utils.sleep(1000); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_CONSISTENCY_SCENE_0070_1 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_CONSISTENCY_SCENE_0070_1 + * @tc.desc PromptAction Indicates the user-defined pop-up + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_CONSISTENCY_SCENE_0070_1', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_CONSISTENCY_SCENE_0070_1 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxConsistencyScene/UIComponentPopupBoxConsistencyScene007"); + await Utils.sleep(500); + let driver: Driver = Driver.create(); + let button: Component = + await driver.findComponent(ON.id('UIComponentPopupBoxConsistencyScene0070')); + await button?.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_CONSISTENCY_SCENE_0070_1 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_CONSISTENCY_SCENE_0070_2 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_CONSISTENCY_SCENE_0070_2 + * @tc.desc Customize the pop-up + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_CONSISTENCY_SCENE_0070_2', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_CONSISTENCY_SCENE_0070_2 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxConsistencyScene/UIComponentPopupBoxConsistencyScene007"); + await Utils.sleep(500); + let driver: Driver = Driver.create(); + let button: Component = + await driver.findComponent(ON.id('UIComponentPopupBoxConsistencyScene0071')); + await button?.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_CONSISTENCY_SCENE_0070_2 finish.`); + done(); + }) + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupBoxFullDialogInterfaceTest/UIComponentPopupBoxFullDialogInterface001.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupBoxFullDialogInterfaceTest/UIComponentPopupBoxFullDialogInterface001.test.ets index eb02ccf53794e15cc33243ad16576e4b5e7a0c72..578d695e702329124c5798d58551d66cab27820a 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupBoxFullDialogInterfaceTest/UIComponentPopupBoxFullDialogInterface001.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupBoxFullDialogInterfaceTest/UIComponentPopupBoxFullDialogInterface001.test.ets @@ -13,12 +13,13 @@ * limitations under the License. */ -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' +import { describe, afterEach, it } from '@ohos/hypium' import Settings from '../model/Settings' import windowSnap from '../model/snapShot' import Logger from '../model/Logger' import Utils from '../model/Utils' -import { Component, Driver, MouseButton, ON } from '@ohos.UiTest' +import { Component, Driver, ON } from '@ohos.UiTest' +import { window } from '@kit.ArkUI' /* * @@ -38,7 +39,21 @@ import { Component, Driver, MouseButton, ON } from '@ohos.UiTest' export default function UIComponentPopupBoxFullDialogInterface001() { describe('UIComponentPopupBoxFullDialogInterface001', () => { + afterEach(async (done: Function) => { + if (Settings.windowClass == undefined) { + return + } + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`) + return; + } + Logger.info('TEST', `Succeeded in destroy the window.`); + }) + await Utils.sleep(1000); + done() + }) /* * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_FULLDIALOG_0350 @@ -55,7 +70,7 @@ export default function UIComponentPopupBoxFullDialogInterface001() { await Utils.sleep(500) await button?.click() await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_FULLDIALOG_0350 finish.`); done() @@ -75,11 +90,161 @@ export default function UIComponentPopupBoxFullDialogInterface001() { await Utils.sleep(500) await button?.click() await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_FULLDIALOG_0360 finish.`); done() }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_FULLDIALOG_0390 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_FULLDIALOG_0390 + * @tc.desc customDialog test showlnSubWindow = true + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_FULLDIALOG_0390', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_FULLDIALOG_0390 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface009") + await Utils.sleep(500) + let driver: Driver = Driver.create() + let button: Component = + await driver.findComponent(ON.id('UIComponentPopupBoxFullDialogInterface009_button_001')) + await Utils.sleep(500) + await button?.click() + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_FULLDIALOG_0390 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_FULLDIALOG_0400 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_FULLDIALOG_0400 + * @tc.desc customDialog test change Dialog content + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_FULLDIALOG_0400', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_FULLDIALOG_0400 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface0011") + await Utils.sleep(500) + let driver: Driver = Driver.create() + let button: Component = + await driver.findComponent(ON.id('UIComponentPopupBoxFullDialogInterface0011_button_001')) + await Utils.sleep(500) + await button?.click() + await Utils.sleep(1000) + let buttonTwo: Component = + await driver.findComponent(ON.id('UIComponentPopupBoxFullDialogInterface0011_button_002')) + let buttonThree: Component = + await driver.findComponent(ON.id('UIComponentPopupBoxFullDialogInterface0011_button_003')) + await Utils.sleep(500) + await buttonTwo?.click() + await Utils.sleep(500) + await buttonThree?.click() + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_FULLDIALOG_0400 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_FULLDIALOG_0450 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_FULLDIALOG_0450 + * @tc.desc customDialog test isModal为true + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_FULLDIALOG_0450', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_FULLDIALOG_0450 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface0012") + await Utils.sleep(500) + let driver: Driver = Driver.create() + let button: Component = + await driver.findComponent(ON.id('UIComponentPopupBoxFullDialogInterface0012_button_001')) + await Utils.sleep(500) + await button?.click() + await Utils.sleep(500) + let buttonTwo: Component = + await driver.findComponent(ON.id('UIComponentPopupBoxFullDialogInterface0012_button_002')) + await Utils.sleep(500) + await buttonTwo?.click() + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_FULLDIALOG_0450 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_FULLDIALOG_0470_1 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_FULLDIALOG_0470_1 + * @tc.desc customDialog test 子窗口的弹框不能弹出子弹框 + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_FULLDIALOG_0470_1', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_FULLDIALOG_0470_1 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface0015"); + await Utils.sleep(2000) + let driver: Driver = Driver.create() + let button: Component = + await driver.findComponent(ON.id('UIComponentPopupBoxFullDialogInterface00150')); + await button?.click() + await Utils.sleep(2000) + let buttonTwo: Component = + await driver.findComponent(ON.id('UIComponentPopupBoxFullDialogInterface00151')) + await buttonTwo?.click() + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_FULLDIALOG_0470_1 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_FULLDIALOG_0470_2 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_FULLDIALOG_0470_2 + * @tc.desc customDialog test 子窗口的弹框能弹出弹框 + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_FULLDIALOG_0470_2', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_FULLDIALOG_0470_2 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface0015"); + Settings.windowClass?.setTopmost(false) + Settings.windowClass?.setWindowMode(window.WindowMode.FLOATING) + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = + await driver.findComponent(ON.id('UIComponentPopupBoxFullDialogInterface00150')); + await button?.click(); + await Utils.sleep(2000); + let buttonTwo: Component = + await driver.findComponent(ON.id('UIComponentPopupBoxFullDialogInterface00152')) + await buttonTwo?.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_FULLDIALOG_0470_2 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_FULLDIALOG_0070 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_FULLDIALOG_0070 + * @tc.desc customDialog test dialog is null + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_FULLDIALOG_0070', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_FULLDIALOG_0070 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface0013") + await Utils.sleep(500) + let driver: Driver = Driver.create() + let button: Component = + await driver.findComponent(ON.id('UIComponentPopupBoxFullDialogInterface0013_button_001')) + await Utils.sleep(500) + await button?.click() + await Utils.sleep(500) + await driver?.click(50, 100) + await Utils.sleep(1000) + await button?.click() + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_FULLDIALOG_0070 finish.`); + done() + }) + /* * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_FULLDIALOG_0370 * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_FULLDIALOG_0370 @@ -95,11 +260,13 @@ export default function UIComponentPopupBoxFullDialogInterface001() { await Utils.sleep(500) await button?.click() await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_FULLDIALOG_0370 finish.`); done() }) + + /* * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_FULLDIALOG_0310 * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_FULLDIALOG_0310 @@ -115,7 +282,7 @@ export default function UIComponentPopupBoxFullDialogInterface001() { await Utils.sleep(1000) await button?.click() await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_FULLDIALOG_0310 finish.`); done() @@ -142,7 +309,7 @@ export default function UIComponentPopupBoxFullDialogInterface001() { await Utils.sleep(500) await driver?.click(50, 100) await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_FULLDIALOG_0040 finish.`); done() @@ -167,7 +334,7 @@ export default function UIComponentPopupBoxFullDialogInterface001() { await Utils.sleep(500) await buttonTwo?.click() await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_FULLDIALOG_0080 finish.`); done() @@ -193,7 +360,7 @@ export default function UIComponentPopupBoxFullDialogInterface001() { await Utils.sleep(500) await buttonTwo?.click() await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_FULLDIALOG_0090 finish.`); done() @@ -213,7 +380,7 @@ export default function UIComponentPopupBoxFullDialogInterface001() { await Utils.sleep(1000) await button?.click() await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_FULLDIALOG_0110 finish.`); done() @@ -239,7 +406,7 @@ export default function UIComponentPopupBoxFullDialogInterface001() { await driver?.click(50, 100) } await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_FULLDIALOG_0050 finish.`); done() @@ -264,7 +431,7 @@ export default function UIComponentPopupBoxFullDialogInterface001() { await driver?.click(50, 100) } await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_FULLDIALOG_0020 finish.`); done() @@ -289,11 +456,34 @@ export default function UIComponentPopupBoxFullDialogInterface001() { await driver?.click(50, 100) } await Utils.sleep(500) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(500) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_FULLDIALOG_0060 finish.`); done() }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_FULLDIALOG_0480 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_FULLDIALOG_0480 + * @tc.desc The list component is configured in ComponentContent, position and offset are configured in the root node of the content, and alignment and offset are configured in the options object in openCustomDialog + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_FULLDIALOG_0480', 0, async (done: Function) => { + Logger.info('TEST', `UIComponentPopupBoxFullDialogInterface048 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface048") + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + let button: Component = + await driver.findComponent(ON.id('UIComponentPopupBoxFullDialogInterface0480')); + await button?.click(); + await Utils.sleep(1000) + let buttonTwo: Component = + await driver.findComponent(ON.id('UIComponentPopupBoxFullDialogInterface0481')); + await buttonTwo?.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_FULLDIALOG_0480 finish.`); + done(); + }) }) } diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupBoxPopupFollowTransformOfTarget/UIComponentPopupBoxPopupFollowTransformofTarget.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupBoxPopupFollowTransformOfTarget/UIComponentPopupBoxPopupFollowTransformofTarget.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..e7ad808cef8b41bcc95a4d5f4d3fea5ef2838983 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupBoxPopupFollowTransformOfTarget/UIComponentPopupBoxPopupFollowTransformofTarget.test.ets @@ -0,0 +1,129 @@ +/* + * Copyright (C) 2024 Huawei Device 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 { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' +import Settings from '../model/Settings' +import windowSnap from '../model/snapShot' +import Logger from '../model/Logger' +import Utils from '../model/Utils' +import { Component, Driver, MouseButton, ON } from '@ohos.UiTest' + +/* + * + * Settings.createWindow(config.url): + * 创建窗口,更改窗口基本配置,更改方式详见model/Settings createWindow方法 + * + * windowSnap.snapShot(globalThis.context): + * 窗口截屏&图片文件保存,存储在设备端 + * 存储文件固定,单挑用例执行后覆盖,用于自动化UI对比 + * 支持调试更改文件名为时间戳格式,更改model/snapShot createAndGetFile方法 注释L35,放开L32,L33 + * + * Logger日志使用方法: + * import Logger form './model/Logger' + * Logger.info(TAG,`config = ${config}, err = ${JSON.stringify(exception)}`) + * */ + +export default function UIComponentPopupBoxPopupFollowTransformofTarget() { + + describe('UIComponentPopupBoxPopupFollowTransformofTarget', () => { + afterEach(async (done: Function) => { + if (Settings.windowClass == undefined) { + return; + } + + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`); + return; + } + Logger.info('TEST', `Succeeded in destroy the window.`); + }) + await Utils.sleep(1000); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_FOLLOWTRANSFORMOFTARGET_0580 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_FOLLOWTRANSFORMOFTARGET_0580 + * @tc.desc customDialog test inputMethod + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_FOLLOWTRANSFORMOFTARGET_0580', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_FOLLOWTRANSFORMOFTARGET_0580 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxPopupFollowTransformOfTarget/UIComponentPopupBoxPopupFollowTransformofTarget058"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + let button: Component = + await driver.findComponent(ON.id('Target0580')); + let button1: Component = + await driver.findComponent(ON.id('Target0581')); + button.click(); + await Utils.sleep(1000); + button1.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_FOLLOWTRANSFORMOFTARGET_0580 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_FOLLOWTRANSFORMOFTARGET_0310 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_FOLLOWTRANSFORMOFTARGET_0310 + * @tc.desc customDialog test inputMethod + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_FOLLOWTRANSFORMOFTARGET_0310', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_FOLLOWTRANSFORMOFTARGET_0310 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxPopupFollowTransformOfTarget/UIComponentPopupBoxPopupFollowTransformofTarget031"); + await Utils.sleep(500); + let driver: Driver = Driver.create(); + let button: Component = + await driver.findComponent(ON.id('UIComponentPopupBoxPopupFollowTransformofTarget0310')); + let button1: Component = + await driver.findComponent(ON.id('UIComponentPopupBoxPopupFollowTransformofTarget0311')); + button.click(); + await Utils.sleep(1000); + button1.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_FOLLOWTRANSFORMOFTARGET_0310 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_FOLLOWTRANSFORMOFTARGET_0850 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_FOLLOWTRANSFORMOFTARGET_0850 + * @tc.desc customDialog test inputMethod + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_FOLLOWTRANSFORMOFTARGET_0850', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_FOLLOWTRANSFORMOFTARGET_0850 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxPopupFollowTransformOfTarget/UIComponentPopupBoxPopupFollowTransformofTarget085"); + await Utils.sleep(500); + let driver: Driver = Driver.create(); + let button: Component = + await driver.findComponent(ON.id('UIComponentPopupBoxPopupFollowTransformofTarget0850')); + let button1: Component = + await driver.findComponent(ON.id('UIComponentPopupBoxPopupFollowTransformofTarget0851')); + button.click(); + await Utils.sleep(1000); + button1.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_FOLLOWTRANSFORMOFTARGET_0850 finish.`); + done(); + }) + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupBoxPopupInterfaceTest/UIComponentPopupBoxPopupInterface001.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupBoxPopupInterfaceTest/UIComponentPopupBoxPopupInterface001.test.ets index 049f8800687b8e445e67cb8225fdebada1034d31..b40c0da3318007160a6e1435b8e71fce5c35410d 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupBoxPopupInterfaceTest/UIComponentPopupBoxPopupInterface001.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupBoxPopupInterfaceTest/UIComponentPopupBoxPopupInterface001.test.ets @@ -38,7 +38,21 @@ import { Component, Driver, MouseButton, ON } from '@ohos.UiTest' export default function UIComponentPopupBoxPopupInterface001() { describe('UIComponentPopupBoxPopupInterface001', () => { + afterEach(async (done: Function) => { + if (Settings.windowClass == undefined) { + return + } + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`) + return; + } + Logger.info('TEST', `Succeeded in destroy the window.`); + }) + await Utils.sleep(1000); + done() + }) /* * @tc.number SUB_ACE_ANALYSE_UI_COMPONENT_POPUPBOX_POPUP_0020 @@ -60,9 +74,9 @@ export default function UIComponentPopupBoxPopupInterface001() { await Utils.sleep(500) await textInput?.inputText("This is test text") await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) - Logger.info('TEST', `SUB_ACE_UI_COMPONENT_REVERSEANALYSIS_0020 finish.`); + Logger.info('TEST', `SUB_ACE_ANALYSE_UI_COMPONENT_POPUPBOX_POPUP_0020 finish.`); done() }) @@ -90,7 +104,7 @@ export default function UIComponentPopupBoxPopupInterface001() { await Utils.sleep(500) await driver?.triggerKey(2049) await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_ANALYSE_UI_COMPONENT_POPUPBOX_POPUP_0030 finish.`); done() @@ -123,7 +137,7 @@ export default function UIComponentPopupBoxPopupInterface001() { await Utils.sleep(500) await textInput?.inputText("test1") await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_ANALYSE_UI_COMPONENT_POPUPBOX_POPUP_0040 finish.`); done() @@ -144,7 +158,7 @@ export default function UIComponentPopupBoxPopupInterface001() { await Utils.sleep(500) await button?.click() await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_PROMPT_SCENARIOS_0010 finish.`); done() @@ -169,7 +183,7 @@ export default function UIComponentPopupBoxPopupInterface001() { await Utils.sleep(500) await confirmButton?.click() await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_PROMPT_SCENARIOS_0120 finish.`); done() @@ -195,7 +209,7 @@ export default function UIComponentPopupBoxPopupInterface001() { await Utils.sleep(500) await confirmButton?.click() await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_PROMPT_SCENARIOS_0110 finish.`); done() diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupBoxPopupOnWillDisMissBooleanTest/UIComponentPopupBoxPopupOnWillDisMissBoolean.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupBoxPopupOnWillDisMissBooleanTest/UIComponentPopupBoxPopupOnWillDisMissBoolean.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..5ae62b1414266935d9378e8ef90888012e7f86bc --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupBoxPopupOnWillDisMissBooleanTest/UIComponentPopupBoxPopupOnWillDisMissBoolean.test.ets @@ -0,0 +1,1069 @@ +/* + * Copyright (C) 2024 Huawei Device 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 { afterEach, describe, it } from '@ohos/hypium' +import Settings from '../model/Settings' +import windowSnap from '../model/snapShot' +import Logger from '../model/Logger' +import Utils from '../model/Utils' +import { Driver, ON } from '@ohos.UiTest' +import { KeyCode } from '@kit.InputKit' + +/* + * Settings.createWindow(config.url): + * 创建窗口,更改窗口基本配置,更改方式详见model/Settings createWindow方法 + * + * windowSnap.snapShot(globalThis.context): + * 窗口截屏&图片文件保存,存储在设备端 + * 存储文件固定,单挑用例执行后覆盖,用于自动化UI对比 + * 支持调试更改文件名为时间戳格式,更改model/snapShot createAndGetFile方法 注释L35,放开L32,L33 + * + * Logger日志使用方法: + * import Logger form './model/Logger' + * Logger.info(TAG,`config = ${config}, err = ${JSON.stringify(exception)}`) + * */ + +export default function UIComponentPopupBoxPopupOnWillDisMissBoolean() { + + describe('UIComponentPopupBoxPopupOnWillDisMissBoolean', () => { + afterEach(async (done: Function) => { + if (Settings.windowClass == undefined) { + return; + } + + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`); + return; + } + Logger.info('TEST', `Succeeded in destroy the window.`); + }) + await Utils.sleep(1000); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0090_1 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0090_1 + * @tc.desc Set PopupOptions to true, autoCancel:true showInSubWindow:true onWillDismiss: true + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0090_1', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0090_1 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean009"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let ButtonCom = await driver.findComponent(ON.id('UIComponentPopupBoxPopupOnWillDisMissBoolean0090')); + let pointButtonCenter = await ButtonCom.getBoundsCenter(); + await driver.click(pointButtonCenter.x, pointButtonCenter.y); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0090_1 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0090_2 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0090_2 + * @tc.desc Set PopupOptions to true, autoCancel:true showInSubWindow:true onWillDismiss: true Exit with an empty dot + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0090_2', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0090_2 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean009"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let ButtonCom = await driver.findComponent(ON.id('UIComponentPopupBoxPopupOnWillDisMissBoolean0090')); + let pointButtonCenter = await ButtonCom.getBoundsCenter(); + await driver.click(pointButtonCenter.x, pointButtonCenter.y); + await Utils.sleep(2000); + await driver.click(pointButtonCenter.x, pointButtonCenter.y - 100); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0090_2 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0010_1 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0010_1 + * @tc.desc CustomPopupOptions autoCancel:false. showInSubWindow:true. onWillDismiss: true(CustomPopup Bubble pops up) + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0010_1', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0010_1 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean001"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let ButtonCom = await driver.findComponent(ON.id('UIComponentPopupBoxPopupOnWillDisMissBoolean0010')); + let pointButtonCenter = await ButtonCom.getBoundsCenter(); + await driver.click(pointButtonCenter.x, pointButtonCenter.y); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0010_1 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0010_2 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0010_2 + * @tc.desc CustomPopupOptions autoCancel:false. showInSubWindow:true. onWillDismiss: true(Bubble retention) + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0010_2', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0010_2 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean001"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let ButtonCom = await driver.findComponent(ON.id('UIComponentPopupBoxPopupOnWillDisMissBoolean0010')); + let pointButtonCenter = await ButtonCom.getBoundsCenter(); + await driver.click(pointButtonCenter.x, pointButtonCenter.y); + await Utils.sleep(2000); + await driver.click(pointButtonCenter.x, pointButtonCenter.y - 100); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0010_2 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0010_3 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0010_3 + * @tc.desc CustomPopupOptions autoCancel:false. showInSubWindow:true. onWillDismiss: true(Left slide bubble disappears) + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0010_3', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0010_3 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean001"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let ButtonCom = await driver.findComponent(ON.id('UIComponentPopupBoxPopupOnWillDisMissBoolean0010')); + let pointButtonCenter = await ButtonCom.getBoundsCenter(); + await driver.click(pointButtonCenter.x, pointButtonCenter.y); + await Utils.sleep(2000); + await driver.drag(100, 100, 10, 100, 1000); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0010_3 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0010_4 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0010_4 + * @tc.desc CustomPopupOptions autoCancel:false. showInSubWindow:true. onWillDismiss: true(Right slide bubble disappears) + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0010_4', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0010_4 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean001"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let ButtonCom = await driver.findComponent(ON.id('UIComponentPopupBoxPopupOnWillDisMissBoolean0010')); + let pointButtonCenter = await ButtonCom.getBoundsCenter(); + await driver.click(pointButtonCenter.x, pointButtonCenter.y); + await Utils.sleep(2000); + await driver.drag(10, 100, 100, 100, 1000); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0010_4 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0010_5 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0010_5 + * @tc.desc CustomPopupOptions autoCancel:false. showInSubWindow:true. onWillDismiss: true(Esc bubble disappears) + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0010_5', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0010_5 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean001"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let ButtonCom = await driver.findComponent(ON.id('UIComponentPopupBoxPopupOnWillDisMissBoolean0010')); + let pointButtonCenter = await ButtonCom.getBoundsCenter(); + await driver.click(pointButtonCenter.x, pointButtonCenter.y); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_ESCAPE); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0010_5 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0010_6 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0010_6 + * @tc.desc CustomPopupOptions autoCancel:false. showInSubWindow:true. onWillDismiss: true(Back bubble disappears) + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0010_6', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0010_6 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean001"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let ButtonCom = await driver.findComponent(ON.id('UIComponentPopupBoxPopupOnWillDisMissBoolean0010')); + let pointButtonCenter = await ButtonCom.getBoundsCenter(); + await driver.click(pointButtonCenter.x, pointButtonCenter.y); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_BACK); + await driver.triggerKey(KeyCode.KEYCODE_BACK); + await driver.triggerKey(KeyCode.KEYCODE_BACK); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0010_6 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0060_1 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0060_1 + * @tc.desc CustomPopupOptions autoCancel:false. showInSubWindow:true. onWillDismiss: true(CustomPopup Bubble pops up) + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0060_1', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0060_1 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean006"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let ButtonCom = await driver.findComponent(ON.id('UIComponentPopupBoxPopupOnWillDisMissBoolean0060')); + let pointButtonCenter = await ButtonCom.getBoundsCenter(); + await driver.click(pointButtonCenter.x, pointButtonCenter.y); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0060_1 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0060_2 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0060_2 + * @tc.desc CustomPopupOptions autoCancel:false. showInSubWindow:true. onWillDismiss: true(Bubble retention) + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0060_2', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0060_2 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean006"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let ButtonCom = await driver.findComponent(ON.id('UIComponentPopupBoxPopupOnWillDisMissBoolean0060')); + let pointButtonCenter = await ButtonCom.getBoundsCenter(); + await driver.click(pointButtonCenter.x, pointButtonCenter.y); + await Utils.sleep(2000); + await driver.click(pointButtonCenter.x, pointButtonCenter.y - 100); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0060_2 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0060_3 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0060_3 + * @tc.desc CustomPopupOptions autoCancel:false. showInSubWindow:true. onWillDismiss: true(Left slide bubble disappears) + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0060_3', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0060_3 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean006"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let ButtonCom = await driver.findComponent(ON.id('UIComponentPopupBoxPopupOnWillDisMissBoolean0060')); + let pointButtonCenter = await ButtonCom.getBoundsCenter(); + await driver.click(pointButtonCenter.x, pointButtonCenter.y); + await Utils.sleep(2000); + await driver.drag(100, 100, 10, 100, 1000); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0060_3 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0060_4 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0060_4 + * @tc.desc CustomPopupOptions autoCancel:false. showInSubWindow:true. onWillDismiss: true(Right slide bubble disappears) + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0060_4', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0060_4 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean006"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let ButtonCom = await driver.findComponent(ON.id('UIComponentPopupBoxPopupOnWillDisMissBoolean0060')); + let pointButtonCenter = await ButtonCom.getBoundsCenter(); + await driver.click(pointButtonCenter.x, pointButtonCenter.y); + await Utils.sleep(2000); + await driver.drag(10, 100, 100, 100, 1000); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0060_4 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0060_5 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0060_5 + * @tc.desc CustomPopupOptions autoCancel:false. showInSubWindow:true. onWillDismiss: true(ESC bubble disappears) + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0060_5', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0060_5 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean006"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let ButtonCom = await driver.findComponent(ON.id('UIComponentPopupBoxPopupOnWillDisMissBoolean0060')); + let pointButtonCenter = await ButtonCom.getBoundsCenter(); + await driver.click(pointButtonCenter.x, pointButtonCenter.y); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_ESCAPE); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0060_5 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0060_6 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0060_6 + * @tc.desc CustomPopupOptions autoCancel:false. showInSubWindow:true. onWillDismiss: true(Back bubble disappears) + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0060_6', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0060_6 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean006"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let ButtonCom = await driver.findComponent(ON.id('UIComponentPopupBoxPopupOnWillDisMissBoolean0060')); + let pointButtonCenter = await ButtonCom.getBoundsCenter(); + await driver.click(pointButtonCenter.x, pointButtonCenter.y); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_BACK); + await driver.triggerKey(KeyCode.KEYCODE_BACK); + await driver.triggerKey(KeyCode.KEYCODE_BACK); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0060_6 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0100_1 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0100_1 + * @tc.desc CustomPopupOptions autoCancel:false. showInSubWindow:true. onWillDismiss: true(CustomPopup Bubble pops up) + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0100_1', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0100_1 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean010"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let ButtonCom = await driver.findComponent(ON.id('UIComponentPopupBoxPopupOnWillDisMissBoolean0100')); + let pointButtonCenter = await ButtonCom.getBoundsCenter(); + await driver.click(pointButtonCenter.x, pointButtonCenter.y); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0100_1 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0100_2 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0100_2 + * @tc.desc CustomPopupOptions autoCancel:false. showInSubWindow:true. onWillDismiss: true(Bubble disappearance) + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0100_2', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0100_2 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean010"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let ButtonCom = await driver.findComponent(ON.id('UIComponentPopupBoxPopupOnWillDisMissBoolean0100')); + let pointButtonCenter = await ButtonCom.getBoundsCenter(); + await driver.click(pointButtonCenter.x, pointButtonCenter.y); + await Utils.sleep(1000); + let ButtonCom1 = await driver.findComponent(ON.text('show=false')); + await ButtonCom1.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0100_2 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0100_3 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0100_3 + * @tc.desc CustomPopupOptions autoCancel:false. showInSubWindow:true. onWillDismiss: true(Left slide bubble disappears) + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0100_3', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0100_3 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean010"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let ButtonCom = await driver.findComponent(ON.id('UIComponentPopupBoxPopupOnWillDisMissBoolean0100')); + let pointButtonCenter = await ButtonCom.getBoundsCenter(); + await driver.click(pointButtonCenter.x, pointButtonCenter.y); + await Utils.sleep(2000); + await driver.drag(100, 100, 10, 100, 1000); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0100_3 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0100_4 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0100_4 + * @tc.desc CustomPopupOptions autoCancel:false. showInSubWindow:true. onWillDismiss: true(Right slide bubble disappears) + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0100_4', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0100_4 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean010"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let ButtonCom = await driver.findComponent(ON.id('UIComponentPopupBoxPopupOnWillDisMissBoolean0100')); + let pointButtonCenter = await ButtonCom.getBoundsCenter(); + await driver.click(pointButtonCenter.x, pointButtonCenter.y); + await Utils.sleep(2000); + await driver.drag(10, 100, 100, 100, 1000); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0100_4 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0100_5 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0100_5 + * @tc.desc CustomPopupOptions autoCancel:false. showInSubWindow:true. onWillDismiss: true(ESC bubble disappears) + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0100_5', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0100_5 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean010"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let ButtonCom = await driver.findComponent(ON.id('UIComponentPopupBoxPopupOnWillDisMissBoolean0100')); + let pointButtonCenter = await ButtonCom.getBoundsCenter(); + await driver.click(pointButtonCenter.x, pointButtonCenter.y); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_ESCAPE); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0100_5 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0100_6 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0100_6 + * @tc.desc CustomPopupOptions autoCancel:false. showInSubWindow:true. onWillDismiss: true(Back bubble disappears) + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0100_6', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0100_6 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean010"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let ButtonCom = await driver.findComponent(ON.id('UIComponentPopupBoxPopupOnWillDisMissBoolean0100')); + let pointButtonCenter = await ButtonCom.getBoundsCenter(); + await driver.click(pointButtonCenter.x, pointButtonCenter.y); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_BACK); + await driver.triggerKey(KeyCode.KEYCODE_BACK); + await driver.triggerKey(KeyCode.KEYCODE_BACK); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0100_6 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0020_1 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0020_1 + * @tc.desc Set PopupOptions to true, autoCancel:true showInSubWindow:true onWillDismiss: true + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0020_1', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0020_1 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean002"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let ButtonCom = await driver.findComponent(ON.id('UIComponentPopupBoxPopupOnWillDisMissBoolean0020')); + let pointButtonCenter = await ButtonCom.getBoundsCenter(); + await driver.click(pointButtonCenter.x, pointButtonCenter.y); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0020_1 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0020_2 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0020_2 + * @tc.desc Set CustomPopupOptions to true, autoCancel:true showInSubWindow:true onWillDismiss: true Exit with an empty dot + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0020_2', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0020_2 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean002"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let ButtonCom = await driver.findComponent(ON.id('UIComponentPopupBoxPopupOnWillDisMissBoolean0020')); + let pointButtonCenter = await ButtonCom.getBoundsCenter(); + await driver.click(pointButtonCenter.x, pointButtonCenter.y); + await Utils.sleep(2000); + await driver.click(pointButtonCenter.x, pointButtonCenter.y - 100); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0020_2 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0070_1 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0070_1 + * @tc.desc PopupOptions autoCancel:false. showInSubWindow:true. onWillDismiss: true(Popup Bubble pops up) + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0070_1', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0070_1 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean007"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let ButtonCom = await driver.findComponent(ON.id('UIComponentPopupBoxPopupOnWillDisMissBoolean0070')); + let pointButtonCenter = await ButtonCom.getBoundsCenter(); + await driver.click(pointButtonCenter.x, pointButtonCenter.y); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0070_1 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0070_2 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0070_2 + * @tc.desc PopupOptions autoCancel:false. showInSubWindow:true. onWillDismiss: true(Bubble disappearance) + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0070_2', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0070_2 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean007"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let ButtonCom = await driver.findComponent(ON.id('UIComponentPopupBoxPopupOnWillDisMissBoolean0070')); + let pointButtonCenter = await ButtonCom.getBoundsCenter(); + await driver.click(pointButtonCenter.x, pointButtonCenter.y); + await Utils.sleep(1000); + let ButtonCom1 = await driver.findComponent(ON.text('close')); + await ButtonCom1.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0070_2 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0070_3 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0070_3 + * @tc.desc PopupOptions autoCancel:false. showInSubWindow:true. onWillDismiss: true(Left slide bubble disappears) + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0070_3', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0070_3 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean007"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let ButtonCom = await driver.findComponent(ON.id('UIComponentPopupBoxPopupOnWillDisMissBoolean0070')); + let pointButtonCenter = await ButtonCom.getBoundsCenter(); + await driver.click(pointButtonCenter.x, pointButtonCenter.y); + await Utils.sleep(2000); + await driver.drag(100, 100, 10, 100, 1000); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0070_3 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0070_4 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0070_4 + * @tc.desc PopupOptions autoCancel:false. showInSubWindow:true. onWillDismiss: true(Right slide bubble disappears) + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0070_4', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0070_4 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean007"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let ButtonCom = await driver.findComponent(ON.id('UIComponentPopupBoxPopupOnWillDisMissBoolean0070')); + let pointButtonCenter = await ButtonCom.getBoundsCenter(); + await driver.click(pointButtonCenter.x, pointButtonCenter.y); + await Utils.sleep(2000); + await driver.drag(10, 100, 100, 100, 1000); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0070_4 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0070_5 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0070_5 + * @tc.desc PopupOptions autoCancel:false. showInSubWindow:true. onWillDismiss: true(ESC bubble disappears) + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0070_5', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0070_5 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean007"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let ButtonCom = await driver.findComponent(ON.id('UIComponentPopupBoxPopupOnWillDisMissBoolean0070')); + let pointButtonCenter = await ButtonCom.getBoundsCenter(); + await driver.click(pointButtonCenter.x, pointButtonCenter.y); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_ESCAPE); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0070_5 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0070_6 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0070_6 + * @tc.desc PopupOptions autoCancel:false. showInSubWindow:true. onWillDismiss: true(Back bubble disappears) + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0070_6', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0070_6 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean007"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let ButtonCom = await driver.findComponent(ON.id('UIComponentPopupBoxPopupOnWillDisMissBoolean0070')); + let pointButtonCenter = await ButtonCom.getBoundsCenter(); + await driver.click(pointButtonCenter.x, pointButtonCenter.y); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_BACK); + await driver.triggerKey(KeyCode.KEYCODE_BACK); + await driver.triggerKey(KeyCode.KEYCODE_BACK); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0070_6 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0110_1 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0110_1 + * @tc.desc PopupOptions autoCancel:false. showInSubWindow:true. onWillDismiss: true(Popup Bubble pops up) + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0110_1', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0110_1 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean011"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let ButtonCom = await driver.findComponent(ON.id('UIComponentPopupBoxPopupOnWillDisMissBoolean0110')); + let pointButtonCenter = await ButtonCom.getBoundsCenter(); + await driver.click(pointButtonCenter.x, pointButtonCenter.y); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0110_1 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0110_2 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0110_2 + * @tc.desc PopupOptions autoCancel:false. showInSubWindow:true. onWillDismiss: true(Bubble retention) + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0110_2', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0110_2 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean011"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let ButtonCom = await driver.findComponent(ON.id('UIComponentPopupBoxPopupOnWillDisMissBoolean0110')); + let pointButtonCenter = await ButtonCom.getBoundsCenter(); + await driver.click(pointButtonCenter.x, pointButtonCenter.y); + await Utils.sleep(1000); + await driver.click(pointButtonCenter.x, pointButtonCenter.y - 100); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0110_2 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0110_3 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0110_3 + * @tc.desc PopupOptions autoCancel:false. showInSubWindow:true. onWillDismiss: true(Left slide bubble retention) + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0110_3', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0110_3 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean011"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let ButtonCom = await driver.findComponent(ON.id('UIComponentPopupBoxPopupOnWillDisMissBoolean0110')); + let pointButtonCenter = await ButtonCom.getBoundsCenter(); + await driver.click(pointButtonCenter.x, pointButtonCenter.y); + await Utils.sleep(1000); + await driver.drag(100, 100, 10, 100, 1000); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0110_3 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0110_4 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0110_4 + * @tc.desc PopupOptions autoCancel:false. showInSubWindow:true. onWillDismiss: true(Right slide bubble retention) + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0110_4', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0110_4 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean011"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let ButtonCom = await driver.findComponent(ON.id('UIComponentPopupBoxPopupOnWillDisMissBoolean0110')); + let pointButtonCenter = await ButtonCom.getBoundsCenter(); + await driver.click(pointButtonCenter.x, pointButtonCenter.y); + await Utils.sleep(1000); + await driver.drag(10, 100, 100, 100, 1000); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0110_4 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0110_5 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0110_5 + * @tc.desc PopupOptions autoCancel:false. showInSubWindow:true. onWillDismiss: true(ESC bubble retention) + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0110_5', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0110_5 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean011"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let ButtonCom = await driver.findComponent(ON.id('UIComponentPopupBoxPopupOnWillDisMissBoolean0110')); + let pointButtonCenter = await ButtonCom.getBoundsCenter(); + await driver.click(pointButtonCenter.x, pointButtonCenter.y); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_ESCAPE); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0110_5 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0110_6 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0110_6 + * @tc.desc PopupOptions autoCancel:false. showInSubWindow:true. onWillDismiss: true(Back bubble retention) + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0110_6', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0110_6 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean011"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let ButtonCom = await driver.findComponent(ON.id('UIComponentPopupBoxPopupOnWillDisMissBoolean0110')); + let pointButtonCenter = await ButtonCom.getBoundsCenter(); + await driver.click(pointButtonCenter.x, pointButtonCenter.y); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_BACK); + await driver.triggerKey(KeyCode.KEYCODE_BACK); + await driver.triggerKey(KeyCode.KEYCODE_BACK); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0110_6 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0050_1 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0050_1 + * @tc.desc PopupOptions autoCancel:false. showInSubWindow:true. onWillDismiss: true(Popup Bubble pops up) + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0050_1', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0050_1 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean005"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let ButtonCom = await driver.findComponent(ON.id('UIComponentPopupBoxPopupOnWillDisMissBoolean0050')); + let pointButtonCenter = await ButtonCom.getBoundsCenter(); + await driver.click(pointButtonCenter.x, pointButtonCenter.y); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0050_1 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0050_2 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0050_2 + * @tc.desc PopupOptions autoCancel:false. showInSubWindow:true. onWillDismiss: true(Bubble disappearance) + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0050_2', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0050_2 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean005"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let ButtonCom = await driver.findComponent(ON.id('UIComponentPopupBoxPopupOnWillDisMissBoolean0050')); + let pointButtonCenter = await ButtonCom.getBoundsCenter(); + await driver.click(pointButtonCenter.x, pointButtonCenter.y); + await Utils.sleep(1000); + await driver.click(pointButtonCenter.x, pointButtonCenter.y - 100); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0050_2 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0050_3 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0050_3 + * @tc.desc PopupOptions autoCancel:false. showInSubWindow:true. onWillDismiss: true(Left slide bubble disappearance) + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0050_3', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0050_3 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean005"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let ButtonCom = await driver.findComponent(ON.id('UIComponentPopupBoxPopupOnWillDisMissBoolean0050')); + let pointButtonCenter = await ButtonCom.getBoundsCenter(); + await driver.click(pointButtonCenter.x, pointButtonCenter.y); + await Utils.sleep(1000); + await driver.drag(100, 100, 10, 100, 1000); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0050_3 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0050_4 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0050_4 + * @tc.desc PopupOptions autoCancel:false. showInSubWindow:true. onWillDismiss: true(Right slide bubble disappearance) + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0050_4', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0050_4 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean005"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let ButtonCom = await driver.findComponent(ON.id('UIComponentPopupBoxPopupOnWillDisMissBoolean0050')); + let pointButtonCenter = await ButtonCom.getBoundsCenter(); + await driver.click(pointButtonCenter.x, pointButtonCenter.y); + await Utils.sleep(1000); + await driver.drag(10, 100, 100, 100, 1000); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0050_4 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0050_5 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0050_5 + * + * @tc.desc PopupOptions autoCancel:false. showInSubWindow:true. onWillDismiss: true(ESC bubble disappearance) + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0050_5', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0050_5 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean005"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let ButtonCom = await driver.findComponent(ON.id('UIComponentPopupBoxPopupOnWillDisMissBoolean0050')); + let pointButtonCenter = await ButtonCom.getBoundsCenter(); + await driver.click(pointButtonCenter.x, pointButtonCenter.y); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_ESCAPE); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0050_5 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0050_6 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0050_6 + * @tc.desc PopupOptions autoCancel:false. showInSubWindow:true. onWillDismiss: true(Back bubble disappearance) + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0050_6', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0050_6 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean005"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let ButtonCom = await driver.findComponent(ON.id('UIComponentPopupBoxPopupOnWillDisMissBoolean0050')); + let pointButtonCenter = await ButtonCom.getBoundsCenter(); + await driver.click(pointButtonCenter.x, pointButtonCenter.y); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_BACK); + await driver.triggerKey(KeyCode.KEYCODE_BACK); + await driver.triggerKey(KeyCode.KEYCODE_BACK); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0050_6 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0120_1 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0120_1 + * @tc.desc PopupOptions autoCancel:false. showInSubWindow:true. onWillDismiss: true(Popup Bubble pops up) + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0120_1', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0120_1 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean012"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let ButtonCom = await driver.findComponent(ON.id('UIComponentPopupBoxPopupOnWillDisMissBoolean0120')); + let pointButtonCenter = await ButtonCom.getBoundsCenter(); + await driver.click(pointButtonCenter.x, pointButtonCenter.y); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0120_1 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0120_2 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0120_2 + * @tc.desc PopupOptions autoCancel:false. showInSubWindow:true. onWillDismiss: true(Bubble disappearance) + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0120_2', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0120_2 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean012"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let ButtonCom = await driver.findComponent(ON.id('UIComponentPopupBoxPopupOnWillDisMissBoolean0120')); + let pointButtonCenter = await ButtonCom.getBoundsCenter(); + await driver.click(pointButtonCenter.x, pointButtonCenter.y); + await Utils.sleep(1000); + await driver.click(pointButtonCenter.x, pointButtonCenter.y - 100); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0120_2 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0120_3 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0120_3 + * @tc.desc PopupOptions autoCancel:false. showInSubWindow:true. onWillDismiss: true(Left slide bubble disappearance) + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0120_3', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0120_3 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean012"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let ButtonCom = await driver.findComponent(ON.id('UIComponentPopupBoxPopupOnWillDisMissBoolean0120')); + let pointButtonCenter = await ButtonCom.getBoundsCenter(); + await driver.click(pointButtonCenter.x, pointButtonCenter.y); + await Utils.sleep(1000); + await driver.drag(100, 100, 10, 100, 1000); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0120_3 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0120_4 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0120_4 + * @tc.desc PopupOptions autoCancel:false. showInSubWindow:true. onWillDismiss: true(Right slide bubble disappearance) + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0120_4', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0120_4 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean012"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let ButtonCom = await driver.findComponent(ON.id('UIComponentPopupBoxPopupOnWillDisMissBoolean0120')); + let pointButtonCenter = await ButtonCom.getBoundsCenter(); + await driver.click(pointButtonCenter.x, pointButtonCenter.y); + await Utils.sleep(1000); + await driver.drag(10, 100, 100, 100, 1000); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0120_4 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0120_5 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0120_5 + * + * @tc.desc PopupOptions autoCancel:false. showInSubWindow:true. onWillDismiss: true(ESC bubble disappearance) + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0120_5', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0120_5 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean012"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let ButtonCom = await driver.findComponent(ON.id('UIComponentPopupBoxPopupOnWillDisMissBoolean0120')); + let pointButtonCenter = await ButtonCom.getBoundsCenter(); + await driver.click(pointButtonCenter.x, pointButtonCenter.y); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_ESCAPE); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0120_5 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0120_6 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0120_6 + * @tc.desc PopupOptions autoCancel:false. showInSubWindow:true. onWillDismiss: true(Back bubble disappearance) + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0120_6', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0120_6 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean012"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let ButtonCom = await driver.findComponent(ON.id('UIComponentPopupBoxPopupOnWillDisMissBoolean0120')); + let pointButtonCenter = await ButtonCom.getBoundsCenter(); + await driver.click(pointButtonCenter.x, pointButtonCenter.y); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_BACK); + await driver.triggerKey(KeyCode.KEYCODE_BACK); + await driver.triggerKey(KeyCode.KEYCODE_BACK); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_POPUP_ONWILLDISMISSBOOLEAN_0120_6 finish.`); + done(); + }) + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupBoxPromptToastSequenceTest/UIComponentPopupBoxPromptToastSequence.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupBoxPromptToastSequenceTest/UIComponentPopupBoxPromptToastSequence.test.ets index a5589bad6bf1432e1c40456152c8fb24fc1f4949..46d6ce0066ffa6929ed66c0df8fd2d3e2084d426 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupBoxPromptToastSequenceTest/UIComponentPopupBoxPromptToastSequence.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupBoxPromptToastSequenceTest/UIComponentPopupBoxPromptToastSequence.test.ets @@ -37,7 +37,21 @@ import { Driver, ON } from '@ohos.UiTest' export default function UIComponentPopupBoxPromptToastSequence() { describe('UIComponentPopupBoxPromptToastSequence', () => { + afterEach(async (done: Function) => { + if (Settings.windowClass == undefined) { + return; + } + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`); + return; + } + Logger.info('TEST', `Succeeded in destroy the window.`); + }) + await Utils.sleep(1000); + done(); + }) /* * @tc.number SUB_ACE_Ul_COMPONENT_POPUPBOX_PROMPT_TOASTSEQUENCE_0020 @@ -250,5 +264,45 @@ export default function UIComponentPopupBoxPromptToastSequence() { Logger.info('TEST', `SUB_ACE_Ul_COMPONENT_POPUPBOX_PROMPT_TOASTSEQUENCE_0060 finish.`); done(); }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_PROMPT_TOASTSEQUENCE_0100 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_PROMPT_TOASTSEQUENCE_0100 + * @tc.desc showMode is TOP_MOST,Toast is displayed above the app, popup and toast popup at the same time, showInSubwindow is true + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_PROMPT_TOASTSEQUENCE_0100', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_PROMPT_TOASTSEQUENCE_0100 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxPromptToastSequence/UIComponentPopupBoxPromptToastSequence010"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let ButtonCom = await driver.findComponent(ON.id("UIComponentPopupBoxPromptToastSequence0100")); + let pointButtonCenter = await ButtonCom.getBoundsCenter(); + await driver.click(pointButtonCenter.x, pointButtonCenter.y); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_PROMPT_TOASTSEQUENCE_0100 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_PROMPT_TOASTSEQUENCE_0010 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_PROMPT_TOASTSEQUENCE_0010 + * @tc.desc showMode is TOP_MOST,Toast is displayed above the app, popup and toast popup at the same time, showInSubwindow is true + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_PROMPT_TOASTSEQUENCE_0010', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_PROMPT_TOASTSEQUENCE_0010 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxPromptToastSequence/UIComponentPopupBoxPromptToastSequence001"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let ButtonCom = await driver.findComponent(ON.id("UIComponentPopupBoxPromptToastSequence0010")); + let pointButtonCenter = await ButtonCom.getBoundsCenter(); + await driver.click(pointButtonCenter.x, pointButtonCenter.y); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_PROMPT_TOASTSEQUENCE_0010 finish.`); + done(); + }) }) } diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupBoxSpecificationsPopupTest/UIComponentPopupBoxSpecificationsPopup.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupBoxSpecificationsPopupTest/UIComponentPopupBoxSpecificationsPopup.test.ets index 4b584d61470bf4bdb306a6f24f40bfd5df091b91..429b8fb99708f201cabeb1a9e37f8cc2c1eb45c6 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupBoxSpecificationsPopupTest/UIComponentPopupBoxSpecificationsPopup.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupBoxSpecificationsPopupTest/UIComponentPopupBoxSpecificationsPopup.test.ets @@ -37,7 +37,21 @@ import { Driver, ON } from '@ohos.UiTest' export default function UIComponentPopupBoxSpecificationsPopup() { describe('UIComponentPopupBoxSpecificationsPopup', () => { + afterEach(async (done: Function) => { + if (Settings.windowClass == undefined) { + return; + } + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`); + return; + } + Logger.info('TEST', `Succeeded in destroy the window.`); + }) + await Utils.sleep(1000); + done(); + }) /* * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_POPUP_0010 @@ -53,7 +67,7 @@ export default function UIComponentPopupBoxSpecificationsPopup() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(5000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_POPUP_0010 finish.`); done(); @@ -73,7 +87,7 @@ export default function UIComponentPopupBoxSpecificationsPopup() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(5000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_POPUP_0020 finish.`); done(); @@ -93,7 +107,7 @@ export default function UIComponentPopupBoxSpecificationsPopup() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(5000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_POPUP_0030 finish.`); done(); @@ -113,7 +127,7 @@ export default function UIComponentPopupBoxSpecificationsPopup() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(5000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_POPUP_0040 finish.`); done(); @@ -133,7 +147,7 @@ export default function UIComponentPopupBoxSpecificationsPopup() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(5000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_POPUP_0050 finish.`); done(); @@ -153,7 +167,7 @@ export default function UIComponentPopupBoxSpecificationsPopup() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(5000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_POPUP_0060 finish.`); done(); diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupBoxSpecificationsShadowTest/UIComponentPopupBoxSpecificationsShadow.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupBoxSpecificationsShadowTest/UIComponentPopupBoxSpecificationsShadow.test.ets index d1ef9fb3eb5b5fd0fd601ff3a9108f0bbdf14aec..f873812396e1d2fcb2398dbdff617e3ca21fa78f 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupBoxSpecificationsShadowTest/UIComponentPopupBoxSpecificationsShadow.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupBoxSpecificationsShadowTest/UIComponentPopupBoxSpecificationsShadow.test.ets @@ -37,7 +37,21 @@ import { Driver, ON } from '@ohos.UiTest' export default function UIComponentPopupBoxSpecificationsShadow() { describe('UIComponentPopupBoxSpecificationsShadow', () => { + afterEach(async (done: Function) => { + if (Settings.windowClass == undefined) { + return + } + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`) + return; + } + Logger.info('TEST', `Succeeded in destroy the window.`); + }) + await Utils.sleep(1000); + done() + }) /* * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_SHADOW_0200 @@ -53,7 +67,7 @@ export default function UIComponentPopupBoxSpecificationsShadow() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(3000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_SHADOW_0200 finish.`); done(); @@ -73,7 +87,7 @@ export default function UIComponentPopupBoxSpecificationsShadow() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(3000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_SHADOW_0170 finish.`); done(); @@ -93,7 +107,7 @@ export default function UIComponentPopupBoxSpecificationsShadow() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(3000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_SHADOW_0120 finish.`); done(); @@ -113,7 +127,7 @@ export default function UIComponentPopupBoxSpecificationsShadow() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(3000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_SHADOW_0180 finish.`); done(); @@ -133,7 +147,7 @@ export default function UIComponentPopupBoxSpecificationsShadow() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(3000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_SHADOW_0130 finish.`); done(); @@ -153,7 +167,7 @@ export default function UIComponentPopupBoxSpecificationsShadow() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(3000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_SHADOW_0140 finish.`); done(); @@ -173,7 +187,7 @@ export default function UIComponentPopupBoxSpecificationsShadow() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(3000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_SHADOW_0160 finish.`); done(); @@ -193,7 +207,7 @@ export default function UIComponentPopupBoxSpecificationsShadow() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(3000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_SHADOW_0210 finish.`); done(); @@ -213,7 +227,7 @@ export default function UIComponentPopupBoxSpecificationsShadow() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(3000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_SHADOW_0220 finish.`); done(); @@ -233,10 +247,90 @@ export default function UIComponentPopupBoxSpecificationsShadow() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(3000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_SHADOW_0830 finish.`); done(); }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_SHADOW_0100 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_SHADOW_0100 + * @tc.desc LoadingDialog configures shadow ({radius: reference 30vp,type: ShadowType.BLUR,color: "FF00FF",offsetX: references 30vp,offsetY: references 30vp,fill:false}) + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_SHADOW_0100', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_SHADOW_0100 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxSpecificationsShadow/UIComponentPopupBoxSpecificationsShadow010"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let ButtonCom = await driver.findComponent(ON.id("UIComponentPopupBoxSpecificationsShadow0100")); + let pointButtonCenter = await ButtonCom.getBoundsCenter(); + await driver.click(pointButtonCenter.x, pointButtonCenter.y); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_SHADOW_0100 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_SHADOW_0190 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_SHADOW_0190 + * @tc.desc SelectDialog configures shadow ({radius: reference 100vp,type: ShadowType.COLOR,color: ColoringStrategy.INVERT,offsetX: references 100vp,offsetY: references 100vp,fill:false}) + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_SHADOW_0190', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_SHADOW_0190 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxSpecificationsShadow/UIComponentPopupBoxSpecificationsShadow019"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let ButtonCom = await driver.findComponent(ON.id("UIComponentPopupBoxSpecificationsShadow0190")); + let pointButtonCenter = await ButtonCom.getBoundsCenter(); + await driver.click(pointButtonCenter.x, pointButtonCenter.y); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_SHADOW_0190 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_SHADOW_0900 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_SHADOW_0900 + * @tc.desc Set default values: SelectDialog Configure shadow (ShadowStyle.OUTER_DEFAULT_MD) + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_SHADOW_0900', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_SHADOW_0900 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxSpecificationsShadow/UIComponentPopupBoxSpecificationsShadow090"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let ButtonCom = await driver.findComponent(ON.id("UIComponentPopupBoxSpecificationsShadow0900")); + let pointButtonCenter = await ButtonCom.getBoundsCenter(); + await driver.click(pointButtonCenter.x, pointButtonCenter.y); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_SHADOW_0900 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_SHADOW_0970 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_SHADOW_0970 + * @tc.desc Not configured: The SelectDialog does not configure shadow + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_SHADOW_0970', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_SHADOW_0970 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxSpecificationsShadow/UIComponentPopupBoxSpecificationsShadow097"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let ButtonCom = await driver.findComponent(ON.id("UIComponentPopupBoxSpecificationsShadow0970")); + let pointButtonCenter = await ButtonCom.getBoundsCenter(); + await driver.click(pointButtonCenter.x, pointButtonCenter.y); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_SHADOW_0970 finish.`); + done(); + }) }) } \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupBoxSpecificationsTest/UIComponentPopupBoxSpecifications.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupBoxSpecificationsTest/UIComponentPopupBoxSpecifications.test.ets index df8f62febaa7068ff33755e9427ac27829cdfb9c..5e33568d185088908b761a6b562aefd1414abf03 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupBoxSpecificationsTest/UIComponentPopupBoxSpecifications.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupBoxSpecificationsTest/UIComponentPopupBoxSpecifications.test.ets @@ -37,7 +37,21 @@ import { Driver, ON } from '@ohos.UiTest' export default function UIComponentPopupBoxSpecifications() { describe('UIComponentPopupBoxSpecifications', () => { - + afterEach(async (done: Function) => { + if (Settings.windowClass == undefined) { + return; + } + + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`); + return; + } + Logger.info('TEST', `Succeeded in destroy the window.`); + }) + await Utils.sleep(1000); + done(); + }) /* * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0610 @@ -53,7 +67,7 @@ export default function UIComponentPopupBoxSpecifications() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0610 finish.`); done(); @@ -73,7 +87,7 @@ export default function UIComponentPopupBoxSpecifications() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0600 finish.`); done(); @@ -93,7 +107,7 @@ export default function UIComponentPopupBoxSpecifications() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0590 finish.`); done(); @@ -113,7 +127,7 @@ export default function UIComponentPopupBoxSpecifications() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0620 finish.`); done(); @@ -133,7 +147,7 @@ export default function UIComponentPopupBoxSpecifications() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0690 finish.`); done(); @@ -154,7 +168,7 @@ export default function UIComponentPopupBoxSpecifications() { ; await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0640 finish.`); done(); @@ -174,7 +188,7 @@ export default function UIComponentPopupBoxSpecifications() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0650 finish.`); done(); @@ -194,7 +208,7 @@ export default function UIComponentPopupBoxSpecifications() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0790 finish.`); done(); @@ -214,7 +228,7 @@ export default function UIComponentPopupBoxSpecifications() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0800 finish.`); done(); @@ -234,7 +248,7 @@ export default function UIComponentPopupBoxSpecifications() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0710 finish.`); done(); @@ -254,7 +268,7 @@ export default function UIComponentPopupBoxSpecifications() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0720 finish.`); done(); @@ -274,7 +288,7 @@ export default function UIComponentPopupBoxSpecifications() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0630 finish.`); done(); @@ -294,7 +308,7 @@ export default function UIComponentPopupBoxSpecifications() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0700 finish.`); done(); @@ -314,7 +328,7 @@ export default function UIComponentPopupBoxSpecifications() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0670 finish.`); done(); @@ -334,7 +348,7 @@ export default function UIComponentPopupBoxSpecifications() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0660 finish.`); done(); @@ -355,7 +369,7 @@ export default function UIComponentPopupBoxSpecifications() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0740 finish.`); done(); @@ -375,7 +389,7 @@ export default function UIComponentPopupBoxSpecifications() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0680 finish.`); done(); @@ -395,7 +409,7 @@ export default function UIComponentPopupBoxSpecifications() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0730 finish.`); done(); @@ -416,7 +430,7 @@ export default function UIComponentPopupBoxSpecifications() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0830 finish.`); done(); @@ -437,7 +451,7 @@ export default function UIComponentPopupBoxSpecifications() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0760 finish.`); done(); @@ -458,7 +472,7 @@ export default function UIComponentPopupBoxSpecifications() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0750 finish.`); done(); @@ -479,7 +493,7 @@ export default function UIComponentPopupBoxSpecifications() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0780 finish.`); done(); @@ -499,7 +513,7 @@ export default function UIComponentPopupBoxSpecifications() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0810 finish.`); done(); @@ -520,7 +534,7 @@ export default function UIComponentPopupBoxSpecifications() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0770 finish.`); done(); @@ -540,7 +554,7 @@ export default function UIComponentPopupBoxSpecifications() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0840 finish.`); done(); @@ -560,7 +574,7 @@ export default function UIComponentPopupBoxSpecifications() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0850 finish.`); done(); @@ -580,7 +594,7 @@ export default function UIComponentPopupBoxSpecifications() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0820 finish.`); done(); @@ -600,10 +614,172 @@ export default function UIComponentPopupBoxSpecifications() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0580 finish.`); done(); }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0390 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0390 + * @tc.desc show custom dialog + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0390', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0390 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxSpecifications/UIComponentPopupBoxSpecifications039"); + await Utils.sleep(500); + let driver: Driver = Driver.create(); + let button = await driver.findComponent(ON.id("UIComponentPopupBoxSpecifications0390")); + await Utils.sleep(500); + await button?.click() + await Utils.sleep(500); + let confirm = await driver.findComponent(ON.text("confirm")); + await Utils.sleep(500); + await confirm?.click() + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0390 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0400 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0400 + * @tc.desc show Alert dialog + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0400', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0400 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxSpecifications/UIComponentPopupBoxSpecifications040"); + await Utils.sleep(500); + let driver: Driver = Driver.create(); + let button = await driver.findComponent(ON.id("UIComponentPopupBoxSpecifications0400")); + await Utils.sleep(500); + await button?.click() + await Utils.sleep(500); + let confirm = await driver.findComponent(ON.text("confirm")); + await Utils.sleep(500); + await confirm?.click() + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0400 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0410 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0410 + * @tc.desc show ActionSheet dialog + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0410', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0410 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxSpecifications/UIComponentPopupBoxSpecifications041"); + await Utils.sleep(500); + let driver: Driver = Driver.create(); + let button = await driver.findComponent(ON.id("UIComponentPopupBoxSpecifications0410")); + await Utils.sleep(500); + await button?.click() + await Utils.sleep(500); + let confirm = await driver.findComponent(ON.text("confirm")); + await Utils.sleep(500); + await confirm?.click() + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0410 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0450 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0450 + * @tc.desc show customPopup + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0450', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0450 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxSpecifications/UIComponentPopupBoxSpecifications045"); + await Utils.sleep(500); + let driver: Driver = Driver.create(); + let button = await driver.findComponent(ON.id("UIComponentPopupBoxSpecifications0450_1")); + await Utils.sleep(500); + await button?.click() + await Utils.sleep(500); + let confirm = await driver.findComponent(ON.id("UIComponentPopupBoxSpecifications0450_2")); + await Utils.sleep(500); + await confirm?.click() + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0450 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0460 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0460 + * @tc.desc show prompt + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0460', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0460 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxSpecifications/UIComponentPopupBoxSpecifications046"); + await Utils.sleep(500); + let driver: Driver = Driver.create(); + let button = await driver.findComponent(ON.id("UIComponentPopupBoxSpecifications0460")); + await Utils.sleep(500); + await button?.click() + await Utils.sleep(500); + let confirm = await driver.findComponent(ON.text("confirm")); + await Utils.sleep(500); + await confirm?.click() + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0460 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0470 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0470 + * @tc.desc promptAction dialog + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0470', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0470 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxSpecifications/UIComponentPopupBoxSpecifications047"); + await Utils.sleep(500); + let driver: Driver = Driver.create(); + let button = await driver.findComponent(ON.id("UIComponentPopupBoxSpecifications0470")); + await Utils.sleep(500); + await button?.click() + await Utils.sleep(500); + let confirm = await driver.findComponent(ON.text("confirm")); + await Utils.sleep(500); + await confirm?.click() + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0470 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0480 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0480 + * @tc.desc show menu + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0480', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0480 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxSpecifications/UIComponentPopupBoxSpecifications048"); + await Utils.sleep(500); + let driver: Driver = Driver.create(); + let button = await driver.findComponent(ON.id("UIComponentPopupBoxSpecifications0480")); + await Utils.sleep(500); + await button?.click() + await Utils.sleep(1000); + await driver?.click(50, 400) + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_SPECIFICATIONS_0480 finish.`); + done(); + }) + }) } diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupBoxStyleStrongTest/UIComponentPopupBoxStyleStrong.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupBoxStyleStrongTest/UIComponentPopupBoxStyleStrong.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..ab9ab3a8ea5d041d1c38d5cddccbf2fad9781884 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupBoxStyleStrongTest/UIComponentPopupBoxStyleStrong.test.ets @@ -0,0 +1,117 @@ +/* + * Copyright (C) 2024 Huawei Device 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 { afterEach, describe, it } from '@ohos/hypium'; +import Settings from '../model/Settings'; +import windowSnap from '../model/snapShot'; +import Logger from '../model/Logger'; +import Utils from '../model/Utils'; +import { Component, Driver, ON } from '@ohos.UiTest'; + +/* + * + * Settings.createWindow(config.url): + * 创建窗口,更改窗口基本配置,更改方式详见model/Settings createWindow方法 + * + * windowSnap.snapShot(globalThis.context): + * 窗口截屏&图片文件保存,存储在设备端 + * 存储文件固定,单挑用例执行后覆盖,用于自动化UI对比 + * 支持调试更改文件名为时间戳格式,更改model/snapShot createAndGetFile方法 注释L35,放开L32,L33 + * + * Logger日志使用方法: + * import Logger form './model/Logger' + * Logger.info(TAG,`config = ${config}, err = ${JSON.stringify(exception)}`) + * */ + +export default function UIComponentPopupBoxStyleStrong() { + + describe('UIComponentPopupBoxStyleStrong', () => { + afterEach(async (done: Function) => { + if (Settings.windowClass == undefined) { + return; + } + + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`); + return; + } + Logger.info('TEST', `Succeeded in destroy the window.`); + }) + await Utils.sleep(1000); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_STYLESTRONG_0270 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_STYLESTRONG_0270 + * @tc.desc PromptAction.ShowDialog The default value + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_STYLESTRONG_0270', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_STYLESTRONG_0270 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxStyleStrong/UIComponentPopupBoxStyleStrong027"); + await Utils.sleep(500); + let driver: Driver = Driver.create(); + let button: Component = + await driver.findComponent(ON.id('UIComponentPopupBoxStyleStrong0270')); + await button?.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_STYLESTRONG_0270 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_STYLESTRONG_0260_1 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_STYLESTRONG_0260_1 + * @tc.desc PromptAction.ShowDialog Default material + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_STYLESTRONG_0260_1', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_STYLESTRONG_0260_1 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxStyleStrong/UIComponentPopupBoxStyleStrong026"); + await Utils.sleep(500); + let driver: Driver = Driver.create(); + let button: Component = + await driver.findComponent(ON.id('UIComponentPopupBoxStyleStrong0260')); + await button?.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_STYLESTRONG_0260_1 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_STYLESTRONG_0260_2 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_STYLESTRONG_0260_2 + * @tc.desc PromptAction.ShowDialog Specifies the mode paste material + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_STYLESTRONG_0260_2', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_STYLESTRONG_0260_2 start.`); + Settings.createWindow("testability/pages/UIComponentPopupBoxStyleStrong/UIComponentPopupBoxStyleStrong026"); + await Utils.sleep(500); + let driver: Driver = Driver.create(); + let button: Component = + await driver.findComponent(ON.id('UIComponentPopupBoxStyleStrong0261')); + await button?.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_STYLESTRONG_0260_2 finish.`); + done(); + }) + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupBoxToastStyleInterfaceTest/UIComponentPopupBoxToastStyleInterface001.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupBoxToastStyleInterfaceTest/UIComponentPopupBoxToastStyleInterface001.test.ets index 4ba11fad1d659f692e0920ed9c71ee9f8e36897b..ae4dd883469ba13d771368efdb36d66df13f47bc 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupBoxToastStyleInterfaceTest/UIComponentPopupBoxToastStyleInterface001.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupBoxToastStyleInterfaceTest/UIComponentPopupBoxToastStyleInterface001.test.ets @@ -39,6 +39,21 @@ import uiAppearance from '@ohos.uiAppearance' export default function UIComponentPopupBoxToastStyleInterface001() { describe('UIComponentPopupBoxToastStyleInterface001', () => { + afterEach(async (done: Function) => { + if (Settings.windowClass == undefined) { + return + } + + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`) + return; + } + Logger.info('TEST', `Succeeded in destroy the window.`); + }) + await Utils.sleep(1000); + done(); + }) /* @@ -56,11 +71,19 @@ export default function UIComponentPopupBoxToastStyleInterface001() { await Utils.sleep(500) await button?.click() await Utils.sleep(500) - uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_DARK) + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_DARK).then(() => { + console.info('Set dark-mode successfully.'); + }).catch((error:Error) => { + console.error('Set dark-mode failed, ' + error.message); + }); await Utils.sleep(1000) windowSnap.snapShot() await Utils.sleep(500) - uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT) + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Set light-mode successfully.'); + }).catch((error:Error) => { + console.error('Set light-mode failed, ' + error.message); + }); await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_Ul_COMPONENT_POPUPBOX_PROMPT_TOASTSTYLE_0010 finish.`); done() @@ -81,11 +104,19 @@ export default function UIComponentPopupBoxToastStyleInterface001() { await Utils.sleep(500) await button?.click() await Utils.sleep(500) - uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_DARK) + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_DARK).then(() => { + console.info('Set dark-mode successfully.'); + }).catch((error:Error) => { + console.error('Set dark-mode failed, ' + error.message); + }); await Utils.sleep(1000) windowSnap.snapShot() await Utils.sleep(500) - uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT) + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Set light-mode successfully.'); + }).catch((error:Error) => { + console.error('Set light-mode failed, ' + error.message); + }); await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_Ul_COMPONENT_POPUPBOX_PROMPT_TOASTSTYLE_0020 finish.`); done() diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupPromptInterfaceTest/UIComponentPopupPromptInterface001.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupPromptInterfaceTest/UIComponentPopupPromptInterface001.test.ets index f6d927187a6c1ecb829392b3e1f08aeb7b95a4cb..64d9595f393b66da5efdac3ba009cdc4252533eb 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupPromptInterfaceTest/UIComponentPopupPromptInterface001.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupPromptInterfaceTest/UIComponentPopupPromptInterface001.test.ets @@ -38,7 +38,21 @@ import { Component, Driver, MouseButton, ON } from '@ohos.UiTest' export default function UIComponentPopupPromptInterface001() { describe('UIComponentPopupPromptInterface001', () => { + afterEach(async (done: Function) => { + if (Settings.windowClass == undefined) { + return + } + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`) + return; + } + Logger.info('TEST', `Succeeded in destroy the window.`); + }) + await Utils.sleep(1000); + done() + }) /* * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_PROMPT_INTERFACE_0290 @@ -55,7 +69,7 @@ export default function UIComponentPopupPromptInterface001() { await Utils.sleep(500) await button?.click() await Utils.sleep(1500) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_PROMPT_INTERFACE_0290 finish.`); done() @@ -80,7 +94,7 @@ export default function UIComponentPopupPromptInterface001() { await Utils.sleep(500) await button?.click() await Utils.sleep(3000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_PROMPT_INTERFACE_0300 finish.`); done() @@ -105,7 +119,7 @@ export default function UIComponentPopupPromptInterface001() { await Utils.sleep(500) await button?.click() await Utils.sleep(3000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_PROMPT_INTERFACE_0310 finish.`); done() @@ -126,7 +140,7 @@ export default function UIComponentPopupPromptInterface001() { await Utils.sleep(500) await button?.click() await Utils.sleep(3000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_PROMPT_INTERFACE_0270 finish.`); done() @@ -151,7 +165,7 @@ export default function UIComponentPopupPromptInterface001() { await Utils.sleep(500) await button?.click() await Utils.sleep(3000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_PROMPT_INTERFACE_0280 finish.`); done() @@ -176,7 +190,7 @@ export default function UIComponentPopupPromptInterface001() { await Utils.sleep(500) await button?.click() await Utils.sleep(3000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_PROMPT_INTERFACE_0250 finish.`); done() @@ -201,7 +215,7 @@ export default function UIComponentPopupPromptInterface001() { await Utils.sleep(500) await button?.click() await Utils.sleep(3000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_PROMPT_INTERFACE_0320 finish.`); done() @@ -225,7 +239,7 @@ export default function UIComponentPopupPromptInterface001() { await Utils.sleep(500) await button?.click() await Utils.sleep(3000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_PROMPT_INTERFACE_0260 finish.`); done() @@ -246,7 +260,7 @@ export default function UIComponentPopupPromptInterface001() { await Utils.sleep(500) await button?.click() await Utils.sleep(3000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_PROMPT_INTERFACE_0220 finish.`); done() @@ -271,7 +285,7 @@ export default function UIComponentPopupPromptInterface001() { await Utils.sleep(500) await button?.click() await Utils.sleep(3000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_PROMPT_INTERFACE_0230 finish.`); done() @@ -296,7 +310,7 @@ export default function UIComponentPopupPromptInterface001() { await Utils.sleep(500) await item?.click() await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_PROMPT_INTERFACE_0010 finish.`); done() @@ -307,7 +321,7 @@ export default function UIComponentPopupPromptInterface001() { * @tc.desc show ActionMenu 异步返回result */ it('SUB_ACE_UI_COMPONENT_POPUPBOX_PROMPT_INTERFACE_0020', 0, async (done: Function) => { - Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_PROMPT_INTERFACE_0010 start.`); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_PROMPT_INTERFACE_0020 start.`); Settings.createWindow("testability/pages/UIComponentPopupPromptInterface/UIComponentPopupPromptInterface006") await Utils.sleep(500) let driver: Driver = Driver.create() @@ -320,9 +334,9 @@ export default function UIComponentPopupPromptInterface001() { await Utils.sleep(500) await item?.click() await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) - Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_PROMPT_INTERFACE_0010 finish.`); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_PROMPT_INTERFACE_0020 finish.`); done() }) /* @@ -340,7 +354,7 @@ export default function UIComponentPopupPromptInterface001() { await Utils.sleep(500) await button?.click() await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_PROMPT_INTERFACE_0040 finish.`); done() @@ -361,7 +375,7 @@ export default function UIComponentPopupPromptInterface001() { await Utils.sleep(500) await button?.click() await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_PROMPT_INTERFACE_0110 finish.`); done() @@ -382,7 +396,7 @@ export default function UIComponentPopupPromptInterface001() { await Utils.sleep(500) await button?.click() await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_PROMPT_INTERFACE_0080 finish.`); done() @@ -402,7 +416,7 @@ export default function UIComponentPopupPromptInterface001() { await Utils.sleep(500) await button?.click() await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_PROMPT_INTERFACE_0120 finish.`); done() @@ -426,7 +440,7 @@ export default function UIComponentPopupPromptInterface001() { await Utils.sleep(500) await item?.click() await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_PROMPT_INTERFACE_0140 finish.`); done() @@ -451,7 +465,7 @@ export default function UIComponentPopupPromptInterface001() { await Utils.sleep(500) await item?.click() await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_PROMPT_INTERFACE_0130 finish.`); done() @@ -471,7 +485,7 @@ export default function UIComponentPopupPromptInterface001() { await Utils.sleep(500) await button?.click() await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_PROMPT_INTERFACE_0200 finish.`); done() @@ -491,7 +505,7 @@ export default function UIComponentPopupPromptInterface001() { await Utils.sleep(500) await button?.click() await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_PROMPT_INTERFACE_0210 finish.`); done() @@ -512,7 +526,7 @@ export default function UIComponentPopupPromptInterface001() { await Utils.sleep(500) await button?.click() await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_PROMPT_INTERFACE_0150 finish.`); done() @@ -532,7 +546,7 @@ export default function UIComponentPopupPromptInterface001() { await Utils.sleep(500) await button?.click() await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_PROMPT_INTERFACE_0160 finish.`); done() @@ -553,7 +567,7 @@ export default function UIComponentPopupPromptInterface001() { await Utils.sleep(500) await button?.click() await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_PROMPT_INTERFACE_0190 finish.`); done() @@ -574,7 +588,7 @@ export default function UIComponentPopupPromptInterface001() { await Utils.sleep(500) await button?.click() await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_PROMPT_INTERFACE_0170 finish.`); done() @@ -595,11 +609,30 @@ export default function UIComponentPopupPromptInterface001() { await Utils.sleep(500) await button?.click() await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_PROMPT_INTERFACE_0180 finish.`); done() }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_PROMPT_INTERFACE_0100 + * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_PROMPT_INTERFACE_0100 + * @tc.desc show Dialog test not set message + */ + it('SUB_ACE_UI_COMPONENT_POPUPBOX_PROMPT_INTERFACE_0100', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_PROMPT_INTERFACE_0100 start.`); + Settings.createWindow("testability/pages/UIComponentPopupPromptInterface/UIComponentPopupPromptInterface0013") + await Utils.sleep(2000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentPopupPromptInterface00130')) + await button?.click() + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_PROMPT_INTERFACE_0100 finish.`); + done() + }) + }) } diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupboxCalendarpickerInterfaceTest/UIComponentPopupboxCalendarpickerInterface.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupboxCalendarpickerInterfaceTest/UIComponentPopupboxCalendarpickerInterface.test.ets index 56efac85bdcdde66b20abef1be9ebb5a36e2bfd4..f7ecdfbd13a396ad257347da005cd049fa6db5a3 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupboxCalendarpickerInterfaceTest/UIComponentPopupboxCalendarpickerInterface.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupboxCalendarpickerInterfaceTest/UIComponentPopupboxCalendarpickerInterface.test.ets @@ -23,7 +23,20 @@ import { Driver, MouseButton, ON } from '@kit.TestKit'; export default function UIComponentPopupboxCalendarpickerInterface() { describe('UIComponentPopupboxCalendarpickerInterface', () => { - + afterEach(async (done: Function) => { + if (Settings.windowClass == undefined) { + return; + } + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`); + return; + } + Logger.info('TEST', `Succeeded in destroy the window.`); + }) + await Utils.sleep(1000); + done(); + }) /* * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_CALENDARPICKER_INTERFACE_0070 * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_CALENDARPICKER_INTERFACE_0070 @@ -42,7 +55,7 @@ export default function UIComponentPopupboxCalendarpickerInterface() { await Utils.sleep(500); await driver.triggerKey(2012); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_CALENDARPICKER_INTERFACE_0070 finish.`); done(); @@ -68,7 +81,7 @@ export default function UIComponentPopupboxCalendarpickerInterface() { await Utils.sleep(500); await driver.mouseClick({x:point.right-100,y:point.top+20},MouseButton.MOUSE_BUTTON_LEFT); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_CALENDARPICKER_INTERFACE_0080 finish.`); done(); @@ -90,7 +103,7 @@ export default function UIComponentPopupboxCalendarpickerInterface() { await Utils.sleep(500); await driver.mouseClick({x:point.right-100,y:point.top+20},MouseButton.MOUSE_BUTTON_LEFT); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_CALENDARPICKER_INTERFACE_0060 finish.`); done(); @@ -110,7 +123,7 @@ export default function UIComponentPopupboxCalendarpickerInterface() { let point = await calPicker.getBounds(); await driver.mouseClick({x:point.right-20,y:point.top+5},MouseButton.MOUSE_BUTTON_LEFT); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_CALENDARPICKER_INTERFACE_0250 finish.`); done(); @@ -136,7 +149,7 @@ export default function UIComponentPopupboxCalendarpickerInterface() { await Utils.sleep(500); await driver.mouseClick({x:point.right-100,y:point.top+20},MouseButton.MOUSE_BUTTON_LEFT); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_CALENDARPICKER_INTERFACE_0300 finish.`); done(); @@ -160,7 +173,7 @@ export default function UIComponentPopupboxCalendarpickerInterface() { await Utils.sleep(500); await driver.mouseClick({x:point.right-100,y:point.top+20},MouseButton.MOUSE_BUTTON_LEFT); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_CALENDARPICKER_INTERFACE_0040 finish.`); done(); @@ -180,7 +193,7 @@ export default function UIComponentPopupboxCalendarpickerInterface() { let point = await calPicker.getBounds(); await driver.mouseDoubleClick({x:point.right-20,y:point.top+5},MouseButton.MOUSE_BUTTON_LEFT); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_CALENDARPICKER_INTERFACE_0050 finish.`); done(); @@ -202,7 +215,7 @@ export default function UIComponentPopupboxCalendarpickerInterface() { await Utils.sleep(500); await driver.mouseDoubleClick({x:point.right-20,y:point.top+5},MouseButton.MOUSE_BUTTON_LEFT); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_CALENDARPICKER_INTERFACE_0030 finish.`); done(); @@ -213,7 +226,7 @@ export default function UIComponentPopupboxCalendarpickerInterface() { * @tc.desc CalendarPicker:switch all */ it('SUB_ACE_UI_COMPONENT_POPUPBOX_CALENDARPICKER_INTERFACE_0020', 0, async (done: Function) => { - Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_CALENDARPICKER_INTERFACE_0030 start.`); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_CALENDARPICKER_INTERFACE_0020 start.`); Settings.createWindow("testability/pages/UIComponentPopupboxCalendarpickerInterface/UIComponentPopupboxCalendarpickerInterface0070") await Utils.sleep(1000) let driver: Driver = Driver.create(); @@ -233,7 +246,7 @@ export default function UIComponentPopupboxCalendarpickerInterface() { await driver.mouseDoubleClick({x:point.right-20,y:point.top+5},MouseButton.MOUSE_BUTTON_LEFT); } await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_CALENDARPICKER_INTERFACE_0020 finish.`); done(); @@ -259,7 +272,7 @@ export default function UIComponentPopupboxCalendarpickerInterface() { await Utils.sleep(500); await calPicker.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_CALENDARPICKER_INTERFACE_0320 finish.`); done(); @@ -288,7 +301,7 @@ export default function UIComponentPopupboxCalendarpickerInterface() { await Utils.sleep(300); await driver.mouseDoubleClick({x:point.right-20,y:point.top+5},MouseButton.MOUSE_BUTTON_LEFT); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_CALENDARPICKER_INTERFACE_0290 finish.`); done(); @@ -307,7 +320,7 @@ export default function UIComponentPopupboxCalendarpickerInterface() { await Utils.sleep(500); await calPicker.inputText('1999-13-32'); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_CALENDARPICKER_INTERFACE_0310 finish.`); done(); @@ -327,7 +340,7 @@ export default function UIComponentPopupboxCalendarpickerInterface() { await Utils.sleep(500); await btn.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_CALENDARPICKER_INTERFACE_0330 finish.`); done(); @@ -365,7 +378,7 @@ export default function UIComponentPopupboxCalendarpickerInterface() { await calPicker.click(); } await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_CALENDARPICKER_INTERFACE_0010 finish.`); done(); diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupboxDatepickerDialogLanguageHabitTest/UIComponentPopupboxDatepickerDialogLanguageHabit.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupboxDatepickerDialogLanguageHabitTest/UIComponentPopupboxDatepickerDialogLanguageHabit.test.ets index e7bd7e98d0e917bfce122b159cc5e012722dc7cd..c82a43833e308af3a2f7d2f3cfccf9b785b2946e 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupboxDatepickerDialogLanguageHabitTest/UIComponentPopupboxDatepickerDialogLanguageHabit.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPopupboxDatepickerDialogLanguageHabitTest/UIComponentPopupboxDatepickerDialogLanguageHabit.test.ets @@ -23,7 +23,20 @@ import { Driver, MouseButton, ON } from '@kit.TestKit'; export default function UIComponentPopupboxDatepickerDialogLanguageHabit() { describe('UIComponentPopupboxDatepickerDialogLanguageHabit', () => { - + afterEach(async (done: Function) => { + if (Settings.windowClass == undefined) { + return; + } + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`); + return; + } + Logger.info('TEST', `Succeeded in destroy the window.`); + }) + await Utils.sleep(1000); + done(); + }) /* * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_LANGUAGEHABIT_0050 * @tc.name SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_LANGUAGEHABIT_0050 @@ -47,7 +60,7 @@ export default function UIComponentPopupboxDatepickerDialogLanguageHabit() { x: point.x, y: point.y }, true, 2); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_LANGUAGEHABIT_0050 finish.`); done(); @@ -70,7 +83,7 @@ export default function UIComponentPopupboxDatepickerDialogLanguageHabit() { x: point.x, y: point.y }, true, 2); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_LANGUAGEHABIT_0070 finish.`); done(); @@ -93,7 +106,7 @@ export default function UIComponentPopupboxDatepickerDialogLanguageHabit() { await Utils.sleep(1000); Settings.switchCusLocales('en-Latn-CN'); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_LANGUAGEHABIT_0100 finish.`); done(); @@ -121,7 +134,7 @@ export default function UIComponentPopupboxDatepickerDialogLanguageHabit() { x: point.x, y: point.y }, true, 2); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_LANGUAGEHABIT_0030 finish.`); done(); @@ -149,7 +162,7 @@ export default function UIComponentPopupboxDatepickerDialogLanguageHabit() { x: point.x, y: point.y }, true, 2); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_LANGUAGEHABIT_0040 finish.`); done(); @@ -174,7 +187,7 @@ export default function UIComponentPopupboxDatepickerDialogLanguageHabit() { x: point.x, y: point.y }, true, 2); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_LANGUAGEHABIT_0090 finish.`); done(); @@ -197,7 +210,7 @@ export default function UIComponentPopupboxDatepickerDialogLanguageHabit() { await Utils.sleep(1000); Settings.switchCusLocales('zh-Hant-CN'); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_LANGUAGEHABIT_0110 finish.`); done(); @@ -225,7 +238,7 @@ export default function UIComponentPopupboxDatepickerDialogLanguageHabit() { x: point.x, y: point.y }, true, 2); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_LANGUAGEHABIT_0010 finish.`); done(); @@ -243,7 +256,7 @@ export default function UIComponentPopupboxDatepickerDialogLanguageHabit() { await Utils.sleep(1000); Settings.switchCusLocales('zh-Hant-CN'); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_LANGUAGEHABIT_0150 finish.`); done(); @@ -268,7 +281,7 @@ export default function UIComponentPopupboxDatepickerDialogLanguageHabit() { x: point.x, y: point.y }, true, 2); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_LANGUAGEHABIT_0080 finish.`); done(); @@ -291,7 +304,7 @@ export default function UIComponentPopupboxDatepickerDialogLanguageHabit() { await Utils.sleep(1000); Settings.switchCusLocales('ug-CN'); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_LANGUAGEHABIT_0140 finish.`); done(); @@ -319,7 +332,7 @@ export default function UIComponentPopupboxDatepickerDialogLanguageHabit() { x: point.x, y: point.y }, true, 2); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_LANGUAGEHABIT_0060 finish.`); done(); @@ -342,7 +355,7 @@ export default function UIComponentPopupboxDatepickerDialogLanguageHabit() { await Utils.sleep(1000); Settings.switchCusLocales('zh-Hant-CN'); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_LANGUAGEHABIT_0120 finish.`); done(); @@ -365,7 +378,7 @@ export default function UIComponentPopupboxDatepickerDialogLanguageHabit() { await Utils.sleep(1000); Settings.switchCusLocales('bo-CN'); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_LANGUAGEHABIT_0130 finish.`); done(); @@ -388,12 +401,12 @@ export default function UIComponentPopupboxDatepickerDialogLanguageHabit() { await Utils.sleep(500); let timePicker = await driver.findComponent(ON.type('TimePicker')); let datePicker = await driver.findComponent(ON.type('DatePicker')); - let point1 = await datePicker.getBounds(); - let point2 = await timePicker.getBounds(); - let centerX1 = (point1.left + point1.right) / 2; - let centerY1 = (point1.top + point1.bottom) / 2; - let centerX2 = (point2.left + point2.right) / 2; - let centerY2 = (point2.top + point2.bottom) / 2; + let point1 = await datePicker.getBoundsCenter(); + let point2 = await timePicker.getBoundsCenter(); + let centerX1 = point1.x; + let centerY1 = point1.y; + let centerX2 = point2.x; + let centerY2 = point2.y; await Utils.sleep(300); await driver.mouseScroll({ x: centerX1, y: centerY1 @@ -404,9 +417,9 @@ export default function UIComponentPopupboxDatepickerDialogLanguageHabit() { }, true, 3); await Utils.sleep(1000); // await driver.mouseClick({x:point2.left+150,y:point2.bottom+100},MouseButton.MOUSE_BUTTON_LEFT); - await driver.click(point2.left + 150, point2.bottom + 100); + await driver.click(point2.x + 150, point2.y + 100); await Utils.sleep(1500); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_LANGUAGEHABIT_0210_1 finish.`); done(); @@ -430,7 +443,7 @@ export default function UIComponentPopupboxDatepickerDialogLanguageHabit() { await Utils.sleep(300); await btn.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_LANGUAGEHABIT_0210_2 finish.`); done(); @@ -454,7 +467,7 @@ export default function UIComponentPopupboxDatepickerDialogLanguageHabit() { await Utils.sleep(500); await btn.click(); await Utils.sleep(1500); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_LANGUAGEHABIT_0210_3 finish.`); done(); @@ -477,12 +490,12 @@ export default function UIComponentPopupboxDatepickerDialogLanguageHabit() { await Utils.sleep(500); let timePicker = await driver.findComponent(ON.type('TimePicker')); let datePicker = await driver.findComponent(ON.type('DatePicker')); - let point1 = await datePicker.getBounds(); - let point2 = await timePicker.getBounds(); - let centerX1 = (point1.left + point1.right) / 2; - let centerY1 = (point1.top + point1.bottom) / 2; - let centerX2 = (point2.left + point2.right) / 2; - let centerY2 = (point2.top + point2.bottom) / 2; + let point1 = await datePicker.getBoundsCenter(); + let point2 = await timePicker.getBoundsCenter(); + let centerX1 = point1.x; + let centerY1 = point1.y; + let centerX2 = point2.x; + let centerY2 = point2.y; await Utils.sleep(300); await driver.mouseScroll({ x: centerX1, y: centerY1 @@ -492,9 +505,9 @@ export default function UIComponentPopupboxDatepickerDialogLanguageHabit() { x: centerX2 - 80, y: centerY2 }, true, 3); await Utils.sleep(1000); - await driver.click(point2.left + 150, point2.bottom + 100); + await driver.click(point2.x + 150, point2.y + 100); await Utils.sleep(1500); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_LANGUAGEHABIT_0170_1 finish.`); done(); @@ -505,7 +518,7 @@ export default function UIComponentPopupboxDatepickerDialogLanguageHabit() { * @tc.desc DatePicker */ it('SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_LANGUAGEHABIT_0170_2', 0, async (done: Function) => { - Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_LANGUAGEHABIT_0210_2 start.`); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_LANGUAGEHABIT_0170_2 start.`); Settings.createWindow("testability/pages/UIComponentPopupboxDatepickerDialogLanguageHabit/UIComponentPopupboxDatepickerDialogLanguageHabit0210") await Utils.sleep(1000) Settings.switchCusLocales('zh-Hans-CN'); @@ -518,7 +531,7 @@ export default function UIComponentPopupboxDatepickerDialogLanguageHabit() { await Utils.sleep(300); await btn.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_LANGUAGEHABIT_0170_2 finish.`); done(); @@ -542,7 +555,7 @@ export default function UIComponentPopupboxDatepickerDialogLanguageHabit() { await Utils.sleep(500); await btn.click(); await Utils.sleep(1500); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_LANGUAGEHABIT_0170_3 finish.`); done(); @@ -565,12 +578,12 @@ export default function UIComponentPopupboxDatepickerDialogLanguageHabit() { await Utils.sleep(500); let timePicker = await driver.findComponent(ON.type('TimePicker')); let datePicker = await driver.findComponent(ON.type('DatePicker')); - let point1 = await datePicker.getBounds(); - let point2 = await timePicker.getBounds(); - let centerX1 = (point1.left + point1.right) / 2; - let centerY1 = (point1.top + point1.bottom) / 2; - let centerX2 = (point2.left + point2.right) / 2; - let centerY2 = (point2.top + point2.bottom) / 2; + let point1 = await datePicker.getBoundsCenter(); + let point2 = await timePicker.getBoundsCenter(); + let centerX1 = point1.x; + let centerY1 = point1.y; + let centerX2 = point2.x; + let centerY2 = point2.y; await Utils.sleep(300); await driver.mouseScroll({ x: centerX1, y: centerY1 @@ -580,9 +593,9 @@ export default function UIComponentPopupboxDatepickerDialogLanguageHabit() { x: centerX2 - 80, y: centerY2 }, true, 3); await Utils.sleep(1000); - await driver.click(point2.left + 150, point2.bottom + 100); + await driver.click(point2.x + 150, point2.y + 100); await Utils.sleep(1500); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_LANGUAGEHABIT_0190_1 finish.`); done(); @@ -606,7 +619,7 @@ export default function UIComponentPopupboxDatepickerDialogLanguageHabit() { await Utils.sleep(300); await btn.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_LANGUAGEHABIT_0190_2 finish.`); done(); @@ -617,7 +630,7 @@ export default function UIComponentPopupboxDatepickerDialogLanguageHabit() { * @tc.desc DatePicker */ it('SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_LANGUAGEHABIT_0190_3', 0, async (done: Function) => { - Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_LANGUAGEHABIT_0170_3 start.`); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_LANGUAGEHABIT_0190_3 start.`); Settings.createWindow("testability/pages/UIComponentPopupboxDatepickerDialogLanguageHabit/UIComponentPopupboxDatepickerDialogLanguageHabit0210") await Utils.sleep(1000) Settings.switchCusLocales('zh-Hant-CN'); @@ -630,7 +643,7 @@ export default function UIComponentPopupboxDatepickerDialogLanguageHabit() { await Utils.sleep(500); await btn.click(); await Utils.sleep(1500); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_LANGUAGEHABIT_0190_3 finish.`); done(); @@ -653,12 +666,12 @@ export default function UIComponentPopupboxDatepickerDialogLanguageHabit() { await Utils.sleep(500); let timePicker = await driver.findComponent(ON.type('TimePicker')); let datePicker = await driver.findComponent(ON.type('DatePicker')); - let point1 = await datePicker.getBounds(); - let point2 = await timePicker.getBounds(); - let centerX1 = (point1.left + point1.right) / 2; - let centerY1 = (point1.top + point1.bottom) / 2; - let centerX2 = (point2.left + point2.right) / 2; - let centerY2 = (point2.top + point2.bottom) / 2; + let point1 = await datePicker.getBoundsCenter(); + let point2 = await timePicker.getBoundsCenter(); + let centerX1 = point1.x; + let centerY1 = point1.y; + let centerX2 = point2.x; + let centerY2 = point2.y; await Utils.sleep(300); await driver.mouseScroll({ x: centerX1, y: centerY1 @@ -668,9 +681,9 @@ export default function UIComponentPopupboxDatepickerDialogLanguageHabit() { x: centerX2 - 80, y: centerY2 }, true, 3); await Utils.sleep(1000); - await driver.click(point2.left + 150, point2.bottom + 100); + await driver.click(point2.x + 150, point2.y + 100); await Utils.sleep(1500); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_LANGUAGEHABIT_0200_1 finish.`); done(); @@ -694,7 +707,7 @@ export default function UIComponentPopupboxDatepickerDialogLanguageHabit() { await Utils.sleep(300); await btn.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_LANGUAGEHABIT_0200_2 finish.`); done(); @@ -718,7 +731,7 @@ export default function UIComponentPopupboxDatepickerDialogLanguageHabit() { await Utils.sleep(500); await btn.click(); await Utils.sleep(1500); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_LANGUAGEHABIT_0200_3 finish.`); done(); @@ -741,12 +754,12 @@ export default function UIComponentPopupboxDatepickerDialogLanguageHabit() { await Utils.sleep(500); let datePicker = await driver.findComponent(ON.type('DatePicker')); let timePicker = await driver.findComponent(ON.type('TimePicker')); - let point1 = await datePicker.getBounds(); - let point2 = await timePicker.getBounds(); - let centerX1 = (point1.left + point1.right) / 2; - let centerY1 = (point1.top + point1.bottom) / 2; - let centerX2 = (point2.left + point2.right) / 2; - let centerY2 = (point2.top + point2.bottom) / 2; + let point1 = await datePicker.getBoundsCenter(); + let point2 = await timePicker.getBoundsCenter(); + let centerX1 = point1.x; + let centerY1 = point1.y; + let centerX2 = point2.x; + let centerY2 = point2.y; await Utils.sleep(300); await driver.mouseScroll({ x: centerX1, y: centerY1 @@ -756,9 +769,9 @@ export default function UIComponentPopupboxDatepickerDialogLanguageHabit() { x: centerX2 - 80, y: centerY2 }, true, 3); await Utils.sleep(1000); - await driver.click(point2.left + 150, point2.bottom + 100); + await driver.click(point2.x + 150, point2.y + 100); await Utils.sleep(1500); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_LANGUAGEHABIT_0220_1 finish.`); done(); @@ -782,7 +795,7 @@ export default function UIComponentPopupboxDatepickerDialogLanguageHabit() { await Utils.sleep(300); await btn.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_LANGUAGEHABIT_0220_2 finish.`); done(); @@ -806,7 +819,7 @@ export default function UIComponentPopupboxDatepickerDialogLanguageHabit() { await Utils.sleep(500); await btn.click(); await Utils.sleep(1500); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_LANGUAGEHABIT_0220_3 finish.`); done(); @@ -829,14 +842,14 @@ export default function UIComponentPopupboxDatepickerDialogLanguageHabit() { await Utils.sleep(500); let datePicker = await driver.findComponent(ON.type('DatePicker')); let timePicker = await driver.findComponent(ON.type('TimePicker')); - let point1 = await datePicker.getBounds(); - let point2 = await timePicker.getBounds(); - let centerX1 = (point1.left + point1.right) / 2; - let centerY1 = (point1.top + point1.bottom) / 2; - let centerX2 = (point2.left + point2.right) / 2; - let centerY2 = (point2.top + point2.bottom) / 2; + let point1 = await datePicker.getBoundsCenter(); + let point2 = await timePicker.getBoundsCenter(); + let centerX1 = point1.x; + let centerY1 = point1.y; + let centerX2 = point2.x; + let centerY2 = point2.y; await Utils.sleep(300); - await driver.click(point1.left, point1.bottom + 30); + await driver.click(point2.x + 150, point2.y + 100); await Utils.sleep(1000); await driver.mouseScroll({ x: centerX1, y: centerY1 @@ -846,9 +859,9 @@ export default function UIComponentPopupboxDatepickerDialogLanguageHabit() { x: centerX2 - 80, y: centerY2 }, true, 3); await Utils.sleep(1000); - await driver.click(point2.left + 150, point2.bottom + 100); + await driver.click(point2.x + 150, point2.y + 100); await Utils.sleep(1500); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_LANGUAGEHABIT_0180_1 finish.`); done(); @@ -859,7 +872,7 @@ export default function UIComponentPopupboxDatepickerDialogLanguageHabit() { * @tc.desc DatePicker */ it('SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_LANGUAGEHABIT_0180_2', 0, async (done: Function) => { - Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_LANGUAGEHABIT_0220_2 start.`); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_LANGUAGEHABIT_0180_2 start.`); Settings.createWindow("testability/pages/UIComponentPopupboxDatepickerDialogLanguageHabit/UIComponentPopupboxDatepickerDialogLanguageHabit0210") await Utils.sleep(1000); Settings.switchCusLocales('en-Latn-CN'); @@ -877,7 +890,7 @@ export default function UIComponentPopupboxDatepickerDialogLanguageHabit() { await Utils.sleep(300); await driver.click(point1.left, point1.bottom + 30); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_LANGUAGEHABIT_0180_2 finish.`); done(); @@ -906,7 +919,7 @@ export default function UIComponentPopupboxDatepickerDialogLanguageHabit() { await Utils.sleep(300); await driver.click(point1.left, point1.bottom + 30); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_LANGUAGEHABIT_0180_3 finish.`); done(); @@ -929,14 +942,14 @@ export default function UIComponentPopupboxDatepickerDialogLanguageHabit() { await Utils.sleep(500); let datePicker = await driver.findComponent(ON.type('DatePicker')); let timePicker = await driver.findComponent(ON.type('TimePicker')); - let point1 = await datePicker.getBounds(); - let point2 = await timePicker.getBounds(); - let centerX1 = (point1.left + point1.right) / 2; - let centerY1 = (point1.top + point1.bottom) / 2; - let centerX2 = (point2.left + point2.right) / 2; - let centerY2 = (point2.top + point2.bottom) / 2; + let point1 = await datePicker.getBoundsCenter(); + let point2 = await timePicker.getBoundsCenter(); + let centerX1 = point1.x; + let centerY1 = point1.y; + let centerX2 = point2.x; + let centerY2 = point2.y; await Utils.sleep(300); - await driver.click(point1.left, point1.bottom + 30); + await driver.click(point2.x + 150, point2.y + 100); await Utils.sleep(1000); await driver.mouseScroll({ x: centerX1, y: centerY1 @@ -946,9 +959,9 @@ export default function UIComponentPopupboxDatepickerDialogLanguageHabit() { x: centerX2 - 80, y: centerY2 }, true, 3); await Utils.sleep(1000); - await driver.click(point2.left + 150, point2.bottom + 100); + await driver.click(point2.x + 150, point2.y + 100); await Utils.sleep(1500); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_LANGUAGEHABIT_0240_1 finish.`); done(); @@ -977,7 +990,7 @@ export default function UIComponentPopupboxDatepickerDialogLanguageHabit() { await Utils.sleep(300); await driver.click(point1.left, point1.bottom + 30); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_LANGUAGEHABIT_0240_2 finish.`); done(); @@ -1006,7 +1019,7 @@ export default function UIComponentPopupboxDatepickerDialogLanguageHabit() { await Utils.sleep(300); await driver.click(point1.left, point1.bottom + 30); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_LANGUAGEHABIT_0240_3 finish.`); done(); @@ -1029,14 +1042,14 @@ export default function UIComponentPopupboxDatepickerDialogLanguageHabit() { await Utils.sleep(500); let datePicker = await driver.findComponent(ON.type('DatePicker')); let timePicker = await driver.findComponent(ON.type('TimePicker')); - let point1 = await datePicker.getBounds(); - let point2 = await timePicker.getBounds(); - let centerX1 = (point1.left + point1.right) / 2; - let centerY1 = (point1.top + point1.bottom) / 2; - let centerX2 = (point2.left + point2.right) / 2; - let centerY2 = (point2.top + point2.bottom) / 2; + let point1 = await datePicker.getBoundsCenter(); + let point2 = await timePicker.getBoundsCenter(); + let centerX1 = point1.x; + let centerY1 = point1.y; + let centerX2 = point2.x; + let centerY2 = point2.y; await Utils.sleep(300); - await driver.click(point1.left, point1.bottom + 30); + await driver.click(point2.x + 150, point2.y + 100); await Utils.sleep(1000); await driver.mouseScroll({ x: centerX1, y: centerY1 @@ -1046,9 +1059,9 @@ export default function UIComponentPopupboxDatepickerDialogLanguageHabit() { x: centerX2 - 80, y: centerY2 }, true, 3); await Utils.sleep(1000); - await driver.click(point2.left + 150, point2.bottom + 100); + await driver.click(point2.x + 150, point2.y + 100); await Utils.sleep(1500); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_LANGUAGEHABIT_0250_1 finish.`); done(); @@ -1077,7 +1090,7 @@ export default function UIComponentPopupboxDatepickerDialogLanguageHabit() { await Utils.sleep(300); await driver.click(point1.left, point1.bottom + 30); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_LANGUAGEHABIT_0250_2 finish.`); done(); @@ -1106,7 +1119,7 @@ export default function UIComponentPopupboxDatepickerDialogLanguageHabit() { await Utils.sleep(300); await driver.click(point1.left, point1.bottom + 30); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_LANGUAGEHABIT_0250_3 finish.`); done(); @@ -1132,7 +1145,7 @@ export default function UIComponentPopupboxDatepickerDialogLanguageHabit() { await Utils.sleep(1000); Settings.switchCusLocales('en-Latn-CN'); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_LANGUAGEHABIT_0260 finish.`); done(); @@ -1158,7 +1171,7 @@ export default function UIComponentPopupboxDatepickerDialogLanguageHabit() { await Utils.sleep(1000); Settings.switchCusLocales('zh-Hant-CN'); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_LANGUAGEHABIT_0270 finish.`); done(); @@ -1184,7 +1197,7 @@ export default function UIComponentPopupboxDatepickerDialogLanguageHabit() { await Utils.sleep(1000); Settings.switchCusLocales('zh-Hant-CN'); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_LANGUAGEHABIT_0280 finish.`); done(); @@ -1210,7 +1223,7 @@ export default function UIComponentPopupboxDatepickerDialogLanguageHabit() { await Utils.sleep(1000); Settings.switchCusLocales('ug-CN'); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_LANGUAGEHABIT_0300 finish.`); done(); @@ -1234,14 +1247,14 @@ export default function UIComponentPopupboxDatepickerDialogLanguageHabit() { await Utils.sleep(500); let datePicker = await driver.findComponent(ON.type('DatePicker')); let timePicker = await driver.findComponent(ON.type('TimePicker')); - let point1 = await datePicker.getBounds(); - let point2 = await timePicker.getBounds(); - let centerX1 = (point1.left + point1.right) / 2; - let centerY1 = (point1.top + point1.bottom) / 2; - let centerX2 = (point2.left + point2.right) / 2; - let centerY2 = (point2.top + point2.bottom) / 2; + let point1 = await datePicker.getBoundsCenter(); + let point2 = await timePicker.getBoundsCenter(); + let centerX1 = point1.x; + let centerY1 = point1.y; + let centerX2 = point2.x; + let centerY2 = point2.y; await Utils.sleep(300); - await driver.click(point1.left, point1.bottom + 30); + await driver.click(point2.x + 150, point2.y + 100); await Utils.sleep(1000); await driver.mouseScroll({ x: centerX1, y: centerY1 @@ -1251,9 +1264,9 @@ export default function UIComponentPopupboxDatepickerDialogLanguageHabit() { x: centerX2 - 80, y: centerY2 }, true, 3); await Utils.sleep(1000); - await driver.click(point2.left + 150, point2.bottom + 100); + await driver.click(point2.x + 150, point2.y + 100); await Utils.sleep(1500); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_LANGUAGEHABIT_0230_1 finish.`); done(); @@ -1282,7 +1295,7 @@ export default function UIComponentPopupboxDatepickerDialogLanguageHabit() { await Utils.sleep(300); await driver.click(point1.left, point1.bottom + 30); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_LANGUAGEHABIT_0230_2 finish.`); done(); @@ -1311,7 +1324,7 @@ export default function UIComponentPopupboxDatepickerDialogLanguageHabit() { await Utils.sleep(300); await driver.click(point1.left, point1.bottom + 30); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_LANGUAGEHABIT_0230_3 finish.`); done(); @@ -1337,7 +1350,7 @@ export default function UIComponentPopupboxDatepickerDialogLanguageHabit() { await Utils.sleep(1000); Settings.switchCusLocales('bo-CN'); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_LANGUAGEHABIT_0290 finish.`); done(); diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentSpecialComponentsFormComponentTransparentTest/UIComponentSpecialComponentsFormComponentTransparent.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentSpecialComponentsFormComponentTransparentTest/UIComponentSpecialComponentsFormComponentTransparent.test.ets index 12c11f63f67cd94f3bfcf75b4f3b7c5f2f53145d..0cb86a6c935be1b1f52ddaf3c5c2f4600bd6a049 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentSpecialComponentsFormComponentTransparentTest/UIComponentSpecialComponentsFormComponentTransparent.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentSpecialComponentsFormComponentTransparentTest/UIComponentSpecialComponentsFormComponentTransparent.test.ets @@ -39,7 +39,21 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { describe('UIComponentSpecialComponentsFormComponentTransparent', () => { + afterEach(async (done: Function) => { + if (Settings.windowClass == undefined) { + return; + } + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`); + return; + } + Logger.info('TEST', `Succeeded in destroy the window.`); + }) + await Utils.sleep(1000); + done(); + }) /* * @tc.number SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1260 @@ -55,7 +69,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(3000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1260 finish.`); done(); @@ -75,7 +89,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(3000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1540 finish.`); done(); @@ -95,7 +109,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(3000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_0100 finish.`); done(); @@ -115,7 +129,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(3000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_0390 finish.`); done(); @@ -127,7 +141,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { * @tc.desc CustomPopupOptions for Popup, shadow (ShadowOptions) parameter type color(ColoringStrategy):INVERT */ it('SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1520', 0, async (done: Function) => { - Logger.info('TEST', `SUB_ACE UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1520 start.`); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1520 start.`); Settings.createWindow("testability/pages/UIComponentSpecialComponentsFormComponentTransparent/UIComponentSpecialComponentsFormComponentTransparent152"); await Utils.sleep(2000); let driver: Driver = Driver.create(); @@ -135,9 +149,9 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(2000); - Logger.info('TEST', `SUB_ACE UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1520 finish.`); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1520 finish.`); done(); }) @@ -155,7 +169,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(3000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_0130 finish.`); done(); @@ -175,7 +189,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1300 finish.`); done(); @@ -195,7 +209,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1570 finish.`); done(); @@ -215,7 +229,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1230 finish.`); done(); @@ -235,7 +249,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1500 finish.`); done(); @@ -255,7 +269,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1770 finish.`); done(); @@ -275,7 +289,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_0190 finish.`); done(); @@ -295,7 +309,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1280 finish.`); done(); @@ -315,7 +329,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1530 finish.`); done(); @@ -335,7 +349,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1780 finish.`); done(); @@ -355,7 +369,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_0820 finish.`); done(); @@ -375,7 +389,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_0170 finish.`); done(); @@ -395,7 +409,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1220 finish.`); done(); @@ -415,7 +429,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1310 finish.`); done(); @@ -435,7 +449,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_0600 finish.`); done(); @@ -455,7 +469,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1290 finish.`); done(); @@ -475,7 +489,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_0630 finish.`); done(); @@ -495,7 +509,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_0830 finish.`); done(); @@ -515,7 +529,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_0620 finish.`); done(); @@ -535,7 +549,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_0360 finish.`); done(); @@ -555,7 +569,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1470 finish.`); done(); @@ -575,7 +589,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1760 finish.`); done(); @@ -595,7 +609,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1240 finish.`); done(); @@ -615,7 +629,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1560 finish.`); done(); @@ -635,7 +649,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_0180 finish.`); done(); @@ -655,7 +669,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1800 finish.`); done(); @@ -675,7 +689,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1250 finish.`); done(); @@ -695,7 +709,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1210 finish.`); done(); @@ -715,7 +729,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1510 finish.`); done(); @@ -735,7 +749,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1790 finish.`); done(); @@ -755,7 +769,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_0150 finish.`); done(); @@ -775,7 +789,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1750 finish.`); done(); @@ -795,7 +809,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_0610 finish.`); done(); @@ -815,7 +829,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_0140 finish.`); done(); @@ -835,7 +849,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1330 finish.`); done(); @@ -855,7 +869,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1590 finish.`); done(); @@ -875,12 +889,12 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); let rect = await SliderCom.getBounds(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_0920 finish.`); done(); @@ -900,7 +914,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_0650 finish.`); done(); @@ -920,7 +934,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1020 finish.`); done(); @@ -940,7 +954,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_0940 finish.`); done(); @@ -960,7 +974,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1080 finish.`); done(); @@ -980,7 +994,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1350 finish.`); done(); @@ -1000,7 +1014,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_0670 finish.`); done(); @@ -1020,7 +1034,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1820 finish.`); done(); @@ -1040,7 +1054,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1090 finish.`); done(); @@ -1060,7 +1074,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1380 finish.`); done(); @@ -1080,7 +1094,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1810 finish.`); done(); @@ -1100,7 +1114,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1040 finish.`); done(); @@ -1120,7 +1134,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1360 finish.`); done(); @@ -1140,7 +1154,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1600 finish.`); done(); @@ -1160,7 +1174,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_0960 finish.`); done(); @@ -1180,7 +1194,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1170 finish.`); done(); @@ -1200,7 +1214,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1840 finish.`); done(); @@ -1220,7 +1234,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1100 finish.`); done(); @@ -1240,7 +1254,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_0710 finish.`); done(); @@ -1260,7 +1274,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_0980 finish.`); done(); @@ -1280,7 +1294,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1370 finish.`); done(); @@ -1300,7 +1314,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1390 finish.`); done(); @@ -1320,7 +1334,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_0720 finish.`); done(); @@ -1340,7 +1354,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1830 finish.`); done(); @@ -1360,7 +1374,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1120 finish.`); done(); @@ -1380,7 +1394,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_0730 finish.`); done(); @@ -1400,7 +1414,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_0990 finish.`); done(); @@ -1420,7 +1434,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1180 finish.`); done(); @@ -1440,7 +1454,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_0740 finish.`); done(); @@ -1460,7 +1474,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1110 finish.`); done(); @@ -1480,7 +1494,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_0760 finish.`); done(); @@ -1500,7 +1514,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1000 finish.`); done(); @@ -1520,7 +1534,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1150 finish.`); done(); @@ -1540,7 +1554,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1620 finish.`); done(); @@ -1560,7 +1574,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1400 finish.`); done(); @@ -1580,7 +1594,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_0770 finish.`); done(); @@ -1600,7 +1614,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_0230 finish.`); done(); @@ -1620,7 +1634,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1130 finish.`); done(); @@ -1640,7 +1654,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1640 finish.`); done(); @@ -1660,7 +1674,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_0220 finish.`); done(); @@ -1680,7 +1694,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_0540 finish.`); done(); @@ -1700,7 +1714,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_0780 finish.`); done(); @@ -1720,7 +1734,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_0240 finish.`); done(); @@ -1740,7 +1754,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_0790 finish.`); done(); @@ -1760,7 +1774,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_0250 finish.`); done(); @@ -1780,7 +1794,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_0530 finish.`); done(); @@ -1800,7 +1814,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1650 finish.`); done(); @@ -1820,7 +1834,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1670 finish.`); done(); @@ -1840,7 +1854,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_0260 finish.`); done(); @@ -1860,7 +1874,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_0560 finish.`); done(); @@ -1880,7 +1894,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1690 finish.`); done(); @@ -1900,7 +1914,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_0270 finish.`); done(); @@ -1920,7 +1934,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1420 finish.`); done(); @@ -1940,7 +1954,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_0800 finish.`); done(); @@ -1960,7 +1974,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_0570 finish.`); done(); @@ -1980,7 +1994,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1660 finish.`); done(); @@ -2000,7 +2014,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1680 finish.`); done(); @@ -2020,7 +2034,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_0590 finish.`); done(); @@ -2040,7 +2054,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1730 finish.`); done(); @@ -2060,7 +2074,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_0320 finish.`); done(); @@ -2080,7 +2094,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1440 finish.`); done(); @@ -2100,7 +2114,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1720 finish.`); done(); @@ -2120,7 +2134,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1430 finish.`); done(); @@ -2140,7 +2154,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1740 finish.`); done(); @@ -2160,7 +2174,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_0350 finish.`); done(); @@ -2180,7 +2194,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1460 finish.`); done(); @@ -2200,7 +2214,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1710 finish.`); done(); @@ -2220,7 +2234,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_0340 finish.`); done(); @@ -2240,7 +2254,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1490 finish.`); done(); @@ -2260,7 +2274,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_0810 finish.`); done(); @@ -2280,7 +2294,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_0290 finish.`); done(); @@ -2300,7 +2314,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_0300 finish.`); done(); @@ -2320,7 +2334,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_0400 finish.`); done(); @@ -2340,7 +2354,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1030 finish.`); done(); @@ -2360,7 +2374,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1050 finish.`); done(); @@ -2380,7 +2394,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1160 finish.`); done(); @@ -2400,7 +2414,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1190 finish.`); done(); @@ -2420,7 +2434,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_1320 finish.`); done(); @@ -2440,7 +2454,7 @@ export default function UIComponentSpecialComponentsFormComponentTransparent() { let pointCenter = await SliderCom.getBoundsCenter(); await driver.click(pointCenter.x, pointCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_FORMCOMPONENT_TRANSPARENT_0380 finish.`); done(); diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentSpecialComponentsUIExtensionComponentPopupChangeTest/UIComponentSpecialComponentsUIExtensionComponentPopupChange.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentSpecialComponentsUIExtensionComponentPopupChangeTest/UIComponentSpecialComponentsUIExtensionComponentPopupChange.test.ets index d0b2c2a21c446ab01b898448c730df1a43340e7d..fc615edf307d5fec1049c85e434407dbf15d2122 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentSpecialComponentsUIExtensionComponentPopupChangeTest/UIComponentSpecialComponentsUIExtensionComponentPopupChange.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentSpecialComponentsUIExtensionComponentPopupChangeTest/UIComponentSpecialComponentsUIExtensionComponentPopupChange.test.ets @@ -39,6 +39,21 @@ import Window from '@ohos.window' export default function UIComponentSpecialComponentsUIExtensionComponentPopupChange() { describe('UIComponentSpecialComponentsUIExtensionComponentPopupChange', () => { + afterEach(async (done: Function) => { + if (Settings.windowClass == undefined) { + return; + } + + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`); + return; + } + Logger.info('TEST', `Succeeded in destroy the window.`); + }) + await Utils.sleep(2000); + done(); + }) /* * @tc.number SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_UIEXTENSIONCOMPONENT_POPUPCHANGE_0050 @@ -47,7 +62,7 @@ export default function UIComponentSpecialComponentsUIExtensionComponentPopupCha */ it('SUB_ACE_UI_COMPONENT_SPECIAL_POPUP_CHANGE_0050', 0, async (done: Function) => { Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIAL_POPUP_CHANGE_0050 start.`); - Settings.createWindow("testability/pages/UIComponentSpecialComponentsUIExtensionComponentPopupChange/UIComponentSpecialComponentsUIExtensionComponentPopupChange005"); + Settings.createWindow("testability/pages/UIExtensionComponentPopupChange/UIComponentSpecialComponentsUIExtensionComponentPopupChange005"); await Utils.sleep(2000); let driver: Driver = Driver.create(); let ButtonCom = @@ -57,7 +72,7 @@ export default function UIComponentSpecialComponentsUIExtensionComponentPopupCha await Utils.sleep(1000); driver.triggerKey(KeyCode.KEYCODE_A); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIAL_POPUP_CHANGE_0050 finish.`); done(); @@ -70,7 +85,7 @@ export default function UIComponentSpecialComponentsUIExtensionComponentPopupCha */ it('SUB_ACE_UI_COMPONENT_SPECIAL_POPUP_CHANGE_0050_1', 0, async (done: Function) => { Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIAL_POPUP_CHANGE_0050_1 start.`); - Settings.createWindow("testability/pages/UIComponentSpecialComponentsUIExtensionComponentPopupChange/UIComponentSpecialComponentsUIExtensionComponentPopupChange005"); + Settings.createWindow("testability/pages/UIExtensionComponentPopupChange/UIComponentSpecialComponentsUIExtensionComponentPopupChange005"); await Utils.sleep(2000); let driver: Driver = Driver.create(); let ButtonCom = @@ -84,7 +99,7 @@ export default function UIComponentSpecialComponentsUIExtensionComponentPopupCha await Utils.sleep(1000); driver.triggerKey(KeyCode.KEYCODE_B); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIAL_POPUP_CHANGE_0050_1 finish.`); done(); @@ -97,7 +112,7 @@ export default function UIComponentSpecialComponentsUIExtensionComponentPopupCha */ it('SUB_ACE_UI_COMPONENT_SPECIAL_POPUP_CHANGE_0060', 0, async (done: Function) => { Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIAL_POPUP_CHANGE_0060 start.`); - Settings.createWindow("testability/pages/UIComponentSpecialComponentsUIExtensionComponentPopupChange/UIComponentSpecialComponentsUIExtensionComponentPopupChange006"); + Settings.createWindow("testability/pages/UIExtensionComponentPopupChange/UIComponentSpecialComponentsUIExtensionComponentPopupChange006"); await Utils.sleep(2000); let driver: Driver = Driver.create(); let ButtonCom = @@ -109,7 +124,7 @@ export default function UIComponentSpecialComponentsUIExtensionComponentPopupCha await Utils.sleep(1000); await driver.triggerKey(KeyCode.KEYCODE_B); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIAL_POPUP_CHANGE_0060 finish.`); done(); @@ -122,7 +137,7 @@ export default function UIComponentSpecialComponentsUIExtensionComponentPopupCha */ it('SUB_ACE_UI_COMPONENT_SPECIAL_POPUP_CHANGE_0020', 0, async (done: Function) => { Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIAL_POPUP_CHANGE_0020 start.`); - Settings.createWindow("testability/pages/UIComponentSpecialComponentsUIExtensionComponentPopupChange/UIComponentSpecialComponentsUIExtensionComponentPopupChange002"); + Settings.createWindow("testability/pages/UIExtensionComponentPopupChange/UIComponentSpecialComponentsUIExtensionComponentPopupChange002"); await Utils.sleep(2000); let driver: Driver = Driver.create(); let ButtonCom = @@ -132,7 +147,7 @@ export default function UIComponentSpecialComponentsUIExtensionComponentPopupCha await Utils.sleep(1000); await driver.triggerKey(KeyCode.KEYCODE_A); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); let currentWindow = await Window.getLastWindow(getContext()); await currentWindow.setPreferredOrientation(1); @@ -148,7 +163,7 @@ export default function UIComponentSpecialComponentsUIExtensionComponentPopupCha */ it('SUB_ACE_UI_COMPONENT_SPECIAL_POPUP_CHANGE_0030', 0, async (done: Function) => { Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIAL_POPUP_CHANGE_0030 start.`); - Settings.createWindow("testability/pages/UIComponentSpecialComponentsUIExtensionComponentPopupChange/UIComponentSpecialComponentsUIExtensionComponentPopupChange003"); + Settings.createWindow("testability/pages/UIExtensionComponentPopupChange/UIComponentSpecialComponentsUIExtensionComponentPopupChange003"); await Utils.sleep(2000); let driver: Driver = Driver.create(); let ButtonCom = @@ -162,7 +177,7 @@ export default function UIComponentSpecialComponentsUIExtensionComponentPopupCha await driver.triggerKey(KeyCode.KEYCODE_D); await driver.triggerKey(KeyCode.KEYCODE_E); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIAL_POPUP_CHANGE_0030 finish.`); done(); @@ -175,7 +190,7 @@ export default function UIComponentSpecialComponentsUIExtensionComponentPopupCha */ it('SUB_ACE_UI_COMPONENT_SPECIAL_POPUP_CHANGE_0010', 0, async (done: Function) => { Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIAL_POPUP_CHANGE_0010 start.`); - Settings.createWindow("testability/pages/UIComponentSpecialComponentsUIExtensionComponentPopupChange/UIComponentSpecialComponentsUIExtensionComponentPopupChange001"); + Settings.createWindow("testability/pages/UIExtensionComponentPopupChange/UIComponentSpecialComponentsUIExtensionComponentPopupChange001"); await Utils.sleep(2000); let driver: Driver = Driver.create(); let ButtonCom = @@ -189,7 +204,7 @@ export default function UIComponentSpecialComponentsUIExtensionComponentPopupCha await driver.triggerKey(KeyCode.KEYCODE_D); await driver.triggerKey(KeyCode.KEYCODE_E); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIAL_POPUP_CHANGE_0010 finish.`); done(); @@ -202,7 +217,7 @@ export default function UIComponentSpecialComponentsUIExtensionComponentPopupCha */ it('SUB_ACE_UI_COMPONENT_SPECIAL_POPUP_CHANGE_0040', 0, async (done: Function) => { Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIAL_POPUP_CHANGE_0040 start.`); - Settings.createWindow("testability/pages/UIComponentSpecialComponentsUIExtensionComponentPopupChange/UIComponentSpecialComponentsUIExtensionComponentPopupChange004"); + Settings.createWindow("testability/pages/UIExtensionComponentPopupChange/UIComponentSpecialComponentsUIExtensionComponentPopupChange004"); await Utils.sleep(2000); let driver: Driver = Driver.create(); let ButtonCom = @@ -216,7 +231,7 @@ export default function UIComponentSpecialComponentsUIExtensionComponentPopupCha await driver.triggerKey(KeyCode.KEYCODE_D); await driver.triggerKey(KeyCode.KEYCODE_E); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SPECIAL_POPUP_CHANGE_0040 finish.`); done(); diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentUISupportColorTest/UIComponentUISupportColor.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentUISupportColorTest/UIComponentUISupportColor.test.ets index daf797ea095d73d75a47ee5fe88209d0fec33dae..bfe6a34b593ed77b285e74bbd2acc2bbad1de080 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentUISupportColorTest/UIComponentUISupportColor.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentUISupportColorTest/UIComponentUISupportColor.test.ets @@ -20,6 +20,7 @@ import Logger from '../model/Logger'; import Utils from '../model/Utils'; import uiAppearance from '@ohos.uiAppearance'; import { Driver ,ON } from '@ohos.UiTest' +import { BusinessError } from '@kit.BasicServicesKit'; /* * UIComponentUISupportColor @@ -40,6 +41,21 @@ import { Driver ,ON } from '@ohos.UiTest' export default function UIComponentUISupportColor() { describe('UIComponentUISupportColor', () => { + afterEach(async (done: Function) => { + if (Settings.windowClass == undefined) { + return + } + + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`) + return; + } + Logger.info('TEST', `Succeeded in destroy the window.`); + }) + await Utils.sleep(1000); + done(); + }) /* @@ -49,7 +65,10 @@ export default function UIComponentUISupportColor() { */ it('SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_1010', 0, async (done: Function) => { Logger.info('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_1010 start.`); - await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_DARK, () => { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_DARK).then(() => { + console.info('Set dark-mode successfully.'); + }).catch((error:Error) => { + console.error('Set dark-mode failed, ' + error.message); }); Settings.createWindow("testability/pages/UIComponentUISupportColor/UIComponentUISupportColor101"); await Utils.sleep(2000); @@ -57,10 +76,13 @@ export default function UIComponentUISupportColor() { let ButtonCom = await driver.findComponent(ON.id("UIComponentUISupportColor1011")); let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); - await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT, () => { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Set ligtht-mode successfully.'); + }).catch((error:Error) => { + console.error('Set light-mode failed, ' + error.message); }); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_1010 finish.`); done(); @@ -73,7 +95,10 @@ export default function UIComponentUISupportColor() { */ it('SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_1050', 0, async (done: Function) => { Logger.info('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_1050 start.`); - await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT, () => { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Set ligtht-mode successfully.'); + }).catch((error:Error) => { + console.error('Set light-mode failed, ' + error.message); }); Settings.createWindow("testability/pages/UIComponentUISupportColor/UIComponentUISupportColor105"); await Utils.sleep(2000); @@ -81,10 +106,19 @@ export default function UIComponentUISupportColor() { let ButtonCom = await driver.findComponent(ON.id("UIComponentUISupportColor1051")); let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); - await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_DARK, () => { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_DARK).then(() => { + console.info('Set dark-mode successfully.'); + }).catch((error:Error) => { + console.error('Set dark-mode failed, ' + error.message); }); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); + await Utils.sleep(1000); + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Set ligtht-mode successfully.'); + }).catch((error:Error) => { + console.error('Set light-mode failed, ' + error.message); + }); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_1050 finish.`); done(); @@ -97,7 +131,10 @@ export default function UIComponentUISupportColor() { */ it('SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_1050_1', 0, async (done: Function) => { Logger.info('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_1050_1 start.`); - await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_DARK, () => { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_DARK).then(() => { + console.info('Set dark-mode successfully.'); + }).catch((error:Error) => { + console.error('Set dark-mode failed, ' + error.message); }); Settings.createWindow("testability/pages/UIComponentUISupportColor/UIComponentUISupportColor105"); await Utils.sleep(2000); @@ -105,10 +142,13 @@ export default function UIComponentUISupportColor() { let ButtonCom = await driver.findComponent(ON.id("UIComponentUISupportColor1051")); let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); - await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT, () => { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Set ligtht-mode successfully.'); + }).catch((error:Error) => { + console.error('Set light-mode failed, ' + error.message); }); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_1050_1 finish.`); done(); @@ -121,7 +161,10 @@ export default function UIComponentUISupportColor() { */ it('SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_1020', 0, async (done: Function) => { Logger.info('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_1020 start.`); - await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_DARK, () => { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_DARK).then(() => { + console.info('Set dark-mode successfully.'); + }).catch((error:Error) => { + console.error('Set dark-mode failed, ' + error.message); }); Settings.createWindow("testability/pages/UIComponentUISupportColor/UIComponentUISupportColor102"); await Utils.sleep(2000); @@ -129,10 +172,19 @@ export default function UIComponentUISupportColor() { let ButtonCom = await driver.findComponent(ON.id("UIComponentUISupportColor1021")); let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); - await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_DARK, () => { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_DARK).then(() => { + console.info('Set dark-mode successfully.'); + }).catch((error:Error) => { + console.error('Set dark-mode failed, ' + error.message); }); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); + await Utils.sleep(1000); + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Set ligtht-mode successfully.'); + }).catch((error:Error) => { + console.error('Set light-mode failed, ' + error.message); + }); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_1020 finish.`); done(); @@ -152,7 +204,7 @@ export default function UIComponentUISupportColor() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_1040 finish.`); done(); @@ -165,18 +217,28 @@ export default function UIComponentUISupportColor() { */ it('SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_1000', 0, async (done: Function) => { Logger.info('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_1000 start.`); - await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT, () => { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Set ligtht-mode successfully.'); + }).catch((error:Error) => { + console.error('Set light-mode failed, ' + error.message); }); Settings.createWindow("testability/pages/UIComponentUISupportColor/UIComponentUISupportColor100"); await Utils.sleep(2000); let driver: Driver = Driver.create(); - let ButtonCom = await driver.findComponent(ON.id("UIComponentUISupportColor1001")); - let pointButtonCenter = await ButtonCom.getBoundsCenter(); - await driver.click(pointButtonCenter.x, pointButtonCenter.y); - await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_DARK, () => { + await Utils.sleep(2000); + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_DARK).then(() => { + console.info('Set dark-mode successfully.'); + }).catch((error:Error) => { + console.error('Set dark-mode failed, ' + error.message); }); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); + await Utils.sleep(1000); + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Set ligtht-mode successfully.'); + }).catch((error:Error) => { + console.error('Set light-mode failed, ' + error.message); + }); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_1000 finish.`); done(); @@ -196,7 +258,7 @@ export default function UIComponentUISupportColor() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_1030 finish.`); done(); @@ -209,18 +271,22 @@ export default function UIComponentUISupportColor() { */ it('SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0990', 0, async (done: Function) => { Logger.info('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0990 start.`); - await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT, () => { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Set ligtht-mode successfully.'); + }).catch((error:Error) => { + console.error('Set light-mode failed, ' + error.message); }); Settings.createWindow("testability/pages/UIComponentUISupportColor/UIComponentUISupportColor099"); await Utils.sleep(2000); let driver: Driver = Driver.create(); - let ButtonCom = await driver.findComponent(ON.id("UIComponentUISupportColor0991")); - let pointButtonCenter = await ButtonCom.getBoundsCenter(); - await driver.click(pointButtonCenter.x, pointButtonCenter.y); - await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT, () => { + await Utils.sleep(2000); + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Set ligtht-mode successfully.'); + }).catch((error:Error) => { + console.error('Set light-mode failed, ' + error.message); }); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0990 finish.`); done(); @@ -233,7 +299,10 @@ export default function UIComponentUISupportColor() { */ it('SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0940', 0, async (done: Function) => { Logger.info('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0940 start.`); - await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_DARK, () => { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_DARK).then(() => { + console.info('Set dark-mode successfully.'); + }).catch((error:Error) => { + console.error('Set dark-mode failed, ' + error.message); }); Settings.createWindow("testability/pages/UIComponentUISupportColor/UIComponentUISupportColor094") await Utils.sleep(2000); @@ -241,10 +310,13 @@ export default function UIComponentUISupportColor() { let ButtonCom = await driver.findComponent(ON.id("UIComponentUISupportColor0940")); let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); - await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT, () => { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Set ligtht-mode successfully.'); + }).catch((error:Error) => { + console.error('Set light-mode failed, ' + error.message); }); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0940 finish.`); done(); @@ -257,7 +329,10 @@ export default function UIComponentUISupportColor() { */ it('SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0930', 0, async (done: Function) => { Logger.info('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0930 start.`); - await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT, () => { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Set ligtht-mode successfully.'); + }).catch((error:Error) => { + console.error('Set light-mode failed, ' + error.message); }); Settings.createWindow("testability/pages/UIComponentUISupportColor/UIComponentUISupportColor093") await Utils.sleep(2000); @@ -265,10 +340,19 @@ export default function UIComponentUISupportColor() { let ButtonCom = await driver.findComponent(ON.id("UIComponentUISupportColor0930")); let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); - await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_DARK, () => { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_DARK).then(() => { + console.info('Set dark-mode successfully.'); + }).catch((error:Error) => { + console.error('Set dark-mode failed, ' + error.message); }); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); + await Utils.sleep(1000); + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Set ligtht-mode successfully.'); + }).catch((error:Error) => { + console.error('Set light-mode failed, ' + error.message); + }); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0930 finish.`); done(); @@ -288,7 +372,7 @@ export default function UIComponentUISupportColor() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0970 finish.`); done(); @@ -301,7 +385,10 @@ export default function UIComponentUISupportColor() { */ it('SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0980', 0, async (done: Function) => { Logger.info('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0980 start.`); - await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT, () => { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Set ligtht-mode successfully.'); + }).catch((error:Error) => { + console.error('Set light-mode failed, ' + error.message); }); Settings.createWindow("testability/pages/UIComponentUISupportColor/UIComponentUISupportColor098"); await Utils.sleep(2000); @@ -309,12 +396,18 @@ export default function UIComponentUISupportColor() { let ButtonCom = await driver.findComponent(ON.id("UIComponentUISupportColor0980")); let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); - await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_DARK, () => { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_DARK).then(() => { + console.info('Set dark-mode successfully.'); + }).catch((error:Error) => { + console.error('Set dark-mode failed, ' + error.message); }); await Utils.sleep(1000); windowSnap.snapShot('UIComponentUISupportColor0980'); await driver.click(pointButtonCenter.x, pointButtonCenter.y); - await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT, () => { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Set ligtht-mode successfully.'); + }).catch((error:Error) => { + console.error('Set light-mode failed, ' + error.message); }); await Utils.sleep(1000); windowSnap.snapShot('UIComponentUISupportColor0981'); @@ -330,7 +423,10 @@ export default function UIComponentUISupportColor() { */ it('SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0920', 0, async (done: Function) => { Logger.info('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0920 start.`); - await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT, () => { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Set ligtht-mode successfully.'); + }).catch((error:Error) => { + console.error('Set light-mode failed, ' + error.message); }); Settings.createWindow("testability/pages/UIComponentUISupportColor/UIComponentUISupportColor092"); await Utils.sleep(2000); @@ -338,10 +434,13 @@ export default function UIComponentUISupportColor() { let ButtonCom = await driver.findComponent(ON.id("UIComponentUISupportColor0920")); let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); - await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT, () => { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Set ligtht-mode successfully.'); + }).catch((error:Error) => { + console.error('Set light-mode failed, ' + error.message); }); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0920 finish.`); done(); @@ -361,7 +460,7 @@ export default function UIComponentUISupportColor() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0960 finish.`); done(); @@ -374,7 +473,10 @@ export default function UIComponentUISupportColor() { */ it('SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0950', 0, async (done: Function) => { Logger.info('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0950 start.`); - await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_DARK, () => { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_DARK).then(() => { + console.info('Set dark-mode successfully.'); + }).catch((error:Error) => { + console.error('Set dark-mode failed, ' + error.message); }); Settings.createWindow("testability/pages/UIComponentUISupportColor/UIComponentUISupportColor095"); await Utils.sleep(2000); @@ -382,13 +484,223 @@ export default function UIComponentUISupportColor() { let ButtonCom = await driver.findComponent(ON.id("UIComponentUISupportColor0950")); let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); - await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_DARK, () => { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_DARK).then(() => { + console.info('Set dark-mode successfully.'); + }).catch((error:Error) => { + console.error('Set dark-mode failed, ' + error.message); }); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); + await Utils.sleep(1000); + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Set ligtht-mode successfully.'); + }).catch((error:Error) => { + console.error('Set light-mode failed, ' + error.message); + }); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0950 finish.`); done(); }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_1410 + * @tc.name : SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_1410 + * @tc.desc : 验证Select组件动态切换浅色模式-浅色模式正常切换 + */ + it('SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_1410', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_1410 start.`); + Settings.createWindow("testability/pages/UIComponentUISupportColor/UIComponentUISupportColor141") + await Utils.sleep(500); + try { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Set ligtht-mode successfully.'); + }).catch((error:Error) => { + console.error('Set light-mode failed, ' + error.message); + }); + await Utils.sleep(1000); + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Set ligtht-mode successfully.'); + }).catch((error:Error) => { + console.error('Set light-mode failed, ' + error.message); + }); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + } catch (error) { + let message = (error as BusinessError).message; + Logger.error('Set dark-mode failed, ' + message); + } + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_1410 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_1420 + * @tc.name : SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_1420 + * @tc.desc : 验证Select组件动态切换浅色模式-深色模式正常切换 + */ + it('SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_1420', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_1420 start.`); + Settings.createWindow("testability/pages/UIComponentUISupportColor/UIComponentUISupportColor142") + await Utils.sleep(500); + try { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Set ligtht-mode successfully.'); + }).catch((error:Error) => { + console.error('Set light-mode failed, ' + error.message); + }); + await Utils.sleep(1000); + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_DARK).then(() => { + console.info('Set dark-mode successfully.'); + }).catch((error:Error) => { + console.error('Set dark-mode failed, ' + error.message); + }); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Set ligtht-mode successfully.'); + }).catch((error:Error) => { + console.error('Set light-mode failed, ' + error.message); + }); + } catch (error) { + let message = (error as BusinessError).message; + Logger.error('Set dark-mode failed, ' + message); + } + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_1420 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_1430 + * @tc.name : SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_1430 + * @tc.desc : 验证Select组件动态切换深色模式-浅色模式正常切换 + */ + it('SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_1430', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_1430 start.`); + Settings.createWindow("testability/pages/UIComponentUISupportColor/UIComponentUISupportColor143") + await Utils.sleep(500); + try { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_DARK).then(() => { + console.info('Set dark-mode successfully.'); + }).catch((error:Error) => { + console.error('Set dark-mode failed, ' + error.message); + }); + await Utils.sleep(1000); + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Set ligtht-mode successfully.'); + }).catch((error:Error) => { + console.error('Set light-mode failed, ' + error.message); + }); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + } catch (error) { + let message = (error as BusinessError).message; + Logger.error('Set dark-mode failed, ' + message); + } + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_1430 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_1440 + * @tc.name : SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_1440 + * @tc.desc : 验证Select组件动态切换深色模式-深色模式正常切换 + */ + it('SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_1440', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_1440 start.`); + Settings.createWindow("testability/pages/UIComponentUISupportColor/UIComponentUISupportColor144") + await Utils.sleep(500); + try { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_DARK).then(() => { + console.info('Set dark-mode successfully.'); + }).catch((error:Error) => { + console.error('Set dark-mode failed, ' + error.message); + }); + await Utils.sleep(1000); + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_DARK).then(() => { + console.info('Set dark-mode successfully.'); + }).catch((error:Error) => { + console.error('Set dark-mode failed, ' + error.message); + }); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Set ligtht-mode successfully.'); + }).catch((error:Error) => { + console.error('Set light-mode failed, ' + error.message); + }); + await Utils.sleep(1000); + } catch (error) { + let message = (error as BusinessError).message; + Logger.error('Set dark-mode failed, ' + message); + } + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_1440 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_1450 + * @tc.name : SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_1450 + * @tc.desc : 验证Select组件固定使用浅色模式 + */ + it('SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_1450', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_1450 start.`); + Settings.createWindow("testability/pages/UIComponentUISupportColor/UIComponentUISupportColor145") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(500); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_1450 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_1460 + * @tc.name : SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_1460 + * @tc.desc : 验证Select组件固定使用深色模式 + */ + it('SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_1460', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_1460 start.`); + Settings.createWindow("testability/pages/UIComponentUISupportColor/UIComponentUISupportColor146") + await Utils.sleep(500); + await windowSnap.snapShot(); + await Utils.sleep(500); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_1460 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_1470 + * @tc.name : SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_1470 + * @tc.desc : 验证Select组件跟随系统深浅颜色变化 + */ + it('SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_1470', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_1470 start.`); + Settings.createWindow("testability/pages/UIComponentUISupportColor/UIComponentUISupportColor147") + await Utils.sleep(500); + try { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_DARK).then(() => { + console.info('Set dark-mode successfully.'); + }).catch((error:Error) => { + console.error('Set dark-mode failed, ' + error.message); + }); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(500); + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Set ligtht-mode successfully.'); + }).catch((error:Error) => { + console.error('Set light-mode failed, ' + error.message); + }); + await Utils.sleep(500); + } catch (error) { + let message = (error as BusinessError).message; + Logger.error('Set dark-mode failed, ' + message); + } + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_1470 finish.`); + done() + }) }) } diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentfunctionSpecialComponentsDialogDataInterfaceTest/UIComponentfunctionSpecialComponentsDialogDataInterface.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentfunctionSpecialComponentsDialogDataInterfaceTest/UIComponentfunctionSpecialComponentsDialogDataInterface.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..b789e46da2bd0743b5e78eecf48d7c3b1e05e3ef --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentfunctionSpecialComponentsDialogDataInterfaceTest/UIComponentfunctionSpecialComponentsDialogDataInterface.test.ets @@ -0,0 +1,998 @@ +/* + * Copyright (C) 2024 Huawei Device 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 { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' +import Settings from '../model/Settings' +import windowSnap from '../model/snapShot' +import Logger from '../model/Logger' +import Utils from '../model/Utils' +import { Driver, MouseButton, ON } from '@kit.TestKit'; + +export default function UIComponentfunctionSpecialComponentsDialogDataInterface() { + + describe('UIComponentfunctionSpecialComponentsDialogDataInterface', () => { + afterEach(async (done: Function) => { + if (Settings.windowClass == undefined) { + return; + } + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`); + return; + } + Logger.info('TEST', `Succeeded in destroy the window.`); + }) + await Utils.sleep(1000); + done(); + }) + /* + * @tc.number ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0010 + * @tc.name ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0010 + * @tc.desc DatePickerDialog + */ + it('ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0010', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0010 start.`); + Settings.createWindow("testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0020") + await Utils.sleep(1000) + let driver: Driver = Driver.create(); + let btn = await driver.findComponent(ON.id('dialogDataInterface0020_btn')); + await Utils.sleep(500); + await btn.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0010 finish.`); + done(); + }) + /* + * @tc.number ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0020 + * @tc.name ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0020 + * @tc.desc DatePickerDialog + */ + it('ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0020', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0020 start.`); + Settings.createWindow("testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0020") + await Utils.sleep(1000) + let driver: Driver = Driver.create(); + let btn = await driver.findComponent(ON.id('dialogDataInterface0020_btn')); + await Utils.sleep(500); + await btn.click(); + await Utils.sleep(500); + let datePicker = await driver.findComponent(ON.type('DatePicker')); + let point1 = await datePicker.getBoundsCenter(); + await Utils.sleep(300); + await driver.mouseScroll({ + x: point1.x, y: point1.y + }, true, 3); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0020 finish.`); + done(); + }) + /* + * @tc.number ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0110 + * @tc.name ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0110 + * @tc.desc DatePickerDialog:DialogAlignment.TopEnd + */ + it('ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0110', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0110 start.`); + Settings.createWindow("testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0110") + await Utils.sleep(1000) + let driver: Driver = Driver.create(); + let cb = await driver.findComponent(ON.id('dialogDataInterface0110_cb5')); + let btn = await driver.findComponent(ON.id('dialogDataInterface0110_btn')); + await Utils.sleep(500); + await cb.click(); + await Utils.sleep(500); + await btn.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0110 finish.`); + done(); + }) + /* + * @tc.number ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0130 + * @tc.name ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0130 + * @tc.desc DatePickerDialog:DialogAlignment.CenterEnd + */ + it('ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0130', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0130 start.`); + Settings.createWindow("testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0110") + await Utils.sleep(1000) + let driver: Driver = Driver.create(); + let cb = await driver.findComponent(ON.id('dialogDataInterface0110_cb7')); + let btn = await driver.findComponent(ON.id('dialogDataInterface0110_btn')); + await Utils.sleep(500); + await cb.click(); + await Utils.sleep(500); + await btn.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0130 finish.`); + done(); + }) + /* + * @tc.number ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0140 + * @tc.name ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0140 + * @tc.desc DatePickerDialog:DialogAlignment.BottomStart + */ + it('ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0140', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0140 start.`); + Settings.createWindow("testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0110") + await Utils.sleep(1000) + let driver: Driver = Driver.create(); + let cb = await driver.findComponent(ON.id('dialogDataInterface0110_cb8')); + let btn = await driver.findComponent(ON.id('dialogDataInterface0110_btn')); + await Utils.sleep(500); + await cb.click(); + await Utils.sleep(500); + await btn.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0140 finish.`); + done(); + }) + /* + * @tc.number ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0070 + * @tc.name ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0070 + * @tc.desc DatePickerDialog:DialogAlignment.Center + */ + it('ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0070', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0070 start.`); + Settings.createWindow("testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0110") + await Utils.sleep(1000) + let driver: Driver = Driver.create(); + let cb = await driver.findComponent(ON.id('dialogDataInterface0110_cb2')); + let btn = await driver.findComponent(ON.id('dialogDataInterface0110_btn')); + await Utils.sleep(500); + await cb.click(); + await Utils.sleep(500); + await btn.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0070 finish.`); + done(); + }) + /* + * @tc.number ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0060 + * @tc.name ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0060 + * @tc.desc DatePickerDialog:DialogAlignment.Top + */ + it('ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0060', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0060 start.`); + Settings.createWindow("testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0110") + await Utils.sleep(1000) + let driver: Driver = Driver.create(); + let cb = await driver.findComponent(ON.id('dialogDataInterface0110_cb1')); + let btn = await driver.findComponent(ON.id('dialogDataInterface0110_btn')); + await Utils.sleep(500); + await cb.click(); + await Utils.sleep(500); + await btn.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0060 finish.`); + done(); + }) + /* + * @tc.number ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0080 + * @tc.name ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0080 + * @tc.desc DatePickerDialog:DialogAlignment.Bottom + */ + it('ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0080', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0080 start.`); + Settings.createWindow("testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0110") + await Utils.sleep(1000) + let driver: Driver = Driver.create(); + let cb = await driver.findComponent(ON.id('dialogDataInterface0110_cb3')); + let btn = await driver.findComponent(ON.id('dialogDataInterface0110_btn')); + await Utils.sleep(500); + await cb.click(); + await Utils.sleep(500); + await btn.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0080 finish.`); + done(); + }) + /* + * @tc.number ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0150 + * @tc.name ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0150 + * @tc.desc DatePickerDialog:DialogAlignment.BottomEnd + */ + it('ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0150', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0150 start.`); + Settings.createWindow("testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0110") + await Utils.sleep(1000) + let driver: Driver = Driver.create(); + let cb = await driver.findComponent(ON.id('dialogDataInterface0110_cb9')); + let btn = await driver.findComponent(ON.id('dialogDataInterface0110_btn')); + await Utils.sleep(500); + await cb.click(); + await Utils.sleep(500); + await btn.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0150 finish.`); + done(); + }) + /* + * @tc.number ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0100 + * @tc.name ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0100 + * @tc.desc DatePickerDialog:DialogAlignment.TopStart + */ + it('ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0100', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0100 start.`); + Settings.createWindow("testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0110") + await Utils.sleep(1000) + let driver: Driver = Driver.create(); + let cb = await driver.findComponent(ON.id('dialogDataInterface0110_cb4')); + let btn = await driver.findComponent(ON.id('dialogDataInterface0110_btn')); + await Utils.sleep(500); + await cb.click(); + await Utils.sleep(500); + await btn.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0100 finish.`); + done(); + }) + /* + * @tc.number ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0120 + * @tc.name ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0120 + * @tc.desc DatePickerDialog:DialogAlignment.CenterStart + */ + it('ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0120', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0120 start.`); + Settings.createWindow("testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0110") + await Utils.sleep(1000) + let driver: Driver = Driver.create(); + let cb = await driver.findComponent(ON.id('dialogDataInterface0110_cb6')); + let btn = await driver.findComponent(ON.id('dialogDataInterface0110_btn')); + await Utils.sleep(500); + await cb.click(); + await Utils.sleep(500); + await btn.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0120 finish.`); + done(); + }) + /* + * @tc.number ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0160 + * @tc.name ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0160 + * @tc.desc DatePickerDialog:none + */ + it('ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0160', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0160 start.`); + Settings.createWindow("testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0020") + await Utils.sleep(1000) + let driver: Driver = Driver.create(); + let btn = await driver.findComponent(ON.id('dialogDataInterface0020_btn')); + await Utils.sleep(500); + await btn.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0160 finish.`); + done(); + }) + /* + * @tc.number ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0090 + * @tc.name ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0090 + * @tc.desc DatePickerDialog:default + */ + it('ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0090', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0090 start.`); + Settings.createWindow("testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0110") + await Utils.sleep(1000) + let driver: Driver = Driver.create(); + let btn = await driver.findComponent(ON.id('dialogDataInterface0110_btn')); + await Utils.sleep(500); + await btn.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0090 finish.`); + done(); + }) + /* + * @tc.number ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0180 + * @tc.name ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0180 + * @tc.desc DatePickerDialog:offset + */ + it('ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0180', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0180 start.`); + Settings.createWindow("testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0180") + await Utils.sleep(1000) + let driver: Driver = Driver.create(); + let cb1 = await driver.findComponent(ON.id('dialogDataInterface0180_cb1')); + let btn = await driver.findComponent(ON.id('dialogDataInterface0180_btn')); + await Utils.sleep(500); + await cb1.click(); + await Utils.sleep(500); + await btn.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0180 finish.`); + done(); + }) + /* + * @tc.number ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0190 + * @tc.name ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0190 + * @tc.desc DatePickerDialog:offset + */ + it('ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0190', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0190 start.`); + Settings.createWindow("testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0180") + await Utils.sleep(1000) + let driver: Driver = Driver.create(); + let btn = await driver.findComponent(ON.id('dialogDataInterface0180_btn')); + await Utils.sleep(500); + await btn.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0190 finish.`); + done(); + }) + /* + * @tc.number ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0170 + * @tc.name ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0170 + * @tc.desc DatePickerDialog:offset + */ + it('ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0170', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0170 start.`); + Settings.createWindow("testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0180") + await Utils.sleep(1000) + let driver: Driver = Driver.create(); + let cb = await driver.findComponent(ON.id('dialogDataInterface0180_cb2')); + let btn = await driver.findComponent(ON.id('dialogDataInterface0180_btn')); + await Utils.sleep(500); + await cb.click(); + await Utils.sleep(500); + await btn.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0170 finish.`); + done(); + }) + /* + * @tc.number ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0030 + * @tc.name ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0030 + * @tc.desc DatePickerDialog:lunarSwitch + */ + it('ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0030', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0030 start.`); + Settings.createWindow("testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0040") + await Utils.sleep(1000) + let driver: Driver = Driver.create(); + let cb = await driver.findComponent(ON.id('dialogDataInterface0040_cb1')); + let btn = await driver.findComponent(ON.id('dialogDataInterface0040_btn')); + await Utils.sleep(500); + await cb.click(); + await Utils.sleep(500); + await btn.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0030 finish.`); + done(); + }) + /* + * @tc.number ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0040 + * @tc.name ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0040 + * @tc.desc DatePickerDialog:lunarSwitch + */ + it('ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0040', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0040 start.`); + Settings.createWindow("testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0040") + await Utils.sleep(1000) + let driver: Driver = Driver.create(); + let btn = await driver.findComponent(ON.id('dialogDataInterface0040_btn')); + await Utils.sleep(500); + await btn.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0040 finish.`); + done(); + }) + /* + * @tc.number ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0050 + * @tc.name ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0050 + * @tc.desc DatePickerDialog:lunarSwitch + */ + it('ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0050', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0050 start.`); + Settings.createWindow("testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0020") + await Utils.sleep(1000) + let driver: Driver = Driver.create(); + let btn = await driver.findComponent(ON.id('dialogDataInterface0020_btn')); + await Utils.sleep(500); + await btn.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0050 finish.`); + done(); + }) + /* + * @tc.number ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0210 + * @tc.name ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0210 + * @tc.desc DatePickerDialog:maskRect + */ + it('ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0210', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0210 start.`); + Settings.createWindow("testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0020") + await Utils.sleep(1000) + let driver: Driver = Driver.create(); + let btn = await driver.findComponent(ON.id('dialogDataInterface0020_btn')); + await Utils.sleep(500); + await btn.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0210 finish.`); + done(); + }) + /* + * @tc.number ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0200 + * @tc.name ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0200 + * @tc.desc DatePickerDialog:maskRect + */ + it('ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0200', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0200 start.`); + Settings.createWindow("testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0200") + await Utils.sleep(1000) + let driver: Driver = Driver.create(); + let cb = await driver.findComponent(ON.id('dialogDataInterface0200_cb1')); + let btn = await driver.findComponent(ON.id('dialogDataInterface0200_btn')); + await Utils.sleep(500); + await cb.click(); + await Utils.sleep(500); + await btn.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0200 finish.`); + done(); + }) + /* + * @tc.number ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0220 + * @tc.name ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0220 + * @tc.desc DatePickerDialog + */ + it('ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0220', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0220 start.`); + Settings.createWindow("testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0220") + await Utils.sleep(1000) + let driver: Driver = Driver.create(); + let btn = await driver.findComponent(ON.id('dialogDataInterface0220_btn')); + await Utils.sleep(500); + await btn.click(); + await Utils.sleep(500); + let datePicker = await driver.findComponent(ON.type('DatePicker')); + let point1 = await datePicker.getBoundsCenter(); + await Utils.sleep(300); + await driver.mouseScroll({ + x: point1.x, y: point1.y + }, true, 3); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0220 finish.`); + done(); + }) + /* + * @tc.number ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0310 + * @tc.name ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0310 + * @tc.desc DatePickerDialog:BlurStyle.Regular + */ + it('ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0310', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0310 start.`); + Settings.createWindow("testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0310") + await Utils.sleep(1000) + let driver: Driver = Driver.create(); + let cb = await driver.findComponent(ON.id('dialogDataInterface0310_cb1')); + let btn = await driver.findComponent(ON.id('dialogDataInterface0310_btn')); + await Utils.sleep(500); + await cb.click(); + await Utils.sleep(500); + await btn.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0310 finish.`); + done(); + }) + /* + * @tc.number ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0360 + * @tc.name ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0360 + * @tc.desc DatePickerDialog:BlurStyle.BACKGROUND_ULTRA_THICK + */ + it('ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0360', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0360 start.`); + Settings.createWindow("testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0310") + await Utils.sleep(1000) + let driver: Driver = Driver.create(); + let cb = await driver.findComponent(ON.id('dialogDataInterface0310_cb2')); + let btn = await driver.findComponent(ON.id('dialogDataInterface0310_btn')); + await Utils.sleep(500); + await cb.click(); + await Utils.sleep(500); + await btn.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0360 finish.`); + done(); + }) + /* + * @tc.number ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0300 + * @tc.name ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0300 + * @tc.desc DatePickerDialog:BlurStyle.Thin + */ + it('ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0300', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0300 start.`); + Settings.createWindow("testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0310") + await Utils.sleep(1000) + let driver: Driver = Driver.create(); + let cb = await driver.findComponent(ON.id('dialogDataInterface0310_cb3')); + let btn = await driver.findComponent(ON.id('dialogDataInterface0310_btn')); + await Utils.sleep(500); + await cb.click(); + await Utils.sleep(500); + await btn.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0300 finish.`); + done(); + }) + /* + * @tc.number ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0330 + * @tc.name ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0330 + * @tc.desc DatePickerDialog:BlurStyle.BACKGROUND_THIN + */ + it('ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0330', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0330 start.`); + Settings.createWindow("testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0310") + await Utils.sleep(1000) + let driver: Driver = Driver.create(); + let cb = await driver.findComponent(ON.id('dialogDataInterface0310_cb4')); + let btn = await driver.findComponent(ON.id('dialogDataInterface0310_btn')); + await Utils.sleep(500); + await cb.click(); + await Utils.sleep(500); + await btn.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0330 finish.`); + done(); + }) + /* + * @tc.number ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0370 + * @tc.name ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0370 + * @tc.desc DatePickerDialog:BlurStyle.None + */ + it('ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0370', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0370 start.`); + Settings.createWindow("testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0310") + await Utils.sleep(1000) + let driver: Driver = Driver.create(); + let btn = await driver.findComponent(ON.id('dialogDataInterface0310_btn')); + await Utils.sleep(500); + await btn.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0370 finish.`); + done(); + }) + /* + * @tc.number ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0380 + * @tc.name ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0380 + * @tc.desc DatePickerDialog:BlurStyle.COMPONENT_ULTRA_THIN + */ + it('ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0380', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0380 start.`); + Settings.createWindow("testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0310") + await Utils.sleep(1000) + let driver: Driver = Driver.create(); + let cb = await driver.findComponent(ON.id('dialogDataInterface0310_cb5')); + let btn = await driver.findComponent(ON.id('dialogDataInterface0310_btn')); + await Utils.sleep(500); + await cb.click(); + await Utils.sleep(500); + await btn.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0380 finish.`); + done(); + }) + /* + * @tc.number ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0320 + * @tc.name ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0320 + * @tc.desc DatePickerDialog:BlurStyle.COMPONENT_ULTRA_THIN + */ + it('ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0320', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0320 start.`); + Settings.createWindow("testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0310") + await Utils.sleep(1000) + let driver: Driver = Driver.create(); + let cb = await driver.findComponent(ON.id('dialogDataInterface0310_cb6')); + let btn = await driver.findComponent(ON.id('dialogDataInterface0310_btn')); + await Utils.sleep(500); + await cb.click(); + await Utils.sleep(500); + await btn.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0320 finish.`); + done(); + }) + /* + * @tc.number ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0340 + * @tc.name ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0340 + * @tc.desc DatePickerDialog:BlurStyle.BACKGROUND_REGULAR + */ + it('ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0340', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0340 start.`); + Settings.createWindow("testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0310") + await Utils.sleep(1000) + let driver: Driver = Driver.create(); + let cb = await driver.findComponent(ON.id('dialogDataInterface0310_cb7')); + let btn = await driver.findComponent(ON.id('dialogDataInterface0310_btn')); + await Utils.sleep(500); + await cb.click(); + await Utils.sleep(500); + await btn.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0340 finish.`); + done(); + }) + /* + * @tc.number ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0390 + * @tc.name ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0390 + * @tc.desc DatePickerDialog:BlurStyle.COMPONENT_THIN + */ + it('ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0390', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0390 start.`); + Settings.createWindow("testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0310") + await Utils.sleep(1000) + let driver: Driver = Driver.create(); + let cb = await driver.findComponent(ON.id('dialogDataInterface0310_cb8')); + let btn = await driver.findComponent(ON.id('dialogDataInterface0310_btn')); + await Utils.sleep(500); + await cb.click(); + await Utils.sleep(500); + await btn.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0390 finish.`); + done(); + }) + /* + * @tc.number ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0400 + * @tc.name ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0400 + * @tc.desc DatePickerDialog:BlurStyle.COMPONENT_REGULAR + */ + it('ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0400', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0400 start.`); + Settings.createWindow("testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0310") + await Utils.sleep(1000) + let driver: Driver = Driver.create(); + let cb = await driver.findComponent(ON.id('dialogDataInterface0310_cb9')); + let btn = await driver.findComponent(ON.id('dialogDataInterface0310_btn')); + await Utils.sleep(500); + await cb.click(); + await Utils.sleep(500); + await btn.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0400 finish.`); + done(); + }) + /* + * @tc.number ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0350 + * @tc.name ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0350 + * @tc.desc DatePickerDialog:BlurStyle.BACKGROUND_THICK + */ + it('ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0350', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0350 start.`); + Settings.createWindow("testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0310") + await Utils.sleep(1000) + let driver: Driver = Driver.create(); + let cb = await driver.findComponent(ON.id('dialogDataInterface0310_cb10')); + let btn = await driver.findComponent(ON.id('dialogDataInterface0310_btn')); + await Utils.sleep(500); + await cb.click(); + await Utils.sleep(500); + await btn.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0350 finish.`); + done(); + }) + /* + * @tc.number ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0430 + * @tc.name ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0430 + * @tc.desc DatePickerDialog:BlurStyle + */ + it('ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0430', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0430 start.`); + Settings.createWindow("testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0020") + await Utils.sleep(1000) + let driver: Driver = Driver.create(); + let btn = await driver.findComponent(ON.id('dialogDataInterface0020_btn')); + await Utils.sleep(500); + await btn.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0430 finish.`); + done(); + }) + /* + * @tc.number ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0410 + * @tc.name ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0410 + * @tc.desc DatePickerDialog:BlurStyle.COMPONENT_ULTRA_THICK + */ + it('ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0410', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0410 start.`); + Settings.createWindow("testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0310") + await Utils.sleep(1000) + let driver: Driver = Driver.create(); + let cb = await driver.findComponent(ON.id('dialogDataInterface0310_cb11')); + let btn = await driver.findComponent(ON.id('dialogDataInterface0310_btn')); + await Utils.sleep(500); + await cb.click(); + await Utils.sleep(500); + await btn.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0410 finish.`); + done(); + }) + /* + * @tc.number ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0420 + * @tc.name ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0420 + * @tc.desc DatePickerDialog:BlurStyle.COMPONENT_ULTRA_THICK + */ + it('ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0420', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0420 start.`); + Settings.createWindow("testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0310") + await Utils.sleep(1000) + let driver: Driver = Driver.create(); + let cb = await driver.findComponent(ON.id('dialogDataInterface0310_cb11')); + let btn = await driver.findComponent(ON.id('dialogDataInterface0310_btn')); + await Utils.sleep(500); + await cb.click(); + await Utils.sleep(500); + await btn.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0420 finish.`); + done(); + }) + /* + * @tc.number ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0280 + * @tc.name ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0280 + * @tc.desc DatePickerDialog:backgroundColor + */ + it('ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0280', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0280 start.`); + Settings.createWindow("testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0020") + await Utils.sleep(1000) + let driver: Driver = Driver.create(); + let btn = await driver.findComponent(ON.id('dialogDataInterface0020_btn')); + await Utils.sleep(500); + await btn.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0280 finish.`); + done(); + }) + /* + * @tc.number ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0240 + * @tc.name ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0240 + * @tc.desc DatePickerDialog:backgroundColor + */ + it('ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0240', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0240 start.`); + Settings.createWindow("testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0240") + await Utils.sleep(1000) + let driver: Driver = Driver.create(); + let cb = await driver.findComponent(ON.id('dialogDataInterface0240_cb1')); + let btn = await driver.findComponent(ON.id('dialogDataInterface0240_btn')); + await Utils.sleep(500); + await cb.click(); + await Utils.sleep(500); + await btn.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0240 finish.`); + done(); + }) + /* + * @tc.number ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0230 + * @tc.name ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0230 + * @tc.desc DatePickerDialog:backgroundColor + */ + it('ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0230', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0230 start.`); + Settings.createWindow("testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0240") + await Utils.sleep(1000) + let driver: Driver = Driver.create(); + let cb = await driver.findComponent(ON.id('dialogDataInterface0240_cb2')); + let btn = await driver.findComponent(ON.id('dialogDataInterface0240_btn')); + await Utils.sleep(500); + await cb.click(); + await Utils.sleep(500); + await btn.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0230 finish.`); + done(); + }) + /* + * @tc.number ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0250 + * @tc.name ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0250 + * @tc.desc DatePickerDialog:backgroundColor + */ + it('ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0250', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0250 start.`); + Settings.createWindow("testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0240") + await Utils.sleep(1000) + let driver: Driver = Driver.create(); + let cb = await driver.findComponent(ON.id('dialogDataInterface0240_cb3')); + let btn = await driver.findComponent(ON.id('dialogDataInterface0240_btn')); + await Utils.sleep(500); + await cb.click(); + await Utils.sleep(500); + await btn.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0250 finish.`); + done(); + }) + /* + * @tc.number ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0270 + * @tc.name ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0270 + * @tc.desc DatePickerDialog:backgroundColor + */ + it('ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0270', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0270 start.`); + Settings.createWindow("testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0240") + await Utils.sleep(1000) + let driver: Driver = Driver.create(); + let cb = await driver.findComponent(ON.id('dialogDataInterface0240_cb4')); + let btn = await driver.findComponent(ON.id('dialogDataInterface0240_btn')); + await Utils.sleep(500); + await cb.click(); + await Utils.sleep(500); + await btn.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0270 finish.`); + done(); + }) + /* + * @tc.number ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0260 + * @tc.name ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0260 + * @tc.desc DatePickerDialog:backgroundColor + */ + it('ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0260', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0260 start.`); + Settings.createWindow("testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0240") + await Utils.sleep(1000) + let driver: Driver = Driver.create(); + let cb = await driver.findComponent(ON.id('dialogDataInterface0240_cb5')); + let btn = await driver.findComponent(ON.id('dialogDataInterface0240_btn')); + await Utils.sleep(500); + await cb.click(); + await Utils.sleep(500); + await btn.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0260 finish.`); + done(); + }) + /* + * @tc.number ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0290 + * @tc.name ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0290 + * @tc.desc DatePickerDialog:backgroundColor + */ + it('ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0290', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0290 start.`); + Settings.createWindow("testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0240") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let cb1 = await driver.findComponent(ON.id('dialogDataInterface0240_cb1')); + let cb2 = await driver.findComponent(ON.id('dialogDataInterface0240_cb2')); + let cb3 = await driver.findComponent(ON.id('dialogDataInterface0240_cb3')); + let btn = await driver.findComponent(ON.id('dialogDataInterface0240_btn')); + await Utils.sleep(300); + await cb1.click(); + await Utils.sleep(300); + await btn.click(); + await Utils.sleep(500); + let datePicker = await driver.findComponent(ON.type('DatePicker')); + let point1 = await datePicker.getBounds(); + await Utils.sleep(300); + await Utils.sleep(300); + await driver.click(point1.left + 50, point1.bottom + 30); + + await Utils.sleep(300); + await cb1.click(); + await Utils.sleep(300); + await cb2.click(); + await Utils.sleep(300); + await btn.click(); + await Utils.sleep(500); + await driver.click(point1.left + 50, point1.bottom + 30); + + await Utils.sleep(300); + await cb2.click(); + await Utils.sleep(300); + await cb3.click(); + await Utils.sleep(300); + await btn.click(); + await Utils.sleep(300); + await driver.click(point1.left + 50, point1.bottom + 30); + + await Utils.sleep(300); + await cb3.click(); + await Utils.sleep(300); + await cb1.click(); + await Utils.sleep(300); + await btn.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ARKUI_COMPONENTFUNCTION_SPECIALCOMPONENTS_DIALOG_DATA_INTERFACE_0290 finish.`); + done(); + }) + }) +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UITestCaseTest/UITestCaseTest.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UITestCaseTest/UITestCaseTest.test.ets index 3eb298841d45ba5327799ebf74cac6a88d27c69a..442b282ada0c70bfad4c3bb7d423de51d0761aff 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UITestCaseTest/UITestCaseTest.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UITestCaseTest/UITestCaseTest.test.ets @@ -38,7 +38,21 @@ import { Driver, ON } from '@ohos.UiTest'; export default function UITestCaseTest() { describe('UITestCaseTest', () => { + afterEach(async (done: Function) => { + if (Settings.windowClass == undefined) { + return; + } + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`); + return; + } + Logger.info('TEST', `Succeeded in destroy the window.`); + }) + await Utils.sleep(1000); + done(); + }) /* * @tc.number TestCase_6eb28b4e7e20410ea8a92fc7bb5809fc_1 @@ -54,7 +68,7 @@ export default function UITestCaseTest() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `TestCase_6eb28b4e7e20410ea8a92fc7bb5809fc_1 finish.`); done(); @@ -77,7 +91,7 @@ export default function UITestCaseTest() { await Utils.sleep(1000); await driver.click(pointButtonCenter.x, bounds.top - 20); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `TestCase_6eb28b4e7e20410ea8a92fc7bb5809fc_2 finish.`); done(); @@ -97,7 +111,7 @@ export default function UITestCaseTest() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `TestCase_8f7f773ecd634e0299eeaf06572766d6 finish.`); done(); @@ -117,7 +131,7 @@ export default function UITestCaseTest() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `TestCase_d087a60e6a7b48ca972deccca5b79d53 finish.`); done(); @@ -137,10 +151,67 @@ export default function UITestCaseTest() { let pointButtonCenter = await ButtonCom.getBoundsCenter(); await driver.click(pointButtonCenter.x, pointButtonCenter.y); await Utils.sleep(3000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `TestCase_bf3141f96575428e895b380b081b0d89 finish.`); done(); }) + + /* + * @tc.number TestCase_f4fccd0f5fd54498b59a2cc7705810eb + * @tc.name TestCase_f4fccd0f5fd54498b59a2cc7705810eb + * @tc.desc indicatorBuilder value set to button1 bind the click event, click the button component, button becomes selected state + */ + it('TestCase_f4fccd0f5fd54498b59a2cc7705810eb', 0, async (done: Function) => { + Logger.info('TEST', `TestCase_f4fccd0f5fd54498b59a2cc7705810eb start.`); + Settings.createWindow("testability/pages/UITestCase/UITestCase005"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let ButtonCom = await driver.findComponent(ON.id("UITestCase0050")); + await ButtonCom.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `TestCase_f4fccd0f5fd54498b59a2cc7705810eb finish.`); + done(); + }) + + /* + * @tc.number TestCase_a8338b8f06ff4d979697706cd26d097e + * @tc.name TestCase_a8338b8f06ff4d979697706cd26d097e + * @tc.desc indicatorBuilder is set to button1 to bind the click event, set stopPropagation0 to prevent bubbler up, click the button component, button changes to selected state + */ + it('TestCase_a8338b8f06ff4d979697706cd26d097e', 0, async (done: Function) => { + Logger.info('TEST', `TestCase_a8338b8f06ff4d979697706cd26d097e start.`); + Settings.createWindow("testability/pages/UITestCase/UITestCase006"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let ButtonCom = await driver.findComponent(ON.id("UITestCase0061")); + await ButtonCom.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `TestCase_a8338b8f06ff4d979697706cd26d097e finish.`); + done(); + }) + + /* + * @tc.number TestCase_14ff3370028f4788b4bdb3958fe3ae39 + * @tc.name TestCase_14ff3370028f4788b4bdb3958fe3ae39 + * @tc.desc indicatorBuilder value is set to button1 without binding events, click the button component, button becomes selected state + */ + it('TestCase_14ff3370028f4788b4bdb3958fe3ae39', 0, async (done: Function) => { + Logger.info('TEST', `TestCase_14ff3370028f4788b4bdb3958fe3ae39 start.`); + Settings.createWindow("testability/pages/UITestCase/UITestCase007"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let ButtonCom = await driver.findComponent(ON.id("UITestCase0071")); + await ButtonCom.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `TestCase_14ff3370028f4788b4bdb3958fe3ae39 finish.`); + done(); + }) }) } diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UiComponentButtonSelectAlign/UiComponentButtonSelectAlign.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UiComponentButtonSelectAlign/UiComponentButtonSelectAlign.test.ets index a09b5277a3b64943ed6dd032dd72a0cf3d92d9ee..df63e15ba08af8e8d550a7a2e6dd97d142ce70d6 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UiComponentButtonSelectAlign/UiComponentButtonSelectAlign.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UiComponentButtonSelectAlign/UiComponentButtonSelectAlign.test.ets @@ -39,7 +39,21 @@ import { Component, Driver ,ON } from '@ohos.UiTest' export default function UiComponentButtonSelectAlign() { describe('UiComponentButtonSelectAlign', () => { + afterEach(async (done: Function) => { + if (Settings.windowClass == undefined) { + return + } + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`) + return; + } + Logger.info('TEST', `Succeeded in destroy the window.`); + }) + await Utils.sleep(1000); + done() + }) /* * @tc.number : SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ALIGN_0010 @@ -54,7 +68,7 @@ export default function UiComponentButtonSelectAlign() { let select: Component = await driver.findComponent(ON.id('UiComponentButtonSelectAlign0010_001')); await select.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ALIGN_0010 finish.`); done() @@ -73,7 +87,7 @@ export default function UiComponentButtonSelectAlign() { let select: Component = await driver.findComponent(ON.id('UiComponentButtonSelectAlign0020_001')); await select.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ALIGN_0020 finish.`); done() @@ -92,7 +106,7 @@ export default function UiComponentButtonSelectAlign() { let select: Component = await driver.findComponent(ON.id('UiComponentButtonSelectAlign0030_001')); await select.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ALIGN_0030 finish.`); done() @@ -111,7 +125,7 @@ export default function UiComponentButtonSelectAlign() { let select: Component = await driver.findComponent(ON.id('UiComponentButtonSelectAlign0040_001')); await select.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ALIGN_0040 finish.`); done() @@ -130,7 +144,7 @@ export default function UiComponentButtonSelectAlign() { let select: Component = await driver.findComponent(ON.id('UiComponentButtonSelectAlign0050_001')); await select.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ALIGN_0050 finish.`); done() @@ -149,7 +163,7 @@ export default function UiComponentButtonSelectAlign() { let select: Component = await driver.findComponent(ON.id('UiComponentButtonSelectAlign0060_001')); await select.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ALIGN_0060 finish.`); done() @@ -168,7 +182,7 @@ export default function UiComponentButtonSelectAlign() { let select: Component = await driver.findComponent(ON.id('UiComponentButtonSelectAlign0070_001')); await select.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ALIGN_0070 finish.`); done() @@ -187,7 +201,7 @@ export default function UiComponentButtonSelectAlign() { let select: Component = await driver.findComponent(ON.id('UiComponentButtonSelectAlign0080_001')); await select.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ALIGN_0080 finish.`); done() @@ -206,7 +220,7 @@ export default function UiComponentButtonSelectAlign() { let select: Component = await driver.findComponent(ON.id('UiComponentButtonSelectAlign0090_001')); await select.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ALIGN_0090 finish.`); done() @@ -225,7 +239,7 @@ export default function UiComponentButtonSelectAlign() { let select: Component = await driver.findComponent(ON.id('UiComponentButtonSelectAlign0100_001')); await select.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ALIGN_0100 finish.`); done() @@ -244,7 +258,7 @@ export default function UiComponentButtonSelectAlign() { let select: Component = await driver.findComponent(ON.id('UiComponentButtonSelectAlign0110_001')); await select.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ALIGN_0110 finish.`); done() @@ -263,7 +277,7 @@ export default function UiComponentButtonSelectAlign() { let select: Component = await driver.findComponent(ON.id('UiComponentButtonSelectAlign0120_001')); await select.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ALIGN_0120 finish.`); done() @@ -282,7 +296,7 @@ export default function UiComponentButtonSelectAlign() { let select: Component = await driver.findComponent(ON.id('UiComponentButtonSelectAlign0130_001')); await select.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ALIGN_0130 finish.`); done() @@ -301,7 +315,7 @@ export default function UiComponentButtonSelectAlign() { let select: Component = await driver.findComponent(ON.id('UiComponentButtonSelectAlign0140_001')); await select.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ALIGN_0140 finish.`); done() @@ -320,7 +334,7 @@ export default function UiComponentButtonSelectAlign() { let select: Component = await driver.findComponent(ON.id('UiComponentButtonSelectAlign0150_001')); await select.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ALIGN_0150 finish.`); done() @@ -339,7 +353,7 @@ export default function UiComponentButtonSelectAlign() { let select: Component = await driver.findComponent(ON.id('UiComponentButtonSelectAlign0160_001')); await select.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ALIGN_0160 finish.`); done() @@ -358,7 +372,7 @@ export default function UiComponentButtonSelectAlign() { let select: Component = await driver.findComponent(ON.id('UiComponentButtonSelectAlign0170_001')); await select.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ALIGN_0170 finish.`); done() @@ -377,7 +391,7 @@ export default function UiComponentButtonSelectAlign() { let select: Component = await driver.findComponent(ON.id('UiComponentButtonSelectAlign0180_001')); await select.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ALIGN_0180 finish.`); done() @@ -396,7 +410,7 @@ export default function UiComponentButtonSelectAlign() { let select: Component = await driver.findComponent(ON.id('UiComponentButtonSelectAlign0190_001')); await select.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ALIGN_0190 finish.`); done() @@ -415,7 +429,7 @@ export default function UiComponentButtonSelectAlign() { let select: Component = await driver.findComponent(ON.id('UiComponentButtonSelectAlign0200_001')); await select.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ALIGN_0200 finish.`); done() @@ -434,7 +448,7 @@ export default function UiComponentButtonSelectAlign() { let select: Component = await driver.findComponent(ON.id('UiComponentButtonSelectAlign0210_001')); await select.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ALIGN_0210 finish.`); done() @@ -453,7 +467,7 @@ export default function UiComponentButtonSelectAlign() { let select: Component = await driver.findComponent(ON.id('UiComponentButtonSelectAlign0220_001')); await select.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ALIGN_0220 finish.`); done() @@ -472,7 +486,7 @@ export default function UiComponentButtonSelectAlign() { let select: Component = await driver.findComponent(ON.id('UiComponentButtonSelectAlign0230_001')); await select.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ALIGN_0230 finish.`); done() @@ -491,7 +505,7 @@ export default function UiComponentButtonSelectAlign() { let select: Component = await driver.findComponent(ON.id('UiComponentButtonSelectAlign0240_001')); await select.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ALIGN_0240 finish.`); done() @@ -510,7 +524,7 @@ export default function UiComponentButtonSelectAlign() { let select: Component = await driver.findComponent(ON.id('UiComponentButtonSelectAlign0250_001')); await select.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ALIGN_0250 finish.`); done() @@ -529,7 +543,7 @@ export default function UiComponentButtonSelectAlign() { let select: Component = await driver.findComponent(ON.id('UiComponentButtonSelectAlign0260_001')); await select.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ALIGN_0260 finish.`); done() @@ -548,7 +562,7 @@ export default function UiComponentButtonSelectAlign() { let select: Component = await driver.findComponent(ON.id('UiComponentButtonSelectAlign0270_001')); await select.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ALIGN_0270 finish.`); done() @@ -567,7 +581,7 @@ export default function UiComponentButtonSelectAlign() { let select: Component = await driver.findComponent(ON.id('UiComponentButtonSelectAlign0280_001')); await select.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ALIGN_0280 finish.`); done() @@ -585,8 +599,8 @@ export default function UiComponentButtonSelectAlign() { let driver: Driver = Driver.create(); let select: Component = await driver.findComponent(ON.id('UiComponentButtonSelectAlign0290_001')); await select.click(); - await Utils.sleep(1000); - windowSnap.snapShot(); + await Utils.sleep(4000); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ALIGN_0290 finish.`); done() @@ -605,7 +619,7 @@ export default function UiComponentButtonSelectAlign() { let select: Component = await driver.findComponent(ON.id('UiComponentButtonSelectAlign0300_001')); await select.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ALIGN_0300 finish.`); done() @@ -624,7 +638,7 @@ export default function UiComponentButtonSelectAlign() { let select: Component = await driver.findComponent(ON.id('UiComponentButtonSelectAlign0310_001')); await select.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ALIGN_0310 finish.`); done() @@ -643,7 +657,7 @@ export default function UiComponentButtonSelectAlign() { let select: Component = await driver.findComponent(ON.id('UiComponentButtonSelectAlign0320_001')); await select.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ALIGN_0320 finish.`); done() @@ -662,7 +676,7 @@ export default function UiComponentButtonSelectAlign() { let select: Component = await driver.findComponent(ON.id('UiComponentButtonSelectAlign0330_001')); await select.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ALIGN_0330 finish.`); done() @@ -681,7 +695,7 @@ export default function UiComponentButtonSelectAlign() { let select: Component = await driver.findComponent(ON.id('UiComponentButtonSelectAlign0340_001')); await select.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ALIGN_0340 finish.`); done() @@ -700,7 +714,7 @@ export default function UiComponentButtonSelectAlign() { let select: Component = await driver.findComponent(ON.id('UiComponentButtonSelectAlign0350_001')); await select.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ALIGN_0350 finish.`); done() @@ -719,7 +733,7 @@ export default function UiComponentButtonSelectAlign() { let select: Component = await driver.findComponent(ON.id('UiComponentButtonSelectAlign0360_001')); await select.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ALIGN_0360 finish.`); done() @@ -738,7 +752,7 @@ export default function UiComponentButtonSelectAlign() { let select: Component = await driver.findComponent(ON.id('UiComponentButtonSelectAlign0370_001')); await select.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ALIGN_0370 finish.`); done() @@ -757,7 +771,7 @@ export default function UiComponentButtonSelectAlign() { let select: Component = await driver.findComponent(ON.id('UiComponentButtonSelectAlign0380_001')); await select.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ALIGN_0380 finish.`); done() @@ -776,7 +790,7 @@ export default function UiComponentButtonSelectAlign() { let select: Component = await driver.findComponent(ON.id('UiComponentButtonSelectAlign0390_001')); await select.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ALIGN_0390 finish.`); done() @@ -795,7 +809,7 @@ export default function UiComponentButtonSelectAlign() { let select: Component = await driver.findComponent(ON.id('UiComponentButtonSelectAlign0400_001')); await select.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ALIGN_0400 finish.`); done() @@ -814,7 +828,7 @@ export default function UiComponentButtonSelectAlign() { let select: Component = await driver.findComponent(ON.id('UiComponentButtonSelectAlign0410_001')); await select.click(); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ALIGN_0410 finish.`); done() @@ -829,7 +843,7 @@ export default function UiComponentButtonSelectAlign() { Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ALIGN_0420 start.`); Settings.createWindow("testability/pages/UiComponentButtonSelectAlign/UiComponentButtonSelectAlign0420") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ALIGN_0420 finish.`); done() diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UiComponentButtonSelectEnhancement/UiComponentButtonSelectEnhancement.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UiComponentButtonSelectEnhancement/UiComponentButtonSelectEnhancement.test.ets index 4fbfa47e38af2ff483dc2cfc63041a4ea34fb578..ab935bb0994e27666b6721ed1ae19083fda5ea72 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UiComponentButtonSelectEnhancement/UiComponentButtonSelectEnhancement.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UiComponentButtonSelectEnhancement/UiComponentButtonSelectEnhancement.test.ets @@ -41,6 +41,21 @@ import Window from '@ohos.window' export default function UiComponentButtonSelectEnhancement() { describe('UiComponentButtonSelectEnhancement', () => { + afterEach(async (done: Function) => { + if (Settings.windowClass == undefined) { + return + } + + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`) + return; + } + Logger.info('TEST', `Succeeded in destroy the window.`); + }) + await Utils.sleep(1000); + done() + }) /* * @tc.number : SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ENHANCEMENT_0030 @@ -51,7 +66,7 @@ export default function UiComponentButtonSelectEnhancement() { Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ENHANCEMENT_0030 start.`); Settings.createWindow("testability/pages/UiComponentButtonSelectEnhancement/UiComponentButtonSelectEnhancement0030") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ENHANCEMENT_0030 finish.`); done() @@ -66,7 +81,7 @@ export default function UiComponentButtonSelectEnhancement() { Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ENHANCEMENT_0040 start.`); Settings.createWindow("testability/pages/UiComponentButtonSelectEnhancement/UiComponentButtonSelectEnhancement0040") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ENHANCEMENT_0040 finish.`); done() @@ -81,7 +96,7 @@ export default function UiComponentButtonSelectEnhancement() { Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ENHANCEMENT_0050 start.`); Settings.createWindow("testability/pages/UiComponentButtonSelectEnhancement/UiComponentButtonSelectEnhancement0050") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ENHANCEMENT_0050 finish.`); done() @@ -96,7 +111,7 @@ export default function UiComponentButtonSelectEnhancement() { Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ENHANCEMENT_0060 start.`); Settings.createWindow("testability/pages/UiComponentButtonSelectEnhancement/UiComponentButtonSelectEnhancement0060") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ENHANCEMENT_0060 finish.`); done() @@ -111,7 +126,7 @@ export default function UiComponentButtonSelectEnhancement() { Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ENHANCEMENT_0070 start.`); Settings.createWindow("testability/pages/UiComponentButtonSelectEnhancement/UiComponentButtonSelectEnhancement0070") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ENHANCEMENT_0070 finish.`); done() @@ -126,7 +141,7 @@ export default function UiComponentButtonSelectEnhancement() { Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ENHANCEMENT_0080 start.`); Settings.createWindow("testability/pages/UiComponentButtonSelectEnhancement/UiComponentButtonSelectEnhancement0080") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ENHANCEMENT_0080 finish.`); done() @@ -141,7 +156,7 @@ export default function UiComponentButtonSelectEnhancement() { Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ENHANCEMENT_0090 start.`); Settings.createWindow("testability/pages/UiComponentButtonSelectEnhancement/UiComponentButtonSelectEnhancement0090") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ENHANCEMENT_0090 finish.`); done() @@ -156,7 +171,7 @@ export default function UiComponentButtonSelectEnhancement() { Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ENHANCEMENT_0100 start.`); Settings.createWindow("testability/pages/UiComponentButtonSelectEnhancement/UiComponentButtonSelectEnhancement0100") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ENHANCEMENT_0100 finish.`); done() @@ -171,7 +186,7 @@ export default function UiComponentButtonSelectEnhancement() { Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ENHANCEMENT_0110 start.`); Settings.createWindow("testability/pages/UiComponentButtonSelectEnhancement/UiComponentButtonSelectEnhancement0110") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ENHANCEMENT_0110 finish.`); done() @@ -186,7 +201,7 @@ export default function UiComponentButtonSelectEnhancement() { Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ENHANCEMENT_0120 start.`); Settings.createWindow("testability/pages/UiComponentButtonSelectEnhancement/UiComponentButtonSelectEnhancement0120") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ENHANCEMENT_0120 finish.`); done() @@ -201,7 +216,7 @@ export default function UiComponentButtonSelectEnhancement() { Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ENHANCEMENT_0130 start.`); Settings.createWindow("testability/pages/UiComponentButtonSelectEnhancement/UiComponentButtonSelectEnhancement0130") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ENHANCEMENT_0130 finish.`); done() @@ -216,7 +231,7 @@ export default function UiComponentButtonSelectEnhancement() { Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ENHANCEMENT_0140_1 start.`); Settings.createWindow("testability/pages/UiComponentButtonSelectEnhancement/UiComponentButtonSelectEnhancement0140") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ENHANCEMENT_0140_1 finish.`); done() @@ -231,7 +246,7 @@ export default function UiComponentButtonSelectEnhancement() { Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ENHANCEMENT_0150 start.`); Settings.createWindow("testability/pages/UiComponentButtonSelectEnhancement/UiComponentButtonSelectEnhancement0150") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ENHANCEMENT_0150 finish.`); done() @@ -246,7 +261,7 @@ export default function UiComponentButtonSelectEnhancement() { Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ENHANCEMENT_0160 start.`); Settings.createWindow("testability/pages/UiComponentButtonSelectEnhancement/UiComponentButtonSelectEnhancement0160") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ENHANCEMENT_0160 finish.`); done() @@ -261,7 +276,7 @@ export default function UiComponentButtonSelectEnhancement() { Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ENHANCEMENT_0170 start.`); Settings.createWindow("testability/pages/UiComponentButtonSelectEnhancement/UiComponentButtonSelectEnhancement0170") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ENHANCEMENT_0170 finish.`); done() @@ -276,7 +291,7 @@ export default function UiComponentButtonSelectEnhancement() { Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ENHANCEMENT_0180 start.`); Settings.createWindow("testability/pages/UiComponentButtonSelectEnhancement/UiComponentButtonSelectEnhancement0180") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ENHANCEMENT_0180 finish.`); done() @@ -291,7 +306,7 @@ export default function UiComponentButtonSelectEnhancement() { Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ENHANCEMENT_0190 start.`); Settings.createWindow("testability/pages/UiComponentButtonSelectEnhancement/UiComponentButtonSelectEnhancement0190") await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ENHANCEMENT_0190 finish.`); done() @@ -317,7 +332,7 @@ export default function UiComponentButtonSelectEnhancement() { // 竖屏 await driver.triggerKey(KeyCode.KEYCODE_F2); await Utils.sleep(2000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); let currentWindow = await Window.getLastWindow(getContext()); await currentWindow.setPreferredOrientation(1); @@ -338,7 +353,7 @@ export default function UiComponentButtonSelectEnhancement() { let driver : Driver = Driver.create(); await driver.triggerKey(KeyCode.KEYCODE_DPAD_UP); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ENHANCEMENT_0230_1 finish.`); done() @@ -360,7 +375,7 @@ export default function UiComponentButtonSelectEnhancement() { await Utils.sleep(1000); await driver.triggerKey(KeyCode.KEYCODE_DPAD_UP); await Utils.sleep(1000); - windowSnap.snapShot(); + await windowSnap.snapShot(); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BUTTON_SELECT_ENHANCEMENT_0230_2 finish.`); done() diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface.test.ets index bc20143f7a22bcbe35428a3620cd11a3941b5309..bd3bb011ee51213bb17160b22a57a397db9bdc10 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface.test.ets @@ -40,7 +40,21 @@ import { KeyCode } from '@kit.InputKit' export default function UiComponentPopupboxDatePickerDialogInterface() { describe('UiComponentPopupboxDatePickerDialogInterface', () => { - + afterEach(async (done: Function) => { + if (Settings.windowClass == undefined) { + return + } + + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`) + return; + } + Logger.info('TEST', `Succeeded in destroy the window.`); + }) + await Utils.sleep(1000); + done() + }) /* * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0010 @@ -56,7 +70,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0010_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0010 finish.`); done() @@ -76,7 +90,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0020_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0020 finish.`); done() @@ -96,7 +110,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0030_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0030 finish.`); done() @@ -116,7 +130,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0040_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0040 finish.`); done() @@ -136,7 +150,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0050_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0050 finish.`); done() @@ -156,7 +170,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0060_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0060 finish.`); done() @@ -176,7 +190,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0070_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0070 finish.`); done() @@ -196,7 +210,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0080_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0080 finish.`); done() @@ -216,7 +230,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0090_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0090 finish.`); done() @@ -236,7 +250,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0100_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0100 finish.`); done() @@ -256,7 +270,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0110_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0110 finish.`); done() @@ -277,7 +291,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0120_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0120 finish.`); done() @@ -298,7 +312,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0130_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0130 finish.`); done() @@ -318,7 +332,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0140_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0140 finish.`); done() @@ -338,7 +352,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0150_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0150 finish.`); done() @@ -358,7 +372,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0160_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0160 finish.`); done() @@ -378,7 +392,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0170_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0170 finish.`); done() @@ -398,7 +412,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0180_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0180 finish.`); done() @@ -418,7 +432,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0190_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0190 finish.`); done() @@ -438,7 +452,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0200_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0200 finish.`); done() @@ -458,7 +472,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0210_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0210 finish.`); done() @@ -478,7 +492,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0220_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0220 finish.`); done() @@ -498,7 +512,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0230_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0230 finish.`); done() @@ -518,7 +532,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0240_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0240 finish.`); done() @@ -538,7 +552,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0250_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0250 finish.`); done() @@ -558,7 +572,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0260_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0260 finish.`); done() @@ -578,7 +592,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0270_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0270 finish.`); done() @@ -598,7 +612,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0280_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0280 finish.`); done() @@ -618,7 +632,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0290_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0290 finish.`); done() @@ -638,7 +652,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0300_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0300 finish.`); done() @@ -658,7 +672,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0310_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0310 finish.`); done() @@ -678,7 +692,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0320_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0320 finish.`); done() @@ -698,7 +712,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0330_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0330 finish.`); done() @@ -718,7 +732,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0340_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0340 finish.`); done() @@ -738,7 +752,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0350_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0350 finish.`); done() @@ -758,7 +772,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0360_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0360 finish.`); done() @@ -778,7 +792,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0370_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0370 finish.`); done() @@ -798,7 +812,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0380_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0380 finish.`); done() @@ -818,7 +832,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0390_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0390 finish.`); done() @@ -838,7 +852,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0400_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0400 finish.`); done() @@ -858,7 +872,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0410_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0410 finish.`); done() @@ -878,7 +892,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0420_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0420 finish.`); done() @@ -898,7 +912,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0430_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0430 finish.`); done() @@ -918,7 +932,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0440_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0440 finish.`); done() @@ -938,7 +952,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0450_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0450 finish.`); done() @@ -958,7 +972,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0460_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0460 finish.`); done() @@ -978,7 +992,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0470_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0470 finish.`); done() @@ -998,7 +1012,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0480_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0480 finish.`); done() @@ -1018,7 +1032,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0490_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0490 finish.`); done() @@ -1038,7 +1052,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0500_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0500 finish.`); done() @@ -1058,7 +1072,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0510_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0510 finish.`); done() @@ -1078,7 +1092,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0520_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0520 finish.`); done() @@ -1098,7 +1112,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0530_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0530 finish.`); done() @@ -1118,7 +1132,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0540_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0540 finish.`); done() @@ -1138,7 +1152,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0550_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0550 finish.`); done() @@ -1158,7 +1172,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0560_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0560 finish.`); done() @@ -1178,7 +1192,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0570_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0570 finish.`); done() @@ -1198,7 +1212,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0580_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0580 finish.`); done() @@ -1218,7 +1232,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0590_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0590 finish.`); done() @@ -1238,7 +1252,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0600_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0600 finish.`); done() @@ -1258,7 +1272,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0610_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0610 finish.`); done() @@ -1278,7 +1292,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0620_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0620 finish.`); done() @@ -1298,7 +1312,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0630_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0630 finish.`); done() @@ -1318,7 +1332,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0640_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0640 finish.`); done() @@ -1338,7 +1352,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0650_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0650 finish.`); done() @@ -1358,7 +1372,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0660_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0660 finish.`); done() @@ -1378,7 +1392,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0670_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0670 finish.`); done() @@ -1398,7 +1412,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0680_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0680 finish.`); done() @@ -1418,7 +1432,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0690_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0690 finish.`); done() @@ -1438,7 +1452,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0700_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0700 finish.`); done() @@ -1458,7 +1472,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0710_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0710 finish.`); done() @@ -1478,7 +1492,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0720_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0720 finish.`); done() @@ -1498,7 +1512,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0730_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0730 finish.`); done() @@ -1518,7 +1532,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0740_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0740 finish.`); done() @@ -1538,7 +1552,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0750_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0750 finish.`); done() @@ -1558,7 +1572,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0760_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0760 finish.`); done() @@ -1580,7 +1594,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { await Utils.sleep(1000) await driver.triggerKey(KeyCode.KEYCODE_ENTER); await Utils.sleep(1000); - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0770 finish.`); done() @@ -1602,7 +1616,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { await Utils.sleep(1000) await driver.triggerKey(KeyCode.KEYCODE_ENTER); await Utils.sleep(1000); - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0780 finish.`); done() @@ -1622,7 +1636,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0790_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0790 finish.`); done() @@ -1642,7 +1656,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0830_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0830 finish.`); done() @@ -1662,7 +1676,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0840_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0840 finish.`); done() @@ -1682,7 +1696,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0850_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0850 finish.`); done() @@ -1702,7 +1716,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0880_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0880 finish.`); done() @@ -1722,7 +1736,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0890_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0890 finish.`); done() @@ -1742,7 +1756,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0900_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0900 finish.`); done() @@ -1762,7 +1776,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0910_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0910 finish.`); done() @@ -1782,7 +1796,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0920_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0920 finish.`); done() @@ -1802,7 +1816,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0930_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0930 finish.`); done() @@ -1822,7 +1836,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0940_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0940 finish.`); done() @@ -1842,7 +1856,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0950_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0950 finish.`); done() @@ -1862,7 +1876,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface0960_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_0960 finish.`); done() @@ -1882,7 +1896,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface1000_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_1000 finish.`); done() @@ -1902,7 +1916,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface1010_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_1010 finish.`); done() @@ -1922,7 +1936,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface1020_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_1020 finish.`); done() @@ -1942,7 +1956,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface1030_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_1030 finish.`); done() @@ -1962,7 +1976,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface1070_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_1070 finish.`); done() @@ -1982,7 +1996,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface1080_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_1080 finish.`); done() @@ -2002,7 +2016,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogInterface1090_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_1090 finish.`); done() @@ -2024,7 +2038,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { await Utils.sleep(1000) await driver.triggerKey(KeyCode.KEYCODE_ENTER); await Utils.sleep(1000); - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_1170 finish.`); done() @@ -2046,7 +2060,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { await Utils.sleep(1000) await driver.triggerKey(KeyCode.KEYCODE_ENTER); await Utils.sleep(1000); - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_1180 finish.`); done() @@ -2068,7 +2082,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { await Utils.sleep(1000) await driver.triggerKey(KeyCode.KEYCODE_ENTER); await Utils.sleep(1000); - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_1450 finish.`); done() @@ -2090,7 +2104,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { await Utils.sleep(1000) await driver.triggerKey(KeyCode.KEYCODE_ENTER); await Utils.sleep(1000); - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_1460 finish.`); done() @@ -2112,7 +2126,7 @@ export default function UiComponentPopupboxDatePickerDialogInterface() { await Utils.sleep(1000); await driver.fling({x: 300, y: 700}, {x: 300, y: 200}, 5, 600); await Utils.sleep(2000); - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_INTERFACE_1470 finish.`); done() diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UiComponentPopupboxDatePickerDialogScenarios/UiComponentPopupboxDatePickerDialogScenarios.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UiComponentPopupboxDatePickerDialogScenarios/UiComponentPopupboxDatePickerDialogScenarios.test.ets index b505ee8b3feae25d89a2138e5b25a5361f1c8eb8..a6ce3a40e28a23cfe6e2859e7c6b824d55d8f005 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UiComponentPopupboxDatePickerDialogScenarios/UiComponentPopupboxDatePickerDialogScenarios.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UiComponentPopupboxDatePickerDialogScenarios/UiComponentPopupboxDatePickerDialogScenarios.test.ets @@ -42,6 +42,26 @@ import Window from '@ohos.window' export default function UiComponentPopupboxDatePickerDialogScenarios() { describe('UiComponentPopupboxDatePickerDialogScenarios', () => { + afterEach(async (done: Function) => { + if (Settings.windowClass == undefined) { + return + } + + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`) + return; + } + Logger.info('TEST', `Succeeded in destroy the window.`); + }) + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Set light-mode successfully.'); + }).catch((error:Error) => { + console.error('Set light-mode failed, ' + error.message); + }); + await Utils.sleep(1000); + done() + }) /* * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_SCENARIOS_0010 @@ -59,7 +79,7 @@ export default function UiComponentPopupboxDatePickerDialogScenarios() { await Utils.sleep(3000); Settings.changeOrientation(); await Utils.sleep(1000); - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) let currentWindow = await Window.getLastWindow(getContext()); await currentWindow.setPreferredOrientation(1); @@ -84,7 +104,7 @@ export default function UiComponentPopupboxDatePickerDialogScenarios() { await Utils.sleep(3000); Settings.changeOrientation(); await Utils.sleep(1000); - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) let currentWindow = await Window.getLastWindow(getContext()); await currentWindow.setPreferredOrientation(1); @@ -109,7 +129,7 @@ export default function UiComponentPopupboxDatePickerDialogScenarios() { await Utils.sleep(1000) await driver.triggerKey(KeyCode.KEYCODE_ENTER); await Utils.sleep(1000); - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_SCENARIOS_0090 finish.`); done() @@ -138,11 +158,19 @@ export default function UiComponentPopupboxDatePickerDialogScenarios() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxDatePickerDialogScenarios0110Page_002')); await datePickerButton.click(); await Utils.sleep(1000); - await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_DARK, () => {}); + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_DARK).then(() => { + console.info('Set light-mode successfully.'); + }).catch((error:Error) => { + console.error('Set light-mode failed, ' + error.message); + }); await Utils.sleep(1000); - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) - await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT, () => {}); + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Set light-mode successfully.'); + }).catch((error:Error) => { + console.error('Set light-mode failed, ' + error.message); + }); await Utils.sleep(1000); Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_SCENARIOS_0110 finish.`); done() @@ -172,13 +200,21 @@ export default function UiComponentPopupboxDatePickerDialogScenarios() { await datePickerButton.click(); await Utils.sleep(1000); for (let i = 0; i < 2; i++) { - await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_DARK, () => {}); + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_DARK).then(() => { + console.info('Set light-mode successfully.'); + }).catch((error:Error) => { + console.error('Set light-mode failed, ' + error.message); + }); await Utils.sleep(500); - await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT, () => {}); + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Set light-mode successfully.'); + }).catch((error:Error) => { + console.error('Set light-mode failed, ' + error.message); + }); await Utils.sleep(500); } await Utils.sleep(1000); - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_DATEPICKERDIALOG_SCENARIOS_0110_1 finish.`); done() diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UiComponentPopupboxZero/UiComponentPopupboxZero.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UiComponentPopupboxZero/UiComponentPopupboxZero.test.ets index e74f0b0b0a85f524fdef6269946388faeba8c80f..4c617d89e0b0dc19d8cfa4653faf66e1c2d92981 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UiComponentPopupboxZero/UiComponentPopupboxZero.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UiComponentPopupboxZero/UiComponentPopupboxZero.test.ets @@ -39,7 +39,21 @@ import { Driver, ON } from '@kit.TestKit' export default function UiComponentPopupboxZero() { describe('UiComponentPopupboxZero', () => { + afterEach(async (done: Function) => { + if (Settings.windowClass == undefined) { + return + } + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`) + return; + } + Logger.info('TEST', `Succeeded in destroy the window.`); + }) + await Utils.sleep(1000); + done() + }) /* * @tc.number SUB_ACE_UI_COMPONENT_POPUPBOX_ZERO_0010 @@ -54,7 +68,7 @@ export default function UiComponentPopupboxZero() { let timePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxZero0010_001')); await timePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ZERO_0010 finish.`); done() @@ -76,7 +90,7 @@ export default function UiComponentPopupboxZero() { let timePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxZero0030_002')); await timePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ZERO_0030 finish.`); done() @@ -98,7 +112,7 @@ export default function UiComponentPopupboxZero() { let timePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxZero0040_002')); await timePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ZERO_0040 finish.`); done() @@ -120,7 +134,7 @@ export default function UiComponentPopupboxZero() { let timePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxZero0050_002')); await timePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ZERO_0050 finish.`); done() @@ -142,7 +156,7 @@ export default function UiComponentPopupboxZero() { let timePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxZero0060_002')); await timePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ZERO_0060 finish.`); done() @@ -161,7 +175,7 @@ export default function UiComponentPopupboxZero() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxZero0070_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ZERO_0070 finish.`); done() @@ -183,7 +197,7 @@ export default function UiComponentPopupboxZero() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxZero0090_002')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ZERO_0090 finish.`); done() @@ -205,7 +219,7 @@ export default function UiComponentPopupboxZero() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxZero0100_002')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ZERO_0100 finish.`); done() @@ -227,7 +241,7 @@ export default function UiComponentPopupboxZero() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxZero0110_002')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ZERO_0110 finish.`); done() @@ -249,7 +263,7 @@ export default function UiComponentPopupboxZero() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxZero0120_002')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ZERO_0120 finish.`); done() @@ -268,7 +282,7 @@ export default function UiComponentPopupboxZero() { let timePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxZero0130_001')); await timePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ZERO_0130 finish.`); done() @@ -290,7 +304,7 @@ export default function UiComponentPopupboxZero() { let timePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxZero0150_002')); await timePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ZERO_0150 finish.`); done() @@ -312,7 +326,7 @@ export default function UiComponentPopupboxZero() { let timePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxZero0160_002')); await timePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ZERO_0160 finish.`); done() @@ -334,7 +348,7 @@ export default function UiComponentPopupboxZero() { let timePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxZero0170_002')); await timePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ZERO_0170 finish.`); done() @@ -356,7 +370,7 @@ export default function UiComponentPopupboxZero() { let timePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxZero0180_002')); await timePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ZERO_0180 finish.`); done() @@ -375,7 +389,7 @@ export default function UiComponentPopupboxZero() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxZero0190_001')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ZERO_0190 finish.`); done() @@ -397,7 +411,7 @@ export default function UiComponentPopupboxZero() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxZero0210_002')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ZERO_0210 finish.`); done() @@ -419,7 +433,7 @@ export default function UiComponentPopupboxZero() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxZero0220_002')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ZERO_0220 finish.`); done() @@ -441,7 +455,7 @@ export default function UiComponentPopupboxZero() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxZero0230_002')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ZERO_0230 finish.`); done() @@ -463,7 +477,7 @@ export default function UiComponentPopupboxZero() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxZero0240_002')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ZERO_0240 finish.`); done() @@ -485,7 +499,7 @@ export default function UiComponentPopupboxZero() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxZero0250_002')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ZERO_0250 finish.`); done() @@ -507,7 +521,7 @@ export default function UiComponentPopupboxZero() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxZero0260_002')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ZERO_0260 finish.`); done() @@ -532,7 +546,7 @@ export default function UiComponentPopupboxZero() { let datePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxZero0280_003')); await datePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ZERO_0280 finish.`); done() @@ -557,7 +571,7 @@ export default function UiComponentPopupboxZero() { let timePickerButton = await driver.findComponent(ON.id('UiComponentPopupboxZero0290_003')); await timePickerButton.click(); await Utils.sleep(1000) - windowSnap.snapShot() + await windowSnap.snapShot() await Utils.sleep(1000) Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POPUPBOX_ZERO_0290 finish.`); done() diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/model/Settings.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/model/Settings.ets index c74ae272407cbf707ddcfaaacf42c1e132d5452d..07d1bbd86550255ba5ba7f960dc4ebeded31496f 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/model/Settings.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/model/Settings.ets @@ -36,14 +36,14 @@ async function sleep(time: number): Promise { } class Settings { - isPhone: boolean = true; + isPhone: boolean = false; windowClass: window.Window | undefined = undefined windowCreateType: string = "changeWindow"; private static DEFAULT_WIDTH: number = 720; - private static DEFAULT_HEIGHT: number = 1280; + private static DEFAULT_HEIGHT: number = 1412; private static DEFAULT_DPI: number = 240; - private static DEFAULT_OFFSET_X: number = 0; - private static DEFAULT_OFFSET_Y: number = 60; + private static DEFAULT_OFFSET_X: number = 100; + private static DEFAULT_OFFSET_Y: number = 132; private portrait: boolean = true changeWindowPosition(windowClass: window.Window, X: number | undefined, Y: number | undefined) { diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/model/Utils.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/model/Utils.ets index 7f06aa4d872061e0682441fd8f47b33730bc78c1..e9235713ec11e0690bcf620e019edcd29c6cced3 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/model/Utils.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/model/Utils.ets @@ -13,35 +13,57 @@ * limitations under the License. */ -import {Driver , ON} from '@ohos.UiTest' +import { Driver } from '@ohos.UiTest'; +import { BusinessError, screenLock } from '@kit.BasicServicesKit'; +import Settings from './Settings'; +import { KeyCode } from '@kit.InputKit'; export default class Utils { - - static async sleep(time : number) :Promise { - const result:string = await new Promise((resolve:Function)=>{ - setTimeout(()=> { + static async sleep(time: number): Promise { + const result: string = await new Promise((resolve: Function) => { + setTimeout(() => { resolve('sleep ok') - },time) + }, time) }); console.info(result); } - static async waitAsync (ms:number):Promise{ - return new Promise((resolve)=>{ - setTimeout(resolve,ms) - }) + /** + * The app locks the screen and then unlocks it + * + * @param driver + */ + static async lockAndUnlock(driver: Driver) { + await screenLock.lock((err: BusinessError, data: Boolean) => { + if (err) { + console.error(`Failed to lock the screen, Code: ${err.code}, message: ${err.message}`); + return; + } + console.info(`Succeeded in locking the screen. result: ${data}`); + }); + await Utils.sleep(2000); + await screenLock.unlock((err: BusinessError) => { + if (err) { + console.error(`Failed to unlock the screen, Code: ${err.code}, message: ${err.message}`); + return; + } + console.info(`Succeeded unlocking the screen.`); + }); + await driver.drag(100, 900, 100, 1, 1000); } - static async clickComponentByKey (componentKey :string){ - let driver = Driver.create(); - let component = await driver.findComponent(ON.id(componentKey)) - await component.click(); - + /** + * The app turns off the screen before it lights up + * + * @param driver + */ + static async homeAndBack(driver: Driver) { + let currentWindow = await Settings.windowClass; + if (currentWindow) { + await currentWindow.hide(); + await driver.triggerKey(KeyCode.KEYCODE_HOME); + await Utils.sleep(2000); + await currentWindow.showWindow(); + } } - - } - - - - diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/TestAbility.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/TestAbility.ets index 5b2992dcb24394039f4c71907479c34895c1a73a..956959276850fafb640ee420bd6cad3d971d7f05 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/TestAbility.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/TestAbility.ets @@ -59,13 +59,29 @@ export default class TestAbility extends UIAbility { hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onWindowStageCreate'); GlobalThis.getInstance().setContext("context", this.context) - windowStage.loadContent('testability/pages/Index', (err) => { - if (err.code) { - hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? ''); - return; + // + let atManager = abilityAccessCtrl.createAtManager(); + let appFlags = bundleManager.BundleFlag.GET_BUNDLE_INFO_WITH_APPLICATION; + let permissionFlags = 0; + bundleManager.getBundleInfoForSelf(appFlags, (err, data) => { + if (err) { + Logger.error(TAG, 'getAllApplicationInfo failed: %{public}s', err.message); + console.error("") } - hilog.info(0x0000, 'testTag', 'Succeeded in loading the content.'); - }); + let tokenID = + data.appInfo.accessTokenId; //系统应用可以通过bundleManager.getApplicationInfo获取,普通应用可以通过bundleManager.getBundleInfoForSelf获取 + atManager.grantUserGrantedPermission(tokenID, 'ohos.permission.READ_MEDIA', permissionFlags, (err, data) => { + if (err) { + Logger.info(TAG, `grantUserGrantedPermission fail, err->${JSON.stringify(err)}`) + } + }) + atManager.grantUserGrantedPermission(tokenID, 'ohos.permission.WRITE_MEDIA', permissionFlags, (err, data) => { + if (err) { + Logger.info(TAG, `grantUserGrantedPermission fail, err->${JSON.stringify(err)}`) + } + }) + }) + } onWindowStageDestroy() { diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentButtonSelectMenuItemContentModifier/ComponentButtonSelectMenuItemContentModifier0012.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentButtonSelectMenuItemContentModifier/ComponentButtonSelectMenuItemContentModifier0012.ets index 5adea556de29a422c4236cf18c428a99fbbe4052..ddf777e33d0cd0e05a9ec5ca8cebafeba3e8f40b 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentButtonSelectMenuItemContentModifier/ComponentButtonSelectMenuItemContentModifier0012.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentButtonSelectMenuItemContentModifier/ComponentButtonSelectMenuItemContentModifier0012.ets @@ -16,8 +16,10 @@ @Entry @Component struct ComponentButtonSelectMenuItemContentModifier0012 { - @State indexNum: number | undefined | null = -1 - @State option: Array = [{value: 'aaa'}, {value: 'bbb'}] + @State indexNum: number | undefined | null = 1 + @State option: Array = [{ value: 'aaa' }, { value: 'bbb' }] + @State modifier: ContentModifier | undefined = undefined + build() { Row() { Column() { @@ -26,6 +28,21 @@ struct ComponentButtonSelectMenuItemContentModifier0012 { this.option = this.getOptions() }) .id("ComponentButtonSelectMenuItemContentModifier0012_001") + + Button('设置menuItemContentModifier') + .onClick(() => { + this.modifier = new MyMenuItemContentModifier012(); + }) + .id("ComponentButtonSelectMenuItemContentModifier0012_002") + Button('设置builder_Null') + .onClick(() => { + this.modifier = new MyMenuItemContentModifier_null(); + }) + .id("ComponentButtonSelectMenuItemContentModifier0012_005") + Select(this.option) + .selected(this.indexNum) + .menuItemContentModifier(this.modifier) + .id("ComponentButtonSelectMenuItemContentModifier0012_003") Select([{ value: '1', }, { @@ -34,18 +51,14 @@ struct ComponentButtonSelectMenuItemContentModifier0012 { value: 'null', }]) .value('切换index') - .id('ComponentButtonSelectMenuItemContentModifier0012_002') + .id('ComponentButtonSelectMenuItemContentModifier0012_004') .menuItemContentModifier(new MyMenuItemContentModifier012()) .selected(0) - .onSelect((index:number, text?: string | undefined)=>{ - if(text){ - this.indexNum = text === 'undefined' ? undefined : (text === 'null' ? null : 1) - } + .onSelect((index: number, text?: string | undefined) => { + console.log('index=' + index + ' text=' + text) + this.indexNum = text === 'undefined' ? undefined : (text === 'null' ? null : 1) }) - Select(this.option) - .selected(this.indexNum) - .menuItemContentModifier(new MyMenuItemContentModifier012()) - .id("ComponentButtonSelectMenuItemContentModifier0012_003") + .margin(20) } .width('100%') .height('100%') @@ -53,20 +66,25 @@ struct ComponentButtonSelectMenuItemContentModifier0012 { } getOptions(): Array { - const options:Array = []; + const options: Array = []; for (let i = 1; i <= 20; i++) { - const value = i === 3 ? "" : (i === 4 ? '这是一个非常长的文本,可能会超过显示限制,需要截断或者滚动查看' : `item${i}`); + const value = + i === 3 ? "" : (i === 4 ? '这是一个非常长的文本,可能会超过显示限制,需要截断或者滚动查看' : `item${i}`); options.push({ value: value }); } return options; } } - class MyMenuItemContentModifier012 implements ContentModifier { applyContent(): WrappedBuilder<[MenuItemConfiguration]> { return wrapBuilder(MyMenuItemBuilder012); } } +class MyMenuItemContentModifier_null implements ContentModifier { + applyContent(): WrappedBuilder<[MenuItemConfiguration]> { + return wrapBuilder(MyMenuItemBuilder_null); + } +} @Builder function MyMenuItemBuilder012(configuration: MenuItemConfiguration) { @@ -81,4 +99,9 @@ function MyMenuItemBuilder012(configuration: MenuItemConfiguration) { .onClick(() => { configuration.triggerSelect(configuration.index, configuration.value.valueOf().toString()) }) +} + +@Builder +function MyMenuItemBuilder_null(configuration: MenuItemConfiguration) { + } \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentFunctionLAdvancedComponentsPopupInterface/UIComponentPopupBoxPopupBackwardAnalysis002.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentFunctionLAdvancedComponentsPopupInterface/UIComponentPopupBoxPopupBackwardAnalysis002.ets new file mode 100644 index 0000000000000000000000000000000000000000..989be8dd378faed21922c00bbe0e76177246d61f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentFunctionLAdvancedComponentsPopupInterface/UIComponentPopupBoxPopupBackwardAnalysis002.ets @@ -0,0 +1,92 @@ +/* + * Copyright (C) 2024 Huawei Device 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. + */ + +@Entry +@Component +struct UIComponentPopupBoxPopupBackwardAnalysis002 { + @State message: string = '调起半模态弹窗'; + @State customPopup: boolean = false; + @State isShow: boolean = false; + @State sheetHeight: number = 300; + + @Builder + popupBuilder() { + Row({ space: 2 }) { + Text('This is a custom popup').fontSize(10) + } + } + + @Builder + SheetBuilder() { + Column() { + Button('changeHeight') + .margin(10) + .fontSize(20) + .onClick(() => { + this.sheetHeight = 500; + }) + + Button('弹出popup') + .margin(10) + .fontSize(20) + .id('UIComponentPopupBoxPopupBackwardAnalysis0021') + .onClick(() => { + this.customPopup = !this.customPopup; + }) + .bindPopup(this.customPopup, { + builder: this.popupBuilder, + enableArrow: true, + showInSubWindow: false, + width: '100%', + }) + } + .width('100%') + .height('100%') + } + + build() { + Row() { + Column() { + Button(this.message) + .fontSize(20) + .fontColor(Color.Blue) + .id('UIComponentPopupBoxPopupBackwardAnalysis0020') + .onClick(() => { + this.isShow = true + }) + .bindSheet($$this.isShow, this.SheetBuilder(), { + height: this.sheetHeight, + backgroundColor: Color.Green, + onWillAppear: () => { + console.log("BindSheet onWillAppear.") + }, + onAppear: () => { + console.log("BindSheet onAppear.") + }, + onWillDisappear: () => { + console.log("BindSheet onWillDisappear.") + }, + onDisappear: () => { + console.log("BindSheet onDisappear.") + } + }) + } + } + .width('100%') + .height('100%') + .alignItems(VerticalAlign.Center) + .justifyContent(FlexAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/FunctionJiChuSR000HUB4K/FunctionJiChuSR000HUB4K015.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/FunctionJiChuSR000HUB4K/FunctionJiChuSR000HUB4K015.ets index c383f8e7157b9528795119ad6d1286a357e267dd..1109022bf1d2768493b7fda84e86aa6fc12814d2 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/FunctionJiChuSR000HUB4K/FunctionJiChuSR000HUB4K015.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/FunctionJiChuSR000HUB4K/FunctionJiChuSR000HUB4K015.ets @@ -27,7 +27,7 @@ struct FunctionJiChuSR000HUB4K015 { .onClick(() => { promptAction.showToast({ message: '对话框显示', - showMode: 1 + showMode: promptAction.ToastShowMode.TOP_MOST }) }) } diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/FunctionJiChuSR000HUB4K/FunctionJiChuSR000HUB4K016.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/FunctionJiChuSR000HUB4K/FunctionJiChuSR000HUB4K016.ets index 35e0178cf47cb9daefaee6017b089a8b1cebc34e..23b1ebb9ed713b71b65e80edc4fe9851206f0948 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/FunctionJiChuSR000HUB4K/FunctionJiChuSR000HUB4K016.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/FunctionJiChuSR000HUB4K/FunctionJiChuSR000HUB4K016.ets @@ -27,7 +27,7 @@ struct FunctionJiChuSR000HUB4K016 { .onClick(() => { promptAction.showToast({ message: '对话框显示', - showMode: 0 + showMode: promptAction.ToastShowMode.DEFAULT }) }) } diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/FunctionJiChuSR000HUB4K/FunctionJiChuSR000HUB4K018.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/FunctionJiChuSR000HUB4K/FunctionJiChuSR000HUB4K018.ets index 815e5cd5c96cf2dd676963c129d23c5ce74ae9a9..c7a62f48e03df4dde250548a5c90436c05377bd6 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/FunctionJiChuSR000HUB4K/FunctionJiChuSR000HUB4K018.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/FunctionJiChuSR000HUB4K/FunctionJiChuSR000HUB4K018.ets @@ -22,12 +22,14 @@ struct FunctionJiChuSR000HUB4K018 { build() { Row() { Column() { + Text(`'': 2`) Button('promptAction.showToast_message超长') .id('FunctionJiChuSR000HUB4K0180') .onClick(() => { promptAction.showToast({ message: "In the realm of collaborative projects, effective communication is paramount. It serves as the cornerstone for success, ensuring that all team members are aligned with the project's vision and goals. When communication is clear and transparent, it fosters an environment where ideas can flow freely, and misunderstandings are minimized. Team members can leverage their diverse skill sets to contribute to the project, knowing that their input is valued and will be heard. Moreover, good communication allows for the timely resolution of conflicts, which is crucial in maintaining team morale and momentum. It also enables the project to stay on track, as updates and changes can be disseminated quickly, keeping everyone informed and able to adapt accordingly. In essence, communication is not just a means to an end in team projects; it is the lifeblood that sustains the team's progress and unity towards achieving their collective objectives.\n", - bottom: '80vp', + alignment: Alignment.Bottom, + bottom: 80, }) }) } diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/FunctionJiChuSR000HUB4K/FunctionJiChuSR000HUB4K020.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/FunctionJiChuSR000HUB4K/FunctionJiChuSR000HUB4K020.ets index bea2771ca1dfa32accdf7ffe65f50f9438ce3abb..feec0170b38ebbb91f51c8586f8aadf983f74056 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/FunctionJiChuSR000HUB4K/FunctionJiChuSR000HUB4K020.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/FunctionJiChuSR000HUB4K/FunctionJiChuSR000HUB4K020.ets @@ -18,17 +18,13 @@ import { promptAction } from '@kit.ArkUI'; @Entry @Component struct FunctionJiChuSR000HUB4K020 { - build() { Row() { Column() { Button('promptAction.showDialog({})') .id('FunctionJiChuSR000HUB4K0200') .onClick(() => { - promptAction.showToast({ - message: getContext().resourceManager.getStringSync($r("app.string.toast_message_1")), - - }) + promptAction.showDialog({}) }) } } diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TsComponentSR000HRP34Test/TsComponentSR000HRP34Test124.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TsComponentSR000HRP34Test/TsComponentSR000HRP34Test124.ets index 2f2572051e7f49a67a30964d19e1ef0539bd9e6c..c20f343fc13bd9fcc8d496192fdc49823e61b857 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TsComponentSR000HRP34Test/TsComponentSR000HRP34Test124.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TsComponentSR000HRP34Test/TsComponentSR000HRP34Test124.ets @@ -17,6 +17,8 @@ @Entry @Component struct TsComponentSR000HRP34_124 { + selectedDate: Date = new Date("2024-12-1") + build() { Column() { Button("DatePickerDialog") @@ -24,6 +26,7 @@ struct TsComponentSR000HRP34_124 { .onClick(() => { DatePickerDialog.show({ textStyle: {color: Color.Blue}, + selected: this.selectedDate }) }) .id("TsComponentSR000HRP34_124_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TsComponentSR000HRP34Test/TsComponentSR000HRP34Test125.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TsComponentSR000HRP34Test/TsComponentSR000HRP34Test125.ets index cccd5ac76a73256a35c037b063ee06154f2ede9c..452ef96352c7bd7c52026e7fc720fc1c67f7486f 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TsComponentSR000HRP34Test/TsComponentSR000HRP34Test125.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TsComponentSR000HRP34Test/TsComponentSR000HRP34Test125.ets @@ -17,6 +17,8 @@ @Entry @Component struct TsComponentSR000HRP34_125 { + selectedDate: Date = new Date("2024-12-1") + build() { Column() { Button("DatePickerDialog") @@ -24,6 +26,7 @@ struct TsComponentSR000HRP34_125 { .onClick(() => { DatePickerDialog.show({ textStyle: {color: 0x0000ff}, + selected: this.selectedDate }) }) .id("TsComponentSR000HRP34_125_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TsComponentSR000HRP34Test/TsComponentSR000HRP34Test126.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TsComponentSR000HRP34Test/TsComponentSR000HRP34Test126.ets index 597851dae92f5d8c149b0858b261fa050364b8b1..33c44c9105b1a314805fc0bdf6319acafdd0d6de 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TsComponentSR000HRP34Test/TsComponentSR000HRP34Test126.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TsComponentSR000HRP34Test/TsComponentSR000HRP34Test126.ets @@ -17,6 +17,8 @@ @Entry @Component struct TsComponentSR000HRP34_126 { + selectedDate: Date = new Date("2024-12-1") + build() { Column() { Button("DatePickerDialog") @@ -24,6 +26,7 @@ struct TsComponentSR000HRP34_126 { .onClick(() => { DatePickerDialog.show({ textStyle: {color: "rgb(255,0,0)"}, + selected: this.selectedDate }) }) .id("TsComponentSR000HRP34_126_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TsComponentSR000HRP34Test/TsComponentSR000HRP34Test127.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TsComponentSR000HRP34Test/TsComponentSR000HRP34Test127.ets index bda237a2bb7eac2a8f5adcc5ba9eae8ab19bb6ca..2dffe381838a3c3e6b0181aae2a14172a037a243 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TsComponentSR000HRP34Test/TsComponentSR000HRP34Test127.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TsComponentSR000HRP34Test/TsComponentSR000HRP34Test127.ets @@ -17,6 +17,8 @@ @Entry @Component struct TsComponentSR000HRP34_127 { + selectedDate: Date = new Date("2024-12-1") + build() { Column() { Button("DatePickerDialog") @@ -24,6 +26,7 @@ struct TsComponentSR000HRP34_127 { .onClick(() => { DatePickerDialog.show({ textStyle: {color: getContext().resourceManager.getColorSync($r("app.color.blue"))}, + selected: this.selectedDate }) }) .id("TsComponentSR000HRP34_127_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentButtonRadioLConic/UIComponentButtonRadioLConic005.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentButtonRadioLConic/UIComponentButtonRadioLConic005.ets index 5210b226e2994051cd05f2dc74892c910d4f36ab..e0f4a34c372c533266776463bf5c339c40382ff2 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentButtonRadioLConic/UIComponentButtonRadioLConic005.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentButtonRadioLConic/UIComponentButtonRadioLConic005.ets @@ -17,15 +17,14 @@ @Component struct UIComponentButtonRadioLConic005 { @State rating: number = 3.5; - @State resourcePng: string = 'cat.jpg'; - @State resourceColor: Color = Color.Pink; + @State resourcePng: string = ''; + @State resourceColor: Color | undefined = undefined; @State checkedStatus: boolean = false; @Builder indicatorBuilder() { Image(this.resourcePng) - .width('20vp') - .height('20vp') + .backgroundColor(this.resourceColor) } build() { @@ -42,20 +41,11 @@ struct UIComponentButtonRadioLConic005 { .height('50vp') .width('50vp') .checked(this.checkedStatus) - .radioStyle( - { - indicatorColor: Color.Pink - } - ) .id('UIComponentButtonRadioLConic0050') - Button('切换图片') - .fontSize(20) - .fontColor(Color.Blue) - .width('200px') - .id('UIComponentButtonRadioLConic0051') - .onClick(() => { - this.resourcePng = 'image2.png'; - this.checkedStatus = true; + .onChange(isChecked => { + this.checkedStatus = isChecked; + this.resourcePng = 'https://gitee.com/openharmony/docs/raw/master/zh-cn/figures/1.png'; + this.resourceColor = Color.Pink; }) } .width('200px') diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentButtonSelectAttribute/UIComponentButtonSelectAttribute004.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentButtonSelectAttribute/UIComponentButtonSelectAttribute004.ets index 7418a53002308b2ab8772a400884665049551301..33522836d83b272b254fb07f3fd2bf85ef1645b9 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentButtonSelectAttribute/UIComponentButtonSelectAttribute004.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentButtonSelectAttribute/UIComponentButtonSelectAttribute004.ets @@ -16,65 +16,21 @@ @Entry @Component struct UIComponentButtonSelectAttribute004 { + private jsonText = '{"value1": "John", "value2": "John2"}'; + build() { Row() { Column({ space: 20 }) { - Text("默认值: 'HarmonyOS Sans', selected为0") - Select([{ - value: 'abc', - }, { - value: 'def', - }, { - value: 'ghi', - }]) - .width('100%') - .id('UIComponentButtonSelectAttribute0040') + Text("json") + Select([{ value: JSON.parse(this.jsonText)?.["value1"] }, { value: JSON.parse(this.jsonText)?.["value2"] }]) .font({ - size: 5 + size: 20 }) - .menuItemContentModifier(new FontSizeItemContentModifier(0)) - .value(getContext().resourceManager.getStringSync($r("app.string.popup_font_family"))) - .selected(0) - - Text("默认值: 'HarmonyOS Sans'") - Select([{ - value: 'abc', - }, { - value: 'def', - }, { - value: 'ghi', - }]) .width('100%') - .id('UIComponentButtonSelectAttribute0041') - .font({ - size: 0 - }) - .menuItemContentModifier(new FontSizeItemContentModifier(1)) - .selected(0) - .value(getContext().resourceManager.getStringSync($r("app.string.popup_font_family"))) - .font({ - size: getContext().resourceManager.getNumber($r("app.integer.negative30")) - }) - - Text("默认值: 'HarmonyOS Sans'") - Select([{ - value: 'abc', - }, { - value: 'def', - }, { - value: 'ghi', - }]) - .width('100%') - .id('UIComponentButtonSelectAttribute0042') - .font({ - size: -5 - }) - .menuItemContentModifier(new FontSizeItemContentModifier(2)) + .id('UIComponentButtonSelectAttribute0040') + .menuItemContentModifier(new FontSizeItemContentModifier(0)) + .value('select-') .selected(0) - .value(getContext().resourceManager.getStringSync($r("app.string.popup_font_family"))) - .font({ - size: getContext().resourceManager.getNumber($r("app.integer.negative30")) - }) } } .width('100%') @@ -115,7 +71,7 @@ function FontSizeItemBuilder(configuration: MenuItemConfiguration) { function getFontSize(itemIndex: number) { switch (itemIndex) { case 0: - return 5; + return 15; case 1: return 0; case 2: diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentButtonSelectAttribute/UIComponentButtonSelectAttribute005.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentButtonSelectAttribute/UIComponentButtonSelectAttribute005.ets index b16d622a5fbe8e44692c8e675d5c6f0076217aa8..43f7b127ab497b6bb43d675b5e1b7a91ff8e03e9 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentButtonSelectAttribute/UIComponentButtonSelectAttribute005.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentButtonSelectAttribute/UIComponentButtonSelectAttribute005.ets @@ -18,41 +18,64 @@ struct UIComponentButtonSelectAttribute005 { build() { Row() { - Column({ space: 50 }) { - Text("默认值: 'HarmonyOS Sans', selected为0") + Column({ space: 20 }) { + Text("fontsize = str5") Select([{ - value: getContext().resourceManager.getStringSync($r("app.string.popup_font_family")), + value: 'abc', }, { - value: '2', + value: 'def', }, { - value: '3', + value: 'ghi', + }]) + .width('100%') + .id('UIComponentButtonSelectAttribute0050_1') + .font({ + size: '5' + }) + .menuItemContentModifier(new FontSizeItemContentModifier050(0)) + .value('select1') + .selected(0) + + Text("fontsize = str0") + Select([{ + value: 'abc', }, { - value: '4', + value: 'def', }, { - value: '5', + value: 'ghi', }]) .width('100%') - .id('UIComponentButtonSelectAttribute0050') - .menuItemContentModifier(new FontMenuItemContentModifier(0)) - .value(getContext().resourceManager.getStringSync($r("app.string.popup_font_family"))) + .id('UIComponentButtonSelectAttribute0050_2') + .font({ + size: '0' + }) + .menuItemContentModifier(new FontSizeItemContentModifier050(1)) .selected(0) + .value('select2') + .font({ + size: '0' + }) + Text("fontsize = str-5") Select([{ - value: 'default_font_size', + value: 'abc', }, { - value: getContext().resourceManager.getNumber($r("app.integer.negative30")) + '', + value: 'def', + }, { + value: 'ghi', }]) .width('100%') - .id('UIComponentButtonSelectAttribute0051') - .menuItemContentModifier(new FontMenuItemContentModifier(1)) + .id('UIComponentButtonSelectAttribute0050_3') + .font({ + size: '-5' + }) + .menuItemContentModifier(new FontSizeItemContentModifier050(2)) .selected(0) - .value(getContext().resourceManager.getStringSync($r("app.string.popup_font_family"))) + .value('select3') .font({ - size: getContext().resourceManager.getNumber($r("app.integer.negative30")) + size: '-5' }) } - .width('350px') - .height('80px') } .width('100%') .height('100%') @@ -61,7 +84,7 @@ struct UIComponentButtonSelectAttribute005 { } } -class FontMenuItemContentModifier implements ContentModifier { +class FontSizeItemContentModifier050 implements ContentModifier { selectNum: number = 0; constructor(selectNumber: number) { @@ -69,19 +92,18 @@ class FontMenuItemContentModifier implements ContentModifier { - return wrapBuilder(FontMenuItemBuilder); + return wrapBuilder(FontSizeItemBuilder050); } } @Builder -function FontMenuItemBuilder(configuration: MenuItemConfiguration) { +function FontSizeItemBuilder050(configuration: MenuItemConfiguration) { Row() { Image(configuration.icon).size({ width: 40, height: 40 }) Text(configuration.value) - .id(`UIComponentButtonSelectAttribute005${(configuration.contentModifier as FontMenuItemContentModifier).selectNum}_${configuration.value}`) + .id(`UIComponentButtonSelectAttribute004${(configuration.contentModifier as FontSizeItemContentModifier050).selectNum}_${configuration.value}`) .fontColor(configuration.selected ? Color.Blue : Color.Black) - .fontSize(getContext().resourceManager.getNumber($r("app.integer.5"))) - .fontFamily(getContext().resourceManager.getStringSync($r("app.string.popup_font_time_picker"))) + .fontSize(getFontSize050((configuration.contentModifier as FontSizeItemContentModifier050).selectNum)) } .width('100%') .backgroundColor(configuration.selected ? '#CBE6FD' : Color.White) @@ -89,3 +111,16 @@ function FontMenuItemBuilder(configuration: MenuItemConfiguration) { configuration.triggerSelect(configuration.index, configuration.value.valueOf().toString()); }) } + +function getFontSize050(itemIndex: number) { + switch (itemIndex) { + case 0: + return 5; + case 1: + return 0; + case 2: + return -5; + default: + return 0; + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentButtonSelectAttribute/UIComponentButtonSelectInterface.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentButtonSelectAttribute/UIComponentButtonSelectInterface.ets new file mode 100644 index 0000000000000000000000000000000000000000..318e79a370048f62bfbbdfee8b7086e54f1c90da --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentButtonSelectAttribute/UIComponentButtonSelectInterface.ets @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2024 Huawei Device 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. + */ + +@Entry +@Component +struct UIComponentButtonSelectInterface { + private static DEFAULT_WIDTH: number = 720; + @State selectValue: string = 'select : '; + + build() { + Row() { + Column({ space: 20 }) { + Text(this.selectValue) + Select([{ + value: 'abc', + }, { + value: 'def2', + }, { + value: 'def2', + }, { + value: 'def', + }, { + value: 'ghi', + }]) + .optionWidth(UIComponentButtonSelectInterface.DEFAULT_WIDTH) + .width('100%') + .id('UIComponentButtonSelectInterface') + .font({ + size: 15 + }) + .onSelect((index: number, value: string) => { + this.selectValue = 'select : ' + value; + }) + .onClick(() => { + this.selectValue = 'select : ' + 'def2'; + }) + .value('select1') + .selected(2) + } + } + .width('100%') + .height('100%') + .alignItems(VerticalAlign.Top) + .justifyContent(FlexAlign.Center) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxAttribute/UIComponentPopupBoxAttribute011.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxAttribute/UIComponentPopupBoxAttribute011.ets index 69f59a4c5041a5c4c0393afee948cd5ac20e5aa6..ec2021655aa0deff4507931a63d098eb400a7f49 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxAttribute/UIComponentPopupBoxAttribute011.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxAttribute/UIComponentPopupBoxAttribute011.ets @@ -13,35 +13,48 @@ * limitations under the License. */ -import { promptAction } from '@kit.ArkUI'; +@Builder +function customDialogBuilderAttribute011() { + Column() { + Text('Custom dialog Message').fontSize(20).margin(20) + // Row() { + // Button("ȷ").onClick(() => { + // promptAction.closeCustomDialog(customDialogId) + // }) + // Blank().width(50) + // Button("ȡ").onClick(() => { + // promptAction.closeCustomDialog(customDialogId) + // }) + // } + }.height(900).padding(5) +} @Entry @Component struct UIComponentPopupBoxAttribute011 { - @State buttonText: string = 'Open'; - @State message: string = ''; + @State message: string = 'Hello World' + @State index: number = 0; + private offSetArr: Offset[] = + [{ dx: 0, dy: '100vp' }]; build() { Row() { Column() { - Text(this.message) - .id('UIComponentPopupBoxAttribute0111') - Button(this.buttonText) - .fontSize(50) + Button('offset') .fontWeight(FontWeight.Bold) - .id('UIComponentPopupBoxAttribute0110') .onClick(() => { - promptAction.openToast({ - message: 'this is a Toast', - offset: { dx: 0, dy: 1000 } + this.getUIContext().getPromptAction().openCustomDialog({ + builder: customDialogBuilderAttribute011.bind(this), + offset: this.offSetArr[this.index] }) + if (this.index == 5) { + this.index = -1; + } + this.index++; }) - } + }.key('UIComponentPopupBoxAttributeInterface001_button_001') .width('100%') } - .width('100%') .height('100%') - .alignItems(VerticalAlign.Center) - .justifyContent(FlexAlign.Center) } -} \ No newline at end of file +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface001.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface001.ets new file mode 100644 index 0000000000000000000000000000000000000000..71782bf58dc68897eea5f66b39f3dada699ef297 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface001.ets @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2024 Huawei Device 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. + */ + +@Builder +function customDialogBuilder001() { + Column() { + Text('Custom dialog Message').fontSize(20).margin(20) + // Row() { + // Button("确认").onClick(() => { + // promptAction.closeCustomDialog(customDialogId) + // }) + // Blank().width(50) + // Button("取消").onClick(() => { + // promptAction.closeCustomDialog(customDialogId) + // }) + // } + }.height(100).padding(5) +} + +@Entry +@Component +struct UIComponentPopupBoxAttributeInterface001 { + @State message: string = 'Hello World' + @State index: number = 0; + private offSetArr: Offset[] = + [{ dx: '-20px', dy: 0 }, { dx: '20px', dy: 0 }, { dx: '-50vp', dy: 0 }, { dx: 0, dy: '-20px' }, + { dx: 0, dy: '20%' }, { dx: 0, dy: '-50vp' }]; + + build() { + Row() { + Column() { + Button('offset') + .fontWeight(FontWeight.Bold) + .onClick(() => { + this.getUIContext().getPromptAction().openCustomDialog({ + builder: customDialogBuilder001.bind(this), + offset: this.offSetArr[this.index] + }) + if (this.index == 5) { + this.index = -1; + } + this.index++; + }) + }.key('UIComponentPopupBoxAttributeInterface001_button_001') + .width('100%') + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface0010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface0010.ets new file mode 100644 index 0000000000000000000000000000000000000000..ed97819164d6c05b00711325b4cc135b6e2d5568 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface0010.ets @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2024 Huawei Device 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 promptAction from '@ohos.promptAction'; +let customDialogId: number = 102; + +@Entry +@Component +struct UIComponentPopupBoxAttributeInterface0010 { + @State message: string = 'This is dialog content'; + + @Builder + customDialogBuilder0010() { + Column() { + Text(this.message).fontSize(20).margin(20).onClick(() => { + promptAction.closeCustomDialog(customDialogId); + }) + }.height(100).padding(5) + } + + build() { + Row() { + Column() { + Button('open') + .fontWeight(FontWeight.Bold) + .onClick(() => { + this.message = this.message + ' : showInSubWindow = true'; + promptAction.openCustomDialog({ + builder: this.customDialogBuilder0010.bind(this), + showInSubWindow: true + }).then((dialogId: number) => { + customDialogId = dialogId + }) + }) + }.key('UIComponentPopupBoxAttributeInterface0010_button_001') + .width('100%') + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface0011.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface0011.ets new file mode 100644 index 0000000000000000000000000000000000000000..b8077bc679cf1aea46780644a1dc3556b9bb7e1c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface0011.ets @@ -0,0 +1,50 @@ +/* + * Copyright (C) 2024 Huawei Device 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 promptAction from '@ohos.promptAction'; +let customDialogId: number = 102; + +@Entry +@Component +struct UIComponentPopupBoxAttributeInterface0011 { + @State message: string = 'This is dialog content'; + + @Builder + customDialogBuilder0011() { + Column() { + Text(this.message).fontSize(20).margin(20).onClick(() => { + promptAction.closeCustomDialog(customDialogId); + }) + }.height(100).padding(5) + } + + build() { + Row() { + Column() { + Button('open') + .fontWeight(FontWeight.Bold) + .onClick(() => { + promptAction.openCustomDialog({ + builder: this.customDialogBuilder0011.bind(this), + }).then((dialogId: number) => { + customDialogId = dialogId + }) + }) + }.key('UIComponentPopupBoxAttributeInterface0011_button_001') + .width('100%') + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface0012.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface0012.ets new file mode 100644 index 0000000000000000000000000000000000000000..214eba630c8dda0c3cfd462c2539d875de799b44 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface0012.ets @@ -0,0 +1,60 @@ +/* + * Copyright (C) 2024 Huawei Device 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 promptAction from '@ohos.promptAction'; + +let customDialogId: number = 103; + +@Entry +@Component +struct UIComponentPopupBoxAttributeInterface0012 { + @State message: string = 'This is dialog content'; + @State heightNum: number = 100; + + @Builder + customDialogBuilder0012() { + Column() { + Text(this.message).fontSize(20).margin(20).onClick(() => { + promptAction.closeCustomDialog(customDialogId); + }) + Button('change content Height').onClick(() => { + setTimeout(() => { + this.heightNum = 200; + }, 1000) + }).key('UIComponentPopupBoxAttributeInterface0012_button_002') + }.height(this.heightNum) + .width('100%') + .backgroundColor(Color.Pink) + } + + build() { + Row() { + Column() { + Button('open') + .fontWeight(FontWeight.Bold) + .onClick(() => { + promptAction.openCustomDialog({ + builder: this.customDialogBuilder0012.bind(this), + height: '80%' + }).then((dialogId: number) => { + customDialogId = dialogId + }) + }) + }.key('UIComponentPopupBoxAttributeInterface0012_button_001') + .width('100%') + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface0013.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface0013.ets new file mode 100644 index 0000000000000000000000000000000000000000..62bca909adbc1c9b14ba739b42ef0917a3a5e9b5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface0013.ets @@ -0,0 +1,65 @@ +/* + * Copyright (C) 2024 Huawei Device 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 promptAction from '@ohos.promptAction'; + +let customDialogId: number = 104; + +@Entry +@Component +struct UIComponentPopupBoxAttributeInterface0013 { + @State content: string = 'This is dialog content'; + + @Builder + customDialogBuilder0013() { + Column() { + Text(this.content).margin(20) + Button('更改弹框内容') + .onClick(() => { + this.content = '涅槃重生'; + }).key('UIComponentPopupBoxAttributeInterface0013_button_002') + .margin(20) + } + .backgroundColor(Color.Yellow) + .height('100%') + .width('100%') + .borderRadius(30) + .borderWidth(5) + .borderColor(0x317aff) + } + + build() { + Row() { + Column() { + Button('open') + .fontWeight(FontWeight.Bold) + .onClick(() => { + promptAction.openCustomDialog({ + builder: this.customDialogBuilder0013.bind(this), + cornerRadius: 10, + borderWidth: 1, + height:200, + borderStyle: BorderStyle.Dashed, + borderColor: 0x317AF7 + }).then((dialogId: number) => { + customDialogId = dialogId + }) + }) + }.key('UIComponentPopupBoxAttributeInterface0013_button_001') + .width('100%') + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface0014.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface0014.ets new file mode 100644 index 0000000000000000000000000000000000000000..8afce14f470ef4ab2e08b77f5a19e25c94996cc6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface0014.ets @@ -0,0 +1,86 @@ +/* + * Copyright (C) 2024 Huawei Device 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 promptAction from '@ohos.promptAction'; + +let customDialogId: number = 104; + +@Entry +@Component +struct UIComponentPopupBoxAttributeInterface0014 { + @State content: string = 'This is dialog content'; + private arr: number[] = [0, 1, 2, 3, 4]; + + @Builder + customDialogBuilder0014() { + Column() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text(this.content + item) + .copyOption(CopyOptions.InApp) + .width('100%') + .fontSize(16) + .textAlign(TextAlign.Center) + .borderRadius(10) + .backgroundColor(0xFFFFFF) + .key('UIComponentTextCommonHandleInterface003_text_001') + } + }, (item: string) => item) + }.offset({ x: 20, y: -20 }) + .align(Alignment.TopEnd) + .listDirection(Axis.Vertical) + .backgroundColor(Color.Gray) + + Text(this.content).margin(20) + Button('更改弹框内容') + .onClick(() => { + this.content = '涅槃重生'; + }).key('UIComponentPopupBoxAttributeInterface0014_button_002') + .margin(20) + } + .backgroundColor(Color.Yellow) + .height('100%') + .width('100%') + .borderRadius(30) + .borderWidth(5) + .borderColor(0x317aff) + } + + build() { + Row() { + Column() { + Button('open') + .fontWeight(FontWeight.Bold) + .onClick(() => { + promptAction.openCustomDialog({ + builder: this.customDialogBuilder0014.bind(this), + alignment: DialogAlignment.Center, + offset: { dx: 20, dy: -20 }, + borderWidth: 1, + cornerRadius: 10, + height: 400, + borderStyle: BorderStyle.Dashed, + borderColor: 0x317AF7 + }).then((dialogId: number) => { + customDialogId = dialogId + }) + }) + }.key('UIComponentPopupBoxAttributeInterface0014_button_001') + .width('100%') + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface0015.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface0015.ets new file mode 100644 index 0000000000000000000000000000000000000000..5ec0ff1bde2d10dcd9b5b9c370f0ba5d4d3df0aa --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface0015.ets @@ -0,0 +1,81 @@ +/* + * Copyright (C) 2024 Huawei Device 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 promptAction from '@ohos.promptAction'; + +let customDialogId: number = 104; + +@Entry +@Component +struct UIComponentPopupBoxAttributeInterface0015 { + @State content: string = 'This is dialog content'; + + @Builder + customDialogBuilder0015() { + Column() { + Text(this.content).margin(20) + Button('open3') + .onClick(() => { + promptAction.openCustomDialog({ + builder: this.customDialogBuilder0015_1.bind(this), + showInSubWindow: true + }) + }).key('UIComponentPopupBoxAttributeInterface0015_button_002') + .margin(20) + // Button('open3') + // .onClick(() => { + // promptAction.openCustomDialog({ + // builder: this.customDialogBuilder0015_1.bind(this), + // showInSubWindow: false + // }) + // }).key('UIComponentPopupBoxAttributeInterface0015_button_003') + // .margin(20) + } + .height('100%') + .width('100%') + .borderRadius(30) + .borderWidth(5) + .borderColor(0x317aff) + } + + @Builder + customDialogBuilder0015_1() { + Column() { + Text(this.content).margin(20) + } + } + + build() { + Row() { + Column() { + Button('open2') + .fontWeight(FontWeight.Bold) + .onClick(() => { + promptAction.openCustomDialog({ + builder: this.customDialogBuilder0015.bind(this), + showInSubWindow: true, + height: 400 + }).then((dialogId: number) => { + customDialogId = dialogId + }) + }).width('100%').key('UIComponentPopupBoxAttributeInterface0015_button_001') + } + .backgroundColor(Color.Pink) + .height('100%') + .width('100%') + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface0016.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface0016.ets new file mode 100644 index 0000000000000000000000000000000000000000..45399c09bd404e39567f24a94f9c78070c6427e8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface0016.ets @@ -0,0 +1,64 @@ +/* + * Copyright (C) 2024 Huawei Device 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 promptAction from '@ohos.promptAction'; +import router from '@ohos.router' + +let customDialogId: number = 105; + +@Entry +@Component +struct UIComponentPopupBoxAttributeInterface0016 { + @State content: string = 'This is dialog content'; + + @Builder + customDialogBuilder0016() { + Column() { + Text(this.content).margin(20) + Button('open B page') + .onClick(() => { + // setTimeout(() => { + // console.log('delay 1s'); + router.pushUrl({ url: './UIComponentPopupBoxAttributeInterface0015' }) + // }, 1000); + }).key('UIComponentPopupBoxAttributeInterface0016_button_002') + .margin(20) + } + .height('100%') + .width('100%') + .borderRadius(30) + .borderWidth(5) + .borderColor(0x317aff) + } + + build() { + Row() { + Column() { + Button('open') + .fontWeight(FontWeight.Bold) + .onClick(() => { + promptAction.openCustomDialog({ + builder: this.customDialogBuilder0016.bind(this), + height: 400 + }).then((dialogId: number) => { + customDialogId = dialogId + }) + }).key('UIComponentPopupBoxAttributeInterface0016_button_001') + } + .width('100%') + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface002.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface002.ets new file mode 100644 index 0000000000000000000000000000000000000000..7ecff1dbea6fc094e037c5b284625081e3241c80 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface002.ets @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2024 Huawei Device 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. + */ + +@Entry +@Component +struct UIComponentPopupBoxAttributeInterface002 { + @State message: string = 'Hello World'; + @State isNull: boolean = true; + + @Builder + customDialogBuilder002() { + Column() { + Text(this.message).fontSize(20).margin(20) + Button('内容更改').onClick(() => { + setTimeout(() => { + this.message = '这是更改后的内容'; + }, 1000); + }).visibility(!this.isNull ? Visibility.Visible : Visibility.None) + .key('UIComponentPopupBoxAttributeInterface002_button_002') + }.height(100).padding(5) + } + + build() { + Row() { + Column() { + Button('open') + .fontWeight(FontWeight.Bold) + .onClick(() => { + this.isNull = !this.isNull; + if (this.isNull) { + this.message = ''; + } + this.getUIContext().getPromptAction().openCustomDialog({ + builder: this.customDialogBuilder002.bind(this) + }) + }) + }.key('UIComponentPopupBoxAttributeInterface002_button_001') + .width('100%') + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface003.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface003.ets new file mode 100644 index 0000000000000000000000000000000000000000..c699597b2b7faa0793f325608e6b0c488ca4f216 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface003.ets @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2024 Huawei Device 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. + */ + + +@Entry +@Component +struct UIComponentPopupBoxAttributeInterface003 { + @State message: string = 'Hello World'; + private alignmentArr: number[] = + [DialogAlignment.Center, DialogAlignment.Bottom, DialogAlignment.Top, DialogAlignment.CenterStart, + DialogAlignment.BottomStart, DialogAlignment.TopStart]; + @State index: number = 0; + build() { + Row() { + Column() { + Button('open') + .fontWeight(FontWeight.Bold) + .onClick(() => { + this.getUIContext().getPromptAction().showDialog({ + title: 'Title Info', + message: 'Message Info', + alignment: this.alignmentArr[this.index] + }) + if (this.index == 5) { + this.index = -1; + } + this.index++; + }) + }.key('UIComponentPopupBoxAttributeInterface003_button_001') + .width('100%') + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface004.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface004.ets new file mode 100644 index 0000000000000000000000000000000000000000..b5a35823125e4b2d7605da253ee0c0f35028f042 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface004.ets @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2024 Huawei Device 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. + */ + + +@Entry +@Component +struct UIComponentPopupBoxAttributeInterface004 { + @State message: string = 'Hello World'; + @State isNull: boolean = true; + + @Builder + customDialogBuilder004() { + Column() { + Text(this.message).fontSize(20).margin(20) + Button('show dialog').onClick(() => { + this.getUIContext().getPromptAction().showDialog({ + message: '这是第二个Dialog' + }) + }).visibility(!this.isNull ? Visibility.Visible : Visibility.None) + .key('UIComponentPopupBoxAttributeInterface004_button_002') + }.padding(5) + } + + build() { + Row() { + Column() { + Button('open') + .fontWeight(FontWeight.Bold) + .onClick(() => { + this.isNull = !this.isNull; + if (this.isNull) { + this.message = ''; + } + this.getUIContext().getPromptAction().openCustomDialog({ + builder: this.customDialogBuilder004.bind(this) + }) + }) + }.key('UIComponentPopupBoxAttributeInterface004_button_001') + .width('100%') + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface005.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface005.ets new file mode 100644 index 0000000000000000000000000000000000000000..1f64a95286e5374f9cac2501d2c87e5d1fd3d5ba --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface005.ets @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2024 Huawei Device 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. + */ + + +@Entry +@Component +struct UIComponentPopupBoxAttributeInterface005 { + @State message: string = 'Hello World'; + @State isNull: boolean = true; + + @Builder + customDialogBuilder005() { + Column() { + Text(this.message).fontSize(20).margin(20) + Button('show dialog').onClick(() => { + this.getUIContext().getPromptAction().showDialog({ + message: '这是第二个Dialog' + }) + }).visibility(!this.isNull ? Visibility.Visible : Visibility.None) + .key('UIComponentPopupBoxAttributeInterface005_button_002') + }.padding(5) + } + + build() { + Row() { + Column() { + Button('open') + .fontWeight(FontWeight.Bold) + .onClick(() => { + this.isNull = !this.isNull; + if (this.isNull) { + this.message = ''; + } + this.getUIContext().getPromptAction().openCustomDialog({ + builder: this.customDialogBuilder005.bind(this) + }) + }) + }.key('UIComponentPopupBoxAttributeInterface005_button_001') + .width('100%') + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface006.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface006.ets new file mode 100644 index 0000000000000000000000000000000000000000..c91982cdda13288a8bbb535c5599701d9842c537 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface006.ets @@ -0,0 +1,51 @@ +/* + * Copyright (C) 2024 Huawei Device 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 promptAction from '@ohos.promptAction'; + +let customDialogId: number = 0 + +@Entry +@Component +struct UIComponentPopupBoxAttributeInterface006 { + @State message: string = 'Hello World'; + @State isCancel: boolean = false; + + @Builder + customDialogBuilder006() { + Column() { + Text(this.message).fontSize(20).margin(20) + }.height(100).padding(5) + } + + build() { + Row() { + Column() { + Button('open') + .fontWeight(FontWeight.Bold) + .onClick(() => { + this.isCancel = !this.isCancel; + promptAction.openCustomDialog({ + builder: this.customDialogBuilder006.bind(this), + autoCancel:this.isCancel + }).then((dialogId: number) => { + customDialogId = dialogId + }) + }) + }.key('UIComponentPopupBoxAttributeInterface006_button_001') + .width('100%') + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface007.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface007.ets new file mode 100644 index 0000000000000000000000000000000000000000..33dd809180fc8b4ebc94fc00171534c8b39a70ff --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface007.ets @@ -0,0 +1,51 @@ +/* + * Copyright (C) 2024 Huawei Device 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 { promptAction } from '@kit.ArkUI'; + + +@Entry +@Component +struct UIComponentPopupBoxAttributeInterface007 { + @State index: number = 0; + private colorArr: number[] = [Color.Pink, Color.White, Color.Red, Color.Blue]; + + @Builder + customDialogBuilder007() { + Column() { + Text('这是标题dialog').fontSize(20).margin(20) + }.height(100).padding(5) + } + + build() { + Row() { + Column() { + Button('open') + .fontWeight(FontWeight.Bold) + .onClick(() => { + promptAction.openCustomDialog({ + builder: this.customDialogBuilder007.bind(this), + maskColor: this.colorArr[this.index] + }) + if (this.index == 3) { + this.index = -1; + } + this.index++; + }) + }.key('UIComponentPopupBoxAttributeInterface007_button_001') + .width('100%') + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface008.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface008.ets new file mode 100644 index 0000000000000000000000000000000000000000..bc8c35b94f0870f81ab85ab0103f470dbc3cb478 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface008.ets @@ -0,0 +1,59 @@ +/* + * Copyright (C) 2024 Huawei Device 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 promptAction from '@ohos.promptAction'; + +let customDialogId: number = 100; + +@Entry +@Component +struct UIComponentPopupBoxAttributeInterface008 { + @State message: string = 'This is dialog content'; + @State isModal: boolean = false; + + @Builder + customDialogBuilder008() { + Column() { + Text(this.message).fontSize(20).margin(20).onClick(() => { + promptAction.closeCustomDialog(customDialogId); + }) + }.height(100).padding(5).backgroundColor(Color.Grey) + } + + build() { + Row() { + Column() { + Button('open') + .fontWeight(FontWeight.Bold) + .onClick(() => { + this.isModal = !this.isModal; + if (this.isModal) { + this.message = this.message + ' : isModal = true'; + } else { + this.message = this.message + ' : isModal = false'; + } + promptAction.openCustomDialog({ + builder: this.customDialogBuilder008.bind(this), + isModal: this.isModal, + autoCancel: true + }).then((dialogId: number) => { + customDialogId = dialogId + }) + }) + }.key('UIComponentPopupBoxAttributeInterface008_button_001') + .width('100%') + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface009.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface009.ets new file mode 100644 index 0000000000000000000000000000000000000000..0e26aa9c1ae0fc03e547388f97e458e5344564be --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface009.ets @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2024 Huawei Device 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 promptAction from '@ohos.promptAction'; + +let customDialogId: number = 101; + +@Entry +@Component +struct UIComponentPopupBoxAttributeInterface009 { + @State message: string = 'This is dialog content'; + + @Builder + customDialogBuilder009() { + Column() { + Text(this.message).fontSize(20).margin(20).onClick(() => { + promptAction.closeCustomDialog(customDialogId); + }) + }.height(100).padding(5) + } + + build() { + Row() { + Column() { + Button('open') + .fontWeight(FontWeight.Bold) + .onClick(() => { + promptAction.openCustomDialog({ + builder: this.customDialogBuilder009.bind(this), + maskRect: { + x: 20, + y: '20px', + width: '300px', + height: '80%' + }, + }).then((dialogId: number) => { + customDialogId = dialogId + }) + }) + }.key('UIComponentPopupBoxAttributeInterface009_button_001') + .width('100%') + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxCalendarPickerFeature/UIComponentPopupBoxCalendarPickerFeature001.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxCalendarPickerFeature/UIComponentPopupBoxCalendarPickerFeature001.ets new file mode 100644 index 0000000000000000000000000000000000000000..01bcfe18e10c12e30defa1cd9f978e397f5c90bd --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxCalendarPickerFeature/UIComponentPopupBoxCalendarPickerFeature001.ets @@ -0,0 +1,77 @@ +/* + * Copyright (C) 2024 Huawei Device 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. + */ + +@Entry +@Component +struct UIComponentPopupBoxCalendarPickerFeature001 { + build() { + Column() { + Text('CalendarPicker选择器').fontSize(30) + Column() { + Calendar({ + date: { year: new Date().getUTCFullYear(), month: new Date().getUTCMonth(), day: new Date().getUTCDay() }, + currentData: { + year: 2024, month: 11, data: [{ + index: 0, + lunarMonth: "十一", + lunarDay: "十三", + year: 2020, + month : 12, + day: 27, + dayMark: "work", + dayMarkValue: "班", + isFirstOfLunar: true, + hasSchedule: true, + markLunarDay: true + }, { + index: 1, + lunarMonth: "十一", + lunarDay: "十四", + year: 2020, + month : 12, + day: 28, + dayMark: "work", + dayMarkValue: "班", + isFirstOfLunar: true, + hasSchedule: true, + markLunarDay: true + }, { + index: 2, + lunarMonth: "十一", + lunarDay: "十五", + year: 2020, + month : 12, + day: 29, + dayMark: "work", + dayMarkValue: "班", + isFirstOfLunar: true, + hasSchedule: true, + markLunarDay: true + }] + }, + preData: { + year: 2024, month: 11, data: [] + }, + nextData: { + year: 2024, month: 11, data: [] + }, + }) + .showLunar(true) + .showHoliday(true) + .startOfWeek(1) + } + }.width('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxCalendarPickerFeature/UIComponentPopupBoxCalendarPickerFeature003.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxCalendarPickerFeature/UIComponentPopupBoxCalendarPickerFeature003.ets new file mode 100644 index 0000000000000000000000000000000000000000..c6a4e0c20d28a1c34d919a7a9f60f79326ba7457 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxCalendarPickerFeature/UIComponentPopupBoxCalendarPickerFeature003.ets @@ -0,0 +1,147 @@ +/* + * Copyright (C) 2024 Huawei Device 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. + */ + +@Entry +@Component +struct UIComponentPopupBoxCalendarPickerFeature003 { + + build() { + Column() { + Text('CalendarPicker选择器').fontSize(30) + Column() { + Calendar({ + date: { year: 2020, month: 12, day: 27 }, + currentData: { + year: 2020, month: 12, data: [{ + index: 0, + lunarMonth: "十一", + lunarDay: "十三", + year: 2020, + month : 12, + day: 27, + dayMark: "work", + dayMarkValue: "班", + isFirstOfLunar: true, + hasSchedule: true, + markLunarDay: true + }, { + index: 1, + lunarMonth: "十一", + lunarDay: "十四", + year: 2020, + month : 12, + day: 28, + dayMark: "work", + dayMarkValue: "班", + isFirstOfLunar: true, + hasSchedule: true, + markLunarDay: true + }, { + index: 2, + lunarMonth: "十一", + lunarDay: "十五", + year: 2020, + month : 12, + day: 29, + dayMark: "work", + dayMarkValue: "班", + isFirstOfLunar: true, + hasSchedule: true, + markLunarDay: true + }] + }, + preData: { + year: 2020, month: 12, data: [{ + index: 0, + lunarMonth: "十一", + lunarDay: "十三", + year: 2020, + month : 12, + day: 27, + dayMark: "work", + dayMarkValue: "班", + isFirstOfLunar: true, + hasSchedule: true, + markLunarDay: true + }, { + index: 1, + lunarMonth: "十一", + lunarDay: "十四", + year: 2020, + month : 12, + day: 28, + dayMark: "work", + dayMarkValue: "班", + isFirstOfLunar: true, + hasSchedule: true, + markLunarDay: true + }, { + index: 2, + lunarMonth: "十一", + lunarDay: "十五", + year: 2020, + month : 12, + day: 29, + dayMark: "work", + dayMarkValue: "班", + isFirstOfLunar: true, + hasSchedule: true, + markLunarDay: true + }] + }, + nextData: { + year: 2020, month: 12, data: [{ + index: 0, + lunarMonth: "十一", + lunarDay: "十三", + year: 2020, + month : 12, + day: 27, + dayMark: "work", + dayMarkValue: "班", + isFirstOfLunar: true, + hasSchedule: true, + markLunarDay: true + }, { + index: 1, + lunarMonth: "十一", + lunarDay: "十四", + year: 2020, + month : 12, + day: 28, + dayMark: "work", + dayMarkValue: "班", + isFirstOfLunar: true, + hasSchedule: true, + markLunarDay: true + }, { + index: 2, + lunarMonth: "十一", + lunarDay: "十五", + year: 2020, + month : 12, + day: 29, + dayMark: "work", + dayMarkValue: "班", + isFirstOfLunar: true, + hasSchedule: true, + markLunarDay: true + }] + }, + }) + } + }.width('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxConsistencyScene/UIComponentPopupBoxConsistencyScene007.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxConsistencyScene/UIComponentPopupBoxConsistencyScene007.ets new file mode 100644 index 0000000000000000000000000000000000000000..1fd1013a682d158ec278d00f254cff7b76bdb2fb --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxConsistencyScene/UIComponentPopupBoxConsistencyScene007.ets @@ -0,0 +1,97 @@ +/* + * Copyright (C) 2024 Huawei Device 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 { promptAction } from '@kit.ArkUI'; + +@Entry +@Component +struct UIComponentPopupBoxConsistencyScene007 { + customDialogComponentId: number = 0; + + @Builder + customDialogComponent() { + Column() { + Text('弹窗').fontSize(30) + Row({ space: 50 }) { + Button("confirm") + .onClick(() => { + promptAction.closeCustomDialog(this.customDialogComponentId); + }) + Button("取消") + .onClick(() => { + promptAction.closeCustomDialog(this.customDialogComponentId); + }) + } + } + .height(200) + .padding(5) + .justifyContent(FlexAlign.SpaceBetween) + } + + build() { + Row() { + Column({ space: 50 }) { + Button('promptAction') + .id('UIComponentPopupBoxConsistencyScene0070') + .onClick(() => { + promptAction.openCustomDialog({ + builder: () => { + this.customDialogComponent(); + }, + }).then((dialogId: number) => { + this.customDialogComponentId = dialogId; + }) + }) + Button('自定义弹窗') + .id('UIComponentPopupBoxConsistencyScene0071') + .onClick(() => { + let dialogController = new CustomDialogController({ + builder: FirstCustomDialog() + }) + dialogController.open(); + }) + } + } + .width('100%') + .height('100%') + .alignItems(VerticalAlign.Center) + .justifyContent(FlexAlign.Center) + } +} + +@CustomDialog +struct FirstCustomDialog { + customDialogComponentId: number = 0; + controller?: CustomDialogController; + + build() { + Column() { + Text('弹窗').fontSize(30) + Row({ space: 50 }) { + Button("confirm") + .onClick(() => { + promptAction.closeCustomDialog(this.customDialogComponentId); + }) + Button("取消") + .onClick(() => { + promptAction.closeCustomDialog(this.customDialogComponentId); + }) + } + } + .height(200) + .padding(5) + .justifyContent(FlexAlign.SpaceBetween) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface001.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface001.ets index 2ebdec27d6964ce709edf5db8870d3dc00b0fcef..04666d668fe4276427d6ec5bbfb60566aab6a706 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface001.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface001.ets @@ -13,7 +13,6 @@ * limitations under the License. */ -// xxx.ets @CustomDialog struct CustomDialogExampleFullDialog { controller?: CustomDialogController diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface0010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface0010.ets index 4334f1612764ce42f337b457723422cec54c49b5..c1e841c2182715de85e5c7e20b4dc39ba71766a3 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface0010.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface0010.ets @@ -13,7 +13,6 @@ * limitations under the License. */ -// xxx.ets @CustomDialog struct CustomDialogExampleFullDialog0010 { controller?: CustomDialogController diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface0011.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface0011.ets new file mode 100644 index 0000000000000000000000000000000000000000..8ce308b677dc61832c1ebdb834a002bf0a5be028 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface0011.ets @@ -0,0 +1,109 @@ +/* + * Copyright (C) 2024 Huawei Device 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. + */ + +@CustomDialog +struct CustomDialogExample0011 { + @State content: string = '这是弹框内容'; + @State heightNum: number = 200; + controller?: CustomDialogController + cancel: () => void = () => { + } + confirm: () => void = () => { + } + + build() { + Column() { + Text(this.content).margin(20) + Button('更改弹框内容') + .onClick(() => { + this.content = '弹框内容已更改'; + }).key('UIComponentPopupBoxFullDialogInterface0011_button_002') + .margin(20) + Button('更改弹框内高度') + .onClick(() => { + setTimeout(() => { + this.heightNum = 400; + }, 2000); + }).key('UIComponentPopupBoxFullDialogInterface0011_button_003') + .margin(20) + }.backgroundColor(Color.Pink) + .height(this.heightNum) + } +} + +@Entry +@Component +struct UIComponentPopupBoxFullDialogInterface0011 { + dialogController: CustomDialogController | null = new CustomDialogController({ + builder: CustomDialogExample0011({ + cancel: () => { + this.onCancel() + }, + confirm: () => { + this.onAccept() + } + }), + cancel: this.existApp, + autoCancel: true, + onWillDismiss: (dismissDialogAction: DismissDialogAction) => { + console.info("reason=" + JSON.stringify(dismissDialogAction.reason)) + console.log("dialog onWillDismiss") + if (dismissDialogAction.reason == DismissReason.PRESS_BACK) { + dismissDialogAction.dismiss() + } + if (dismissDialogAction.reason == DismissReason.TOUCH_OUTSIDE) { + dismissDialogAction.dismiss() + } + }, + alignment: DialogAlignment.Center, + offset: { dx: 0, dy: -20 }, + customStyle: false, + cornerRadius: 20, + width: '80%', + height: '80%', + borderWidth: 1, + borderStyle: BorderStyle.Dashed, //使用borderStyle属性,需要和borderWidth属性一起使用 + borderColor: Color.Blue, //使用borderColor属性,需要和borderWidth属性一起使用 + backgroundColor: Color.White + }) + + // 在自定义组件即将析构销毁时将dialogController置空 + aboutToDisappear() { + this.dialogController = null // 将dialogController置空 + } + + onCancel() { + console.info('Callback when the first button is clicked') + } + + onAccept() { + console.info('Callback when the second button is clicked') + } + + existApp() { + console.info('Click the callback in the blank area') + } + + build() { + Column() { + Button('click me') + .onClick(() => { + if (this.dialogController != null) { + this.dialogController.open() + } + }).backgroundColor(0x317aff).key('UIComponentPopupBoxFullDialogInterface0011_button_001') + }.width('100%').margin({ top: 5 }) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface0012.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface0012.ets new file mode 100644 index 0000000000000000000000000000000000000000..f72be3396577cebd8b625a8a96cf42c1b846dc07 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface0012.ets @@ -0,0 +1,101 @@ +/* + * Copyright (C) 2024 Huawei Device 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. + */ + +@CustomDialog +struct CustomDialogExample0012 { + @State content: string = '这是弹框内容'; + @State heightNum: number = 200; + controller?: CustomDialogController + cancel: () => void = () => { + } + confirm: () => void = () => { + } + + build() { + Column() { + Text(this.content).margin(20) + Button('更改弹框内容') + .onClick(() => { + this.content = '涅槃重生'; + }).key('UIComponentPopupBoxFullDialogInterface0012_button_002') + .margin(20) + }.backgroundColor(Color.Yellow) + .borderRadius(30) + .borderWidth(5) + .borderColor(0x317aff) + } +} + +@Entry +@Component +struct UIComponentPopupBoxFullDialogInterface0012 { + dialogController: CustomDialogController | null = new CustomDialogController({ + builder: CustomDialogExample0012({ + cancel: () => { + this.onCancel() + }, + confirm: () => { + this.onAccept() + } + }), + cancel: this.existApp, + autoCancel: true, + onWillDismiss: (dismissDialogAction: DismissDialogAction) => { + console.info("reason=" + JSON.stringify(dismissDialogAction.reason)) + console.log("dialog onWillDismiss") + if (dismissDialogAction.reason == DismissReason.PRESS_BACK) { + dismissDialogAction.dismiss() + } + if (dismissDialogAction.reason == DismissReason.TOUCH_OUTSIDE) { + dismissDialogAction.dismiss() + } + }, + alignment: DialogAlignment.Center, + offset: { dx: 0, dy: -20 }, + customStyle: false, + cornerRadius: 10, + borderWidth: 1, + borderStyle: BorderStyle.Dashed, + borderColor: 0x317AF7, + backgroundColor: Color.White + }) + + aboutToDisappear() { + this.dialogController = null; + } + + onCancel() { + console.info('Callback when the first button is clicked') + } + + onAccept() { + console.info('Callback when the second button is clicked') + } + + existApp() { + console.info('Click the callback in the blank area') + } + + build() { + Column() { + Button('click me') + .onClick(() => { + if (this.dialogController != null) { + this.dialogController.open() + } + }).backgroundColor(0x317aff).key('UIComponentPopupBoxFullDialogInterface0012_button_001') + }.width('100%').margin({ top: 5 }) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface0013.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface0013.ets new file mode 100644 index 0000000000000000000000000000000000000000..967aa6b914428f14b2146bb7b94333fc0d36a014 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface0013.ets @@ -0,0 +1,102 @@ +/* + * Copyright (C) 2024 Huawei Device 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. + */ + +@CustomDialog +@Component +struct CustomDialogExample0013 { + @Link textValue: string + @Link inputValue: string + controller?: CustomDialogController + cancel: () => void = () => { + } + confirm: () => void = () => { + } + + build() { + Column() { + Text('Change text').fontSize(20).margin({ top: 10, bottom: 10 }) + Text(this.textValue).height(60).width('90%') + + Button('关闭窗口') + .onClick(() => { + if (this.controller != null) { + this.controller.close(); + } + }) + .margin(20) + }.borderRadius(10) + } +} + +@Entry +@Component +struct UIComponentPopupBoxFullDialogInterface0013 { + @State textValue: string = '你好' + @State auto: boolean = false + @State inputValue: string = 'click me' + dialogController: CustomDialogController | null = new CustomDialogController({ + builder: CustomDialogExample0013({ + cancel: () => { + this.onCancel() + }, + confirm: () => { + this.onAccept() + }, + textValue: $textValue, + inputValue: $inputValue + }), + cancel: this.exitApp, + autoCancel: true, + alignment: DialogAlignment.Bottom, + offset: { dx: 0, dy: -20 }, + gridCount: 4, + customStyle: false, + cornerRadius: 10, + }) + + // 在自定义组件即将析构销毁时将dialogController置空 + aboutToDisappear() { + this.dialogController = null // 将dialogController置空 + } + + onCancel() { + console.info('Callback when the first button is clicked') + } + + onAccept() { + console.info('Callback when the second button is clicked') + } + + exitApp() { + console.info('Click the callback in the blank area') + } + + build() { + Column() { + Button(this.inputValue) + .onClick(() => { + if (this.dialogController != null) { + this.auto = !this.auto; + if (this.auto) { + this.textValue = "更改内容"; + } else { + this.textValue = ""; + } + this.dialogController.open() + } + }).backgroundColor(0x317aff).key('UIComponentPopupBoxFullDialogInterface0013_button_001') + }.width('100%').margin({ top: 5 }) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface0014.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface0014.ets new file mode 100644 index 0000000000000000000000000000000000000000..1861f392745b6ae542be3844d924f28f87f861d6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface0014.ets @@ -0,0 +1,140 @@ +/* + * Copyright (C) 2024 Huawei Device 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. + */ + + +@CustomDialog +struct CustomDialogExample0014_1 { + controllerTwo?: CustomDialogController + dialogControllerThree: CustomDialogController | null = new CustomDialogController({ + builder: CustomDialogExample0014_2(), + alignment: DialogAlignment.Bottom, + showInSubWindow:true, + offset: { dx: 0, dy: 20 } + }) + build() { + Column() { + Text('我是第二个弹窗showInSubWindow=true') + Button('点我关闭第二个弹窗') + .onClick(() => { + if (this.controllerTwo != undefined) { + this.controllerTwo.close() + } + }) + .margin(20) + Button('点我打开三个弹窗') + .onClick(() => { + if (this.dialogControllerThree != undefined) { + this.dialogControllerThree.open() + } + }).key('UIComponentPopupBoxFullDialogInterface0014_button_003') + .margin(20) + } + } +} +@CustomDialog +struct CustomDialogExample0014_2 { + controller?: CustomDialogController + build() { + Column() { + Text('我是第三个弹窗showInSubWindow=true') + Button('点我关闭第三个弹窗') + .onClick(() => { + if (this.controller != undefined) { + this.controller.close() + } + }) + .margin(20) + } + } +} +@CustomDialog +@Component +struct CustomDialogExample0014 { + dialogControllerTwo: CustomDialogController | null = new CustomDialogController({ + builder: CustomDialogExample0014_1(), + alignment: DialogAlignment.Bottom, + showInSubWindow:true, + offset: { dx: 0, dy: -20 } + }) + controller?: CustomDialogController + cancel: () => void = () => { + } + confirm: () => void = () => { + } + + build() { + Column() { + Text('Change text showInSubWindow=true').fontSize(20).margin({ top: 10, bottom: 10 }) + Button('点我打开第二个弹窗') + .onClick(() => { + if (this.dialogControllerTwo != null) { + this.dialogControllerTwo.open() + } + }).key('UIComponentPopupBoxFullDialogInterface0014_button_002') + .margin(20) + }.borderRadius(10) + + } +} + +@Entry +@Component +struct UIComponentPopupBoxFullDialogInterface0014 { + @State inputValue: string = 'show Dialog'; + dialogController: CustomDialogController | null = new CustomDialogController({ + builder: CustomDialogExample0014({ + cancel: () => { + this.onCancel() + }, + confirm: () => { + this.onAccept() + } + }), + cancel: this.exitApp, + alignment: DialogAlignment.Center, + offset: { dx: 0, dy: -20 }, + gridCount: 4, + showInSubWindow: true, + isModal: true, + cornerRadius: 10, + }) + + aboutToDisappear() { + this.dialogController = null // 将dialogController置空 + } + + onCancel() { + console.info('Callback when the first button is clicked') + } + + onAccept() { + console.info('Callback when the second button is clicked') + } + + exitApp() { + console.info('Click the callback in the blank area') + } + + build() { + Column() { + Button(this.inputValue) + .onClick(() => { + if (this.dialogController != null) { + this.dialogController.open() + } + }).backgroundColor(0x317aff).key('UIComponentPopupBoxFullDialogInterface0014_button_001') + }.width('100%').margin({ top: 5 }) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface0015.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface0015.ets new file mode 100644 index 0000000000000000000000000000000000000000..158c536211c535597ab3d83b490f15e727457d5d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface0015.ets @@ -0,0 +1,77 @@ +/* + * Copyright (C) 2024 Huawei Device 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 { promptAction } from '@kit.ArkUI'; + +@Entry +@Component +struct UIComponentPopupBoxFullDialogInterface0015 { + @State inputValue: string = 'show Dialog'; + private customDialogComponentId: number = 0 + + @Builder + customDialogComponent() { + Column() { + Text('弹窗').fontSize(30) + Row({ space: 50 }) { + Button("open2") + .id('UIComponentPopupBoxFullDialogInterface00151') + .onClick(() => { + promptAction.showDialog({ + title: '这是第二个子窗口', + showInSubWindow: true, + isModal: true + }) + }) + Button("open3") + .id('UIComponentPopupBoxFullDialogInterface00152') + .onClick(() => { + promptAction.showDialog({ + title: '这是第二个普通窗口', + showInSubWindow: false, + }) + }) + Button("取消") + .onClick(() => { + promptAction.closeCustomDialog(this.customDialogComponentId); + }) + } + }.height(200).padding(5).justifyContent(FlexAlign.SpaceBetween) + } + + build() { + Column() { + Button(this.inputValue) + .onClick(() => { + promptAction.openCustomDialog({ + builder: () => { + this.customDialogComponent(); + }, + onWillDismiss: (dismissDialogAction: DismissDialogAction) => { + if (dismissDialogAction.reason == DismissReason.PRESS_BACK) { + dismissDialogAction.dismiss(); + } + if (dismissDialogAction.reason == DismissReason.TOUCH_OUTSIDE) { + dismissDialogAction.dismiss(); + } + }, + showInSubWindow: true, + }).then((dialogId: number) => { + this.customDialogComponentId = dialogId; + }) + }).backgroundColor(0x317aff).id('UIComponentPopupBoxFullDialogInterface00150') + }.width('100%').margin({ top: 5 }) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface002.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface002.ets index f00512da89151e40f8204cd7b353b6975181db30..6f318c5dd0d244e3132c22a57075bb544cc2fc80 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface002.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface002.ets @@ -13,7 +13,6 @@ * limitations under the License. */ - @CustomDialog struct CustomDialogExample002 { controller?: CustomDialogController diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface003.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface003.ets index c868ea32421f42a57f528c6046309b44b6f565bc..4c708412ea2725a28a5d8803072071b22f1c757a 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface003.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface003.ets @@ -13,8 +13,6 @@ * limitations under the License. */ - -// xxx.ets @CustomDialog struct CustomDialogExample003_1 { controllerTwo?: CustomDialogController diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface004.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface004.ets index 74c25af238bd03f26bbd1474ccbeea9b425df62d..601424e11401c48b9045f1e1d898ae1c506d01d5 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface004.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface004.ets @@ -13,7 +13,6 @@ * limitations under the License. */ - @CustomDialog struct CustomDialogExample004 { controller?: CustomDialogController diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface005.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface005.ets index 21abf45f2f830098e052548bebb0ba4e453fc826..b0c22bca1eb395b9ab45d38daa3a0d7b60febb65 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface005.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface005.ets @@ -14,7 +14,6 @@ */ -// xxx.ets @CustomDialog struct CustomDialogExample005 { controller?: CustomDialogController diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface006.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface006.ets index 3b8c067727f9abe2a1603a2c0f16f54582e06b1a..75ace2b5b9354d24ec684fb9e08da9643fa992a9 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface006.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface006.ets @@ -13,8 +13,6 @@ * limitations under the License. */ - -// xxx.ets @CustomDialog struct CustomDialogExample006 { controller?: CustomDialogController @@ -43,6 +41,9 @@ struct CustomDialogExample006 { @Component struct UIComponentPopupBoxFullDialogInterface006 { @State index: number = 0; + @State textTip: string = ''; + + private alignmentArr: number[] = [DialogAlignment.Center, DialogAlignment.Bottom, DialogAlignment.Top, DialogAlignment.CenterStart, DialogAlignment.BottomStart]; diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface007.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface007.ets index 8270f0e910d1122b4e200b7b64c93f86b10b5684..007e6b2b96d4b4c8c1d8e47261178b65a226b44f 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface007.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface007.ets @@ -13,8 +13,6 @@ * limitations under the License. */ - -// xxx.ets @CustomDialog struct CustomDialogExample007 { controller?: CustomDialogController @@ -61,7 +59,7 @@ struct UIComponentPopupBoxFullDialogInterface007 { build() { Column() { - Button('maskColor动态更新') + Button('offset动态更新') .onClick(() => { let dialogController: CustomDialogController | null = new CustomDialogController({ builder: CustomDialogExample007({}), diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface008.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface008.ets index 30a8eac63917f753df432401eebabcddf31728e1..a3a53117ba389230236caaef3747f672903a0bff 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface008.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface008.ets @@ -13,7 +13,6 @@ * limitations under the License. */ -// xxx.ets @CustomDialog struct CustomDialogExampleFullDialog008 { controller?: CustomDialogController diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface009.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface009.ets index fab8ec7a33269df608e968f15e556dee9331bf48..86b7e23403adfc7453445e4a0c45d57d3d59f16c 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface009.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface009.ets @@ -1,4 +1,4 @@ -/* +function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface008.ets/* * Copyright (C) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the 'License') * you may not use this file except in compliance with the License. @@ -13,8 +13,6 @@ * limitations under the License. */ - -// xxx.ets @CustomDialog struct CustomDialogExample009_1 { controllerTwo?: CustomDialogController diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface048.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface048.ets new file mode 100644 index 0000000000000000000000000000000000000000..9f4cc576ec0862a4e872fdfddfb539d1d5b717e7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface048.ets @@ -0,0 +1,81 @@ +/* + * Copyright (C) 2024 Huawei Device 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 promptAction from '@ohos.promptAction'; + +@Entry +@Component +struct UIComponentPopupBoxFullDialogInterface048 { + @State content: string = 'This is dialog content'; + private arr: number[] = [0, 1, 2, 3, 4]; + + @Builder + customDialogBuilder0014() { + Column() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text(this.content + item) + .copyOption(CopyOptions.InApp) + .width('100%') + .fontSize(16) + .textAlign(TextAlign.Center) + .borderRadius(10) + .backgroundColor(0xFFFFFF) + } + }, (item: string) => item) + }.offset({ x: 20, y: -20 }) + .align(Alignment.TopEnd) + .listDirection(Axis.Vertical) + .backgroundColor(Color.Gray) + + Text(this.content).margin(20) + Button('更改弹框内容') + .onClick(() => { + this.content = '涅槃重生'; + }).key('UIComponentPopupBoxFullDialogInterface0481') + .margin(20) + } + .backgroundColor(Color.Yellow) + .height('100%') + .width('100%') + .borderRadius(30) + .borderWidth(5) + .borderColor(0x317aff) + } + + build() { + Row() { + Column() { + Button('open') + .fontWeight(FontWeight.Bold) + .onClick(() => { + promptAction.openCustomDialog({ + builder: this.customDialogBuilder0014.bind(this), + alignment: DialogAlignment.Center, + offset: { dx: 20, dy: -20 }, + borderWidth: 1, + cornerRadius: 10, + height: 400, + borderStyle: BorderStyle.Dashed, + borderColor: 0x317AF7 + }) + }) + }.key('UIComponentPopupBoxFullDialogInterface0480') + .width('100%') + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxPopupFollowTransformOfTarget/UIComponentPopupBoxPopupFollowTransformofTarget031.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxPopupFollowTransformOfTarget/UIComponentPopupBoxPopupFollowTransformofTarget031.ets new file mode 100644 index 0000000000000000000000000000000000000000..0038591b24ee9bad2132eaeae87d688ba27ce844 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxPopupFollowTransformOfTarget/UIComponentPopupBoxPopupFollowTransformofTarget031.ets @@ -0,0 +1,91 @@ +/* + * Copyright (C) 2024 Huawei Device 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 { matrix4 } from '@kit.ArkUI'; + +let matrix1 = matrix4.init([1.0, 0.0, 0.0, 0.0, + 0.0, 1.0, 0.0, 0.0, + 0.0, 0.0, 1.0, 0.0, + 0.0, 0.0, 0.0, 1.0]) +let matrix2 = matrix4.identity() + +@Entry +@Component +struct UIComponentPopupBoxPopupFollowTransformofTarget031 { + @State message: string = 'popup'; + @State customPopup: boolean = false; + @State scaleX: number = 1; + @State scaleY: number = 1; + @State angle: string = '0deg'; + @State myButtonModifier: ButtonAttributeModifier = new ButtonAttributeModifier(); + + + @Builder + popupBuilder() { + Row({ space: 2 }) { + Text('This is a custom popup').fontSize(20) + } + } + + build() { + Row() { + Column() { + Button(this.message) + .fontSize(20) + .fontColor(Color.Blue) + .id('UIComponentPopupBoxPopupFollowTransformofTarget0310') + .onClick(() => { + this.customPopup = !this.customPopup; + }) + .bindPopup(this.customPopup, { + builder: this.popupBuilder, + enableArrow: true, + showInSubWindow: false, + followTransformOfTarget: false, + autoCancel: false, + }) + .scale({ + centerX: this.scaleX, + centerY: this.scaleY + }) + .transform(matrix1) + .rotate({ + angle: this.angle + }) + .attributeModifier(this.myButtonModifier) + } + .id('UIComponentPopupBoxPopupFollowTransformofTarget0311') + .onClick(() => { + this.scaleX = 0.5; + this.scaleY = 2; + this.angle = '90deg'; + this.myButtonModifier.transformValue = matrix2; + }) + .width('200px') + .height('80px') + } + .width('100%') + .height('100%') + .alignItems(VerticalAlign.Center) + .justifyContent(FlexAlign.Center) + } +} + +class ButtonAttributeModifier implements AttributeModifier { + transformValue: matrix4.Matrix4Transit = matrix1; + + applyNormalAttribute(instance: ButtonAttribute): void { + instance.transform(this.transformValue); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxPopupFollowTransformOfTarget/UIComponentPopupBoxPopupFollowTransformofTarget058.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxPopupFollowTransformOfTarget/UIComponentPopupBoxPopupFollowTransformofTarget058.ets new file mode 100644 index 0000000000000000000000000000000000000000..0214999883deba0a0f703bf153771253aab08961 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxPopupFollowTransformOfTarget/UIComponentPopupBoxPopupFollowTransformofTarget058.ets @@ -0,0 +1,67 @@ +/* + * Copyright (C) 2024 Huawei Device 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. + */ + +@Entry +@Component +struct UIComponentPopupBoxPopupFollowTransformofTarget058 { + @State message: string = 'Scale'; + @State customPopup: boolean = false; + @State scaleX: number = 1; + @State scaleY: number = 1; + + @Builder + popupBuilder() { + Row({ space: 8 }) { + Text('This is a custom popup').fontSize(20) + } + } + + build() { + Row() { + Column() { + Button(this.message) + .fontSize(20) + .fontColor(Color.Blue) + .id('Target0580') + .bindPopup(this.customPopup, { + builder: this.popupBuilder, + enableArrow: true, + showInSubWindow: false, + followTransformOfTarget: true, + autoCancel: false, + }) + .scale({ + x: this.scaleX, + y: this.scaleY + }) + .onClick(() => { + this.customPopup = !this.customPopup; + }) + + } + .width('200px') + .height('80px') + .id('Target0581') + .onClick(() => { + this.scaleX = 0.5; + this.scaleY = 2; + }) + } + .width('100%') + .height('100%') + .alignItems(VerticalAlign.Center) + .justifyContent(FlexAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxPopupFollowTransformOfTarget/UIComponentPopupBoxPopupFollowTransformofTarget085.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxPopupFollowTransformOfTarget/UIComponentPopupBoxPopupFollowTransformofTarget085.ets new file mode 100644 index 0000000000000000000000000000000000000000..2da93c371acda8a358adb4344541c91c995e9b3f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxPopupFollowTransformOfTarget/UIComponentPopupBoxPopupFollowTransformofTarget085.ets @@ -0,0 +1,67 @@ +/* + * Copyright (C) 2024 Huawei Device 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. + */ + +@Entry +@Component +struct UIComponentPopupBoxPopupFollowTransformofTarget085 { + @State message: string = 'Scale'; + @State customPopup: boolean = false; + @State scaleX: number = 1; + @State scaleY: number = 1; + @State angle: string = '0deg'; + + @Builder + popupBuilder() { + Row({ space: 2 }) { + Text('This is a custom popup').fontSize(20) + } + } + + build() { + Row() { + Column() { + Button(this.message) + .fontSize(20) + .fontColor(Color.Blue) + .id('UIComponentPopupBoxPopupFollowTransformofTarget0850') + .bindPopup(this.customPopup, { + builder: this.popupBuilder, + enableArrow: true, + showInSubWindow: false, + followTransformOfTarget: undefined, + autoCancel: false, + }) + .rotate({ + angle: this.angle + }) + .onClick(() => { + this.customPopup = !this.customPopup; + }) + } + .id('UIComponentPopupBoxPopupFollowTransformofTarget0851') + .onClick(() => { + this.scaleX = 0.5; + this.scaleY = 2; + this.angle = '90deg'; + }) + .width('200px') + .height('80px') + } + .width('100%') + .height('100%') + .alignItems(VerticalAlign.Center) + .justifyContent(FlexAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean001.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean001.ets new file mode 100644 index 0000000000000000000000000000000000000000..46b30fb114e54a101f1627c2b958a716af8e27d9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean001.ets @@ -0,0 +1,59 @@ +/* + * Copyright (C) 2024 Huawei Device 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. + */ + +@Entry +@Component +struct UIComponentPopupBoxPopupOnWillDisMissBoolean001 { + @State message: string = 'CustomPop Up'; + @State customPopup: boolean = false; + @State textMessage: string = '气泡未弹出'; + + @Builder + popupBuilder() { + Row({ space: 2 }) { + Text('This is a custom popup').fontSize(10) + } + } + + build() { + Row() { + Column({space: 20}) { + Text(this.textMessage) + Button(this.message) + .fontSize(20) + .fontColor(Color.Blue) + .id('UIComponentPopupBoxPopupOnWillDisMissBoolean0010') + .onClick(() => { + this.customPopup = !this.customPopup; + if (this.customPopup) { + this.textMessage = '气泡已弹出'; + } + }) + .bindPopup(this.customPopup, { + builder: this.popupBuilder, + message: 'popup', + enableArrow: true, + showInSubWindow: true, + autoCancel: false, + onWillDismiss: true, + }) + } + } + .width('100%') + .height('100%') + .alignItems(VerticalAlign.Center) + .justifyContent(FlexAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean002.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean002.ets new file mode 100644 index 0000000000000000000000000000000000000000..b4ca880688821b6b1c54b290c71f5df0f43f3300 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean002.ets @@ -0,0 +1,59 @@ +/* + * Copyright (C) 2024 Huawei Device 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. + */ + +@Entry +@Component +struct UIComponentPopupBoxPopupOnWillDisMissBoolean002 { + @State message: string = 'CustomPop Up'; + @State customPopup: boolean = false; + @State textMessage: string = '气泡未弹出'; + + @Builder + popupBuilder() { + Row({ space: 2 }) { + Text('This is a custom popup').fontSize(10) + } + } + + build() { + Row() { + Column({space: 20}) { + Text(this.textMessage) + Button(this.message) + .fontSize(20) + .fontColor(Color.Blue) + .id('UIComponentPopupBoxPopupOnWillDisMissBoolean0020') + .onClick(() => { + this.customPopup = !this.customPopup; + if (this.customPopup) { + this.textMessage = '气泡已弹出'; + } + }) + .bindPopup(this.customPopup, { + builder: this.popupBuilder, + message: 'popup', + enableArrow: true, + showInSubWindow: true, + autoCancel: true, + onWillDismiss: true, + }) + } + } + .width('100%') + .height('100%') + .alignItems(VerticalAlign.Center) + .justifyContent(FlexAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean005.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean005.ets new file mode 100644 index 0000000000000000000000000000000000000000..6700b4f73ba9c1f7a04d5cb25bc4fa659531daad --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean005.ets @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2024 Huawei Device 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. + */ + +@Entry +@Component +struct UIComponentPopupBoxPopupOnWillDisMissBoolean005 { + @State message: string = 'CustomPop Up'; + @State customPopup: boolean = false; + @State textMessage: string = '气泡未弹出'; + + @Builder + popupBuilder() { + Row({ space: 2 }) { + Text('This is a custom popup').fontSize(10) + } + } + + build() { + Row() { + Column({space: 20}) { + Text(this.textMessage) + Button(this.message) + .fontSize(20) + .fontColor(Color.Blue) + .id('UIComponentPopupBoxPopupOnWillDisMissBoolean0050') + .onClick(() => { + this.customPopup = !this.customPopup; + if (this.customPopup) { + this.textMessage = '气泡已弹出'; + } + }) + .bindPopup(this.customPopup, { + builder: this.popupBuilder, + message: 'popup', + enableArrow: true, + onWillDismiss: true, + }) + } + } + .width('100%') + .height('100%') + .alignItems(VerticalAlign.Center) + .justifyContent(FlexAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean006.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean006.ets new file mode 100644 index 0000000000000000000000000000000000000000..62fa17281d97be7a417d605a8904a03010c7253b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean006.ets @@ -0,0 +1,71 @@ +/* + * Copyright (C) 2024 Huawei Device 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. + */ + +@Entry +@Component +struct UIComponentPopupBoxPopupOnWillDisMissBoolean006 { + @State message: string = 'popup'; + @State handlePopup: boolean = false; + @State textMessage: string = '气泡未弹出'; + + + popupOptions: PopupOptions = { + message: 'this is a popup', + enableArrow: true, + showInSubWindow: true, + autoCancel: false, + onWillDismiss: true, + width: '200px', + primaryButton: { + value: '取消', + action: () => { + this.handlePopup = false; + console.info('取消按钮点击'); + this.textMessage = '气泡弹出并已点击按钮消失'; + } + }, + secondaryButton: { + value: '确定', + action: () => { + this.handlePopup = false; + this.textMessage = '气泡弹出并已点击按钮消失'; + } + } + }; + + build() { + Row() { + Column({space: 20}) { + Text(this.textMessage) + Button(this.message) + .fontSize(20) + .fontColor(Color.Blue) + .id('UIComponentPopupBoxPopupOnWillDisMissBoolean0060') + .onClick(() => { + this.handlePopup = !this.handlePopup; + if (this.handlePopup) { + this.textMessage = '气泡已弹出'; + } + }) + .bindPopup(this.handlePopup, this.popupOptions) + } + .height('80px') + } + .width('100%') + .height('100%') + .alignItems(VerticalAlign.Center) + .justifyContent(FlexAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean007.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean007.ets new file mode 100644 index 0000000000000000000000000000000000000000..dcd69b8caf7be4f4606c9e4b7fde73e9367b3cab --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean007.ets @@ -0,0 +1,70 @@ +/* + * Copyright (C) 2024 Huawei Device 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. + */ + +@Entry +@Component +struct UIComponentPopupBoxPopupOnWillDisMissBoolean007 { + @State message: string = 'popup'; + @State handlePopup: boolean = false; + @State textMessage: string = '气泡未弹出'; + + + popupOptions: PopupOptions = { + message: 'this is a popup', + enableArrow: true, + showInSubWindow: true, + autoCancel: true, + onWillDismiss: false, + width: '200px', + primaryButton: { + value: 'close', + action: () => { + this.handlePopup = false; + this.textMessage = '气泡弹出并已点击按钮消失'; + }, + }, + secondaryButton: { + value: 'confirm', + action: () => { + this.handlePopup = false; + this.textMessage = '气泡弹出并已点击按钮消失'; + } + } + }; + + build() { + Row() { + Column({space: 20}) { + Text(this.textMessage) + Button(this.message) + .fontSize(20) + .fontColor(Color.Blue) + .id('UIComponentPopupBoxPopupOnWillDisMissBoolean0070') + .onClick(() => { + this.handlePopup = !this.handlePopup; + if (this.handlePopup) { + this.textMessage = '气泡已弹出'; + } + }) + .bindPopup(this.handlePopup, this.popupOptions) + } + .height('80px') + } + .width('100%') + .height('100%') + .alignItems(VerticalAlign.Center) + .justifyContent(FlexAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean009.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean009.ets new file mode 100644 index 0000000000000000000000000000000000000000..fddf9c08008dfbea7ce1d22efda5eefac926be18 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean009.ets @@ -0,0 +1,70 @@ +/* + * Copyright (C) 2024 Huawei Device 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. + */ + +@Entry +@Component +struct UIComponentPopupBoxPopupOnWillDisMissBoolean009 { + @State message: string = 'popup'; + @State handlePopup: boolean = false; + @State textMessage: string = '气泡未弹出'; + + + popupOptions: PopupOptions = { + message: 'this is a popup', + enableArrow: true, + showInSubWindow: true, + autoCancel: true, + onWillDismiss: true, + width: '200px', + primaryButton: { + value: '取消', + action: () => { + this.handlePopup = false; + this.textMessage = '气泡弹出并已点击按钮消失'; + } + }, + secondaryButton: { + value: '确定', + action: () => { + this.handlePopup = false; + this.textMessage = '气泡弹出并已点击按钮消失'; + } + } + }; + + build() { + Row() { + Column({space: 20}) { + Text(this.textMessage) + Button(this.message) + .fontSize(20) + .fontColor(Color.Blue) + .id('UIComponentPopupBoxPopupOnWillDisMissBoolean0090') + .onClick(() => { + this.handlePopup = !this.handlePopup; + if (this.handlePopup) { + this.textMessage = '气泡已弹出'; + } + }) + .bindPopup(this.handlePopup, this.popupOptions) + } + .height('80px') + } + .width('100%') + .height('100%') + .alignItems(VerticalAlign.Center) + .justifyContent(FlexAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean010.ets new file mode 100644 index 0000000000000000000000000000000000000000..015f69ec5761cbf41cade0eaae8575970a8a0bde --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean010.ets @@ -0,0 +1,68 @@ +/* + * Copyright (C) 2024 Huawei Device 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. + */ + +@Entry +@Component +struct UIComponentPopupBoxPopupOnWillDisMissBoolean010 { + @State message: string = 'popup'; + @State handlePopup: boolean = false; + @State textMessage: string = '气泡未弹出'; + + popupOptions: PopupOptions = { + message: 'this is a popup', + enableArrow: true, + onWillDismiss: false, + placement: Placement.Bottom, + width: '200px', + primaryButton: { + value: 'show=false', + action: () => { + this.handlePopup = false; + this.textMessage = '气泡弹出并已点击按钮消失'; + } + }, + secondaryButton: { + value: '确定', + action: () => { + this.handlePopup = false; + this.textMessage = '气泡弹出并已点击按钮消失'; + } + } + }; + + build() { + Row() { + Column({space: 20}) { + Text(this.textMessage) + Button(this.message) + .fontSize(20) + .fontColor(Color.Blue) + .id('UIComponentPopupBoxPopupOnWillDisMissBoolean0100') + .onClick(() => { + this.handlePopup = !this.handlePopup; + if (this.handlePopup) { + this.textMessage = '气泡已弹出'; + } + }) + .bindPopup(this.handlePopup, this.popupOptions) + } + .height('80px') + } + .width('100%') + .height('100%') + .alignItems(VerticalAlign.Center) + .justifyContent(FlexAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean011.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean011.ets new file mode 100644 index 0000000000000000000000000000000000000000..e91c0dc06a91657ada618d06c81bd40243057a85 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean011.ets @@ -0,0 +1,68 @@ +/* + * Copyright (C) 2024 Huawei Device 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. + */ + +@Entry +@Component +struct UIComponentPopupBoxPopupOnWillDisMissBoolean011 { + @State message: string = 'popup'; + @State handlePopup: boolean = false; + @State textMessage: string = '气泡未弹出'; + + popupOptions: PopupOptions = { + message: 'this is a popup', + enableArrow: true, + onWillDismiss: false, + placement: Placement.Bottom, + width: '200px', + primaryButton: { + value: 'close', + action: () => { + this.handlePopup = false; + this.textMessage = '气泡弹出并已点击按钮消失'; + } + }, + secondaryButton: { + value: 'confirm', + action: () => { + this.handlePopup = false; + this.textMessage = '气泡弹出并已点击按钮消失'; + } + } + }; + + build() { + Row() { + Column({space: 20}) { + Text(this.textMessage) + Button(this.message) + .fontSize(20) + .fontColor(Color.Blue) + .id('UIComponentPopupBoxPopupOnWillDisMissBoolean0110') + .onClick(() => { + this.handlePopup = !this.handlePopup; + if (this.handlePopup) { + this.textMessage = '气泡已弹出'; + } + }) + .bindPopup(this.handlePopup, this.popupOptions) + } + .height('80px') + } + .width('100%') + .height('100%') + .alignItems(VerticalAlign.Center) + .justifyContent(FlexAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean012.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean012.ets new file mode 100644 index 0000000000000000000000000000000000000000..e9a93fd5b46a6836032a77e96bcc8f1d70118765 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean012.ets @@ -0,0 +1,68 @@ +/* + * Copyright (C) 2024 Huawei Device 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. + */ + +@Entry +@Component +struct UIComponentPopupBoxPopupOnWillDisMissBoolean012 { + @State message: string = 'popup'; + @State handlePopup: boolean = false; + @State textMessage: string = '气泡未弹出'; + + popupOptions: PopupOptions = { + message: 'this is a popup', + enableArrow: true, + onWillDismiss: true, + placement: Placement.Bottom, + width: '200px', + primaryButton: { + value: 'close', + action: () => { + this.handlePopup = false; + this.textMessage = '气泡弹出并已点击按钮消失'; + } + }, + secondaryButton: { + value: 'confirm', + action: () => { + this.handlePopup = false; + this.textMessage = '气泡弹出并已点击按钮消失'; + } + } + }; + + build() { + Row() { + Column({space: 20}) { + Text(this.textMessage) + Button(this.message) + .fontSize(20) + .fontColor(Color.Blue) + .id('UIComponentPopupBoxPopupOnWillDisMissBoolean0120') + .onClick(() => { + this.handlePopup = !this.handlePopup; + if (this.handlePopup) { + this.textMessage = '气泡已弹出'; + } + }) + .bindPopup(this.handlePopup, this.popupOptions) + } + .height('80px') + } + .width('100%') + .height('100%') + .alignItems(VerticalAlign.Center) + .justifyContent(FlexAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxPromptToastSequence/UIComponentPopupBoxPromptToastSequence001.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxPromptToastSequence/UIComponentPopupBoxPromptToastSequence001.ets new file mode 100644 index 0000000000000000000000000000000000000000..04b4cd6ac0f8e77d4036ff9861c23daba7e36732 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxPromptToastSequence/UIComponentPopupBoxPromptToastSequence001.ets @@ -0,0 +1,59 @@ +/* + * Copyright (C) 2024 Huawei Device 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 promptAction from '@ohos.promptAction'; + +@Entry +@Component +struct UIComponentPopupBoxPromptToastSequence001 { + @State buttonText: string = 'Open'; + @State message: string = ''; + @State handlePopup: boolean = false; + + popupOptions: PopupOptions = { + message: 'popup', + placement: Placement.Top, + showInSubWindow: true, + } + + build() { + Row() { + Column() { + Text(this.message) + .height(50) + .id('UIComponentPopupBoxPromptToastSequence0011') + Button(this.buttonText) + .fontSize(50) + .fontWeight(FontWeight.Bold) + .id('UIComponentPopupBoxPromptToastSequence0010') + .onClick(() => { + promptAction.showToast({ + message: 'This is a Toast', + showMode: promptAction.ToastShowMode.TOP_MOST, + alignment: Alignment.Top, + duration: 3000, + }) + this.handlePopup = !this.handlePopup; + }) + .bindPopup(this.handlePopup, this.popupOptions) + } + .width('100%') + } + .width('100%') + .height('100%') + .alignItems(VerticalAlign.Top) + .justifyContent(FlexAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxPromptToastSequence/UIComponentPopupBoxPromptToastSequence006.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxPromptToastSequence/UIComponentPopupBoxPromptToastSequence006.ets index 2850feb0c40503aaf70bb5097edb723207016eb2..ef41d9b546c66a3333858ef7d072a25a836447fc 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxPromptToastSequence/UIComponentPopupBoxPromptToastSequence006.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxPromptToastSequence/UIComponentPopupBoxPromptToastSequence006.ets @@ -36,12 +36,18 @@ struct UIComponentPopupBoxPromptToastSequence006 { message: 'This is a first Toast', showMode: promptAction.ToastShowMode.TOP_MOST, alignment: Alignment.Center, - duration: 3000 - }); + backgroundColor: Color.Pink, + duration: 3000, + }) promptAction.showToast({ - message: 'This is a second Toast', + message: 'second Toast', showMode: promptAction.ToastShowMode.TOP_MOST, alignment: Alignment.Center, + backgroundColor: Color.Blue, + offset: { + dx: 0, + dy: 100 + }, duration: 3000 }); }) diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxPromptToastSequence/UIComponentPopupBoxPromptToastSequence009.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxPromptToastSequence/UIComponentPopupBoxPromptToastSequence009.ets index 88aaeae9b9e1a538834a42a5ad0da142a00c998d..a94394e3192c739bcd8b008b4c485e6a7eab9793 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxPromptToastSequence/UIComponentPopupBoxPromptToastSequence009.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxPromptToastSequence/UIComponentPopupBoxPromptToastSequence009.ets @@ -34,7 +34,7 @@ struct UIComponentPopupBoxPromptToastSequence009 { promptAction.showToast({ message: 'this is a Toast', showMode: promptAction.ToastShowMode.TOP_MOST, - duration: 4000 + duration: 6000, }); }) } diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxPromptToastSequence/UIComponentPopupBoxPromptToastSequence010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxPromptToastSequence/UIComponentPopupBoxPromptToastSequence010.ets new file mode 100644 index 0000000000000000000000000000000000000000..d3397c0d7ff48149741b38100684646ea3542a18 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxPromptToastSequence/UIComponentPopupBoxPromptToastSequence010.ets @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2024 Huawei Device 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 promptAction from '@ohos.promptAction'; + +@Entry +@Component +struct UIComponentPopupBoxPromptToastSequence010 { + @State buttonText: string = 'Open'; + @State message: string = ''; + @State handlePopup: boolean = false; + popupOptions: PopupOptions = { + message: 'This is a popup', + placementOnTop: true, + showInSubWindow: true, + } + + build() { + Row() { + Column() { + Button(this.buttonText) + .fontSize(50) + .fontWeight(FontWeight.Bold) + .id('UIComponentPopupBoxPromptToastSequence0100') + .onClick(() => { + promptAction.showToast({ + message: 'this is a Toast', + showMode: promptAction.ToastShowMode.TOP_MOST, + duration: 3000, + alignment: Alignment.Center + }); + this.handlePopup = !this.handlePopup; + }) + .bindPopup(this.handlePopup, this.popupOptions) + } + .width('100%') + } + .width('100%') + .height('100%') + .alignItems(VerticalAlign.Center) + .justifyContent(FlexAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxSpecifications/UIComponentPopupBoxSpecifications039.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxSpecifications/UIComponentPopupBoxSpecifications039.ets new file mode 100644 index 0000000000000000000000000000000000000000..73060e1498603443a4c97caac26387c09dc044c6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxSpecifications/UIComponentPopupBoxSpecifications039.ets @@ -0,0 +1,70 @@ +/* + * Copyright (C) 2024 Huawei Device 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. + */ + + +@CustomDialog +struct CustomDialogExample_039 { + controller?: CustomDialogController + build() { + Column() { + Text('这是自定义弹窗') + .fontSize(30) + .height(100) + Button('confirm') + .onClick(() => { + if (this.controller != undefined) { + this.controller.close() + } + }) + .margin(20) + } + } +} +@Entry +@Component +struct UIComponentPopupBoxSpecifications039 { + dialogController: CustomDialogController | null = new CustomDialogController({ + builder: CustomDialogExample_039(), + cancel: this.existApp, + autoCancel: true, + alignment: DialogAlignment.Center + }) + aboutToDisappear() { + this.dialogController = null // 将dialogController置空 + } + + onCancel() { + console.info('Callback when the first button is clicked') + } + + onAccept() { + console.info('Callback when the second button is clicked') + } + + existApp() { + console.info('Click the callback in the blank area') + } + + build() { + Column() { + Button('show custom Dialog') + .onClick(() => { + if (this.dialogController != null) { + this.dialogController.open() + } + }).backgroundColor(0x317aff).key('UIComponentPopupBoxSpecifications0390') + }.width('100%').margin({ top: 5 }) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxSpecifications/UIComponentPopupBoxSpecifications040.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxSpecifications/UIComponentPopupBoxSpecifications040.ets new file mode 100644 index 0000000000000000000000000000000000000000..0e6a4ccb018d119b76d496d3d8c2ffe396721791 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxSpecifications/UIComponentPopupBoxSpecifications040.ets @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2024 Huawei Device 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 { promptAction } from '@kit.ArkUI'; + + +@Entry +@Component +struct UIComponentPopupBoxSpecifications040 { + @State message: string = 'show AlertDialog'; + + build() { + Row() { + Column() { + Button(this.message) + .fontSize(20) + .id('UIComponentPopupBoxSpecifications0400') + .onClick(() => { + AlertDialog.show({ + title: 'Alert Dialog', + message: 'text', + autoCancel: true, + alignment: DialogAlignment.Center, + offset: { dx: 0, dy: -20 }, + gridCount: 3, + confirm: { + value: 'confirm', + action: () => { + console.info('Button-clicking callback') + } + }, + cancel: () => { + console.info('Closed callbacks') + } + }) + }) + } + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxSpecifications/UIComponentPopupBoxSpecifications041.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxSpecifications/UIComponentPopupBoxSpecifications041.ets new file mode 100644 index 0000000000000000000000000000000000000000..77e6091ebdb2840c92c7c27c203efe8d28137958 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxSpecifications/UIComponentPopupBoxSpecifications041.ets @@ -0,0 +1,70 @@ +/* + * Copyright (C) 2024 Huawei Device 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. + */ + +@Entry +@Component +struct UIComponentPopupBoxSpecifications041 { + @State message: string = 'Show ActionSheet'; + + build() { + Row() { + Column() { + Button(this.message) + .fontSize(20) + .id('UIComponentPopupBoxSpecifications0410') + .onClick(() => { + ActionSheet.show({ + title: 'ActionSheet title', + subtitle: 'ActionSheet subtitle', + message: 'message', + autoCancel: true, + confirm: { + defaultFocus: true, + value: 'confirm', + action: () => { + console.log('Get Alert Dialog handled') + } + }, + cancel: () => { + console.log('actionSheet canceled') + }, + sheets: [ + { + title: 'apples', + action: () => { + console.log('apples') + } + }, + { + title: 'bananas', + action: () => { + console.log('bananas') + } + }, + { + title: 'pears', + action: () => { + console.log('pears') + } + } + ] + }) + }) + } + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxSpecifications/UIComponentPopupBoxSpecifications045.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxSpecifications/UIComponentPopupBoxSpecifications045.ets new file mode 100644 index 0000000000000000000000000000000000000000..ac570091535a137f675be5d9f31e934afb7584d0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxSpecifications/UIComponentPopupBoxSpecifications045.ets @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2024 Huawei Device 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. + */ + + +@Entry +@Component +struct UIComponentPopupBoxSpecifications0450 { + @State customPopup: boolean = false + + // popup构造器定义弹框内容 + @Builder + popupBuilder() { + Row({ space: 2 }) { + Button('confirm').onClick(() => { + this.customPopup = !this.customPopup; + }).key('UIComponentPopupBoxSpecifications0450_2') + Text('This is Custom Popup').fontSize(15) + }.width(200).height(50).padding(5) + } + + build() { + Column() { + Button('show Popup') + .onClick(() => { + this.customPopup = !this.customPopup; + }) + .bindPopup(this.customPopup, { + builder: this.popupBuilder, // 气泡的内容 + placement: Placement.Bottom, // 气泡的弹出位置 + popupColor: Color.Pink, // 气泡的背景色 + onStateChange: (e) => { + if (!e.isVisible) { + this.customPopup = false; + } + } + }).key('UIComponentPopupBoxSpecifications0450_1') + } + .height('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxSpecifications/UIComponentPopupBoxSpecifications046.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxSpecifications/UIComponentPopupBoxSpecifications046.ets new file mode 100644 index 0000000000000000000000000000000000000000..5f7a66982b35c169d612ec4ca689739d0745f3dd --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxSpecifications/UIComponentPopupBoxSpecifications046.ets @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2024 Huawei Device 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 prompt from '@ohos.prompt'; + +@Entry +@Component +struct UIComponentPopupBoxSpecifications046 { + @State message: string = 'Show prompt'; + + build() { + Row() { + Column() { + Button(this.message) + .fontSize(20) + .id('UIComponentPopupBoxSpecifications0460') + .onClick(() => { + prompt.showDialog({ + title: 'Title Info', + message: 'Message Info', + buttons: [ + { + text: 'cancel', + color: '#000000' + }, + { + text: 'confirm', + color: '#000000' + } + ], + }) + .then(data => { + console.info('showDialog success, click button: ' + data.index); + }) + .catch((err: Error) => { + console.info('showDialog error: ' + err); + }) + }) + } + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxSpecifications/UIComponentPopupBoxSpecifications047.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxSpecifications/UIComponentPopupBoxSpecifications047.ets new file mode 100644 index 0000000000000000000000000000000000000000..5affa2047ab6498867c68b7dd031ca040b91b096 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxSpecifications/UIComponentPopupBoxSpecifications047.ets @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2024 Huawei Device 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 promptAction from '@ohos.promptAction'; + +@Entry +@Component +struct UIComponentPopupBoxSpecifications047 { + @State message: string = 'show Dialog'; + + build() { + Row() { + Column() { + Button(this.message) + .fontSize(20) + .id('UIComponentPopupBoxSpecifications0470') + .onClick(() => { + try { + promptAction.showDialog({ + title: 'showDialog Title Info', + message: 'Message Info', + buttons: [ + { + text: 'cancel', + color: '#000000' + }, + { + text: 'confirm', + color: '#000000' + } + ] + }, (err, data) => { + if (err) { + console.info('showDialog err: ' + err); + return; + } + console.info('showDialog success callback, click button: ' + data.index); + }); + } catch (error) { + console.error(`showDialog args error code is ${error}`); + }; + }) + } + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxSpecifications/UIComponentPopupBoxSpecifications048.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxSpecifications/UIComponentPopupBoxSpecifications048.ets new file mode 100644 index 0000000000000000000000000000000000000000..da2bf844d970b84ab8d5fcbdd7d6af24f9bcab59 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxSpecifications/UIComponentPopupBoxSpecifications048.ets @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2024 Huawei Device 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. + */ + + +@Entry +@Component +struct UIComponentPopupBoxSpecifications048 { + @State select: boolean = true + @State message: string = 'show menu'; + + @Builder + SubMenu() { + Menu() { + MenuItem({ content: "Copy", labelInfo: "Ctrl+C" }) + MenuItem({ content: "Paste", labelInfo: "Ctrl+V" }) + } + } + + @Builder + MyMenu(){ + Menu() { + MenuItem({ startIcon: 'icon.png', content: "Menu option" }) + MenuItem({ startIcon: 'icon.png', content: "Menu option" }) + MenuItem({ + content: "Menu option", + builder: ():void=>this.SubMenu() + }) + } + } + + build() { + Row() { + Column() { + Button(this.message) + .fontSize(20) + .id('UIComponentPopupBoxSpecifications0480') + .bindMenu(this.MyMenu()) + } + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxSpecificationsShadow/UIComponentPopupBoxSpecificationsShadow010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxSpecificationsShadow/UIComponentPopupBoxSpecificationsShadow010.ets new file mode 100644 index 0000000000000000000000000000000000000000..20fbceb3022ba70fa18f8de4880a4d0653223426 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxSpecificationsShadow/UIComponentPopupBoxSpecificationsShadow010.ets @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2024 Huawei Device 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 { LoadingDialog } from '@kit.ArkUI'; + +@Entry +@Component +struct UIComponentPopupBoxSpecificationsShadow010 { + dialogControllerProgress: CustomDialogController = new CustomDialogController({ + builder: LoadingDialog({ + content: 'This is a dialog loading...', + }), + shadow: { + radius: getContext().resourceManager.getNumber($r("app.integer.30")), + type: ShadowType.BLUR, + color: '#FF00FF', + offsetX: getContext().resourceManager.getNumber($r("app.integer.30")), + offsetY: getContext().resourceManager.getNumber($r("app.integer.30")), + fill: false + } + }) + + + build() { + Row() { + Column() { + Button('SelectDialog') + .fontSize(20) + .fontColor(Color.Blue) + .width('300px') + .id('UIComponentPopupBoxSpecificationsShadow0100') + .onClick(() => { + this.dialogControllerProgress.open() + }) + } + } + .width('100%') + .height('100%') + .alignItems(VerticalAlign.Center) + .justifyContent(FlexAlign.Center) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxSpecificationsShadow/UIComponentPopupBoxSpecificationsShadow019.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxSpecificationsShadow/UIComponentPopupBoxSpecificationsShadow019.ets new file mode 100644 index 0000000000000000000000000000000000000000..8cfde9b57fee898d912a0bfd4e1fa6e50af00546 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxSpecificationsShadow/UIComponentPopupBoxSpecificationsShadow019.ets @@ -0,0 +1,76 @@ +/* + * Copyright (C) 2024 Huawei Device 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 { SelectDialog } from '@kit.ArkUI'; + +@Entry +@Component +struct UIComponentPopupBoxSpecificationsShadow019 { + radioIndex = 0; + dialogControllerList: CustomDialogController = new CustomDialogController({ + builder: SelectDialog({ + title: '文本标题', + selectedIndex: this.radioIndex, + confirm: { + value: '取消', + action: () => {}, + }, + radioContent: [ + { + title: 'This is a first radioContent', + action: () => { + this.radioIndex = 0 + } + }, + { + title: 'This is a second radioContent', + action: () => { + this.radioIndex = 1 + } + } + ] + }), + shadow: { + radius: getContext().resourceManager.getNumber($r("app.integer.100")), + type: ShadowType.COLOR, + color: ColoringStrategy.INVERT, + offsetX: getContext().resourceManager.getNumber($r("app.integer.100")), + offsetY: getContext().resourceManager.getNumber($r("app.integer.100")), + fill: false + } + }) + + + build() { + Row() { + Column() { + Button('SelectDialog') + .fontSize(20) + .fontColor(Color.Blue) + .width('300px') + .id('UIComponentPopupBoxSpecificationsShadow0190') + .onClick(() => { + this.dialogControllerList.open(); + }) + } + .width('300px') + .height('200px') + } + .width('100%') + .height('100%') + .alignItems(VerticalAlign.Center) + .justifyContent(FlexAlign.Center) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxSpecificationsShadow/UIComponentPopupBoxSpecificationsShadow090.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxSpecificationsShadow/UIComponentPopupBoxSpecificationsShadow090.ets new file mode 100644 index 0000000000000000000000000000000000000000..012ee0ca92b52152797abf081e47a57ecb84d6c5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxSpecificationsShadow/UIComponentPopupBoxSpecificationsShadow090.ets @@ -0,0 +1,68 @@ +/* + * Copyright (C) 2024 Huawei Device 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 { SelectDialog } from '@kit.ArkUI'; + +@Entry +@Component +struct UIComponentPopupBoxSpecificationsShadow090 { + radioIndex = 0; + dialogControllerList: CustomDialogController = new CustomDialogController({ + builder: SelectDialog({ + title: '文本标题', + selectedIndex: this.radioIndex, + confirm: { + value: '取消', + action: () => {}, + }, + radioContent: [ + { + title: 'This is a first radioContent', + action: () => { + this.radioIndex = 0 + } + }, + { + title: 'This is a second radioContent', + action: () => { + this.radioIndex = 1 + } + } + ] + }), + }) + + + build() { + Row() { + Column() { + Button('SelectDialog') + .fontSize(20) + .fontColor(Color.Blue) + .width('300px') + .id('UIComponentPopupBoxSpecificationsShadow0900') + .onClick(() => { + this.dialogControllerList.open(); + }) + } + .width('300px') + .height('200px') + } + .width('100%') + .height('100%') + .alignItems(VerticalAlign.Center) + .justifyContent(FlexAlign.Center) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxSpecificationsShadow/UIComponentPopupBoxSpecificationsShadow097.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxSpecificationsShadow/UIComponentPopupBoxSpecificationsShadow097.ets new file mode 100644 index 0000000000000000000000000000000000000000..caac9940315fd8d6b3dc5c149c79bdaf8ba77ce3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxSpecificationsShadow/UIComponentPopupBoxSpecificationsShadow097.ets @@ -0,0 +1,69 @@ +/* + * Copyright (C) 2024 Huawei Device 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 { SelectDialog } from '@kit.ArkUI'; + +@Entry +@Component +struct UIComponentPopupBoxSpecificationsShadow097 { + radioIndex = 0; + dialogControllerList: CustomDialogController = new CustomDialogController({ + builder: SelectDialog({ + title: '文本标题', + selectedIndex: this.radioIndex, + confirm: { + value: '取消', + action: () => {}, + }, + radioContent: [ + { + title: 'This is a first radioContent', + action: () => { + this.radioIndex = 0 + } + }, + { + title: 'This is a second radioContent', + action: () => { + this.radioIndex = 1 + } + } + ] + }), + shadow: ShadowStyle.OUTER_DEFAULT_MD + }) + + + build() { + Row() { + Column() { + Button('SelectDialog') + .fontSize(20) + .fontColor(Color.Blue) + .width('300px') + .id('UIComponentPopupBoxSpecificationsShadow0970') + .onClick(() => { + this.dialogControllerList.open(); + }) + } + .width('300px') + .height('200px') + } + .width('100%') + .height('100%') + .alignItems(VerticalAlign.Center) + .justifyContent(FlexAlign.Center) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxStyleStrong/UIComponentPopupBoxStyleStrong026.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxStyleStrong/UIComponentPopupBoxStyleStrong026.ets new file mode 100644 index 0000000000000000000000000000000000000000..32199532ace63110d91687f6d7ad3b473792ef64 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxStyleStrong/UIComponentPopupBoxStyleStrong026.ets @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2024 Huawei Device 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 { promptAction } from '@kit.ArkUI'; + +@Entry +@Component +struct UIComponentPopupBoxStyleStrong026 { + build() { + Row() { + Column({ space: 50 }) { + Button('默认效果') + .id('UIComponentPopupBoxStyleStrong0260') + .onClick(() => { + promptAction.showDialog({ + message: '弹框显示' + }) + }) + Button('配置模糊材质') + .id('UIComponentPopupBoxStyleStrong0261') + .onClick(() => { + promptAction.showDialog({ + message: '弹框显示', + backgroundBlurStyle: BlurStyle.COMPONENT_ULTRA_THICK + }) + }) + } + } + .width('100%') + .height('100%') + .alignItems(VerticalAlign.Center) + .justifyContent(FlexAlign.Center) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxStyleStrong/UIComponentPopupBoxStyleStrong027.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxStyleStrong/UIComponentPopupBoxStyleStrong027.ets new file mode 100644 index 0000000000000000000000000000000000000000..d78b75f042ba1c73a84910f5c51f6883f2232d64 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxStyleStrong/UIComponentPopupBoxStyleStrong027.ets @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2024 Huawei Device 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 { promptAction } from '@kit.ArkUI'; + +@Entry +@Component +struct UIComponentPopupBoxStyleStrong027 { + build() { + Row() { + Column() { + Button('默认效果') + .id('UIComponentPopupBoxStyleStrong0270') + .onClick(() => { + promptAction.showDialog({ + message: '弹框显示' + }) + }) + } + } + .width('100%') + .height('100%') + .alignItems(VerticalAlign.Center) + .justifyContent(FlexAlign.Center) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxToastStyleInterface/UIComponentPopupBoxToastStyleInterface003.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxToastStyleInterface/UIComponentPopupBoxToastStyleInterface003.ets index 7ef216baf87f3182f28cf94543adf10bb04b198c..9c33acfacfe9a0c7bc787c19684b83999c2604ca 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxToastStyleInterface/UIComponentPopupBoxToastStyleInterface003.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxToastStyleInterface/UIComponentPopupBoxToastStyleInterface003.ets @@ -13,6 +13,8 @@ * limitations under the License. */ +import { promptAction } from '@kit.ArkUI'; + @Entry @Component struct UIComponentPopupBoxToastStyleInterface003 { @@ -24,12 +26,18 @@ struct UIComponentPopupBoxToastStyleInterface003 { .fontWeight(FontWeight.Bold) .onClick(() => { this.getUIContext().getPromptAction().showToast({ - message: '这是超长文本,全用默认值。这是超长文本,全用默认值。这是超长文本,全用默认值。这是超长文本,全用默认值。这是超长文本,全用默认值。这是超长文本,全用默认值。' + message: '这是Toast文本', + showMode: promptAction.ToastShowMode.TOP_MOST }); }).key('UIComponentPopupBoxToastStyleInterface003_button_001') + TextInput({ placeholder: '这是输入框' }) + .key('UIComponentPopupBoxToastStyleInterface003_textInput_001') } .width('100%') } + .width('100%') .height('100%') + .alignItems(VerticalAlign.Top) + .justifyContent(FlexAlign.Center) } } diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxToastStyleInterface/UIComponentPopupBoxToastStyleInterface004.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxToastStyleInterface/UIComponentPopupBoxToastStyleInterface004.ets index b2bd2f4b62afea7b567925eb124cd4d92a29a275..8fb6c657263b65f16992a57c64e335b0f309e870 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxToastStyleInterface/UIComponentPopupBoxToastStyleInterface004.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupBoxToastStyleInterface/UIComponentPopupBoxToastStyleInterface004.ets @@ -12,23 +12,22 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +import { promptAction } from '@kit.ArkUI' @Entry @Component struct UIComponentPopupBoxToastStyleInterface004 { + build() { Row() { Column() { - Button('040_Toast') + Button('030_Toast') .fontWeight(FontWeight.Bold) .onClick(() => { this.getUIContext().getPromptAction().showToast({ - message: '这是超长文本,全用默认值', - showMode: 1 + message: 'In the realm of collaborative projects, effective communication is paramount.', }); }).key('UIComponentPopupBoxToastStyleInterface004_button_001') - TextInput({ placeholder: '这是输入框' }) - .key('UIComponentPopupBoxToastStyleInterface004_textInput_001') } .width('100%') } diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupPromptInterface/UIComponentPopupPromptInterface0013.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupPromptInterface/UIComponentPopupPromptInterface0013.ets new file mode 100644 index 0000000000000000000000000000000000000000..c96213c70184323b16ccc18b27d5994f797e365f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupPromptInterface/UIComponentPopupPromptInterface0013.ets @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2024 Huawei Device 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. + */ + + +@Entry +@Component +struct UIComponentPopupPromptInterface0013 { + build() { + Row() { + Column() { + Button('Show ActionMenu') + .fontWeight(FontWeight.Bold) + .onClick(() => { + this.getUIContext() + .getPromptAction() + .showActionMenu({ + buttons: [ + { + text: 'string type button', + color: '#ffc8be2e' + }, + { + text: 'string type button111', + color: '#ffc8be2e' + } + ] + }) + .catch((err: Error) => { + console.info('showActionMenu error: ' + err); + }) + }).key('UIComponentPopupPromptInterface00130') + } + .width('100%') + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupboxCalendarpickerInterface/UIComponentPopupboxCalendarpickerInterface0070.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupboxCalendarpickerInterface/UIComponentPopupboxCalendarpickerInterface0070.ets index c8e1ada30d5dbf0ee59968e6a113acda03e74b3c..64629ea0ae1137797fbd8ba99ee6d42ae7805fc9 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupboxCalendarpickerInterface/UIComponentPopupboxCalendarpickerInterface0070.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupboxCalendarpickerInterface/UIComponentPopupboxCalendarpickerInterface0070.ets @@ -17,7 +17,7 @@ @Component struct UIComponentPopupboxCalendarpickerInterface0070 { private selectedDate: Date = new Date('2024-11-07') - @State changeRes: string = 'CalendarPicker onChange callBack:' + @State changeRes: string = 'CalendarPicker onChange callBack:'; build() { Column() { diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupboxCalendarpickerInterface/UIComponentPopupboxCalendarpickerInterface0310.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupboxCalendarpickerInterface/UIComponentPopupboxCalendarpickerInterface0310.ets index b8c460a5cdaf28555854422246060fda5a9c7edd..7ae41c7725bc5209dd0d268a79277c50ed1f08ef 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupboxCalendarpickerInterface/UIComponentPopupboxCalendarpickerInterface0310.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPopupboxCalendarpickerInterface/UIComponentPopupboxCalendarpickerInterface0310.ets @@ -16,13 +16,14 @@ @Entry @Component struct UIComponentPopupboxCalendarpickerInterface0310 { - @State changeRes: string = 'CalendarPicker onChange callBack:\n' + @State selectedDate: Date = new Date('2024-12-1'); + @State changeRes: string = ''; build() { Column() { Text('月历日期选择器').fontSize(30) Column() { - CalendarPicker({ hintRadius: 10 }) + CalendarPicker({ hintRadius: 10, selected: this.selectedDate }) .id('calendarpickerInterface0310') .edgeAlign(CalendarAlign.END) .textStyle({ color: "#ff182431", font: { size: 20, weight: FontWeight.Normal } }) diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUISupportColor/UIComponentUISupportColor099.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUISupportColor/UIComponentUISupportColor099.ets index d3cd7976ce0c8f953c67e6f77f7d7511ce6b290e..6cc569a55e80b8bfa01bdff4a89989ed82381c7e 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUISupportColor/UIComponentUISupportColor099.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUISupportColor/UIComponentUISupportColor099.ets @@ -35,11 +35,6 @@ struct UIComponentUISupportColor099 { .fontColor(Color.Blue) .width('200px') .id('UIComponentUISupportColor0991') - .onClick(() => { - if (uiAppearance.getDarkMode() === uiAppearance.DarkMode.ALWAYS_LIGHT) { - uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT); - } - }) }.width('100%').height('100%').backgroundColor($r('sys.color.background_primary')) } } \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUISupportColor/UIComponentUISupportColor100.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUISupportColor/UIComponentUISupportColor100.ets index dc20d4467e8b0bd1ec1ff66bfff5794028ddc362..445e10cd13b90bcc24ccc650e4202c5f4cb712a1 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUISupportColor/UIComponentUISupportColor100.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUISupportColor/UIComponentUISupportColor100.ets @@ -35,13 +35,6 @@ struct UIComponentUISupportColor100 { .fontColor(Color.Blue) .width('200px') .id('UIComponentUISupportColor1001') - .onClick(() => { - if (uiAppearance.getDarkMode() === uiAppearance.DarkMode.ALWAYS_DARK) { - uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT); - } else { - uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_DARK); - } - }) }.width('100%').height('100%').backgroundColor($r('sys.color.background_primary')) } } \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUISupportColor/UIComponentUISupportColor102.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUISupportColor/UIComponentUISupportColor102.ets index d9f966d413fb2882bf23b3b5f460f93f0c2f29f1..bc0462579b726b1d55200d5445d67f189ed32f80 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUISupportColor/UIComponentUISupportColor102.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUISupportColor/UIComponentUISupportColor102.ets @@ -35,9 +35,13 @@ struct UIComponentUISupportColor102 { .fontColor(Color.Blue) .width('200px') .id('UIComponentUISupportColor1021') - .onClick(() => { + .onClick(async () => { if (uiAppearance.getDarkMode() === uiAppearance.DarkMode.ALWAYS_DARK) { - uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_DARK); + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_DARK).then(() => { + console.info('Set dark-mode successfully.'); + }).catch((error:Error) => { + console.error('Set dark-mode failed, ' + error.message); + });; } }) }.width('100%').height('100%').backgroundColor($r('sys.color.background_primary')) diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUISupportColor/UIComponentUISupportColor141.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUISupportColor/UIComponentUISupportColor141.ets new file mode 100644 index 0000000000000000000000000000000000000000..8c411919c15bd8e4dec08dd2803091215471c682 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUISupportColor/UIComponentUISupportColor141.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 Huawei Device 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. + */ + +@Entry +@Component +struct UIComponentUISupportColor141 { + @State text: string = "TTTTT"; + + build() { + Row() { + Column() { + + WithTheme({ colorMode: ThemeColorMode.SYSTEM }) { + Select([{ value: 'aaa' }, { value: 'bbb' }, { value: 'ccc' }]) + .value(this.text) + .font({ size: 40, weight: FontWeight.Bold }) + .backgroundColor($r('sys.color.background_primary')) + .width('50%') + .height('20%') + } + + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUISupportColor/UIComponentUISupportColor142.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUISupportColor/UIComponentUISupportColor142.ets new file mode 100644 index 0000000000000000000000000000000000000000..6d01d4214a0f94f399996d9b95a1cf755ba5be4c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUISupportColor/UIComponentUISupportColor142.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 Huawei Device 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. + */ + +@Entry +@Component +struct UIComponentUISupportColor142 { + @State text: string = "TTTTT" + + build() { + Row() { + Column() { + + WithTheme({ colorMode: ThemeColorMode.SYSTEM }) { + Select([{ value: 'aaa' }, { value: 'bbb' }, { value: 'ccc' }]) + .value(this.text) + .font({ size: 40, weight: FontWeight.Bold }) + .backgroundColor($r('sys.color.background_primary')) + .width('50%') + .height('20%') + } + + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUISupportColor/UIComponentUISupportColor143.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUISupportColor/UIComponentUISupportColor143.ets new file mode 100644 index 0000000000000000000000000000000000000000..76e85e9451963ed5f45192c02c7dd704acdb9ec6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUISupportColor/UIComponentUISupportColor143.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 Huawei Device 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. + */ + +@Entry +@Component +struct UIComponentUISupportColor143 { + @State text: string = "TTTTT" + + build() { + Row() { + Column() { + + WithTheme({ colorMode: ThemeColorMode.SYSTEM }) { + Select([{ value: 'aaa' }, { value: 'bbb' }, { value: 'ccc' }]) + .value(this.text) + .font({ size: 40, weight: FontWeight.Bold }) + .backgroundColor($r('sys.color.background_primary')) + .width('50%') + .height('20%') + } + + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUISupportColor/UIComponentUISupportColor144.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUISupportColor/UIComponentUISupportColor144.ets new file mode 100644 index 0000000000000000000000000000000000000000..b790be583bf052ac332a92eb7d2cf4d93f4d3cce --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUISupportColor/UIComponentUISupportColor144.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 Huawei Device 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. + */ + +@Entry +@Component +struct UIComponentUISupportColor144 { + @State text: string = "TTTTT" + + build() { + Row() { + Column() { + + WithTheme({ colorMode: ThemeColorMode.SYSTEM }) { + Select([{ value: 'aaa' }, { value: 'bbb' }, { value: 'ccc' }]) + .value(this.text) + .font({ size: 40, weight: FontWeight.Bold }) + .backgroundColor($r('sys.color.background_primary')) + .width('50%') + .height('20%') + } + + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUISupportColor/UIComponentUISupportColor145.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUISupportColor/UIComponentUISupportColor145.ets new file mode 100644 index 0000000000000000000000000000000000000000..3600f4036ae9234ad7833bf6e2b03b140cb736bd --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUISupportColor/UIComponentUISupportColor145.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 Huawei Device 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. + */ + +@Entry +@Component +struct UIComponentUISupportColor145 { + @State text: string = "TTTTT" + + build() { + Row() { + Column() { + + WithTheme({ colorMode: ThemeColorMode.LIGHT }) { + Select([{ value: 'aaa' }, { value: 'bbb' }, { value: 'ccc' }]) + .value(this.text) + .font({ size: 40, weight: FontWeight.Bold }) + .backgroundColor($r('sys.color.background_primary')) + .width('50%') + .height('20%') + } + + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUISupportColor/UIComponentUISupportColor146.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUISupportColor/UIComponentUISupportColor146.ets new file mode 100644 index 0000000000000000000000000000000000000000..e016f67a8ef54ac282af67f8dbbb816ce1ed3115 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUISupportColor/UIComponentUISupportColor146.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 Huawei Device 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. + */ + +@Entry +@Component +struct UIComponentUISupportColor146 { + @State text: string = "TTTTT" + + build() { + Row() { + Column() { + + WithTheme({ colorMode: ThemeColorMode.DARK }) { + Select([{ value: 'aaa' }, { value: 'bbb' }, { value: 'ccc' }]) + .value(this.text) + .font({ size: 40, weight: FontWeight.Bold }) + .backgroundColor($r('sys.color.background_primary')) + .width('50%') + .height('20%') + } + + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUISupportColor/UIComponentUISupportColor147.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUISupportColor/UIComponentUISupportColor147.ets new file mode 100644 index 0000000000000000000000000000000000000000..611dca378776cb31174f2921f58e74da8f655dba --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUISupportColor/UIComponentUISupportColor147.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 Huawei Device 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. + */ + +@Entry +@Component +struct UIComponentUISupportColor147 { + @State text: string = "TTTTT" + + build() { + Row() { + Column() { + + WithTheme({ colorMode: ThemeColorMode.SYSTEM }) { + Select([{ value: 'aaa' }, { value: 'bbb' }, { value: 'ccc' }]) + .value(this.text) + .font({ size: 40, weight: FontWeight.Bold }) + .backgroundColor($r('sys.color.background_primary')) + .width('50%') + .height('20%') + } + + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0020.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0020.ets new file mode 100644 index 0000000000000000000000000000000000000000..6a92e48941e1242a2ed8c68c7f757d3498ccedfd --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0020.ets @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2024 Huawei Device 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 Settings from '../../../test/model/Settings'; + +@Entry +@Component +struct UIComponentfunctionSpecialComponentsDialogDataInterface0020 { + selectedDate: Date = new Date("2024-12-1") + @State changeRes: string = 'select current DateTime is: \n' + @State useMilitaryTime: boolean = true + @State showTime: boolean = true + lunar: boolean = false + + build() { + Column() { + Button("DatePickerDialog").id('dialogDataInterface0020_btn') + .margin(20) + .onClick(() => { + DatePickerDialog.show({ + selected: this.selectedDate + }); + }) + Button("DatePickerDialog2").id('dialogDataInterface0020_btn2') + .margin(20) + .onClick(() => { + DatePickerDialog.show({ + selected: this.selectedDate + }); + }) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0040.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0040.ets new file mode 100644 index 0000000000000000000000000000000000000000..fe0f6733bbe8ac255c9a841a7ca8ec887ac0c83e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0040.ets @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2024 Huawei Device 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 Settings from '../../../test/model/Settings'; + +@Entry +@Component +struct UIComponentfunctionSpecialComponentsDialogDataInterface0040 { + selectedDate: Date = new Date("2024-12-1") + @State changeRes: string = 'select current DateTime is: \n' + lunarSwitch: boolean = false + checked: boolean = false + + build() { + Column() { + Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) { + Checkbox({ name: 'cb1', group: 'checkboxGroup' }) + .id('dialogDataInterface0040_cb1') + .selectedColor(0x39a2db) + .shape(CheckBoxShape.ROUNDED_SQUARE) + .onChange((value: boolean) => { + console.info('Checkbox change is' + value); + this.lunarSwitch = true; + this.checked = value; + }) + .select(this.checked) + .unselectedColor(Color.Red) + .margin(20) + .height(30) + Text('农历').fontSize(15) + }.width('100%') + + Button("DatePickerDialog").id('dialogDataInterface0040_btn') + .margin(20) + .onClick(() => { + DatePickerDialog.show({ + lunarSwitch: this.lunarSwitch, + selected: this.selectedDate + }); + }) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0110.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0110.ets new file mode 100644 index 0000000000000000000000000000000000000000..64be2a775be219bc5f8f49687e45d00056b90881 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0110.ets @@ -0,0 +1,170 @@ +/* + * Copyright (C) 2024 Huawei Device 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 Settings from '../../../test/model/Settings'; + +@Entry +@Component +struct UIComponentfunctionSpecialComponentsDialogDataInterface0110 { + selectedDate: Date = new Date("2024-12-1") + @State changeRes: string = 'select current DateTime is: \n' + @State useMilitaryTime: boolean = true + @State showTime: boolean = true + lunar: boolean = false + alignment: DialogAlignment = DialogAlignment.Default + + build() { + Column() { + Row() { + Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) { + Checkbox({ name: 'cb1', group: 'checkboxGroup' }) + .id('dialogDataInterface0110_cb1') + .selectedColor(0x39a2db) + .shape(CheckBoxShape.ROUNDED_SQUARE) + .onChange((value: boolean) => { + console.info('Checkbox change is' + value); + this.alignment = DialogAlignment.Top; + }) + .select((this.alignment == DialogAlignment.Top)) + .unselectedColor(Color.Red) + .margin(20) + .height(30) + Text('Top').fontSize(15) + Checkbox({ name: 'cb2', group: 'checkboxGroup' }) + .id('dialogDataInterface0110_cb2') + .selectedColor(0x39a2db) + .shape(CheckBoxShape.ROUNDED_SQUARE) + .onChange((value: boolean) => { + console.info('Checkbox change is' + value); + this.alignment = DialogAlignment.Center; + }) + .select((this.alignment == DialogAlignment.Center)) + .unselectedColor(Color.Red) + .margin(20) + .height(30) + Text('Center').fontSize(15) + Checkbox({ name: 'cb3', group: 'checkboxGroup' }) + .id('dialogDataInterface0110_cb3') + .selectedColor(0x39a2db) + .shape(CheckBoxShape.ROUNDED_SQUARE) + .onChange((value: boolean) => { + console.info('Checkbox change is' + value); + this.alignment = DialogAlignment.Bottom; + }) + .select((this.alignment == DialogAlignment.Bottom)) + .unselectedColor(Color.Red) + .margin(20) + .height(30) + Text('Bottom').fontSize(15) + }.width('100%') + }.width('100%') + + Row() { + Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) { + Checkbox({ name: 'cb4', group: 'checkboxGroup' }) + .id('dialogDataInterface0110_cb4') + .selectedColor(0x39a2db) + .shape(CheckBoxShape.ROUNDED_SQUARE) + .onChange((value: boolean) => { + console.info('Checkbox change is' + value); + this.alignment = DialogAlignment.TopStart; + }) + .select((this.alignment == DialogAlignment.TopStart)) + .unselectedColor(Color.Red) + .margin(20) + .height(30) + Text('TopStart').fontSize(15) + + Checkbox({ name: 'cb5', group: 'checkboxGroup' }) + .id('dialogDataInterface0110_cb5') + .selectedColor(0x39a2db) + .shape(CheckBoxShape.ROUNDED_SQUARE) + .onChange((value: boolean) => { + console.info('Checkbox change is' + value); + this.alignment = DialogAlignment.TopEnd; + }) + .select((this.alignment == DialogAlignment.TopEnd)) + .unselectedColor(Color.Red) + .margin(20) + .height(30) + Text('TopEnd').fontSize(15) + Checkbox({ name: 'cb6', group: 'checkboxGroup' }) + .id('dialogDataInterface0110_cb6') + .selectedColor(0x39a2db) + .shape(CheckBoxShape.ROUNDED_SQUARE) + .onChange((value: boolean) => { + console.info('Checkbox change is' + value); + this.alignment = DialogAlignment.CenterStart; + }) + .select((this.alignment == DialogAlignment.CenterStart)) + .unselectedColor(Color.Red) + .margin(20) + .height(30) + Text('CenterStart').fontSize(15) + }.width('100%') + }.width('100%') + + Row() { + Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) { + Checkbox({ name: 'cb7', group: 'checkboxGroup' }) + .id('dialogDataInterface0110_cb7') + .selectedColor(0x39a2db) + .shape(CheckBoxShape.ROUNDED_SQUARE) + .onChange((value: boolean) => { + console.info('Checkbox change is' + value); + this.alignment = DialogAlignment.CenterEnd; + }) + .select((this.alignment == DialogAlignment.CenterEnd)) + .unselectedColor(Color.Red) + .margin(20) + .height(30) + Text('CenterEnd').fontSize(15) + + Checkbox({ name: 'cb8', group: 'checkboxGroup' }) + .id('dialogDataInterface0110_cb8') + .selectedColor(0x39a2db) + .shape(CheckBoxShape.ROUNDED_SQUARE) + .onChange((value: boolean) => { + console.info('Checkbox change is' + value); + this.alignment = DialogAlignment.BottomStart; + }) + .select((this.alignment == DialogAlignment.BottomStart)) + .unselectedColor(Color.Red) + .margin(20) + .height(30) + Text('BottomStart').fontSize(15) + Checkbox({ name: 'cb9', group: 'checkboxGroup' }) + .id('dialogDataInterface0110_cb9') + .selectedColor(0x39a2db) + .shape(CheckBoxShape.ROUNDED_SQUARE) + .onChange((value: boolean) => { + console.info('Checkbox change is' + value); + this.alignment = DialogAlignment.BottomEnd; + }) + .select((this.alignment == DialogAlignment.BottomEnd)) + .unselectedColor(Color.Red) + .margin(20) + .height(30) + Text('BottomEnd').fontSize(15) + }.width('100%') + }.width('100%') + + Button("DatePickerDialog").id('dialogDataInterface0110_btn') + .margin(20) + .onClick(() => { + DatePickerDialog.show({ alignment: this.alignment, selected: this.selectedDate }); + }) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0180.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0180.ets new file mode 100644 index 0000000000000000000000000000000000000000..6b2f3bfcc4d4927ec36e7696b09632a393bceef3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0180.ets @@ -0,0 +1,71 @@ +/* + * Copyright (C) 2024 Huawei Device 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 Settings from '../../../test/model/Settings'; + +@Entry +@Component +struct UIComponentfunctionSpecialComponentsDialogDataInterface0180 { + selectedDate: Date = new Date("2024-12-1") + @State changeRes: string = 'select current DateTime is: \n' + @State useMilitaryTime: boolean = true + @State showTime: boolean = true + lunar: boolean = false + offSet: Offset | null = null + checked: boolean = false + + build() { + Column() { + Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) { + Checkbox({ name: 'cb1', group: 'checkboxGroup' }) + .id('dialogDataInterface0180_cb1') + .selectedColor(0x39a2db) + .shape(CheckBoxShape.ROUNDED_SQUARE) + .onChange((value: boolean) => { + console.info('Checkbox change is' + value); + this.offSet = { dx: -20, dy: +20 }; + this.checked = value; + }) + .select(this.checked) + .unselectedColor(Color.Red) + .margin(20) + .height(30) + Text('offSet = {dx:-20,dy:+20}').fontSize(15) + Checkbox({ name: 'cb2', group: 'checkboxGroup' }) + .id('dialogDataInterface0180_cb2') + .selectedColor(0x39a2db) + .shape(CheckBoxShape.ROUNDED_SQUARE) + .onChange((value: boolean) => { + console.info('Checkbox change is' + value); + this.offSet = { dx: -20, dy: +20 }; + this.checked = value; + }) + .select(this.checked) + .unselectedColor(Color.Red) + .margin(20) + .height(30) + Text('offSet = {dx:0,dy:0}').fontSize(15) + }.width('100%') + + Button("DatePickerDialog").id('dialogDataInterface0180_btn') + .margin(20) + .onClick(() => { + DatePickerDialog.show({ + offset: this.offSet, + selected: this.selectedDate + }); + }) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0200.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0200.ets new file mode 100644 index 0000000000000000000000000000000000000000..a777602e8b975dc8698e13260cb4ea9b2b1815ed --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0200.ets @@ -0,0 +1,62 @@ +/* + * Copyright (C) 2024 Huawei Device 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 Settings from '../../../test/model/Settings'; + +@Entry +@Component +struct UIComponentfunctionSpecialComponentsDialogDataInterface0200 { + selectedDate: Date = new Date("2024-12-1") + @State changeRes: string = 'select current DateTime is: \n' + @State useMilitaryTime: boolean = true + @State showTime: boolean = true + lunar: boolean = false + maskRect: Rectangle | null = null + checked: boolean = false + + build() { + Column() { + Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) { + Checkbox({ name: 'cb1', group: 'checkboxGroup' }) + .id('dialogDataInterface0200_cb1') + .selectedColor(0x39a2db) + .shape(CheckBoxShape.ROUNDED_SQUARE) + .onChange((value: boolean) => { + console.info('Checkbox change is' + value); + this.maskRect = { + x: 50, + y: 50, + width: '50%', + height: '50%' + }; + this.checked = value; + }) + .select(this.checked) + .unselectedColor(Color.Red) + .margin(20) + .height(30) + Text('maskRect = {x:50,y:50,width:\'50%\',height:\'50%\'}').fontSize(15) + }.width('100%') + + Button("DatePickerDialog").id('dialogDataInterface0200_btn') + .margin(20) + .onClick(() => { + DatePickerDialog.show({ + maskRect: this.maskRect, + selected: this.selectedDate + }); + }) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0220.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0220.ets new file mode 100644 index 0000000000000000000000000000000000000000..8e1d8b4136f5ce75d2c11105d40c2d0598629ce6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0220.ets @@ -0,0 +1,50 @@ +/* + * Copyright (C) 2024 Huawei Device 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 Settings from '../../../test/model/Settings'; +import { JSON } from '@kit.ArkTS'; + +@Entry +@Component +struct UIComponentfunctionSpecialComponentsDialogDataInterface0220 { + selectedDate: Date = new Date("2024-12-1") + @State changeRes: string = '' + @State useMilitaryTime: boolean = true + @State showTime: boolean = true + lunar:boolean = false + + build() { + Column() { + Button("DatePickerDialog").id('dialogDataInterface0220_btn') + .margin(20) + .onClick(() => { + this.getUIContext().showDatePickerDialog({ + selected: this.selectedDate, + onChange: (value) => { + console.info("DatePickerDialog:onChange() value="+JSON.stringify(value)) + this.changeRes += 'onChange: ' + JSON.stringify(value) + '\n'; + } + }) + }) + + Text(this.changeRes) + .fontColor(Color.Orange) + .fontSize(16) + .margin(20) + .borderWidth(1) + .width('100%') + .textAlign(TextAlign.Start) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0240.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0240.ets new file mode 100644 index 0000000000000000000000000000000000000000..e04e0affc337d5c013b52bed89fb29838e379ab2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0240.ets @@ -0,0 +1,112 @@ +/* + * Copyright (C) 2024 Huawei Device 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. + */ + +@Entry +@Component +struct UIComponentfunctionSpecialComponentsDialogDataInterface0240 { + selectedDate: Date = new Date("2024-12-1") + bgColor: ResourceColor | null = null + + build() { + Column() { + Row() { + Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) { + Checkbox({ name: 'cb1', group: 'checkboxGroup' }) + .id('dialogDataInterface0240_cb1') + .selectedColor(0x39a2db) + .shape(CheckBoxShape.ROUNDED_SQUARE) + .onChange((value: boolean) => { + console.info('Checkbox change is' + value); + if (value) { + this.bgColor = 0x008000; + } + }) + .unselectedColor(Color.Red) + .margin(10) + .height(30) + Text('0x008000').fontSize(10) + Checkbox({ name: 'cb2', group: 'checkboxGroup' }) + .id('dialogDataInterface0240_cb2') + .selectedColor(0x39a2db) + .shape(CheckBoxShape.ROUNDED_SQUARE) + .onChange((value: boolean) => { + console.info('Checkbox change is' + value); + if (value) { + this.bgColor = Color.Pink; + } + }) + .unselectedColor(Color.Red) + .margin(10) + .height(30) + Text('Pink').fontSize(10) + Checkbox({ name: 'cb3', group: 'checkboxGroup' }) + .id('dialogDataInterface0240_cb3') + .selectedColor(0x39a2db) + .shape(CheckBoxShape.ROUNDED_SQUARE) + .onChange((value: boolean) => { + console.info('Checkbox change is' + value); + if (value) { + this.bgColor = '#9effffff'; + } + }) + .unselectedColor(Color.Red) + .margin(10) + .height(30) + Text('#9effffff').fontSize(10) + }.width('100%') + }.width('100%') + + Row() { + Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) { + Checkbox({ name: 'cb4', group: 'checkboxGroup' }) + .id('dialogDataInterface0240_cb4') + .selectedColor(0x39a2db) + .shape(CheckBoxShape.ROUNDED_SQUARE) + .onChange((value: boolean) => { + console.info('Checkbox change is' + value); + if (value) { + this.bgColor = getContext().resourceManager.getColorSync($r("app.color.data_bg_color")); + } + }) + .unselectedColor(Color.Red) + .margin(10) + .height(30) + Text('res_9effffff').fontSize(10) + + Checkbox({ name: 'cb5', group: 'checkboxGroup' }) + .id('dialogDataInterface0240_cb5') + .selectedColor(0x39a2db) + .shape(CheckBoxShape.ROUNDED_SQUARE) + .onChange((value: boolean) => { + console.info('Checkbox change is' + value); + if (value) { + this.bgColor = getContext().resourceManager.getColorSync($r('app.color.Pink')); + } + }) + .unselectedColor(Color.Red) + .margin(10) + .height(30) + Text('res_Pink').fontSize(10) + }.width('100%') + }.width('100%') + + Button("DatePickerDialog").id('dialogDataInterface0240_btn') + .margin(20) + .onClick(() => { + DatePickerDialog.show({ backgroundColor: this.bgColor, selected: this.selectedDate }); + }) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0310.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0310.ets new file mode 100644 index 0000000000000000000000000000000000000000..51a318743732b5ffb318b3c53510b100b5d50b87 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0310.ets @@ -0,0 +1,185 @@ +/* + * Copyright (C) 2024 Huawei Device 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. + */ + +@Entry +@Component +struct UIComponentfunctionSpecialComponentsDialogDataInterface0310 { + selectedDate: Date = new Date("2024-12-1") + bgBlurStyle: BlurStyle =BlurStyle.NONE + + build() { + Column() { + Row() { + Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) { + Checkbox({ name: 'cb1', group: 'checkboxGroup' }) + .id('dialogDataInterface0310_cb1') + .selectedColor(0x39a2db) + .shape(CheckBoxShape.ROUNDED_SQUARE) + .onChange((value: boolean) => { + console.info('Checkbox change is' + value); + this.bgBlurStyle = BlurStyle.Regular; + }) + .unselectedColor(Color.Red) + .margin(10) + .height(30) + Text('Regular').fontSize(10) + Checkbox({ name: 'cb2', group: 'checkboxGroup' }) + .id('dialogDataInterface0310_cb2') + .selectedColor(0x39a2db) + .shape(CheckBoxShape.ROUNDED_SQUARE) + .onChange((value: boolean) => { + console.info('Checkbox change is' + value); + this.bgBlurStyle = BlurStyle.BACKGROUND_ULTRA_THICK; + }) + .unselectedColor(Color.Red) + .margin(10) + .height(30) + Text('BACKGROUND_ULTRA_THICK').fontSize(10) + Checkbox({ name: 'cb3', group: 'checkboxGroup' }) + .id('dialogDataInterface0310_cb3') + .selectedColor(0x39a2db) + .shape(CheckBoxShape.ROUNDED_SQUARE) + .onChange((value: boolean) => { + console.info('Checkbox change is' + value); + this.bgBlurStyle = BlurStyle.Thin; + }) + .unselectedColor(Color.Red) + .margin(10) + .height(30) + Text('Thin').fontSize(10) + }.width('100%') + }.width('100%') + + Row() { + Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) { + Checkbox({ name: 'cb4', group: 'checkboxGroup' }) + .id('dialogDataInterface0310_cb4') + .selectedColor(0x39a2db) + .shape(CheckBoxShape.ROUNDED_SQUARE) + .onChange((value: boolean) => { + console.info('Checkbox change is' + value); + this.bgBlurStyle = BlurStyle.BACKGROUND_THIN; + }) + .unselectedColor(Color.Red) + .margin(10) + .height(30) + Text('BACKGROUND_THIN').fontSize(10) + + Checkbox({ name: 'cb5', group: 'checkboxGroup' }) + .id('dialogDataInterface0310_cb5') + .selectedColor(0x39a2db) + .shape(CheckBoxShape.ROUNDED_SQUARE) + .onChange((value: boolean) => { + console.info('Checkbox change is' + value); + this.bgBlurStyle = BlurStyle.COMPONENT_ULTRA_THIN; + }) + .unselectedColor(Color.Red) + .margin(10) + .height(30) + Text('COMPONENT_ULTRA_THIN').fontSize(10) + Checkbox({ name: 'cb6', group: 'checkboxGroup' }) + .id('dialogDataInterface0310_cb6') + .selectedColor(0x39a2db) + .shape(CheckBoxShape.ROUNDED_SQUARE) + .onChange((value: boolean) => { + console.info('Checkbox change is' + value); + this.bgBlurStyle = BlurStyle.Thick; + }) + .unselectedColor(Color.Red) + .margin(10) + .height(30) + Text('Thick').fontSize(10) + }.width('100%') + }.width('100%') + + Row() { + Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) { + Checkbox({ name: 'cb7', group: 'checkboxGroup' }) + .id('dialogDataInterface0310_cb7') + .selectedColor(0x39a2db) + .shape(CheckBoxShape.ROUNDED_SQUARE) + .onChange((value: boolean) => { + console.info('Checkbox change is' + value); + this.bgBlurStyle = BlurStyle.BACKGROUND_REGULAR; + }) + .unselectedColor(Color.Red) + .margin(10) + .height(30) + Text('BACKGROUND_REGULAR').fontSize(10) + + Checkbox({ name: 'cb8', group: 'checkboxGroup' }) + .id('dialogDataInterface0310_cb8') + .selectedColor(0x39a2db) + .shape(CheckBoxShape.ROUNDED_SQUARE) + .onChange((value: boolean) => { + console.info('Checkbox change is' + value); + this.bgBlurStyle = BlurStyle.COMPONENT_THIN; + }) + .unselectedColor(Color.Red) + .margin(10) + .height(30) + Text('COMPONENT_THIN').fontSize(10) + Checkbox({ name: 'cb9', group: 'checkboxGroup' }) + .id('dialogDataInterface0310_cb9') + .selectedColor(0x39a2db) + .shape(CheckBoxShape.ROUNDED_SQUARE) + .onChange((value: boolean) => { + console.info('Checkbox change is' + value); + this.bgBlurStyle = BlurStyle.COMPONENT_REGULAR; + }) + .unselectedColor(Color.Red) + .margin(10) + .height(30) + Text('COMPONENT_REGULAR').fontSize(10) + }.width('100%') + }.width('100%') + Row() { + Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) { + Checkbox({ name: 'cb10', group: 'checkboxGroup' }) + .id('dialogDataInterface0310_cb10') + .selectedColor(0x39a2db) + .shape(CheckBoxShape.ROUNDED_SQUARE) + .onChange((value: boolean) => { + console.info('Checkbox change is' + value); + this.bgBlurStyle = BlurStyle.BACKGROUND_THICK; + }) + .unselectedColor(Color.Red) + .margin(10) + .height(30) + Text('BACKGROUND_THICK').fontSize(10) + + Checkbox({ name: 'cb11', group: 'checkboxGroup' }) + .id('dialogDataInterface0310_cb11') + .selectedColor(0x39a2db) + .shape(CheckBoxShape.ROUNDED_SQUARE) + .onChange((value: boolean) => { + console.info('Checkbox change is' + value); + this.bgBlurStyle = BlurStyle.COMPONENT_ULTRA_THICK; + }) + .unselectedColor(Color.Red) + .margin(10) + .height(30) + Text('COMPONENT_ULTRA_THICK').fontSize(10) + }.width('100%') + }.width('100%') + + Button("DatePickerDialog").id('dialogDataInterface0310_btn') + .margin(20) + .onClick(() => { + DatePickerDialog.show({ backgroundBlurStyle: this.bgBlurStyle, selected: this.selectedDate }); + }) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIExtensionComponentPopupChange/UIComponentSpecialComponentsUIExtensionComponentPopupChange001.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIExtensionComponentPopupChange/UIComponentSpecialComponentsUIExtensionComponentPopupChange001.ets new file mode 100644 index 0000000000000000000000000000000000000000..436c2f50a42fbf2324352cd22ee616a0859ad738 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIExtensionComponentPopupChange/UIComponentSpecialComponentsUIExtensionComponentPopupChange001.ets @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2024 Huawei Device 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. + */ + +@Entry +@Component +struct UIComponentSpecialComponentsUIExtensionComponentPopupChange001 { + @State message: string = 'Hello'; + @State handlePopup: boolean = false; + @State text: string = 'This is a text tip, please input text!'; + @State index: number = 0; + controller: TextInputController = new TextInputController(); + + build() { + Row() { + Column() { + TextInput({ text: $$this.text, controller: this.controller }) + .placeholderFont({ size: 16, weight: 400 }) + .showUnderline(true) + .showCounter(true, { thresholdPercentage: 50, highlightBorder: true }) + .id('UIComponentSpecialComponentsUIExtensionComponentPopupChange0010') + .onClick(() => { + if (!this.handlePopup) { + this.handlePopup = true; + } + }) + .bindPopup(this.handlePopup, { + message: this.text, + placementOnTop: true, + showInSubWindow: false, + autoCancel: false + }) + .width(300) + .height(60) + } + } + .width('100%') + .height('100%') + .alignItems(VerticalAlign.Top) + .justifyContent(FlexAlign.Start) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIExtensionComponentPopupChange/UIComponentSpecialComponentsUIExtensionComponentPopupChange002.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIExtensionComponentPopupChange/UIComponentSpecialComponentsUIExtensionComponentPopupChange002.ets new file mode 100644 index 0000000000000000000000000000000000000000..08183ae37121869491c2863008090f6478aaa0d1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIExtensionComponentPopupChange/UIComponentSpecialComponentsUIExtensionComponentPopupChange002.ets @@ -0,0 +1,84 @@ +/* + * Copyright (C) 2024 Huawei Device 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 window from "@ohos.window"; + +@Entry +@Component +struct UIComponentSpecialComponentsUIExtensionComponentPopupChange002 { + @State message: string = 'Hello'; + @State handlePopup: boolean = false; + @State text: string = 'This is a text tip'; + @State index: number = 0; + controller: TextInputController = new TextInputController(); + + private changeOrientation() { + try { + window.getLastWindow(getContext(this), (err, data) => { + if (err.code) { + return; + } + let windowClass = data; + let orientation = window.Orientation.LANDSCAPE; + try { + windowClass.setPreferredOrientation(orientation, (err) => { + if (err.code) { + return; + } + }); + } catch (exception) { + } + ; + }); + } catch (exception) { + } + } + + build() { + Row() { + Column() { + TextInput({ text: $$this.text, controller: this.controller }) + .placeholderFont({ size: 16, weight: 400 }) + .showUnderline(true) + .showCounter(true, { thresholdPercentage: 50, highlightBorder: true }) + .id('UIComponentSpecialComponentsUIExtensionComponentPopupChange0020') + .onClick(() => { + if (!this.handlePopup) { + this.handlePopup = true; + } + }) + .onChange(() => { + this.index++; + if (this.index === 3) { + this.changeOrientation(); + } + }) + .bindPopup(this.handlePopup, { + message: this.text, + placementOnTop: true, + showInSubWindow: false, + autoCancel: false + }) + .width(300) + .height(60) + } + } + .width('100%') + .height('100%') + .alignItems(VerticalAlign.Top) + .justifyContent(FlexAlign.Start) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIExtensionComponentPopupChange/UIComponentSpecialComponentsUIExtensionComponentPopupChange003.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIExtensionComponentPopupChange/UIComponentSpecialComponentsUIExtensionComponentPopupChange003.ets new file mode 100644 index 0000000000000000000000000000000000000000..18bc52a3c24537449d61469cd8a93d83cabc7852 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIExtensionComponentPopupChange/UIComponentSpecialComponentsUIExtensionComponentPopupChange003.ets @@ -0,0 +1,64 @@ +/* + * Copyright (C) 2024 Huawei Device 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. + */ + +@Entry +@Component +struct UIComponentSpecialComponentsUIExtensionComponentPopupChange003 { + @State message: string = 'Hello'; + @State customPopup: boolean = false; + @State text: string = + 'This is a UIComponentSpecialComponentsUIExtensionComponentPopupChange003 tip, please input text!'; + @State index: number = 0; + controller: TextInputController = new TextInputController(); + + @Builder + popupBuilder() { + Row({ space: 2 }) { + Text('This is a custom popup').fontSize(10) + } + } + + build() { + Row() { + Column() { + TextInput({ text: $$this.text, controller: this.controller }) + .placeholderFont({ size: 16, weight: 400 }) + .showUnderline(true) + .showCounter(true, { thresholdPercentage: 50, highlightBorder: true }) + .id('UIComponentSpecialComponentsUIExtensionComponentPopupChange0030') + .onClick(() => { + if (!this.customPopup) { + this.customPopup = true; + } + }) + .bindPopup(this.customPopup, { + message: this.text, + builder: this.popupBuilder, + placement: Placement.RightTop, + enableArrow: true, + showInSubWindow: false, + autoCancel: false, + }) + .width('100%') + .height(60) + } + } + .width('100%') + .height('100%') + .alignItems(VerticalAlign.Top) + .justifyContent(FlexAlign.End) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIExtensionComponentPopupChange/UIComponentSpecialComponentsUIExtensionComponentPopupChange004.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIExtensionComponentPopupChange/UIComponentSpecialComponentsUIExtensionComponentPopupChange004.ets new file mode 100644 index 0000000000000000000000000000000000000000..e127534aaed89f961845df70c904bd01dfa1ecc1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIExtensionComponentPopupChange/UIComponentSpecialComponentsUIExtensionComponentPopupChange004.ets @@ -0,0 +1,64 @@ +/* + * Copyright (C) 2024 Huawei Device 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. + */ + +@Entry +@Component +struct UIComponentSpecialComponentsUIExtensionComponentPopupChange004 { + @State message: string = 'Hello'; + @State customPopup: boolean = false; + @State text: string = + 'This is a UIComponentSpecialComponentsUIExtensionComponentPopupChange004 tip, please input text!'; + @State index: number = 0; + controller: TextInputController = new TextInputController(); + + @Builder + popupBuilder() { + Row({ space: 2 }) { + Text('This is a custom popup').fontSize(10) + } + } + + build() { + Row() { + Column() { + TextInput({ text: $$this.text, controller: this.controller }) + .placeholderFont({ size: 16, weight: 400 }) + .showUnderline(true) + .showCounter(true, { thresholdPercentage: 50, highlightBorder: true }) + .id('UIComponentSpecialComponentsUIExtensionComponentPopupChange0040') + .onClick(() => { + if (!this.customPopup) { + this.customPopup = true; + } + }) + .bindPopup(this.customPopup, { + message: this.text, + builder: this.popupBuilder, + placement: Placement.RightTop, + enableArrow: true, + showInSubWindow: false, + autoCancel: false, + }) + .width('100%') + .height(60) + } + } + .width('100%') + .height('100%') + .alignItems(VerticalAlign.Top) + .justifyContent(FlexAlign.End) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIExtensionComponentPopupChange/UIComponentSpecialComponentsUIExtensionComponentPopupChange005.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIExtensionComponentPopupChange/UIComponentSpecialComponentsUIExtensionComponentPopupChange005.ets new file mode 100644 index 0000000000000000000000000000000000000000..44bd8552f0c9f0b9130f46efdcaca33dabe96d5e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIExtensionComponentPopupChange/UIComponentSpecialComponentsUIExtensionComponentPopupChange005.ets @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2024 Huawei Device 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. + */ + +@Entry +@Component +struct UIComponentSpecialComponentsUIExtensionComponentPopupChange005 { + @State message: string = 'Hello'; + @State handlePopup: boolean = false; + @State text: string = 'This is a text tip'; + controller: TextInputController = new TextInputController(); + + build() { + Row() { + Column() { + TextInput({ text: $$this.text, controller: this.controller }) + .placeholderFont({ size: 16, weight: 400 }) + .showUnderline(true) + .showCounter(true, { thresholdPercentage: 50, highlightBorder: true }) + .id('UIComponentSpecialComponentsUIExtensionComponentPopupChange0051') + .onClick(() => { + if (!this.handlePopup) { + this.handlePopup = true; + } + }) + .bindPopup(this.handlePopup, { + message: this.text, + placementOnTop: true, + showInSubWindow: false, + autoCancel: false + }) + .width(300) + .height(60) + } + } + .width('100%') + .height('100%') + .alignItems(VerticalAlign.Top) + .justifyContent(FlexAlign.Start) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIExtensionComponentPopupChange/UIComponentSpecialComponentsUIExtensionComponentPopupChange006.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIExtensionComponentPopupChange/UIComponentSpecialComponentsUIExtensionComponentPopupChange006.ets new file mode 100644 index 0000000000000000000000000000000000000000..17f1c8b6c438fcebe928b4b8169bfbd15a354c64 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIExtensionComponentPopupChange/UIComponentSpecialComponentsUIExtensionComponentPopupChange006.ets @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2024 Huawei Device 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. + */ + +@Entry +@Component +struct UIComponentSpecialComponentsUIExtensionComponentPopupChange006 { + @State message: string = 'Hello'; + @State handlePopup: boolean = false; + @State text: string = 'This is a text tip'; + @State index: number = 0; + controller: TextInputController = new TextInputController(); + + build() { + Row() { + Column() { + TextInput({ text: this.text, controller: this.controller }) + .placeholderFont({ size: 16, weight: 400 }) + .showUnderline(true) + .showCounter(true, { thresholdPercentage: 50, highlightBorder: true }) + .id('UIComponentSpecialComponentsUIExtensionComponentPopupChange0060') + .onClick(() => { + if (!this.handlePopup) { + this.handlePopup = true; + } + }) + .bindPopup(this.handlePopup, { + message: this.text, + placementOnTop: true, + showInSubWindow: false, + autoCancel: false + }) + .width(300) + .height(60) + } + } + .width('100%') + .height('100%') + .alignItems(VerticalAlign.Top) + .justifyContent(FlexAlign.Start) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UITestCase/UITestCase005.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UITestCase/UITestCase005.ets new file mode 100644 index 0000000000000000000000000000000000000000..f63339e0e70d8a62d03fc5221fb45c064205dec3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UITestCase/UITestCase005.ets @@ -0,0 +1,62 @@ +/* + * Copyright (C) 2024 Huawei Device 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. + */ + +@Entry +@Component +struct UITestCase005 { + @State textTip: string = ''; + @State checkStatus: boolean = true; + + @Builder + indicatorBuilder() { + Button('button') + .fontSize(20) + .fontColor(Color.Blue) + .key('UITestCase0050') + .onClick(() => { + this.textTip += 'button1 click,'; + }) + .onBlur(() => { + this.textTip += 'button1 onBlur,' + }) + } + + build() { + Row() { + Column({ space: 20 }) { + Text(this.textTip) + Radio( + { + value: 'Radio', + group: 'radioGroup', + indicatorType: RadioIndicatorType.CUSTOM, + indicatorBuilder: () => this.indicatorBuilder() + }) + .height('50vp') + .width('50vp') + .key('UITestCase0051') + .checked(this.checkStatus) + .onClick(() => { + this.textTip += 'Radio click,'; + this.checkStatus = false; + }) + } + } + .width('100%') + .height('100%') + .alignItems(VerticalAlign.Center) + .justifyContent(FlexAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UITestCase/UITestCase006.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UITestCase/UITestCase006.ets new file mode 100644 index 0000000000000000000000000000000000000000..5b0810ea32ee42298688fcbe31db3d7b4dc82d33 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UITestCase/UITestCase006.ets @@ -0,0 +1,65 @@ +/* + * Copyright (C) 2024 Huawei Device 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. + */ + +@Entry +@Component +struct UITestCase006 { + @State textTip: string = ''; + @State checkStatus: boolean = true; + + @Builder + indicatorBuilder() { + Button('button') + .fontSize(20) + .fontColor(Color.Blue) + .key('UITestCase0061') + .onMouse((event: MouseEvent) => { + event.stopPropagation(); + }) + .onClick(() => { + this.textTip += 'button click,'; + }) + .onBlur(() => { + this.textTip += 'button onBlur,'; + }) + } + + build() { + Row() { + Column({ space: 20 }) { + Text(this.textTip) + Radio( + { + value: 'Radio', + group: 'radioGroup', + indicatorType: RadioIndicatorType.CUSTOM, + indicatorBuilder: () => this.indicatorBuilder() + }) + .height('50vp') + .width('50vp') + .key('UITestCase0060') + .checked(this.checkStatus) + .onClick(() => { + this.textTip += 'Radio click,'; + this.checkStatus = false; + }) + } + } + .width('100%') + .height('100%') + .alignItems(VerticalAlign.Center) + .justifyContent(FlexAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UITestCase/UITestCase007.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UITestCase/UITestCase007.ets new file mode 100644 index 0000000000000000000000000000000000000000..cd147da5733075f0c6e1bb7bb98bfde4406ade6d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UITestCase/UITestCase007.ets @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2024 Huawei Device 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. + */ + +@Entry +@Component +struct UITestCase007 { + @State textTip: string = ''; + @State checkStatus: boolean = true; + + @Builder + indicatorBuilder() { + Button('button') + .fontSize(20) + .fontColor(Color.Blue) + .key('UITestCase0071') + .onBlur(() => { + this.textTip += 'button onBlur,'; + }) + .onFocus(() => { + this.textTip += 'button onFocus,'; + }) + } + + build() { + Row() { + Column({ space: 20 }) { + Text(this.textTip) + Radio( + { + value: 'Radio', + group: 'radioGroup', + indicatorType: RadioIndicatorType.CUSTOM, + indicatorBuilder: () => this.indicatorBuilder() + }) + .key('UITestCase0070') + .checked(this.checkStatus) + .height('50vp') + .width('50vp') + .onClick(() => { + this.checkStatus = false; + }) + } + } + .width('100%') + .height('100%') + .alignItems(VerticalAlign.Center) + .justifyContent(FlexAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentButtonSelectAlign/UiComponentButtonSelectAlign0290.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentButtonSelectAlign/UiComponentButtonSelectAlign0290.ets index 9eaf45acc32dc5c594c663d473e663211f3067a5..38a315bd2b01036404b4ff75fa2fb7a72590c257 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentButtonSelectAlign/UiComponentButtonSelectAlign0290.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentButtonSelectAlign/UiComponentButtonSelectAlign0290.ets @@ -27,12 +27,16 @@ struct UiComponentButtonSelectAlign0290 { }, { value: '你好我的朋友上午好早上好中午好晚上好晚安上午好早上好中午好晚上好晚安', }]) - .optionHeight('50lpx') .value(this.text) + .optionHeight('500px') .id("UiComponentButtonSelectAlign0290_001") } .width('100%') .height('100%') } + .width('100%') + .height('100%') + .alignItems(VerticalAlign.Center) + .justifyContent(FlexAlign.Center) } } \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentButtonSelectEnhancement/UiComponentButtonSelectEnhancement0080.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentButtonSelectEnhancement/UiComponentButtonSelectEnhancement0080.ets index 11b618ad0ebb7c52f1fb1cdb44155a5229838f50..ed8620c9e1cfa53baf8d223c5191bfc92820d17d 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentButtonSelectEnhancement/UiComponentButtonSelectEnhancement0080.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentButtonSelectEnhancement/UiComponentButtonSelectEnhancement0080.ets @@ -23,9 +23,9 @@ struct UiComponentButtonSelectEnhancement0080 { Column() { Select([{ value: ''}]) .value(this.text) - .width('500vp') - .space('300vp') - .font({ size: '100vp' }) + .width('1000vp') + .space('800vp') + .font({ size: '200vp' }) .onSelect(() => { }) diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0020.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0020.ets index d0ec57402823ebd54320a2beeca5aa43eaac527b..e4182bc2419fa970756c706d8f150d713f3be1cd 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0020.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0020.ets @@ -17,7 +17,8 @@ @Entry @Component struct UiComponentPopupboxDatePickerDialogInterface0020 { - selectedDate: Date = new Date("1970-1-1") + selectedDate: Date = new Date("2024-12-1") + build() { Column() { Button("DatePickerDialog") @@ -25,7 +26,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0020 { .onClick(() => { this.getUIContext().showDatePickerDialog({ start: new Date("-1970-1-1"), - selected: this.selectedDate, + selected: this.selectedDate }) }) .id("UiComponentPopupboxDatePickerDialogInterface0020_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0080.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0080.ets index 8827c3d998a2e125b7e3a33e39b7884c758fad85..a7a66fbfcee20231f1e88e6a676788062982d4ce 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0080.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0080.ets @@ -17,7 +17,8 @@ @Entry @Component struct UiComponentPopupboxDatePickerDialogInterface0080 { - selectedDate: Date = new Date("2100-12-31") + selectedDate: Date = new Date("2024-12-1") + build() { Column() { Button("DatePickerDialog") @@ -25,7 +26,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0080 { .onClick(() => { this.getUIContext().showDatePickerDialog({ end: new Date("-2100-1-1"), - selected: this.selectedDate, + selected: this.selectedDate }) }) .id("UiComponentPopupboxDatePickerDialogInterface0080_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0120.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0120.ets index 1d16512dd0b41c49af3abd79eac70034ac850dd3..78f218a0339cf2fd9ab39e266a5ebb062262db17 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0120.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0120.ets @@ -17,6 +17,8 @@ @Entry @Component struct UiComponentPopupboxDatePickerDialogInterface0120 { + selectedDate: Date = new Date("2024-12-1") + build() { Column() { Button("DatePickerDialog") @@ -25,6 +27,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0120 { this.getUIContext().showDatePickerDialog({ start: new Date("2100-12-31"), end: new Date("1970-1-1"), + selected: this.selectedDate }) }) .id("UiComponentPopupboxDatePickerDialogInterface0120_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0140.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0140.ets index d534067f89be7aaefcbca3a67d6c7dfecf8c5f7d..7e15e717631ab7881137d66e56df02e8cb0d22ad 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0140.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0140.ets @@ -23,7 +23,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0140 { .margin(20) .onClick(() => { this.getUIContext().showDatePickerDialog({ - selected: new Date("9999-99-99"), + selected: new Date("1970-1-1"), }) }) .id("UiComponentPopupboxDatePickerDialogInterface0140_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0150.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0150.ets index e747b9fdafe2d2140950709d5e464d502ddc4112..72ebeaeaccd309dec87599564cbc0357b05f868d 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0150.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0150.ets @@ -23,7 +23,8 @@ struct UiComponentPopupboxDatePickerDialogInterface0150 { .margin(20) .onClick(() => { this.getUIContext().showDatePickerDialog({ - lunar: true + lunar: true, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0150_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0160.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0160.ets index dab459774e2709e8211983bca9452d23dc99afef..dd7aeb0f2ee5e6ca0286e3177c45bb89494287dd 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0160.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0160.ets @@ -23,7 +23,8 @@ struct UiComponentPopupboxDatePickerDialogInterface0160 { .margin(20) .onClick(() => { this.getUIContext().showDatePickerDialog({ - lunar: false + lunar: false, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0160_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0180.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0180.ets index 811c6a2cf8db379d76cf7bf8f0f8aa3eab588994..9a06afb1c0e38c7f429674ff55938e1df2d15427 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0180.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0180.ets @@ -23,7 +23,8 @@ struct UiComponentPopupboxDatePickerDialogInterface0180 { .margin(20) .onClick(() => { this.getUIContext().showDatePickerDialog({ - showTime: false + showTime: false, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0180_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0190.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0190.ets index c78c1bb561b82b368cf50a720251827974ea5b59..da4c617a8c94d1d6e7e75475194de7c527b87176 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0190.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0190.ets @@ -17,7 +17,7 @@ @Entry @Component struct UiComponentPopupboxDatePickerDialogInterface0190 { - selectTime: Date = new Date('2020-12-25T15:30:00') + selectTime: Date = new Date('2020-12-25') build() { Column() { Button("DatePickerDialog") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0210.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0210.ets index 6794a35c5c851c56833d9fc8f16d330bf099e958..f73fd02681109e3746dddf1462d513ed5f3be32f 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0210.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0210.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0210 { .onClick(() => { this.getUIContext().showDatePickerDialog({ disappearTextStyle: {color: Color.Blue}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0210_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0220.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0220.ets index d56d43ec568cf2e4352170ed2f7cc25fac601000..9d4fc83f9a7539423d8e8c90f41e9608f79260e5 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0220.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0220.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0220 { .onClick(() => { this.getUIContext().showDatePickerDialog({ disappearTextStyle: {color: 0x0000ff}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0220_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0230.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0230.ets index 4ca92ed5ec800011a0a3afe4e5cc89e9dbb144ac..d3612f9a44e2de5052513ed9bceb03dcbbe4022d 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0230.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0230.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0230 { .onClick(() => { this.getUIContext().showDatePickerDialog({ disappearTextStyle: {color: "rgb(255,0,0)"}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0230_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0240.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0240.ets index f0ad1c30530475919c6b2b81c7a5686ee9fdab55..1622e3a5f33e5a6cafaef4e6f2c5bd43864c0283 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0240.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0240.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0240 { .onClick(() => { this.getUIContext().showDatePickerDialog({ disappearTextStyle: {color: getContext().resourceManager.getColorSync($r("app.color.blue"))}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0240_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0250.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0250.ets index b98cecb609f0bc841139f5ee73e56a32ebd6bf80..757dc1a96be61c2dec1908ecf0b7daa1da5d6f7c 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0250.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0250.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0250 { .onClick(() => { this.getUIContext().showDatePickerDialog({ disappearTextStyle: {font: {size: "10px"}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0250_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0260.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0260.ets index 6b2f003183c5d99f8bba5f9673773db89cf60de2..2f093a3b56e981510f5f55974cf66ff08f53906c 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0260.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0260.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0260 { .onClick(() => { this.getUIContext().showDatePickerDialog({ disappearTextStyle: {font: {size: 10}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0260_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0270.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0270.ets index 05baa13c8ff81732a199d04f5ba0320f333966e5..ade8908271e701e1071bb2b84eff02e583438d1d 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0270.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0270.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0270 { .onClick(() => { this.getUIContext().showDatePickerDialog({ disappearTextStyle: {font: {size: getContext().resourceManager.getNumber($r("app.integer.integer100"))}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0270_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0280.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0280.ets index 5d3537321f123f5bdb1f208e861d54dfcec2c6b2..4bf7b62150f791916ad05b1c46b85d8b57f6c048 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0280.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0280.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0280 { .onClick(() => { this.getUIContext().showDatePickerDialog({ disappearTextStyle: {font: {weight: FontWeight.Lighter}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0280_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0290.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0290.ets index 8cae7306b836fa257b8e5c84750feb3c055f2ea5..8f8915a4b7addb48aacdb8c80ad35eaa199c3284 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0290.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0290.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0290 { .onClick(() => { this.getUIContext().showDatePickerDialog({ disappearTextStyle: {font: {weight: FontWeight.Normal}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0290_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0300.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0300.ets index ad00cb007835ffc6f3316214e3b318fd88cbda92..d49d021ffbc97cbbb9a1d150fdaba39621a9bfd1 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0300.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0300.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0300 { .onClick(() => { this.getUIContext().showDatePickerDialog({ disappearTextStyle: {font: {weight: FontWeight.Regular}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0300_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0310.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0310.ets index 42e41a99015a5d5a4be61b787e1a99ef8e35577c..44640cec85d5b9c49c8ab0e13bced0c8a969ed06 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0310.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0310.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0310 { .onClick(() => { this.getUIContext().showDatePickerDialog({ disappearTextStyle: {font: {weight: FontWeight.Medium}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0310_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0320.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0320.ets index 4289d143be8ee1df15c23c5281e9f2b0d6d9e5df..4010678714d663e38e110dbe99867751398f8be7 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0320.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0320.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0320 { .onClick(() => { this.getUIContext().showDatePickerDialog({ disappearTextStyle: {font: {weight: FontWeight.Bold}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0320_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0330.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0330.ets index b65c1eb43fcdb5eaf1e0067b9aef92a59acea12f..d976c956bef755546d2fd18fc0af7f57fa968c0c 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0330.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0330.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0330 { .onClick(() => { this.getUIContext().showDatePickerDialog({ disappearTextStyle: {font: {weight: FontWeight.Bolder}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0330_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0340.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0340.ets index 28426308efa772368e183f45be615dbb16819dee..cb09114d5a331f8f2281f04a71cbd45891893ed5 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0340.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0340.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0340 { .onClick(() => { this.getUIContext().showDatePickerDialog({ disappearTextStyle: {font: {weight: 400}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0340_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0350.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0350.ets index 174bc9a28bb7b788cf2edf85fcb0670ea686ceb6..c77c335b8c0e8f9878a297ecc8a34fd5ff8b58d5 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0350.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0350.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0350 { .onClick(() => { this.getUIContext().showDatePickerDialog({ disappearTextStyle: {font: {weight: 500}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0350_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0360.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0360.ets index 93d7cdbae014cb1d728024704e747511d34e197c..c0eccf77cbeba6cfc6732318d23eda7840fb4054 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0360.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0360.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0360 { .onClick(() => { this.getUIContext().showDatePickerDialog({ disappearTextStyle: {font: {weight: "500"}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0360_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0370.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0370.ets index 478d4236501041f8b4174e0029be0ddd9af75fd3..3aa473cb55a1a3baaff38e94cf59db58595a767d 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0370.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0370.ets @@ -23,7 +23,8 @@ struct UiComponentPopupboxDatePickerDialogInterface0370 { .margin(20) .onClick(() => { this.getUIContext().showDatePickerDialog({ - disappearTextStyle: {font: {family: "HarmonyOS Sans"}}, + disappearTextStyle: {font: {family: "Arial,HarmonyOS Sans"}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0370_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0380.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0380.ets index 5ef2f68e1f302061cb6c071dbe9e938baf6217ed..479da08edadf156610acbae1a3dc95f70762a8ee 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0380.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0380.ets @@ -23,7 +23,8 @@ struct UiComponentPopupboxDatePickerDialogInterface0380 { .margin(20) .onClick(() => { this.getUIContext().showDatePickerDialog({ - disappearTextStyle: {font: {family: getContext().resourceManager.getStringSync($r("app.string.popup_font_family"))}}, + disappearTextStyle: {font: {family: getContext().resourceManager.getStringSync($r("app.string.popup_font_time_picker"))}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0380_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0390.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0390.ets index d19f938b300879b5948abed6de195893b5148552..2164ff006b16994640e4ffe35148a4631a70b0bf 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0390.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0390.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0390 { .onClick(() => { this.getUIContext().showDatePickerDialog({ disappearTextStyle: {font: {style: FontStyle.Normal}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0390_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0400.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0400.ets index c0596be65bcc987e3495e109ea4dd49f58da9b6b..c89ee91e1f70352b5bcc00fb83bca298d60fca25 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0400.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0400.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0400 { .onClick(() => { this.getUIContext().showDatePickerDialog({ disappearTextStyle: {font: {style: FontStyle.Italic}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0400_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0410.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0410.ets index e69f55bb1cbf36b1644b9f9fbe5864005db2b2f0..942fd3010c542e2ddd1958a548861f32a9a7ebe1 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0410.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0410.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0410 { .onClick(() => { this.getUIContext().showDatePickerDialog({ textStyle: {color: Color.Blue}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0410_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0420.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0420.ets index 9fa5dcdfb3f7f72e4c3560eb5a18f467b61147ac..ed54d62b149ea4cd9c727951cd28d6610bcc7b7c 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0420.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0420.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0420 { .onClick(() => { this.getUIContext().showDatePickerDialog({ textStyle: {color: 0x0000ff}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0420_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0430.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0430.ets index 9fe9bb45b890da46b2c4755d6d9085ed15d05d98..706c155da88711a5e94d2198ca6947eaa58d21ad 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0430.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0430.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0430 { .onClick(() => { this.getUIContext().showDatePickerDialog({ textStyle: {color: "rgb(255,0,0)"}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0430_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0440.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0440.ets index c8de1226d40fa858287d7a4bb36fc403697b91bc..069fe254a78286d2610d0e364b6cad2bf570987c 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0440.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0440.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0440 { .onClick(() => { this.getUIContext().showDatePickerDialog({ textStyle: {color: getContext().resourceManager.getColorSync($r("app.color.blue"))}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0440_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0450.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0450.ets index a78639f3f5f6eb41b0f30141e929c5f460f19c91..96f0e448d9a30a760e41c07094b6b748b22e324e 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0450.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0450.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0450 { .onClick(() => { this.getUIContext().showDatePickerDialog({ textStyle: {font: {size: "10px"}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0450_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0460.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0460.ets index 49183cc4e9cedf65b5b6380a4662d64c2571edb8..bc4ed2b3f38d88ac7aa4eaea907854b09aecc68c 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0460.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0460.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0460 { .onClick(() => { this.getUIContext().showDatePickerDialog({ textStyle: {font: {size: 10}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0460_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0470.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0470.ets index 1ccec1e256927a8945055b0897583bca54dca27d..7545e33e6f79ebee4a461de526c57f7ccae8bfb0 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0470.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0470.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0470 { .onClick(() => { this.getUIContext().showDatePickerDialog({ textStyle: {font: {size: getContext().resourceManager.getNumber($r("app.integer.integer100"))}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0470_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0480.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0480.ets index 6fd37afb06ce0d586d6e01d4b3ac90b575eafe44..061ceee0186644bdb46cd83b15bacd24acf7e634 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0480.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0480.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0480 { .onClick(() => { this.getUIContext().showDatePickerDialog({ textStyle: {font: {weight: FontWeight.Lighter}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0480_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0490.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0490.ets index 81e1992e222f19788c596910829f34748d5bf925..278c35c82151f2f7156e486c04caf7ef7b6aa706 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0490.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0490.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0490 { .onClick(() => { this.getUIContext().showDatePickerDialog({ textStyle: {font: {weight: FontWeight.Normal}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0490_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0500.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0500.ets index a874c1d3d013d5ae7c5776c7a77067e870bcb8ba..6e79c3c0bbe67f4c5d491462da2da74b6b32a567 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0500.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0500.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0500 { .onClick(() => { this.getUIContext().showDatePickerDialog({ textStyle: {font: {weight: FontWeight.Regular}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0500_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0510.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0510.ets index 7ae1e2e022e09a23fc810ee57204cc22de956b16..8f03639a5d1075926c5ac5547f919df331f14bfc 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0510.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0510.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0510 { .onClick(() => { this.getUIContext().showDatePickerDialog({ textStyle: {font: {weight: FontWeight.Medium}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0510_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0520.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0520.ets index 23480fcf04d5f56e328eb740239716260b132031..8234864be81255f0ffc18c6ad327207efe889a5e 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0520.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0520.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0520 { .onClick(() => { this.getUIContext().showDatePickerDialog({ textStyle: {font: {weight: FontWeight.Bold}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0520_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0530.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0530.ets index 281306464cb28613c037cf480d4637e84bfab7ed..cba30cbcc7544f2f02b5ab9930026ecba835e350 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0530.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0530.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0530 { .onClick(() => { this.getUIContext().showDatePickerDialog({ textStyle: {font: {weight: FontWeight.Bolder}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0530_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0540.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0540.ets index 4b9a42fc5c9dd8aa233413ee9bf6dd1612ab3b2d..98cb90e0d813a62ef50ffbdcc1300fd720833979 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0540.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0540.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0540 { .onClick(() => { this.getUIContext().showDatePickerDialog({ textStyle: {font: {weight: 400}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0540_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0550.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0550.ets index 2e5d2b4e100457a3e8c7ca52477b54c25e0c8c59..7c2c4669ff41aa5bfdd90c15038eaeefcabb9f47 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0550.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0550.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0550 { .onClick(() => { this.getUIContext().showDatePickerDialog({ textStyle: {font: {weight: 500}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0550_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0560.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0560.ets index 865eaa2b040ecded30aca8c350e48ee55aac3fcb..7c4faba76e454d51ad9771a21071251c7ee04038 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0560.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0560.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0560 { .onClick(() => { this.getUIContext().showDatePickerDialog({ textStyle: {font: {weight: "500"}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0560_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0570.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0570.ets index 9e4fd1083a1d8495022fb63fd5dbc38bde776c3a..14aef9520012eb7627d69c19a435b4e90b303126 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0570.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0570.ets @@ -23,7 +23,8 @@ struct UiComponentPopupboxDatePickerDialogInterface0570 { .margin(20) .onClick(() => { this.getUIContext().showDatePickerDialog({ - textStyle: {font: {family: "HarmonyOS Sans"}}, + textStyle: {font: {family: "Arial,HarmonyOS Sans"}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0570_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0580.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0580.ets index 335bf45470e374ac64bc90a663a8fbb728ae31b6..4996019e9510436062eccff26db8dbc32f9a23cf 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0580.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0580.ets @@ -23,7 +23,8 @@ struct UiComponentPopupboxDatePickerDialogInterface0580 { .margin(20) .onClick(() => { this.getUIContext().showDatePickerDialog({ - textStyle: {font: {family: getContext().resourceManager.getStringSync($r("app.string.popup_font_family"))}}, + textStyle: {font: {family: getContext().resourceManager.getStringSync($r("app.string.popup_font_time_picker"))}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0580_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0590.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0590.ets index fd7d47756ecd0a4be4a98d1cc81c1e8279acb562..d9f7cee93a265f420ceae87224c6151321b9ae85 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0590.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0590.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0590 { .onClick(() => { this.getUIContext().showDatePickerDialog({ textStyle: {font: {style: FontStyle.Normal}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0590_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0600.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0600.ets index b21a4a6b55f2a4adb5df74b5a250b1c2844ff0f6..1edb6eabc397a624a594c222b949f55d80ef1654 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0600.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0600.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0600 { .onClick(() => { this.getUIContext().showDatePickerDialog({ textStyle: {font: {style: FontStyle.Italic}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0600_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0610.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0610.ets index 7800edc54c1cf53e28440e914ef79e1457acaac7..3e5b9ed3875533ab176a293b44fdf880e61c954c 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0610.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0610.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0610 { .onClick(() => { this.getUIContext().showDatePickerDialog({ selectedTextStyle: {font: {size: "10px"}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0610_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0620.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0620.ets index 352e4e01809b97d4c8bfd9969b80478c7c55328e..24384dbebb9947aaeb976f835af118887a42b553 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0620.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0620.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0620 { .onClick(() => { this.getUIContext().showDatePickerDialog({ selectedTextStyle: {font: {size: 10}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0620_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0630.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0630.ets index b99959439804f03aed92b02da944f00a630a5801..6ad5ad46ec57a5b579d86dead05e17a3769b52b9 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0630.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0630.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0630 { .onClick(() => { this.getUIContext().showDatePickerDialog({ selectedTextStyle: {font: {size: getContext().resourceManager.getNumber($r("app.integer.integer100"))}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0630_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0640.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0640.ets index 470d6afd7f1edd65041f98f6322c00009613aba6..866d5d82f80b25ccef101bd7c8ed1cacc1426544 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0640.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0640.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0640 { .onClick(() => { this.getUIContext().showDatePickerDialog({ selectedTextStyle: {font: {weight: FontWeight.Lighter}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0640_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0650.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0650.ets index 2ef158105f8de6843a388167f05ba54f2560827e..795dc8642239f45529790e5dd596057991bcb6ec 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0650.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0650.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0650 { .onClick(() => { this.getUIContext().showDatePickerDialog({ selectedTextStyle: {font: {weight: FontWeight.Normal}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0650_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0660.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0660.ets index e691bd3051b3c5cc63c222b564a933e9031f5308..948d859bc28431a9681ec87a08b27cc8d3fd79d6 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0660.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0660.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0660 { .onClick(() => { this.getUIContext().showDatePickerDialog({ selectedTextStyle: {font: {weight: FontWeight.Regular}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0660_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0670.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0670.ets index 294398da5eb4a01c50119a09c2711c4f22b10bf1..590e6c804325d66ea4c301c29fdaddbac1a77042 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0670.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0670.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0670 { .onClick(() => { this.getUIContext().showDatePickerDialog({ selectedTextStyle: {font: {weight: FontWeight.Medium}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0670_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0680.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0680.ets index db8ac6ee7900b73caf9b4f9c8ec3e2bd7086541d..6c382b27cd25327c0faf9583cc1b7a8151fe4816 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0680.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0680.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0680 { .onClick(() => { this.getUIContext().showDatePickerDialog({ selectedTextStyle: {font: {weight: FontWeight.Bold}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0680_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0690.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0690.ets index b09ede2ea0cfac9cf772d144c184a6da58b09177..68c1c7ec857084f9dd3a7376f00fc78780b2444c 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0690.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0690.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0690 { .onClick(() => { this.getUIContext().showDatePickerDialog({ selectedTextStyle: {font: {weight: FontWeight.Bolder}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0690_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0700.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0700.ets index 486b4d762fa17310d9845d34e3ab3de6381745c5..375cd78b205687726baad91632ba00a78229ff61 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0700.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0700.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0700 { .onClick(() => { this.getUIContext().showDatePickerDialog({ selectedTextStyle: {font: {weight: 400}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0700_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0710.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0710.ets index 8290fcfb32f7be8c0648a3385f54dee4c68c1e44..270ff3aea98da6fe7fe6161ca1d749083df89263 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0710.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0710.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0710 { .onClick(() => { this.getUIContext().showDatePickerDialog({ selectedTextStyle: {font: {weight: 500}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0710_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0720.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0720.ets index efddc5a9be82a08d96ee31d87ee6c30d5674aaec..2da5bd1e842c87cdddc24fee504ffd9b8b6eb41b 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0720.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0720.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0720 { .onClick(() => { this.getUIContext().showDatePickerDialog({ selectedTextStyle: {font: {weight: "500"}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0720_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0730.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0730.ets index 292334493f237933f1248b10203bcf49bf21aa8a..e1d65f501c2b110772e69446bc152cc18df3f035 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0730.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0730.ets @@ -24,7 +24,8 @@ struct UiComponentPopupboxDatePickerDialogInterface0730 { .margin(20) .onClick(() => { this.getUIContext().showDatePickerDialog({ - selectedTextStyle: {font: {family: "HarmonyOS Sans"}}, + selectedTextStyle: {font: {family: "Arial,HarmonyOS Sans"}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0730_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0740.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0740.ets index 2431304fa06df18dcae1bd34b3b5b019dcde9312..f5c37a4d7f20e0394741a46da78247d28d1c5ca4 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0740.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0740.ets @@ -23,7 +23,8 @@ struct UiComponentPopupboxDatePickerDialogInterface0740 { .margin(20) .onClick(() => { this.getUIContext().showDatePickerDialog({ - selectedTextStyle: {font: {family: getContext().resourceManager.getStringSync($r("app.string.popup_font_family"))}}, + selectedTextStyle: {font: {family: getContext().resourceManager.getStringSync($r("app.string.popup_font_time_picker"))}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0740_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0750.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0750.ets index cf791c8209d7fd6bd9471fd10236a60f394c830f..80cee3eb9c621af1a2ddb5bd608ac23aa1fc94bd 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0750.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0750.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0750 { .onClick(() => { this.getUIContext().showDatePickerDialog({ selectedTextStyle: {font: {style: FontStyle.Normal}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0750_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0760.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0760.ets index 06963335c7ef370b560d1bba6052e71e7f8ac46f..c87bce827fef16a8549c590744c9205c74d79a90 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0760.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0760.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0760 { .onClick(() => { this.getUIContext().showDatePickerDialog({ selectedTextStyle: {font: {style: FontStyle.Italic}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0760_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0770.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0770.ets index 8c30a8a9843f1f6952b20f19fa178cc1aae013df..9c7fc49a642649e53973bc4c05aab4c6c9cd4cfa 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0770.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0770.ets @@ -17,18 +17,22 @@ @Entry @Component struct UiComponentPopupboxDatePickerDialogInterface0770 { - @State text: string = "" + @State text: string = "getUIContext()->点击确认回调:\n" build() { Column() { Text(this.text) .margin(20) + .borderWidth(1) + .width('100%') + .textAlign(TextAlign.Start) Button("showDatePickerDialog") .margin(20) .onClick(() => { this.getUIContext().showDatePickerDialog({ + selected: new Date("2024-12-1"), acceptButtonStyle: { primary: true }, onAccept: (value: DatePickerResult) => { - this.text = `onAccept(year: ${value.year}年, month: ${value.month}月, day: ${value.day}日)`; + this.text += `onAccept(year: ${value.year}年, month: ${value.month}月, day: ${value.day}日)`; } }) }) diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0780.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0780.ets index e6f0af4ca38e12093df2af8d8513c2716cac8f29..5dcb57082e70ecea6c26c0175b2250af0789b134 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0780.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0780.ets @@ -18,19 +18,23 @@ @Component struct UiComponentPopupboxDatePickerDialogInterface0780 { private selectedDate: Date = new Date('2018-11-04T09:05:00') - @State text: string = "" + @State text: string = "getUIContext()->点击取消回调,获取选中年份:\n" build() { Column() { Text(this.text) .margin(20) + .borderWidth(1) + .width('100%') + .textAlign(TextAlign.Start) Button("showDatePickerDialog") .margin(20) .onClick(() => { this.getUIContext().showDatePickerDialog({ + selected: this.selectedDate, cancelButtonStyle: { primary: true }, onCancel: () => { const year = this.selectedDate.getFullYear(); - this.text = `onCancel(year: ${year}年)`; + this.text += `onCancel(year: ${year}年)`; } }) }) diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0790.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0790.ets index b58c012c2baef4ed528522ab42663ae70ffcaece..2a8b1cd7e02580c7d83ae86677986cf2842fcd6e 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0790.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0790.ets @@ -25,12 +25,15 @@ struct UiComponentPopupboxDatePickerDialogInterface0790 { let uiContext = this.getUIContext() uiContext.showDatePickerDialog({ selectedTextStyle: {color: Color.Red}, + selected: new Date("2024-12-1") }) uiContext.showDatePickerDialog({ selectedTextStyle: {color: Color.Blue}, + selected: new Date("2024-12-1") }) uiContext.showDatePickerDialog({ selectedTextStyle: {color: Color.Yellow}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0790_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0830.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0830.ets index de7d3f58b638d034563b477499aab41ed8bb307f..8196088820cd5f7b12018248082ffc32bb859040 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0830.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0830.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0830 { .onClick(() => { DatePickerDialog.show({ disappearTextStyle: {font: {size: "10px" }}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0830_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0840.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0840.ets index c6b940bce006324f2fda8ab87a838fed1efe966d..4d897d2dafb376aa5f760c3f016656dda54e1f48 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0840.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0840.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0840 { .onClick(() => { DatePickerDialog.show({ disappearTextStyle: {font: {size: 10 }}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0840_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0850.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0850.ets index 4bcfb254c6dd9e57a89ad3a1d8cb0fc827579077..d8facc29585e04994c670e40337b483d54d6f509 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0850.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0850.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0850 { .onClick(() => { DatePickerDialog.show({ disappearTextStyle: {font: {size: getContext().resourceManager.getNumber($r("app.integer.50"))}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0850_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0880.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0880.ets index adf0919ae02a7a9773d768606c7897e009f22a0e..f8ac83341d4502cd34439e4820382630c0a7f715 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0880.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0880.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0880 { .onClick(() => { DatePickerDialog.show({ textStyle: {font: {size: '10px'}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0880_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0890.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0890.ets index 46d4499f09bbf64b240a27976452d9896f3f1294..e6d39c17544cb6d766ea32852839992040cedbdc 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0890.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0890.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0890 { .onClick(() => { DatePickerDialog.show({ textStyle: {font: {size: 10}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0890_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0900.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0900.ets index 5e2bccf6e2b3f06ec92d581b16501102e0a56c81..475c59228ced23241cbfae2f0c3df344d4020a3b 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0900.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0900.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0900 { .onClick(() => { DatePickerDialog.show({ textStyle: {font: {size: getContext().resourceManager.getNumber($r("app.integer.20"))}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0900_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0910.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0910.ets index 6aa96528f7c0abd413b7d78c03efe24dc0e55153..b32bdd3e4ce68dab268e4e4dd1c4a315e337fe9c 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0910.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0910.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0910 { .onClick(() => { DatePickerDialog.show({ textStyle: {font: {weight: FontWeight.Lighter}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0910_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0920.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0920.ets index 96292df1ef1b57ce9d999d5f1311c02107ea249a..c9dc0533c03487c95fe9a915b070f0174228c557 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0920.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0920.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0920 { .onClick(() => { DatePickerDialog.show({ textStyle: {font: {weight: FontWeight.Normal}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0920_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0930.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0930.ets index 8b1aa5d5151334475bb8a7ead8bbbb15fc1ea935..b4b7c6fffe3d6864bf00f5f9a834c87a67f1257a 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0930.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0930.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0930 { .onClick(() => { DatePickerDialog.show({ textStyle: {font: {weight: FontWeight.Regular}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0930_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0940.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0940.ets index 983c0d146c42964b988bfc8f798d4af4aa40fb72..74c11f6740b76e8795cfd75a44706841b8bb3f9a 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0940.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0940.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0940 { .onClick(() => { DatePickerDialog.show({ textStyle: {font: {weight: FontWeight.Medium}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0940_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0950.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0950.ets index e918e44ac0c2da2e0c642a55b49ceea31d77cb1f..3cf3cc39ff37dcd8f1c1ea204334a5e2eca5139c 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0950.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0950.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0950 { .onClick(() => { DatePickerDialog.show({ textStyle: {font: {weight: FontWeight.Bold}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0950_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0960.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0960.ets index 452f0e2a64df08ed56f03a8e21eb4f59767b121f..98c493d1ae910f8aad4f79e75f9b653d9175aede 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0960.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface0960.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface0960 { .onClick(() => { DatePickerDialog.show({ textStyle: {font: {weight: FontWeight.Bolder}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface0960_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface1000.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface1000.ets index be86c0f008b3a0342e3dc1c2c6274e806fd526f8..217d7466bcb6758605d9e754a71b90975425f5e0 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface1000.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface1000.ets @@ -23,7 +23,8 @@ struct UiComponentPopupboxDatePickerDialogInterface1000 { .margin(20) .onClick(() => { DatePickerDialog.show({ - textStyle: {font: {family: 'HarmonyOS Sans'}}, + textStyle: {font: {family: "Arial,HarmonyOS Sans"}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface1000_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface1010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface1010.ets index df31d8b218a2a94d555ea8478169c081e8c3cb81..3a2eb15575f5b278c78e94018577c136467c4710 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface1010.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface1010.ets @@ -23,7 +23,8 @@ struct UiComponentPopupboxDatePickerDialogInterface1010 { .margin(20) .onClick(() => { DatePickerDialog.show({ - textStyle: {font: {family: getContext().resourceManager.getStringSync($r("app.string.popup_font_family"))}}, + textStyle: {font: {family: getContext().resourceManager.getStringSync($r("app.string.popup_font_time_picker"))}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface1010_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface1020.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface1020.ets index bef3f133df9f33fbb1882c70674247260663db11..bd67d04587b391e5ea94209e0af4dd3cfd6f28bd 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface1020.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface1020.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface1020 { .onClick(() => { DatePickerDialog.show({ textStyle: {font: {style: FontStyle.Normal}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface1020_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface1030.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface1030.ets index c161aa7cc95b20c72e58856d4bfb830a6bb00d64..61ed5b5797d2ad3b25bfe79237dac4b74cb10bf0 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface1030.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface1030.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface1030 { .onClick(() => { DatePickerDialog.show({ textStyle: {font: {style: FontStyle.Italic}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface1030_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface1070.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface1070.ets index e7a99ad9aca9c37db368717e65ff76d0f5778a13..de3b01fffb885842afcbcd8e4095528732d7714f 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface1070.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface1070.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface1070 { .onClick(() => { DatePickerDialog.show({ selectedTextStyle: {font: {size: "10px"}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface1070_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface1080.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface1080.ets index 821ba556894939af494db3ae31929e759c7aa046..9d43c4fca21abe7e176a257f24f23814e4e508b1 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface1080.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface1080.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface1080 { .onClick(() => { DatePickerDialog.show({ selectedTextStyle: {font: {size: 10}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface1080_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface1090.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface1090.ets index 01ba972a5cffbff8de3449e2516f44dc4eb3c7cf..218a5cc528d0aa6892b6408b0e2dd3fa959e9a96 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface1090.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface1090.ets @@ -24,6 +24,7 @@ struct UiComponentPopupboxDatePickerDialogInterface1090 { .onClick(() => { DatePickerDialog.show({ selectedTextStyle: {font: {size: getContext().resourceManager.getNumber($r("app.integer.30"))}}, + selected: new Date("2024-12-1") }) }) .id("UiComponentPopupboxDatePickerDialogInterface1090_001") diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface1170.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface1170.ets index 1cc9f21c1222c69cc2e0a0d52e1058510b3f1f90..7d4a78c3f0381e70af7dff1fb808bf3c726ff9ee 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface1170.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface1170.ets @@ -17,18 +17,22 @@ @Entry @Component struct UiComponentPopupboxDatePickerDialogInterface1170 { - @State text: string = "" + @State text: string = "常规调用,点击确认回调:\n" build() { Column() { Text(this.text) .margin(20) + .borderWidth(1) + .width('100%') + .textAlign(TextAlign.Start) Button("showDatePickerDialog") .margin(20) .onClick(() => { DatePickerDialog.show({ + selected: new Date("2024-12-1"), acceptButtonStyle: { primary: true }, onAccept: (value: DatePickerResult) => { - this.text = `onAccept(year: ${value.year}年, month: ${value.month}月, day: ${value.day}日)`; + this.text += `onAccept(year: ${value.year}年, month: ${value.month}月, day: ${value.day}日)`; }, }) }) diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface1180.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface1180.ets index 3f11cafa719e057dcdef66b474b29f4ecd9985cf..cc4c492bb676265f83ddd65e5f0fc7953a84be69 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface1180.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface1180.ets @@ -17,18 +17,22 @@ @Entry @Component struct UiComponentPopupboxDatePickerDialogInterface1180 { - @State text: string = "" + @State text: string = "常规调用,点击取消回调:\n" build() { Column() { Text(this.text) .margin(20) + .borderWidth(1) + .width('100%') + .textAlign(TextAlign.Start) Button("DatePickerDialog") .margin(20) .onClick(() => { DatePickerDialog.show({ + selected: new Date("2024-12-1"), cancelButtonStyle: { primary: true }, onCancel: () => { - this.text = "DatePickerDialog:onCancel()" + this.text += "DatePickerDialog:onCancel()" } }) }) diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface1450.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface1450.ets index 0587377f7675f56f6552fe30c15c936e21a3ffb4..87ba94f24b74be65f8801dd53c2ea5eefd2c4763 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface1450.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface1450.ets @@ -17,20 +17,24 @@ @Entry @Component struct UiComponentPopupboxDatePickerDialogInterface1450 { - @State text: string = "" + @State text: string = "点击确认回调:\n" build() { Column() { Text(this.text) .margin(20) + .borderWidth(1) + .width('100%') + .textAlign(TextAlign.Start) Button("showDatePickerDialog") .margin(20) .onClick(() => { DatePickerDialog.show({ start: new Date("1970-1-1"), end: new Date("2100-12-31"), + selected: new Date("2024-12-1"), acceptButtonStyle: { primary: true }, onAccept: (value: DatePickerResult) => { - this.text = `onAccept(year: ${value.year}年, month: ${value.month}月, day: ${value.day}日)`; + this.text += `onAccept(year: ${value.year}年, month: ${value.month}月, day: ${value.day}日)`; } }) }) diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface1460.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface1460.ets index 4b31fb3f1a03f1699ca71b2bc499dc48aa3dceed..822b964ab6d58ff0a102d9f55047c8fff174f6cc 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface1460.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface1460.ets @@ -18,23 +18,27 @@ @Component struct UiComponentPopupboxDatePickerDialogInterface1460 { private selectedDate: Date = new Date('2024-11-04T09:05:00') - @State text: string = "" + @State text: string = "常规调用,点击取消回调,获取选中日期:\n" build() { Column() { Text(this.text) .margin(20) + .borderWidth(1) + .width('100%') + .textAlign(TextAlign.Start) Button("showDatePickerDialog") .margin(20) .onClick(() => { DatePickerDialog.show({ start: new Date("1970-1-1"), end: new Date("2100-12-31"), + selected: new Date("2024-12-1"), cancelButtonStyle: { primary: true }, onCancel: () => { const year = this.selectedDate.getFullYear(); const month = this.selectedDate.getMonth(); const day = this.selectedDate.getDate(); - this.text = `onCancel(year: ${year}年, month: ${month}月, day: ${day}日)`; + this.text += `onCancel(year: ${year}年, month: ${month}月, day: ${day}日)`; } }) }) diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface1470.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface1470.ets index 9edd6d47123ef011822ee68e7da5d5c39dac9384..6cff8f6892bccb13e20c16fa563eef64543a18bd 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface1470.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface1470.ets @@ -17,19 +17,23 @@ @Entry @Component struct UiComponentPopupboxDatePickerDialogInterface1470 { - @State text: string = "" + @State text: string = "滑动选择回调,获取当前日期:\n" build() { Column() { Text(this.text) .margin(20) + .borderWidth(1) + .width('100%') + .textAlign(TextAlign.Start) Button("showDatePickerDialog") .margin(20) .onClick(() => { DatePickerDialog.show({ start: new Date("2000-1-1"), end: new Date("2003-12-31"), + selected: new Date("2000-12-31"), onChange: (value: DatePickerResult) => { - this.text = `onChange(year: ${value.year}年, month: ${value.month}月, day: ${value.day}日)`; + this.text += `onChange(year: ${value.year}年, month: ${value.month}月, day: ${value.day}日)` + '\n'; } }) }) diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/resources/containerspan_click_error.png b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/resources/containerspan_click_error.png new file mode 100644 index 0000000000000000000000000000000000000000..476223a2cbaa029e0ccc67660eb768effb766501 Binary files /dev/null and b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/resources/containerspan_click_error.png differ diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/resources/containerspan_height_error.png b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/resources/containerspan_height_error.png new file mode 100644 index 0000000000000000000000000000000000000000..0d16a9f5d39efc178484b2bfcbe3372cb3c16a7e Binary files /dev/null and b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/resources/containerspan_height_error.png differ diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/resources/containerspan_width_error.png b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/resources/containerspan_width_error.png new file mode 100644 index 0000000000000000000000000000000000000000..eaae1996c7bcdeafd8a6287b9d5d44cfda56a934 Binary files /dev/null and b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/resources/containerspan_width_error.png differ diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/resources/span_null_param_error.png b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/resources/span_null_param_error.png new file mode 100644 index 0000000000000000000000000000000000000000..846adf54057902753c7ad575ea11769db6c5eec8 Binary files /dev/null and b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/resources/span_null_param_error.png differ diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/module.json5 b/function/ui_compare_rh/uicompare/entry/src/ohosTest/module.json5 index e58bd507f3ecff51931c351ebcabf6603cd5c40c..3f1c492ecf925c00fbc3ddae14b2bfcfd0ca8575 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/module.json5 +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/module.json5 @@ -12,20 +12,36 @@ "installationFree": false, "pages": "$profile:test_pages", "requestPermissions": [ + { + "name":"ohos.permission.INTERNET" + "name": "ohos.permission.SYSTEM_FLOAT_WINDOW", + "usedScene": { + "abilities": [ + "EntryAbility" + ], + "when": "inuse" + } + }, + { + "name": "ohos.permission.GRANT_SENSITIVE_PERMISSIONS" + }, { "name": "ohos.permission.WRITE_MEDIA" }, + { + "name": "ohos.permission.INTERNET" + }, { "name": "ohos.permission.READ_MEDIA" }, { - "name":"ohos.permission.UPDATE_CONFIGURATION" + "name": "ohos.permission.CAPTURE_SCREEN" }, { - "name":"ohos.permission.RUNNING_LOCK" + "name": "ohos.permission.ACCESS_SCREEN_LOCK_INNER" }, { - "name":"ohos.permission.INTERNET" + "name": "ohos.permission.UPDATE_CONFIGURATION" } ], "abilities": [ diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/base/element/color.json b/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/base/element/color.json index cebaca0ee054e26196800861f14cc2ede61640d2..55706f902ca78803fbcfbaf625bfee4289fc1f14 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/base/element/color.json +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/base/element/color.json @@ -63,6 +63,10 @@ { "name": "search_placeholder", "value": "#FFCFA613" + }, + { + "name": "data_bg_color", + "value": "#9effffff" } ] } \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/base/profile/test_pages.json b/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/base/profile/test_pages.json index 5cc05ce92cff61b76d701a3fe495c11c73638078..f021dd5a31f524a55bd629ad9494b9e80d93e4d8 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/base/profile/test_pages.json +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/base/profile/test_pages.json @@ -1232,16 +1232,26 @@ "testability/pages/UIComponentSpecialComponentsUIExtensionComponentPopupChange/UIComponentSpecialComponentsUIExtensionComponentPopupChange004", "testability/pages/UIComponentSpecialComponentsUIExtensionComponentPopupChange/UIComponentSpecialComponentsUIExtensionComponentPopupChange005", "testability/pages/UIComponentSpecialComponentsUIExtensionComponentPopupChange/UIComponentSpecialComponentsUIExtensionComponentPopupChange006", + "testability/pages/UIExtensionComponentPopupChange/UIComponentSpecialComponentsUIExtensionComponentPopupChange001", + "testability/pages/UIExtensionComponentPopupChange/UIComponentSpecialComponentsUIExtensionComponentPopupChange002", + "testability/pages/UIExtensionComponentPopupChange/UIComponentSpecialComponentsUIExtensionComponentPopupChange003", + "testability/pages/UIExtensionComponentPopupChange/UIComponentSpecialComponentsUIExtensionComponentPopupChange004", + "testability/pages/UIExtensionComponentPopupChange/UIComponentSpecialComponentsUIExtensionComponentPopupChange005", + "testability/pages/UIExtensionComponentPopupChange/UIComponentSpecialComponentsUIExtensionComponentPopupChange006", + "testability/pages/UIComponentPopupBoxSpecificationsShadow/UIComponentPopupBoxSpecificationsShadow010", "testability/pages/UIComponentPopupBoxSpecificationsShadow/UIComponentPopupBoxSpecificationsShadow012", "testability/pages/UIComponentPopupBoxSpecificationsShadow/UIComponentPopupBoxSpecificationsShadow013", "testability/pages/UIComponentPopupBoxSpecificationsShadow/UIComponentPopupBoxSpecificationsShadow014", "testability/pages/UIComponentPopupBoxSpecificationsShadow/UIComponentPopupBoxSpecificationsShadow016", "testability/pages/UIComponentPopupBoxSpecificationsShadow/UIComponentPopupBoxSpecificationsShadow017", "testability/pages/UIComponentPopupBoxSpecificationsShadow/UIComponentPopupBoxSpecificationsShadow018", + "testability/pages/UIComponentPopupBoxSpecificationsShadow/UIComponentPopupBoxSpecificationsShadow019", "testability/pages/UIComponentPopupBoxSpecificationsShadow/UIComponentPopupBoxSpecificationsShadow020", "testability/pages/UIComponentPopupBoxSpecificationsShadow/UIComponentPopupBoxSpecificationsShadow021", "testability/pages/UIComponentPopupBoxSpecificationsShadow/UIComponentPopupBoxSpecificationsShadow022", "testability/pages/UIComponentPopupBoxSpecificationsShadow/UIComponentPopupBoxSpecificationsShadow083", + "testability/pages/UIComponentPopupBoxSpecificationsShadow/UIComponentPopupBoxSpecificationsShadow090", + "testability/pages/UIComponentPopupBoxSpecificationsShadow/UIComponentPopupBoxSpecificationsShadow097", "testability/pages/UIComponentUISupportColor/UIComponentUISupportColor092", "testability/pages/UIComponentUISupportColor/UIComponentUISupportColor093", "testability/pages/UIComponentUISupportColor/UIComponentUISupportColor094", @@ -1256,6 +1266,13 @@ "testability/pages/UIComponentUISupportColor/UIComponentUISupportColor103", "testability/pages/UIComponentUISupportColor/UIComponentUISupportColor104", "testability/pages/UIComponentUISupportColor/UIComponentUISupportColor105", + "testability/pages/UIComponentUISupportColor/UIComponentUISupportColor141", + "testability/pages/UIComponentUISupportColor/UIComponentUISupportColor142", + "testability/pages/UIComponentUISupportColor/UIComponentUISupportColor143", + "testability/pages/UIComponentUISupportColor/UIComponentUISupportColor144", + "testability/pages/UIComponentUISupportColor/UIComponentUISupportColor145", + "testability/pages/UIComponentUISupportColor/UIComponentUISupportColor146", + "testability/pages/UIComponentUISupportColor/UIComponentUISupportColor147", "testability/pages/UIComponentButtonStyle/UIComponentButtonStyle051", "testability/pages/UIComponentButtonStyle/UIComponentButtonStyle052", "testability/pages/UIComponentButtonStyle/UIComponentButtonStyle053", @@ -1264,6 +1281,7 @@ "testability/pages/UIComponentButtonStyle/UIComponentButtonStyle056", "testability/pages/UIComponentButtonStyle/UIComponentButtonStyle057", "testability/pages/UIComponentButtonRadioLConic/UIComponentButtonRadioLConic004", + "testability/pages/UIComponentButtonRadioLConic/UIComponentButtonRadioLConic005", "testability/pages/UIComponentButtonRadioLConic/UIComponentButtonRadioLConic008", "testability/pages/UIComponentButtonRadioLConic/UIComponentButtonRadioLConic009", "testability/pages/UIComponentButtonRadioLConic/UIComponentButtonRadioLConic013", @@ -1306,6 +1324,16 @@ "testability/pages/UIComponentPopupBoxSpecifications/UIComponentPopupBoxSpecifications085", "testability/pages/ComponentFunctionLAdvancedComponentsPopupInterface/ComponentFunctionLAdvancedComponentsPopupInterface01780", "testability/pages/ComponentFunctionLAdvancedComponentsPopupInterface/ComponentFunctionLAdvancedComponentsPopupInterface0178", + "testability/pages/UIComponentPopupBoxSpecifications/UIComponentPopupBoxSpecifications039", + "testability/pages/UIComponentPopupBoxSpecifications/UIComponentPopupBoxSpecifications040", + "testability/pages/UIComponentPopupBoxSpecifications/UIComponentPopupBoxSpecifications041", + "testability/pages/UIComponentPopupBoxSpecifications/UIComponentPopupBoxSpecifications045", + "testability/pages/UIComponentPopupBoxSpecifications/UIComponentPopupBoxSpecifications046", + "testability/pages/UIComponentPopupBoxSpecifications/UIComponentPopupBoxSpecifications047", + "testability/pages/UIComponentPopupBoxSpecifications/UIComponentPopupBoxSpecifications048", + "testability/pages/ComponentFunctionLAdvancedComponentsPopupInterface/ComponentFunctionLAdvancedComponentsPopupInterface01780", + "testability/pages/ComponentFunctionLAdvancedComponentsPopupInterface/ComponentFunctionLAdvancedComponentsPopupInterface0178", + "testability/pages/ComponentFunctionLAdvancedComponentsPopupInterface/UIComponentPopupBoxPopupBackwardAnalysis002", "testability/pages/UIComponentButtonRadioCustonmizing/UIComponentButtonRadioCustonmizing001", "testability/pages/UIComponentButtonRadioCustonmizing/UIComponentButtonRadioCustonmizing002", "testability/pages/UIComponentButtonRadioCustonmizing/UIComponentButtonRadioCustonmizing003", @@ -1332,6 +1360,7 @@ "testability/pages/UIComponentButtonRadioCheckMark/UIComponentButtonRadioCheckMark012", "testability/pages/UIComponentButtonRadioCheckMark/UIComponentButtonRadioCheckMark013", "testability/pages/UIComponentButtonRadioCheckMark/UIComponentButtonRadioCheckMark014", + "testability/pages/UIComponentButtonSelectAttribute/UIComponentButtonSelectInterface", "testability/pages/UIComponentButtonSelectAttribute/UIComponentButtonSelectAttribute004", "testability/pages/UIComponentButtonSelectAttribute/UIComponentButtonSelectAttribute005", "testability/pages/UIComponentButtonSelectAttribute/UIComponentButtonSelectAttribute006", @@ -1472,6 +1501,9 @@ "testability/pages/UITestCase/UITestCase002", "testability/pages/UITestCase/UITestCase003", "testability/pages/UITestCase/UITestCase004", + "testability/pages/UITestCase/UITestCase005", + "testability/pages/UITestCase/UITestCase006", + "testability/pages/UITestCase/UITestCase007", "testability/pages/FunctionJiChuSR000HUB4K/FunctionJiChuSR000HUB4K012", "testability/pages/FunctionJiChuSR000HUB4K/FunctionJiChuSR000HUB4K013", "testability/pages/FunctionJiChuSR000HUB4K/FunctionJiChuSR000HUB4K014", @@ -1747,6 +1779,7 @@ "testability/pages/UIComponentPopupBoxAttribute/UIComponentPopupBoxAttribute011", "testability/pages/UIComponentPopupBoxAttribute/UIComponentPopupBoxAttribute050", "testability/pages/UIComponentPopupBoxAttribute/UIComponentPopupBoxAttribute051", + "testability/pages/UIComponentPopupBoxPromptToastSequence/UIComponentPopupBoxPromptToastSequence001", "testability/pages/UIComponentPopupBoxPromptToastSequence/UIComponentPopupBoxPromptToastSequence002", "testability/pages/UIComponentPopupBoxPromptToastSequence/UIComponentPopupBoxPromptToastSequence003", "testability/pages/UIComponentPopupBoxPromptToastSequence/UIComponentPopupBoxPromptToastSequence004", @@ -1755,6 +1788,7 @@ "testability/pages/UIComponentPopupBoxPromptToastSequence/UIComponentPopupBoxPromptToastSequence007", "testability/pages/UIComponentPopupBoxPromptToastSequence/UIComponentPopupBoxPromptToastSequence008", "testability/pages/UIComponentPopupBoxPromptToastSequence/UIComponentPopupBoxPromptToastSequence009", + "testability/pages/UIComponentPopupBoxPromptToastSequence/UIComponentPopupBoxPromptToastSequence010", "testability/pages/UIComponentPopupBoxPromptToastSequence/UIComponentPopupBoxPromptToastSequence014", "testability/pages/UIComponentPopupBoxPromptToastSequence/UIComponentPopupBoxPromptToastSequence015", "testability/pages/UIComponentButtonCommonButton/UIComponentButtonCommonButton033", @@ -1773,6 +1807,7 @@ "testability/pages/UIComponentPopupBoxSpecificationsPopup/UIComponentPopupBoxSpecificationsPopup005", "testability/pages/UIComponentPopupBoxSpecificationsPopup/UIComponentPopupBoxSpecificationsPopup006", "testability/pages/UiComponentPopupboxDatePickerDialogInterface/UiComponentPopupboxDatePickerDialogInterface1470", + "testability/pages/UIComponentPopupBoxPopupInterface/UIComponentPopupBoxPopupInterface001", "testability/pages/UIComponentPopupBoxPopupInterface/UIComponentPopupBoxPopupInterface002", "testability/pages/UIComponentPopupBoxPopupInterface/UIComponentPopupBoxPopupInterface003", @@ -1788,6 +1823,7 @@ "testability/pages/UIComponentPopupPromptInterface/UIComponentPopupPromptInterface0010", "testability/pages/UIComponentPopupPromptInterface/UIComponentPopupPromptInterface0011", "testability/pages/UIComponentPopupPromptInterface/UIComponentPopupPromptInterface0012", + "testability/pages/UIComponentPopupPromptInterface/UIComponentPopupPromptInterface0013", "testability/pages/UIComponentPopupBoxToastStyleInterface/UIComponentPopupBoxToastStyleInterface001", "testability/pages/UIComponentPopupBoxToastStyleInterface/UIComponentPopupBoxToastStyleInterface002", "testability/pages/UIComponentPopupBoxToastStyleInterface/UIComponentPopupBoxToastStyleInterface003", @@ -1802,5 +1838,53 @@ "testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface008", "testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface009", "testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface0010" + "testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface0010", + "testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface0011", + "testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface0012", + "testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface0013", + "testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface0014", + "testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface0015", + "testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface048", + + "testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface001", + "testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface002", + "testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface003", + "testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface004", + "testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface005", + "testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface006", + "testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface007", + "testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface008", + "testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface009", + "testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface0010", + "testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface0011", + "testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface0012", + "testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface0013", + "testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface0014", + "testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface0015", + "testability/pages/UIComponentPopupBoxAttributeInterface/UIComponentPopupBoxAttributeInterface0016", + "testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean001", + "testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean002", + "testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean005", + "testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean006", + "testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean007", + "testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean009", + "testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean010", + "testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean011", + "testability/pages/UIComponentPopupBoxPopupOnWillDisMissBoolean/UIComponentPopupBoxPopupOnWillDisMissBoolean012", + "testability/pages/UIComponentPopupBoxStyleStrong/UIComponentPopupBoxStyleStrong027", + "testability/pages/UIComponentPopupBoxStyleStrong/UIComponentPopupBoxStyleStrong026", + "testability/pages/UIComponentPopupBoxConsistencyScene/UIComponentPopupBoxConsistencyScene007", + "testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0020", + "testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0110", + "testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0180", + "testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0040", + "testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0200", + "testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0220", + "testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0310", + "testability/pages/UIComponentfunctionSpecialComponentsDialogDataInterface/UIComponentfunctionSpecialComponentsDialogDataInterface0240", + "testability/pages/UIComponentPopupBoxCalendarPickerFeature/UIComponentPopupBoxCalendarPickerFeature003", + "testability/pages/UIComponentPopupBoxPopupFollowTransformOfTarget/UIComponentPopupBoxPopupFollowTransformofTarget031", + "testability/pages/UIComponentPopupBoxPopupFollowTransformOfTarget/UIComponentPopupBoxPopupFollowTransformofTarget058", + "testability/pages/UIComponentPopupBoxPopupFollowTransformOfTarget/UIComponentPopupBoxPopupFollowTransformofTarget085" ] } diff --git a/function/ui_compare_rh/uicompare/hvigor/hvigor-wrapper.js b/function/ui_compare_rh/uicompare/hvigor/hvigor-wrapper.js new file mode 100644 index 0000000000000000000000000000000000000000..372eae8eb4a124095936f9cd78df5c6756746f3f --- /dev/null +++ b/function/ui_compare_rh/uicompare/hvigor/hvigor-wrapper.js @@ -0,0 +1 @@ +"use strict";var u=require("path"),D=require("os"),e=require("fs"),t=require("crypto"),r=require("child_process"),n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},i={},C={},F=n&&n.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(C,"__esModule",{value:!0}),C.maxPathLength=C.isMac=C.isLinux=C.isWindows=void 0;const E=F(D),A="Windows_NT",o="Darwin";function a(){return E.default.type()===A}function c(){return E.default.type()===o}C.isWindows=a,C.isLinux=function(){return"Linux"===E.default.type()},C.isMac=c,C.maxPathLength=function(){return c()?1016:a()?259:4095},function(e){var t=n&&n.__createBinding||(Object.create?function(u,D,e,t){void 0===t&&(t=e);var r=Object.getOwnPropertyDescriptor(D,e);r&&!("get"in r?!D.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return D[e]}}),Object.defineProperty(u,t,r)}:function(u,D,e,t){void 0===t&&(t=e),u[t]=D[e]}),r=n&&n.__setModuleDefault||(Object.create?function(u,D){Object.defineProperty(u,"default",{enumerable:!0,value:D})}:function(u,D){u.default=D}),i=n&&n.__importStar||function(u){if(u&&u.__esModule)return u;var D={};if(null!=u)for(var e in u)"default"!==e&&Object.prototype.hasOwnProperty.call(u,e)&&t(D,u,e);return r(D,u),D};Object.defineProperty(e,"__esModule",{value:!0}),e.WORK_SPACE=e.HVIGOR_PROJECT_WRAPPER_HOME=e.HVIGOR_PROJECT_ROOT_DIR=e.HVIGOR_PROJECT_CACHES_HOME=e.HVIGOR_PNPM_STORE_PATH=e.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH=e.PROJECT_CACHES=e.HVIGOR_WRAPPER_TOOLS_HOME=e.HVIGOR_USER_HOME=e.DEFAULT_PACKAGE_JSON=e.DEFAULT_HVIGOR_CONFIG_JSON_FILE_NAME=e.PNPM=e.HVIGOR=e.NPM_TOOL=e.PNPM_TOOL=e.HVIGOR_ENGINE_PACKAGE_NAME=void 0;const F=i(D),E=i(u),A=C;e.HVIGOR_ENGINE_PACKAGE_NAME="@ohos/hvigor",e.PNPM_TOOL=(0,A.isWindows)()?"pnpm.cmd":"pnpm",e.NPM_TOOL=(0,A.isWindows)()?"npm.cmd":"npm",e.HVIGOR="hvigor",e.PNPM="pnpm",e.DEFAULT_HVIGOR_CONFIG_JSON_FILE_NAME="hvigor-config.json5",e.DEFAULT_PACKAGE_JSON="package.json",e.HVIGOR_USER_HOME=E.resolve(F.homedir(),".hvigor"),e.HVIGOR_WRAPPER_TOOLS_HOME=E.resolve(e.HVIGOR_USER_HOME,"wrapper","tools"),e.PROJECT_CACHES="project_caches",e.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH=E.resolve(e.HVIGOR_WRAPPER_TOOLS_HOME,"node_modules",".bin",e.PNPM_TOOL),e.HVIGOR_PNPM_STORE_PATH=E.resolve(e.HVIGOR_USER_HOME,"caches"),e.HVIGOR_PROJECT_CACHES_HOME=E.resolve(e.HVIGOR_USER_HOME,e.PROJECT_CACHES),e.HVIGOR_PROJECT_ROOT_DIR=process.cwd(),e.HVIGOR_PROJECT_WRAPPER_HOME=E.resolve(e.HVIGOR_PROJECT_ROOT_DIR,e.HVIGOR),e.WORK_SPACE="workspace"}(i);var s={},l={};Object.defineProperty(l,"__esModule",{value:!0}),l.logInfoPrintConsole=l.logErrorAndExit=void 0,l.logErrorAndExit=function(u){u instanceof Error?console.error(u.message):console.error(u),process.exit(-1)},l.logInfoPrintConsole=function(u){console.log(u)};var B=n&&n.__createBinding||(Object.create?function(u,D,e,t){void 0===t&&(t=e);var r=Object.getOwnPropertyDescriptor(D,e);r&&!("get"in r?!D.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return D[e]}}),Object.defineProperty(u,t,r)}:function(u,D,e,t){void 0===t&&(t=e),u[t]=D[e]}),d=n&&n.__setModuleDefault||(Object.create?function(u,D){Object.defineProperty(u,"default",{enumerable:!0,value:D})}:function(u,D){u.default=D}),f=n&&n.__importStar||function(u){if(u&&u.__esModule)return u;var D={};if(null!=u)for(var e in u)"default"!==e&&Object.prototype.hasOwnProperty.call(u,e)&&B(D,u,e);return d(D,u),D};Object.defineProperty(s,"__esModule",{value:!0});var _=s.executeBuild=void 0;const p=f(e),O=f(u),h=l;_=s.executeBuild=function(u){const D=O.resolve(u,"node_modules","@ohos","hvigor","bin","hvigor.js");try{const u=p.realpathSync(D);require(u)}catch(e){(0,h.logErrorAndExit)(`Error: ENOENT: no such file ${D},delete ${u} and retry.`)}};var P={},v={};!function(u){var D=n&&n.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(u,"__esModule",{value:!0}),u.hashFile=u.hash=u.createHash=void 0;const r=D(t),i=D(e);u.createHash=(u="MD5")=>r.default.createHash(u);u.hash=(D,e)=>(0,u.createHash)(e).update(D).digest("hex");u.hashFile=(D,e)=>{if(i.default.existsSync(D))return(0,u.hash)(i.default.readFileSync(D,"utf-8"),e)}}(v);var g={},m={},R={};Object.defineProperty(R,"__esModule",{value:!0}),R.Unicode=void 0;class y{}R.Unicode=y,y.SPACE_SEPARATOR=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,y.ID_START=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,y.ID_CONTINUE=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,Object.defineProperty(m,"__esModule",{value:!0}),m.JudgeUtil=void 0;const I=R;m.JudgeUtil=class{static isIgnoreChar(u){return"string"==typeof u&&("\t"===u||"\v"===u||"\f"===u||" "===u||" "===u||"\ufeff"===u||"\n"===u||"\r"===u||"\u2028"===u||"\u2029"===u)}static isSpaceSeparator(u){return"string"==typeof u&&I.Unicode.SPACE_SEPARATOR.test(u)}static isIdStartChar(u){return"string"==typeof u&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||"$"===u||"_"===u||I.Unicode.ID_START.test(u))}static isIdContinueChar(u){return"string"==typeof u&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||u>="0"&&u<="9"||"$"===u||"_"===u||"‌"===u||"‍"===u||I.Unicode.ID_CONTINUE.test(u))}static isDigitWithoutZero(u){return/[1-9]/.test(u)}static isDigit(u){return"string"==typeof u&&/[0-9]/.test(u)}static isHexDigit(u){return"string"==typeof u&&/[0-9A-Fa-f]/.test(u)}};var N=n&&n.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(g,"__esModule",{value:!0}),g.parseJsonText=g.parseJsonFile=void 0;const b=N(e),S=N(D),w=N(u),H=m;var x;!function(u){u[u.Char=0]="Char",u[u.EOF=1]="EOF",u[u.Identifier=2]="Identifier"}(x||(x={}));let M,T,V,G,j,J,W="start",U=[],L=0,$=1,k=0,K=!1,z="default",q="'",Z=1;function X(u,D=!1){T=String(u),W="start",U=[],L=0,$=1,k=0,G=void 0,K=D;do{M=Q(),nu[W]()}while("eof"!==M.type);return G}function Q(){for(z="default",j="",q="'",Z=1;;){J=Y();const u=Du[z]();if(u)return u}}function Y(){if(T[L])return String.fromCodePoint(T.codePointAt(L))}function uu(){const u=Y();return"\n"===u?($++,k=0):u?k+=u.length:k++,u&&(L+=u.length),u}g.parseJsonFile=function(u,D=!1,e="utf-8"){const t=b.default.readFileSync(w.default.resolve(u),{encoding:e});try{return X(t,D)}catch(D){if(D instanceof SyntaxError){const e=D.message.split("at");if(2===e.length)throw new Error(`${e[0].trim()}${S.default.EOL}\t at ${u}:${e[1].trim()}`)}throw new Error(`${u} is not in valid JSON/JSON5 format.`)}},g.parseJsonText=X;const Du={default(){switch(J){case"/":return uu(),void(z="comment");case void 0:return uu(),eu("eof")}if(!H.JudgeUtil.isIgnoreChar(J)&&!H.JudgeUtil.isSpaceSeparator(J))return Du[W]();uu()},start(){z="value"},beforePropertyName(){switch(J){case"$":case"_":return j=uu(),void(z="identifierName");case"\\":return uu(),void(z="identifierNameStartEscape");case"}":return eu("punctuator",uu());case'"':case"'":return q=J,uu(),void(z="string")}if(H.JudgeUtil.isIdStartChar(J))return j+=uu(),void(z="identifierName");throw Eu(x.Char,uu())},afterPropertyName(){if(":"===J)return eu("punctuator",uu());throw Eu(x.Char,uu())},beforePropertyValue(){z="value"},afterPropertyValue(){switch(J){case",":case"}":return eu("punctuator",uu())}throw Eu(x.Char,uu())},beforeArrayValue(){if("]"===J)return eu("punctuator",uu());z="value"},afterArrayValue(){switch(J){case",":case"]":return eu("punctuator",uu())}throw Eu(x.Char,uu())},end(){throw Eu(x.Char,uu())},comment(){switch(J){case"*":return uu(),void(z="multiLineComment");case"/":return uu(),void(z="singleLineComment")}throw Eu(x.Char,uu())},multiLineComment(){switch(J){case"*":return uu(),void(z="multiLineCommentAsterisk");case void 0:throw Eu(x.Char,uu())}uu()},multiLineCommentAsterisk(){switch(J){case"*":return void uu();case"/":return uu(),void(z="default");case void 0:throw Eu(x.Char,uu())}uu(),z="multiLineComment"},singleLineComment(){switch(J){case"\n":case"\r":case"\u2028":case"\u2029":return uu(),void(z="default");case void 0:return uu(),eu("eof")}uu()},value(){switch(J){case"{":case"[":return eu("punctuator",uu());case"n":return uu(),tu("ull"),eu("null",null);case"t":return uu(),tu("rue"),eu("boolean",!0);case"f":return uu(),tu("alse"),eu("boolean",!1);case"-":case"+":return"-"===uu()&&(Z=-1),void(z="numerical");case".":case"0":case"I":case"N":return void(z="numerical");case'"':case"'":return q=J,uu(),j="",void(z="string")}if(void 0===J||!H.JudgeUtil.isDigitWithoutZero(J))throw Eu(x.Char,uu());z="numerical"},numerical(){switch(J){case".":return j=uu(),void(z="decimalPointLeading");case"0":return j=uu(),void(z="zero");case"I":return uu(),tu("nfinity"),eu("numeric",Z*(1/0));case"N":return uu(),tu("aN"),eu("numeric",NaN)}if(void 0!==J&&H.JudgeUtil.isDigitWithoutZero(J))return j=uu(),void(z="decimalInteger");throw Eu(x.Char,uu())},zero(){switch(J){case".":case"e":case"E":return void(z="decimal");case"x":case"X":return j+=uu(),void(z="hexadecimal")}return eu("numeric",0)},decimalInteger(){switch(J){case".":case"e":case"E":return void(z="decimal")}if(!H.JudgeUtil.isDigit(J))return eu("numeric",Z*Number(j));j+=uu()},decimal(){switch(J){case".":j+=uu(),z="decimalFraction";break;case"e":case"E":j+=uu(),z="decimalExponent"}},decimalPointLeading(){if(H.JudgeUtil.isDigit(J))return j+=uu(),void(z="decimalFraction");throw Eu(x.Char,uu())},decimalFraction(){switch(J){case"e":case"E":return j+=uu(),void(z="decimalExponent")}if(!H.JudgeUtil.isDigit(J))return eu("numeric",Z*Number(j));j+=uu()},decimalExponent(){switch(J){case"+":case"-":return j+=uu(),void(z="decimalExponentSign")}if(H.JudgeUtil.isDigit(J))return j+=uu(),void(z="decimalExponentInteger");throw Eu(x.Char,uu())},decimalExponentSign(){if(H.JudgeUtil.isDigit(J))return j+=uu(),void(z="decimalExponentInteger");throw Eu(x.Char,uu())},decimalExponentInteger(){if(!H.JudgeUtil.isDigit(J))return eu("numeric",Z*Number(j));j+=uu()},hexadecimal(){if(H.JudgeUtil.isHexDigit(J))return j+=uu(),void(z="hexadecimalInteger");throw Eu(x.Char,uu())},hexadecimalInteger(){if(!H.JudgeUtil.isHexDigit(J))return eu("numeric",Z*Number(j));j+=uu()},identifierNameStartEscape(){if("u"!==J)throw Eu(x.Char,uu());uu();const u=ru();switch(u){case"$":case"_":break;default:if(!H.JudgeUtil.isIdStartChar(u))throw Eu(x.Identifier)}j+=u,z="identifierName"},identifierName(){switch(J){case"$":case"_":case"‌":case"‍":return void(j+=uu());case"\\":return uu(),void(z="identifierNameEscape")}if(!H.JudgeUtil.isIdContinueChar(J))return eu("identifier",j);j+=uu()},identifierNameEscape(){if("u"!==J)throw Eu(x.Char,uu());uu();const u=ru();switch(u){case"$":case"_":case"‌":case"‍":break;default:if(!H.JudgeUtil.isIdContinueChar(u))throw Eu(x.Identifier)}j+=u,z="identifierName"},string(){switch(J){case"\\":return uu(),void(j+=function(){const u=Y(),D=function(){switch(Y()){case"b":return uu(),"\b";case"f":return uu(),"\f";case"n":return uu(),"\n";case"r":return uu(),"\r";case"t":return uu(),"\t";case"v":return uu(),"\v"}return}();if(D)return D;switch(u){case"0":if(uu(),H.JudgeUtil.isDigit(Y()))throw Eu(x.Char,uu());return"\0";case"x":return uu(),function(){let u="",D=Y();if(!H.JudgeUtil.isHexDigit(D))throw Eu(x.Char,uu());if(u+=uu(),D=Y(),!H.JudgeUtil.isHexDigit(D))throw Eu(x.Char,uu());return u+=uu(),String.fromCodePoint(parseInt(u,16))}();case"u":return uu(),ru();case"\n":case"\u2028":case"\u2029":return uu(),"";case"\r":return uu(),"\n"===Y()&&uu(),""}if(void 0===u||H.JudgeUtil.isDigitWithoutZero(u))throw Eu(x.Char,uu());return uu()}());case'"':case"'":if(J===q){const u=eu("string",j);return uu(),u}return void(j+=uu());case"\n":case"\r":case void 0:throw Eu(x.Char,uu());case"\u2028":case"\u2029":!function(u){console.warn(`JSON5: '${Fu(u)}' in strings is not valid ECMAScript; consider escaping.`)}(J)}j+=uu()}};function eu(u,D){return{type:u,value:D,line:$,column:k}}function tu(u){for(const D of u){if(Y()!==D)throw Eu(x.Char,uu());uu()}}function ru(){let u="",D=4;for(;D-- >0;){const D=Y();if(!H.JudgeUtil.isHexDigit(D))throw Eu(x.Char,uu());u+=uu()}return String.fromCodePoint(parseInt(u,16))}const nu={start(){if("eof"===M.type)throw Eu(x.EOF);iu()},beforePropertyName(){switch(M.type){case"identifier":case"string":return V=M.value,void(W="afterPropertyName");case"punctuator":return void Cu();case"eof":throw Eu(x.EOF)}},afterPropertyName(){if("eof"===M.type)throw Eu(x.EOF);W="beforePropertyValue"},beforePropertyValue(){if("eof"===M.type)throw Eu(x.EOF);iu()},afterPropertyValue(){if("eof"===M.type)throw Eu(x.EOF);switch(M.value){case",":return void(W="beforePropertyName");case"}":Cu()}},beforeArrayValue(){if("eof"===M.type)throw Eu(x.EOF);"punctuator"!==M.type||"]"!==M.value?iu():Cu()},afterArrayValue(){if("eof"===M.type)throw Eu(x.EOF);switch(M.value){case",":return void(W="beforeArrayValue");case"]":Cu()}},end(){}};function iu(){const u=function(){let u;switch(M.type){case"punctuator":switch(M.value){case"{":u={};break;case"[":u=[]}break;case"null":case"boolean":case"numeric":case"string":u=M.value}return u}();if(K&&"object"==typeof u&&(u._line=$,u._column=k),void 0===G)G=u;else{const D=U[U.length-1];Array.isArray(D)?K&&"object"!=typeof u?D.push({value:u,_line:$,_column:k}):D.push(u):D[V]=K&&"object"!=typeof u?{value:u,_line:$,_column:k}:u}!function(u){if(u&&"object"==typeof u)U.push(u),W=Array.isArray(u)?"beforeArrayValue":"beforePropertyName";else{const u=U[U.length-1];W=u?Array.isArray(u)?"afterArrayValue":"afterPropertyValue":"end"}}(u)}function Cu(){U.pop();const u=U[U.length-1];W=u?Array.isArray(u)?"afterArrayValue":"afterPropertyValue":"end"}function Fu(u){const D={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(D[u])return D[u];if(u<" "){const D=u.charCodeAt(0).toString(16);return`\\x${`00${D}`.substring(D.length)}`}return u}function Eu(u,D){let e="";switch(u){case x.Char:e=void 0===D?`JSON5: invalid end of input at ${$}:${k}`:`JSON5: invalid character '${Fu(D)}' at ${$}:${k}`;break;case x.EOF:e=`JSON5: invalid end of input at ${$}:${k}`;break;case x.Identifier:k-=5,e=`JSON5: invalid identifier character at ${$}:${k}`}const t=new Au(e);return t.lineNumber=$,t.columnNumber=k,t}class Au extends SyntaxError{}var ou={},au=n&&n.__createBinding||(Object.create?function(u,D,e,t){void 0===t&&(t=e);var r=Object.getOwnPropertyDescriptor(D,e);r&&!("get"in r?!D.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return D[e]}}),Object.defineProperty(u,t,r)}:function(u,D,e,t){void 0===t&&(t=e),u[t]=D[e]}),cu=n&&n.__setModuleDefault||(Object.create?function(u,D){Object.defineProperty(u,"default",{enumerable:!0,value:D})}:function(u,D){u.default=D}),su=n&&n.__importStar||function(u){if(u&&u.__esModule)return u;var D={};if(null!=u)for(var e in u)"default"!==e&&Object.prototype.hasOwnProperty.call(u,e)&&au(D,u,e);return cu(D,u),D},lu=n&&n.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(ou,"__esModule",{value:!0}),ou.isFileExists=ou.offlinePluginConversion=ou.executeCommand=ou.getNpmPath=ou.hasNpmPackInPaths=void 0;const Bu=r,du=lu(e),fu=su(u),_u=i,pu=l;ou.hasNpmPackInPaths=function(u,D){try{return require.resolve(u,{paths:[...D]}),!0}catch(u){return!1}},ou.getNpmPath=function(){const u=process.execPath;return fu.join(fu.dirname(u),_u.NPM_TOOL)},ou.executeCommand=function(u,D,e){0!==(0,Bu.spawnSync)(u,D,e).status&&(0,pu.logErrorAndExit)(`Error: ${u} ${D} execute failed.See above for details.`)},ou.offlinePluginConversion=function(u,D){return D.startsWith("file:")||D.endsWith(".tgz")?fu.resolve(u,_u.HVIGOR,D.replace("file:","")):D},ou.isFileExists=function(u){return du.default.existsSync(u)&&du.default.statSync(u).isFile()};var Ou=n&&n.__createBinding||(Object.create?function(u,D,e,t){void 0===t&&(t=e);var r=Object.getOwnPropertyDescriptor(D,e);r&&!("get"in r?!D.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return D[e]}}),Object.defineProperty(u,t,r)}:function(u,D,e,t){void 0===t&&(t=e),u[t]=D[e]}),hu=n&&n.__setModuleDefault||(Object.create?function(u,D){Object.defineProperty(u,"default",{enumerable:!0,value:D})}:function(u,D){u.default=D}),Pu=n&&n.__importStar||function(u){if(u&&u.__esModule)return u;var D={};if(null!=u)for(var e in u)"default"!==e&&Object.prototype.hasOwnProperty.call(u,e)&&Ou(D,u,e);return hu(D,u),D},vu=n&&n.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(P,"__esModule",{value:!0});var gu=P.initProjectWorkSpace=void 0;const mu=Pu(e),Ru=vu(D),yu=Pu(u),Iu=v,Nu=i,bu=g,Su=l,wu=ou;let Hu,xu,Mu;function Tu(u,D,e){return void 0!==e.dependencies&&(0,wu.offlinePluginConversion)(Nu.HVIGOR_PROJECT_ROOT_DIR,D.dependencies[u])===yu.normalize(e.dependencies[u])}function Vu(){const u=yu.join(Mu,Nu.WORK_SPACE);if((0,Su.logInfoPrintConsole)("Hvigor cleaning..."),!mu.existsSync(u))return;const D=mu.readdirSync(u);if(!D||0===D.length)return;const e=yu.resolve(Mu,"node_modules","@ohos","hvigor","bin","hvigor.js");mu.existsSync(e)&&(0,wu.executeCommand)(process.argv[0],[e,"--stop-daemon"],{});try{D.forEach((D=>{mu.rmSync(yu.resolve(u,D),{recursive:!0})}))}catch(D){(0,Su.logErrorAndExit)(`The hvigor build tool cannot be installed. Please manually clear the workspace directory and synchronize the project again.\n\n Workspace Path: ${u}.`)}}gu=P.initProjectWorkSpace=function(){if(Hu=function(){const u=yu.resolve(Nu.HVIGOR_PROJECT_WRAPPER_HOME,Nu.DEFAULT_HVIGOR_CONFIG_JSON_FILE_NAME);mu.existsSync(u)||(0,Su.logErrorAndExit)(`Error: Hvigor config file ${u} does not exist.`);return(0,bu.parseJsonFile)(u)}(),Mu=function(u){let D;D=function(u){let D=u.hvigorVersion;if(D.startsWith("file:")||D.endsWith(".tgz"))return!1;const e=u.dependencies,t=Object.getOwnPropertyNames(e);for(const u of t){const D=e[u];if(D.startsWith("file:")||D.endsWith(".tgz"))return!1}if(1===t.length&&"@ohos/hvigor-ohos-plugin"===t[0])return D>"2.5.0";return!1}(u)?function(u){let D=`${Nu.HVIGOR_ENGINE_PACKAGE_NAME}@${u.hvigorVersion}`;const e=u.dependencies;if(e){Object.getOwnPropertyNames(e).sort().forEach((u=>{D+=`,${u}@${e[u]}`}))}return(0,Iu.hash)(D)}(u):(0,Iu.hash)(process.cwd());return yu.resolve(Ru.default.homedir(),".hvigor","project_caches",D)}(Hu),xu=function(){const u=yu.resolve(Mu,Nu.WORK_SPACE,Nu.DEFAULT_PACKAGE_JSON);return mu.existsSync(u)?(0,bu.parseJsonFile)(u):{dependencies:{}}}(),!(0,wu.hasNpmPackInPaths)(Nu.HVIGOR_ENGINE_PACKAGE_NAME,[yu.join(Mu,Nu.WORK_SPACE)])||(0,wu.offlinePluginConversion)(Nu.HVIGOR_PROJECT_ROOT_DIR,Hu.hvigorVersion)!==xu.dependencies[Nu.HVIGOR_ENGINE_PACKAGE_NAME]||!function(){function u(u){const D=null==u?void 0:u.dependencies;return void 0===D?0:Object.getOwnPropertyNames(D).length}const D=u(Hu),e=u(xu);if(D+1!==e)return!1;for(const u in null==Hu?void 0:Hu.dependencies)if(!(0,wu.hasNpmPackInPaths)(u,[yu.join(Mu,Nu.WORK_SPACE)])||!Tu(u,Hu,xu))return!1;return!0}()){Vu();try{!function(){(0,Su.logInfoPrintConsole)("Hvigor installing...");for(const u in Hu.dependencies)Hu.dependencies[u]&&(Hu.dependencies[u]=(0,wu.offlinePluginConversion)(Nu.HVIGOR_PROJECT_ROOT_DIR,Hu.dependencies[u]));const u={dependencies:{...Hu.dependencies}};u.dependencies[Nu.HVIGOR_ENGINE_PACKAGE_NAME]=(0,wu.offlinePluginConversion)(Nu.HVIGOR_PROJECT_ROOT_DIR,Hu.hvigorVersion);const D=yu.join(Mu,Nu.WORK_SPACE);try{mu.mkdirSync(D,{recursive:!0});const e=yu.resolve(D,Nu.DEFAULT_PACKAGE_JSON);mu.writeFileSync(e,JSON.stringify(u))}catch(u){(0,Su.logErrorAndExit)(u)}(function(){const u=["config","set","store-dir",Nu.HVIGOR_PNPM_STORE_PATH],D={cwd:yu.join(Mu,Nu.WORK_SPACE),stdio:["inherit","inherit","inherit"]};(0,wu.executeCommand)(Nu.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH,u,D)})(),function(){const u=["install"],D={cwd:yu.join(Mu,Nu.WORK_SPACE),stdio:["inherit","inherit","inherit"]};(0,wu.executeCommand)(Nu.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH,u,D)}(),(0,Su.logInfoPrintConsole)("Hvigor install success.")}()}catch(u){Vu()}}return Mu};var Gu={};!function(t){var C=n&&n.__createBinding||(Object.create?function(u,D,e,t){void 0===t&&(t=e);var r=Object.getOwnPropertyDescriptor(D,e);r&&!("get"in r?!D.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return D[e]}}),Object.defineProperty(u,t,r)}:function(u,D,e,t){void 0===t&&(t=e),u[t]=D[e]}),F=n&&n.__setModuleDefault||(Object.create?function(u,D){Object.defineProperty(u,"default",{enumerable:!0,value:D})}:function(u,D){u.default=D}),E=n&&n.__importStar||function(u){if(u&&u.__esModule)return u;var D={};if(null!=u)for(var e in u)"default"!==e&&Object.prototype.hasOwnProperty.call(u,e)&&C(D,u,e);return F(D,u),D},A=n&&n.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(t,"__esModule",{value:!0}),t.executeInstallPnpm=t.isPnpmInstalled=t.environmentHandler=t.checkNpmConifg=t.PNPM_VERSION=void 0;const o=r,a=E(e),c=A(D),s=E(u),B=i,d=l,f=ou;t.PNPM_VERSION="7.30.0",t.checkNpmConifg=function(){const u=s.resolve(B.HVIGOR_PROJECT_ROOT_DIR,".npmrc"),D=s.resolve(c.default.homedir(),".npmrc");if((0,f.isFileExists)(u)||(0,f.isFileExists)(D))return;const e=(0,f.getNpmPath)(),t=(0,o.spawnSync)(e,["config","get","prefix"],{cwd:B.HVIGOR_PROJECT_ROOT_DIR});if(0!==t.status||!t.stdout)return void(0,d.logErrorAndExit)("Error: The hvigor depends on the npmrc file. Configure the npmrc file first.");const r=s.resolve(`${t.stdout}`.replace(/[\r\n]/gi,""),".npmrc");(0,f.isFileExists)(r)||(0,d.logErrorAndExit)("Error: The hvigor depends on the npmrc file. Configure the npmrc file first.")},t.environmentHandler=function(){process.env["npm_config_update-notifier"]="false"},t.isPnpmInstalled=function(){return!!a.existsSync(B.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH)&&(0,f.hasNpmPackInPaths)("pnpm",[B.HVIGOR_WRAPPER_TOOLS_HOME])},t.executeInstallPnpm=function(){(0,d.logInfoPrintConsole)(`Installing pnpm@${t.PNPM_VERSION}...`);const u=(0,f.getNpmPath)();!function(){const u=s.resolve(B.HVIGOR_WRAPPER_TOOLS_HOME,B.DEFAULT_PACKAGE_JSON);try{a.existsSync(B.HVIGOR_WRAPPER_TOOLS_HOME)||a.mkdirSync(B.HVIGOR_WRAPPER_TOOLS_HOME,{recursive:!0});const D={dependencies:{}};D.dependencies[B.PNPM]=t.PNPM_VERSION,a.writeFileSync(u,JSON.stringify(D))}catch(D){(0,d.logErrorAndExit)(`Error: EPERM: operation not permitted,create ${u} failed.`)}}(),(0,f.executeCommand)(u,["install","pnpm"],{cwd:B.HVIGOR_WRAPPER_TOOLS_HOME,stdio:["inherit","inherit","inherit"],env:process.env}),(0,d.logInfoPrintConsole)("Pnpm install success.")}}(Gu),function(){Gu.checkNpmConifg(),Gu.environmentHandler(),Gu.isPnpmInstalled()||Gu.executeInstallPnpm();const D=gu();_(u.join(D,i.WORK_SPACE))}(); \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/oh-package-lock.json5 b/function/ui_compare_rh/uicompare/oh-package-lock.json5 new file mode 100644 index 0000000000000000000000000000000000000000..1faa6b99d48e66baa345e65d2fa943a546f91182 --- /dev/null +++ b/function/ui_compare_rh/uicompare/oh-package-lock.json5 @@ -0,0 +1,15 @@ +{ + "lockfileVersion": 2, + "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", + "specifiers": { + "@ohos/hypium@1.0.6": "@ohos/hypium@1.0.6" + }, + "packages": { + "@ohos/hypium@1.0.6": { + "resolved": "https://repo.harmonyos.com/ohpm/@ohos/hypium/-/hypium-1.0.6.tgz", + "integrity": "sha512-bb3DWeWhYrFqj9mPFV3yZQpkm36kbcK+YYaeY9g292QKSjOdmhEIQR2ULPvyMsgSR4usOBf5nnYrDmaCCXirgQ==", + "registryType": "ohpm", + "shasum": "3f5fed65372633233264b3447705b0831dfe7ea1" + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare_tools/excel/SelectDialog.xlsx b/function/ui_compare_rh/uicompare_tools/excel/SelectDialog.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..9a12091ad8101c50bb298046ceae5c9591f61548 Binary files /dev/null and b/function/ui_compare_rh/uicompare_tools/excel/SelectDialog.xlsx differ diff --git a/function/ui_compare_rh/uicompare_tools/run.bat b/function/ui_compare_rh/uicompare_tools/run.bat index 3fe200aa702522de563d3a9f63384ace127aca21..f9b0fce2659ef06f17b8c5b5c9f79980e1082fe3 100644 --- a/function/ui_compare_rh/uicompare_tools/run.bat +++ b/function/ui_compare_rh/uicompare_tools/run.bat @@ -15,6 +15,8 @@ echo * limitations under the License. echo */ echo. + +@ECHO OFF reg add HKEY_CURRENT_USER\Console /v QuickEdit /t REG_DWORD /d 00000000 /f echo "======使用说明======" echo "--type: 输入0:获取基线图,输入1:对比生成差异图,输入2:生成总html报告" @@ -22,11 +24,10 @@ echo "--excel: 用例数据的Excel所在文件夹路径(Excel仅支持xlsx格 echo "--dir: 基础图源文件夹所在路径(type=1时必填)" echo "--hap: 用例hap文件夹所在路径(必填)" echo "--json: 执行用例生成的 json文件所在文件夹路径(type=2时必填)" -echo "入参范例:--type0--excel D:\UI\All_Excel\--hap D:\UI\hap" +echo "入参范例:--type0--excel D:\UI\All_Excel\--hap D:\UI\hap" echo "入参范例:--type1--excel D:\UI\All_Excel\--dir D:\UI\BaseImages_20230504_174004 --hap D:\UI\hap" echo "入参范例:--type2--json D:\UI\run_json_20230810_163907\" -echo "温馨提示:执行用例前,请先确保已关闭上述路径中所有的Excel表,否则将会导致用例结果写入Excel后保存失败" -echo "======使用说明======" +echo "温馨提示:执行用例前,请先确保已关闭上述路径中所有的Excel表,否则将会导致用例结果写入Excel后保存失败" set /p param= 输入入参: @@ -35,3 +36,4 @@ set /p param= 输入入参: python UiCompareTools_progress.py %param% pause + diff --git "a/function/ui_compare_rh/uicompare_tools/\345\274\200\345\217\221\350\207\252\346\265\213\346\212\245\345\221\212/SelectDialog1115\350\207\252\346\265\213\346\212\245\345\221\212.html" "b/function/ui_compare_rh/uicompare_tools/\345\274\200\345\217\221\350\207\252\346\265\213\346\212\245\345\221\212/SelectDialog1115\350\207\252\346\265\213\346\212\245\345\221\212.html" new file mode 100644 index 0000000000000000000000000000000000000000..7a5601b93499e345a4b5cc8c37dbfacec79d8f25 --- /dev/null +++ "b/function/ui_compare_rh/uicompare_tools/\345\274\200\345\217\221\350\207\252\346\265\213\346\212\245\345\221\212/SelectDialog1115\350\207\252\346\265\213\346\212\245\345\221\212.html" @@ -0,0 +1,516 @@ + + + + + <!--{title_name}--> + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Test Summary
Platform:PhoneTest Type:Test
Device Name:7001005458*************e1c8933900 + Save Image Path:D:\project\UICompareRh\ostest_integration_test\function\ui_compare_rh\uicompare_tools\BaseImages_20241116_104546
Test Start/ End Time:2024-11-16 10:45:46/ 2024-11-16 11:17:23Execution Time:00:31:36
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
MOUDULESTOTAL_TESTSPASSCASE_FAILGET_FAILPASS_RATE
116116100100%
+ + + + + + + + + + + + + + + + + + + + + +
SelectDialog16116100100%
+ + + +
+ + + + \ No newline at end of file