diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/AceActionEventCommoneventClickInterfaceTest/AceActionEventCommoneventClickInterface.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/AceActionEventCommoneventClickInterfaceTest/AceActionEventCommoneventClickInterface.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..bab6d8a738f9bd542bbe7965413e0e89f2f31f07 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/AceActionEventCommoneventClickInterfaceTest/AceActionEventCommoneventClickInterface.test.ets @@ -0,0 +1,178 @@ +/* + * 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, ON ,PointerMatrix,MouseButton} from '@ohos.UiTest' + +export default function AceActionEventCommoneventClickInterface() { + + describe('AceActionEventCommoneventClickInterface', () => { + 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_ACTION_EVENT_COMMONEVENT_CLICK_INTERFACE_0010 + * @tc.name SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICK_INTERFACE_0010 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICK_INTERFACE_0010', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICK_INTERFACE_0010 start.`); + Settings.createWindow("testability/pages/AceActionEventCommoneventClickInterface/AceActionEventCommoneventClickInterface10"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionEventCommoneventClickInterface10')); + await button.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICK_INTERFACE_0010 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICK_INTERFACE_0020 + * @tc.name SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICK_INTERFACE_0020 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICK_INTERFACE_0020', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICK_INTERFACE_0020 start.`); + Settings.createWindow("testability/pages/AceActionEventCommoneventClickInterface/AceActionEventCommoneventClickInterface20"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionEventCommoneventClickInterface20')); + await button.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICK_INTERFACE_0020 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICK_INTERFACE_0030 + * @tc.name SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICK_INTERFACE_0030 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICK_INTERFACE_0030', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICK_INTERFACE_0030 start.`); + Settings.createWindow("testability/pages/AceActionEventCommoneventClickInterface/AceActionEventCommoneventClickInterface30"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionEventCommoneventClickInterface30')); + await button.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICK_INTERFACE_0030 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICK_INTERFACE_0040 + * @tc.name SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICK_INTERFACE_0040 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICK_INTERFACE_0040', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICK_INTERFACE_0040 start.`); + Settings.createWindow("testability/pages/AceActionEventCommoneventClickInterface/AceActionEventCommoneventClickInterface40"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionEventCommoneventClickInterface40')); + await button.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICK_INTERFACE_0040 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICK_INTERFACE_0060 + * @tc.name SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICK_INTERFACE_0060 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICK_INTERFACE_0060', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICK_INTERFACE_0060 start.`); + Settings.createWindow("testability/pages/AceActionEventCommoneventClickInterface/AceActionEventCommoneventClickInterface60"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionEventCommoneventClickInterface60')); + await button.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICK_INTERFACE_0060 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICK_INTERFACE_0090 + * @tc.name SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICK_INTERFACE_0090 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICK_INTERFACE_0090', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICK_INTERFACE_0090 start.`); + Settings.createWindow("testability/pages/AceActionEventCommoneventClickInterface/AceActionEventCommoneventClickInterface80"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('btn')); + await button.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICK_INTERFACE_0090 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICK_INTERFACE_0080 + */ + it('SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICK_INTERFACE_0080', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICK_INTERFACE_0080 start.`); + Settings.createWindow("testability/pages/AceActionEventCommoneventClickInterface/AceActionEventCommoneventClickInterface80"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('btn')); + await button.click(); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICK_INTERFACE_0080 finish.`); + done() + }) + + }) +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/AceActionEventCommoneventClickSpecificationTest/AceActionEventCommoneventClickSpecification.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/AceActionEventCommoneventClickSpecificationTest/AceActionEventCommoneventClickSpecification.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..db442b93f9dc855a9c639a61fdde88c6acfbe9bc --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/AceActionEventCommoneventClickSpecificationTest/AceActionEventCommoneventClickSpecification.test.ets @@ -0,0 +1,475 @@ +/* + * 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, ON ,PointerMatrix,MouseButton} from '@ohos.UiTest' + +export default function AceActionEventCommoneventClickSpecification() { + + describe('AceActionEventCommoneventClickSpecification', () => { + 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_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0010 + * @tc.name SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0010 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0010', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0010 start.`); + Settings.createWindow("testability/pages/AceActionEventCommoneventClickSpecification/AceActionEventCommoneventClickSpecification10"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionEventCommoneventClickSpecification10')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2,4); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y}); + pointers.setPoint(0,2,{x:center.x,y:center.y}); + pointers.setPoint(0,3,{x:center.x,y:center.y}); + pointers.setPoint(1,0,{x:center.x,y:center.y}); + pointers.setPoint(1,1,{x:center.x,y:center.y}); + pointers.setPoint(1,2,{x:center.x,y:center.y}); + pointers.setPoint(1,3,{x:center.x,y:center.y}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0010 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0020 + * @tc.name SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0020 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0020', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0020 start.`); + Settings.createWindow("testability/pages/AceActionEventCommoneventClickSpecification/AceActionEventCommoneventClickSpecification10"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionEventCommoneventClickSpecification10')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2,4); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y-50}); + pointers.setPoint(0,2,{x:center.x,y:center.y-70}); + pointers.setPoint(0,3,{x:center.x,y:center.y}); + pointers.setPoint(1,0,{x:center.x,y:center.y}); + pointers.setPoint(1,1,{x:center.x,y:center.y}); + pointers.setPoint(1,2,{x:center.x,y:center.y}); + pointers.setPoint(1,3,{x:center.x,y:center.y}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0020 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0030 + * @tc.name SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0030 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0030', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0030 start.`); + Settings.createWindow("testability/pages/AceActionEventCommoneventClickSpecification/AceActionEventCommoneventClickSpecification10"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionEventCommoneventClickSpecification10')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2,4); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y-50}); + pointers.setPoint(0,2,{x:center.x,y:center.y-70}); + pointers.setPoint(0,3,{x:center.x,y:center.y}); + pointers.setPoint(1,0,{x:center.x,y:center.y}); + pointers.setPoint(1,1,{x:center.x,y:center.y-50}); + pointers.setPoint(1,2,{x:center.x,y:center.y-70}); + pointers.setPoint(1,3,{x:center.x,y:center.y}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0030 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0040 + * @tc.name SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0040 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0040', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0040 start.`); + Settings.createWindow("testability/pages/AceActionEventCommoneventClickSpecification/AceActionEventCommoneventClickSpecification40"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionEventCommoneventClickSpecification40')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2,4); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y}); + pointers.setPoint(0,2,{x:center.x,y:center.y}); + pointers.setPoint(0,3,{x:center.x,y:center.y}); + pointers.setPoint(1,0,{x:center.x,y:center.y}); + pointers.setPoint(1,1,{x:center.x,y:center.y}); + pointers.setPoint(1,2,{x:center.x,y:center.y}); + pointers.setPoint(1,3,{x:center.x,y:center.y}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y}); + pointers.setPoint(0,2,{x:center.x,y:center.y}); + pointers.setPoint(0,3,{x:center.x,y:center.y}); + pointers.setPoint(1,0,{x:center.x,y:center.y}); + pointers.setPoint(1,1,{x:center.x,y:center.y}); + pointers.setPoint(1,2,{x:center.x,y:center.y}); + pointers.setPoint(1,3,{x:center.x,y:center.y}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0040 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0070 + * @tc.name SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0070 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0070', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0070 start.`); + Settings.createWindow("testability/pages/AceActionEventCommoneventClickSpecification/AceActionEventCommoneventClickSpecification40"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionEventCommoneventClickSpecification40')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2,4); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y}); + pointers.setPoint(0,2,{x:center.x,y:center.y}); + pointers.setPoint(0,3,{x:center.x,y:center.y}); + pointers.setPoint(1,0,{x:center.x,y:center.y}); + pointers.setPoint(1,1,{x:center.x,y:center.y}); + pointers.setPoint(1,2,{x:center.x,y:center.y}); + pointers.setPoint(1,3,{x:center.x,y:center.y}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y-50}); + pointers.setPoint(0,2,{x:center.x,y:center.y-70}); + pointers.setPoint(0,3,{x:center.x,y:center.y-80}); + pointers.setPoint(1,0,{x:center.x,y:center.y}); + pointers.setPoint(1,1,{x:center.x,y:center.y-50}); + pointers.setPoint(1,2,{x:center.x,y:center.y-70}); + pointers.setPoint(1,3,{x:center.x,y:center.y-80}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0070 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0060 + * @tc.name SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0060 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0060', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0060 start.`); + Settings.createWindow("testability/pages/AceActionEventCommoneventClickSpecification/AceActionEventCommoneventClickSpecification40"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionEventCommoneventClickSpecification40')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2,4); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y}); + pointers.setPoint(0,2,{x:center.x,y:center.y}); + pointers.setPoint(0,3,{x:center.x,y:center.y}); + pointers.setPoint(1,0,{x:center.x,y:center.y}); + pointers.setPoint(1,1,{x:center.x,y:center.y}); + pointers.setPoint(1,2,{x:center.x,y:center.y}); + pointers.setPoint(1,3,{x:center.x,y:center.y}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y-50}); + pointers.setPoint(0,2,{x:center.x,y:center.y-70}); + pointers.setPoint(0,3,{x:center.x,y:center.y}); + pointers.setPoint(1,0,{x:center.x,y:center.y}); + pointers.setPoint(1,1,{x:center.x,y:center.y-50}); + pointers.setPoint(1,2,{x:center.x,y:center.y-70}); + pointers.setPoint(1,3,{x:center.x,y:center.y}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0060 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0090 + * @tc.name SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0090 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0090', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0090 start.`); + Settings.createWindow("testability/pages/AceActionEventCommoneventClickSpecification/AceActionEventCommoneventClickSpecification90"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionEventCommoneventClickSpecification90')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,4); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y}); + pointers.setPoint(0,2,{x:center.x,y:center.y}); + pointers.setPoint(0,3,{x:center.x,y:center.y}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0090 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0100 + * @tc.name SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0100 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0100', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0100 start.`); + Settings.createWindow("testability/pages/AceActionEventCommoneventClickSpecification/AceActionEventCommoneventClickSpecification90"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionEventCommoneventClickSpecification90')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,4); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y-50}); + pointers.setPoint(0,2,{x:center.x,y:center.y-70}); + pointers.setPoint(0,3,{x:center.x,y:center.y}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0100 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0110 + * @tc.name SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0110 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0110', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0110 start.`); + Settings.createWindow("testability/pages/AceActionEventCommoneventClickSpecification/AceActionEventCommoneventClickSpecification90"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionEventCommoneventClickSpecification90')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,4); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y-50}); + pointers.setPoint(0,2,{x:center.x,y:center.y-70}); + pointers.setPoint(0,3,{x:center.x,y:center.y-80}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0110 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0140 + * @tc.name SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0140 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0140', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0140 start.`); + Settings.createWindow("testability/pages/AceActionEventCommoneventClickSpecification/AceActionEventCommoneventClickSpecification140"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionEventCommoneventClickSpecification140')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,4); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y}); + pointers.setPoint(0,2,{x:center.x,y:center.y}); + pointers.setPoint(0,3,{x:center.x,y:center.y}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y}); + pointers.setPoint(0,2,{x:center.x,y:center.y}); + pointers.setPoint(0,3,{x:center.x,y:center.y}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0140 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0160 + * @tc.name SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0160 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0160', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0160 start.`); + Settings.createWindow("testability/pages/AceActionEventCommoneventClickSpecification/AceActionEventCommoneventClickSpecification140"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionEventCommoneventClickSpecification140')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,4); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y}); + pointers.setPoint(0,2,{x:center.x,y:center.y}); + pointers.setPoint(0,3,{x:center.x,y:center.y}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y-50}); + pointers.setPoint(0,2,{x:center.x,y:center.y-70}); + pointers.setPoint(0,3,{x:center.x,y:center.y}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0160 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0170 + * @tc.name SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0170 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0170', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0170 start.`); + Settings.createWindow("testability/pages/AceActionEventCommoneventClickSpecification/AceActionEventCommoneventClickSpecification140"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionEventCommoneventClickSpecification140')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,4); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y}); + pointers.setPoint(0,2,{x:center.x,y:center.y}); + pointers.setPoint(0,3,{x:center.x,y:center.y}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y-50}); + pointers.setPoint(0,2,{x:center.x,y:center.y-70}); + pointers.setPoint(0,3,{x:center.x,y:center.y-80}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0170 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0080 + * @tc.name SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0080 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0080', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0080 start.`); + Settings.createWindow("testability/pages/AceActionEventCommoneventClickSpecification/AceActionEventCommoneventClickSpecification80"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionEventCommoneventClickSpecification80')); + await button.click(); + await Utils.sleep(2000); + let button2: Component = await driver.findComponent(ON.id('AceActionEventCommoneventClickSpecification80_1')); + await button2.click(); + await button2.click(); + await button2.click(); + await button2.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKSPECIFICATION_0080 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICK_SPECIFICATION_0120 + * @tc.name SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICK_SPECIFICATION_0120 + * @tc.desc + */ + it('SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICK_SPECIFICATION_0120', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICK_SPECIFICATION_0120 start.`); + Settings.createWindow("testability/pages/AceActionEventCommoneventClickSpecification/AceActionEventCommoneventClickSpecification0120") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionEventCommoneventClickSpecification0120_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1, 3) + + pointers.setPoint(0, 0, { + x: point.x + 100, y: point.y + 100 + }); + pointers.setPoint(0, 1, { + x: point.x + 100, y: point.y + 100 + }); + pointers.setPoint(0, 2, { + x: point.x + 100, y: point.y + 160 + }); + await driver.injectMultiPointerAction(pointers, 200); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICK_SPECIFICATION_0120 finish.`); + done(); + }) + }) +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/AceActionEventGetinspectorTreeTest/AceActionEventGetinspectorTree.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/AceActionEventGetinspectorTreeTest/AceActionEventGetinspectorTree.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..427e64ad72acc7e57448d48d21e946c17808614e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/AceActionEventGetinspectorTreeTest/AceActionEventGetinspectorTree.test.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 { 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, ON ,PointerMatrix,MouseButton} from '@ohos.UiTest' + +export default function AceActionEventGetinspectorTree() { + + describe('AceActionEventGetinspectorTree', () => { + 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_ACTION_EVENT_GETINSPECTOR_TREE_010 + * @tc.name SUB_ACE_ACTION_EVENT_GETINSPECTOR_TREE_010 + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_EVENT_GETINSPECTOR_TREE_010', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_GETINSPECTOR_TREE_010 start.`); + Settings.createWindow("testability/pages/AceActionEventGetinspectorTree/AceActionEventGetinspectorTree010"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_GETINSPECTOR_TREE_010 finish.`); + done() + }) + }) +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/AceActionGestureDisableInterfaceTest/AceActionGestureDisableInterface.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/AceActionGestureDisableInterfaceTest/AceActionGestureDisableInterface.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..367ee763ae5777102ed86c8bbbec6ef394397071 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/AceActionGestureDisableInterfaceTest/AceActionGestureDisableInterface.test.ets @@ -0,0 +1,622 @@ +/* + * 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, ON ,PointerMatrix,MouseButton} from '@ohos.UiTest' + +export default function AceActionGestureDisableInterface() { + + describe('AceActionGestureDisableInterface', () => { + 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_ACTION_GESTURE_DISABLE_INTERFACE_0010 + * @tc.name SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0010 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0010', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0010 start.`); + Settings.createWindow("testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface10"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button1: Component = await driver.findComponent(ON.id('AceActionGestureDisableInterface10_1')); + let button2: Component = await driver.findComponent(ON.id('AceActionGestureDisableInterface10_2')); + let button3: Component = await driver.findComponent(ON.id('AceActionGestureDisableInterface10_3')); + let info1 =await button1.getBoundsCenter(); + let info2 =await button2.getBoundsCenter(); + await driver.drag(info1.x,info1.y,info1.x+100,info1.y); + await driver.drag(info2.x,info2.y,info2.x+100,info2.y); + await button3.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0010 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0020 + * @tc.name SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0020 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0020', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0020 start.`); + Settings.createWindow("testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface20"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button1: Component = await driver.findComponent(ON.id('AceActionGestureDisableInterface20_1')); + let button2: Component = await driver.findComponent(ON.id('AceActionGestureDisableInterface20_2')); + let button3: Component = await driver.findComponent(ON.id('AceActionGestureDisableInterface20_3')); + let info1 =await button1.getBoundsCenter(); + let info2 =await button2.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2,4); + let pointers1: PointerMatrix = PointerMatrix.create(2,4); + pointers.setPoint(0,0,{x:info1.x,y:info1.y}); + pointers.setPoint(0,1,{x:info1.x-10,y:info1.y}); + pointers.setPoint(0,2,{x:info1.x-13,y:info1.y}); + pointers.setPoint(0,3,{x:info1.x-15,y:info1.y}); + pointers.setPoint(1,0,{x:info1.x+10,y:info1.y}); + pointers.setPoint(1,1,{x:info1.x+12,y:info1.y}); + pointers.setPoint(1,2,{x:info1.x+14,y:info1.y}); + pointers.setPoint(1,3,{x:info1.x+15,y:info1.y}); + await driver.injectMultiPointerAction(pointers); + pointers1.setPoint(0,0,{x:info2.x,y:info1.y}); + pointers1.setPoint(0,1,{x:info2.x-10,y:info2.y}); + pointers1.setPoint(0,2,{x:info2.x-13,y:info2.y}); + pointers1.setPoint(0,3,{x:info2.x-15,y:info2.y}); + pointers1.setPoint(1,0,{x:info2.x+10,y:info2.y}); + pointers1.setPoint(1,1,{x:info2.x+12,y:info2.y}); + pointers1.setPoint(1,2,{x:info2.x+14,y:info2.y}); + pointers1.setPoint(1,3,{x:info2.x+15,y:info2.y}); + await Utils.sleep(1000); + await driver.injectMultiPointerAction(pointers1); + await button3.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0020 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0030 + * @tc.name SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0030 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0030', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0030 start.`); + Settings.createWindow("testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface30"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button1: Component = await driver.findComponent(ON.id('AceActionGestureDisableInterface30_1')); + let button2: Component = await driver.findComponent(ON.id('AceActionGestureDisableInterface30_2')); + let button3: Component = await driver.findComponent(ON.id('AceActionGestureDisableInterface30_3')); + let info1 =await button1.getBoundsCenter(); + let info =await button2.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2,4); + let pointers1: PointerMatrix = PointerMatrix.create(2,4); + pointers.setPoint(0,0,{x:info1.x,y:info1.y-25}); + pointers.setPoint(0,1,{x:info1.x-10,y:info1.y-20}); + pointers.setPoint(0,2,{x:info1.x-13,y:info1.y-15}); + pointers.setPoint(0,3,{x:info1.x-15,y:info1.y-10}); + pointers.setPoint(1,0,{x:info1.x,y:info1.y+25}); + pointers.setPoint(1,1,{x:info1.x+12,y:info1.y+20}); + pointers.setPoint(1,2,{x:info1.x+14,y:info1.y+15}); + pointers.setPoint(1,3,{x:info1.x+15,y:info1.y+10}); + await driver.injectMultiPointerAction(pointers); + pointers1.setPoint(0,0,{x:info.x,y:info.y-25}); + pointers1.setPoint(0,1,{x:info.x-10,y:info.y-20}); + pointers1.setPoint(0,2,{x:info.x-13,y:info.y-15}); + pointers1.setPoint(0,3,{x:info.x-15,y:info.y-10}); + pointers1.setPoint(1,0,{x:info.x,y:info.y+25}); + pointers1.setPoint(1,1,{x:info.x+12,y:info.y+20}); + pointers1.setPoint(1,2,{x:info.x+14,y:info.y+15}); + pointers1.setPoint(1,3,{x:info.x+15,y:info.y+10}); + await Utils.sleep(1000); + await driver.injectMultiPointerAction(pointers1); + await button3.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0030 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0040 + * @tc.name SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0040 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0040', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0040 start.`); + Settings.createWindow("testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface40"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button1: Component = await driver.findComponent(ON.id('AceActionGestureDisableInterface40_1')); + let button2: Component = await driver.findComponent(ON.id('AceActionGestureDisableInterface40_2')); + await button1.click(); + await button2.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0040 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0060 + * @tc.name SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0060 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0060', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0060 start.`); + Settings.createWindow("testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface60"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button1: Component = await driver.findComponent(ON.id('AceActionGestureDisableInterface60_1')); + let button2: Component = await driver.findComponent(ON.id('AceActionGestureDisableInterface60_2')); + await button1.longClick(); + await button2.longClick(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0060 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0070 + * @tc.name SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0070 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0070', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0070 start.`); + Settings.createWindow("testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface70"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button1: Component = await driver.findComponent(ON.id('AceActionGestureDisableInterface70_1')); + let button2: Component = await driver.findComponent(ON.id('AceActionGestureDisableInterface70_2')); + await button1.click(); + await button2.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0070 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0080 + * @tc.name SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0080 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0080', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0080 start.`); + Settings.createWindow("testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface80"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button1: Component = await driver.findComponent(ON.id('AceActionGestureDisableInterface80_1')); + let button2: Component = await driver.findComponent(ON.id('AceActionGestureDisableInterface80_2')); + let column: Component = await driver.findComponent(ON.id('AceActionGestureDisableInterface80_3')); + await button1.dragTo(column); + await button2.dragTo(column); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0080 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0090 + * @tc.name SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0090 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0090', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0090 start.`); + Settings.createWindow("testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface90"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button1: Component = await driver.findComponent(ON.id('AceActionGestureDisableInterface90_1')); + let button2: Component = await driver.findComponent(ON.id('AceActionGestureDisableInterface90_2')); + await button1.click(); + await button2.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0090 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0100 + * @tc.name SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0100 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0100', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0100 start.`); + Settings.createWindow("testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface100"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let menu: Component = await driver.findComponent(ON.id('AceActionGestureDisableInterface100_1')); + let button: Component = await driver.findComponent(ON.id('AceActionGestureDisableInterface100_2')); + await menu.longClick(); + driver.triggerKey(2049); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0100 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0110 + * @tc.name SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0110 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0110', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0110 start.`); + Settings.createWindow("testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface110"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button1: Component = await driver.findComponent(ON.id('AceActionGestureDisableInterface110_1')); + let button2: Component = await driver.findComponent(ON.id('AceActionGestureDisableInterface110_2')); + driver.triggerKey(2049); + driver.triggerKey(2013); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0110 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0130 + * @tc.name SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0130 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0130', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0130 start.`); + Settings.createWindow("testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface130"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let menu: Component = await driver.findComponent(ON.id('AceActionGestureDisableInterface130_1')); + await menu.longClick(); + await Utils.sleep(1000); + let button: Component = await driver.findComponent(ON.id('AceActionGestureDisableInterface130_2')); + await button.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0130 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0140 + * @tc.name SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0140 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0140', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0140 start.`); + Settings.createWindow("testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface140"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button1: Component = await driver.findComponent(ON.id('AceActionGestureDisableInterface140_1')); + let button2: Component = await driver.findComponent(ON.id('AceActionGestureDisableInterface140_2')); + await button1.click(); + await button2.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0140 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0150 + * @tc.name SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0150 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0150', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0150 start.`); + Settings.createWindow("testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface150"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let menu: Component = await driver.findComponent(ON.id('AceActionGestureDisableInterface150_1')); + await menu.longClick(); + await Utils.sleep(1000); + driver.triggerKey(2049); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0150 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0160 + * @tc.name SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0160 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0160', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0160 start.`); + Settings.createWindow("testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface160"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button1: Component = await driver.findComponent(ON.id('AceActionGestureDisableInterface110_1')); + let button2: Component = await driver.findComponent(ON.id('AceActionGestureDisableInterface110_2')); + driver.triggerKey(2049); + await Utils.sleep(1000); + driver.triggerKey(2013); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0110 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0170 + * @tc.name SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0170 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0170', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0170 start.`); + Settings.createWindow("testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface170"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('AceActionGestureDisableInterface170')); + let info =await scroll.getBoundsCenter(); + await driver.drag(info.x,info.y+200,info.x,info.y-200,20000) + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0170 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0180 + * @tc.name SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0180 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0180', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0180 start.`); + Settings.createWindow("testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface180"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button1: Component = await driver.findComponent(ON.id('AceActionGestureDisableInterface180_1')); + let button2: Component = await driver.findComponent(ON.id('AceActionGestureDisableInterface110_2')); + driver.triggerKey(2094); + await Utils.sleep(1000); + driver.triggerKey(2092); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0180 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0190 + * @tc.name SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0190 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0190', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0190 start.`); + Settings.createWindow("testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface190"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let menu: Component = await driver.findComponent(ON.id('AceActionGestureDisableInterface190_1')); + await menu.longClick(); + await Utils.sleep(1000); + let button: Component = await driver.findComponent(ON.id('AceActionGestureDisableInterface190_2')); + await button.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0190 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0200 + * @tc.name SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0200 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0200', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0200 start.`); + Settings.createWindow("testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface200"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button1: Component = await driver.findComponent(ON.id('AceActionGestureDisableInterface200_1')); + let button2: Component = await driver.findComponent(ON.id('AceActionGestureDisableInterface200_2')); + await button1.click(); + await button2.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0200 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0230 + * @tc.name SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0230 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0230', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0230 start.`); + Settings.createWindow("testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface230"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let menu: Component = await driver.findComponent(ON.id('AceActionGestureDisableInterface230_1')); + await menu.longClick(); + await Utils.sleep(1000); + let button: Component = await driver.findComponent(ON.id('AceActionGestureDisableInterface230_2')); + let info =await button.getBoundsCenter(); + await driver.mouseClick({x:info.x, y:info.y}, MouseButton.MOUSE_BUTTON_LEFT); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0230 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0240 + * @tc.name SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0240 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0240', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0200 start.`); + Settings.createWindow("testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface240"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button1: Component = await driver.findComponent(ON.id('AceActionGestureDisableInterface240_1')); + let button2: Component = await driver.findComponent(ON.id('AceActionGestureDisableInterface240_2')); + let info1 =await button1.getBoundsCenter(); + await driver.mouseClick({x:info1.x, y:info1.y}, MouseButton.MOUSE_BUTTON_LEFT); + await Utils.sleep(2000); + let info2 =await button2.getBoundsCenter(); + await driver.mouseClick({x:info2.x, y:info2.y}, MouseButton.MOUSE_BUTTON_LEFT); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0240 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0050 + * @tc.name SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0050 + */ + it('SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0050', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0040 start.`); + Settings.createWindow("testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface50"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button1: Component = await driver.findComponent(ON.id('AceActionGestureDisableInterface50_1')); + let button2: Component = await driver.findComponent(ON.id('AceActionGestureDisableInterface50_2')); + await button1.click(); + await button2.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0050 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0120 + */ + it('SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0120', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0120 start.`); + Settings.createWindow("testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface0120"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button1: Component = await driver.findComponent(ON.id('btn1')); + let button2: Component = await driver.findComponent(ON.id('btn2')); + await button1.click() + await Utils.sleep(1000); + await button2.click() + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0120 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0210 + */ + it('SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0210', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0210 start.`); + Settings.createWindow("testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface0210"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button1: Component = await driver.findComponent(ON.id('btn1')); + let button2: Component = await driver.findComponent(ON.id('btn2')); + await button2.click() + await Utils.sleep(800); + await button1.click() + await Utils.sleep(800); + await button2.click() + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0210 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0220 + */ + it('SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0220', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0220 start.`); + Settings.createWindow("testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface0220"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button1: Component = await driver.findComponent(ON.id('btn1')); + let button2: Component = await driver.findComponent(ON.id('btn2')); + await button2.click() + await Utils.sleep(800); + await button1.click() + await Utils.sleep(800); + await button2.click() + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_DISABLE_INTERFACE_0220 finish.`); + done() + }) + }) +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/AceActionGestureEventEnhancementTest/AceActionGestureEventEnhancement.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/AceActionGestureEventEnhancementTest/AceActionGestureEventEnhancement.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..e9caf83479c1b7d205c717ce3984519b12e89366 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/AceActionGestureEventEnhancementTest/AceActionGestureEventEnhancement.test.ets @@ -0,0 +1,629 @@ +/* + * 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, ON ,PointerMatrix,MouseButton} from '@ohos.UiTest' + +export default function AceActionGestureEventEnhancement() { + + describe('AceActionGestureEventEnhancement', () => { + 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_ACTION_GESTURE_EVENT_ENHANCEMENT_0170 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0170 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0170', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0170 start.`); + Settings.createWindow("testability/pages/AceActionGestureEventEnhancement/AceActionGestureEventEnhancement180"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let text: Component = await driver.findComponent(ON.id('AceActionGestureEventEnhancement180')); + await text.longClick(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0170 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0160 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0160 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0160', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0160 start.`); + Settings.createWindow("testability/pages/AceActionGestureEventEnhancement/AceActionGestureEventEnhancement180"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let text: Component = await driver.findComponent(ON.id('AceActionGestureEventEnhancement180')); + await text.longClick(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0160 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0180 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0180 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0180', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0180 start.`); + Settings.createWindow("testability/pages/AceActionGestureEventEnhancement/AceActionGestureEventEnhancement180"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let text: Component = await driver.findComponent(ON.id('AceActionGestureEventEnhancement180')); + let center = await text.getBoundsCenter(); + await driver.mouseLongClick({x:center.x,y:center.y},MouseButton.MOUSE_BUTTON_LEFT); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0180 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0060 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0060 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0060', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0060 start.`); + Settings.createWindow("testability/pages/AceActionGestureEventEnhancement/AceActionGestureEventEnhancement60"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let text: Component = await driver.findComponent(ON.id('AceActionGestureEventEnhancement60')); + let button: Component = await driver.findComponent(ON.id('AceActionGestureEventEnhancement60_1')); + let center = await text.getBoundsCenter(); + await driver.drag(center.x,center.y,center.x+100,center.y); + await Utils.sleep(2000); + await button.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0060 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0070 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0070 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0070', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0070 start.`); + Settings.createWindow("testability/pages/AceActionGestureEventEnhancement/AceActionGestureEventEnhancement60"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let text: Component = await driver.findComponent(ON.id('AceActionGestureEventEnhancement60')); + let button: Component = await driver.findComponent(ON.id('AceActionGestureEventEnhancement60_1')); + let center = await text.getBoundsCenter(); + await driver.mouseDrag({x: center.x, y:center.y},{x: center.x+100, y:center.y}); + await button.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0070 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0080 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0080 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0080', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0080 start.`); + Settings.createWindow("testability/pages/AceActionGestureEventEnhancement/AceActionGestureEventEnhancement60"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let text: Component = await driver.findComponent(ON.id('AceActionGestureEventEnhancement60')); + let button: Component = await driver.findComponent(ON.id('AceActionGestureEventEnhancement60_1')); + let center = await text.getBoundsCenter(); + await driver.mouseDrag({x: center.x, y:center.y},{x: center.x+100, y:center.y}); + await button.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0080 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0190 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0190 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0190', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0190 start.`); + Settings.createWindow("testability/pages/AceActionGestureEventEnhancement/AceActionGestureEventEnhancement200"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let text: Component = await driver.findComponent(ON.id('AceActionGestureEventEnhancement200')); + let button: Component = await driver.findComponent(ON.id('AceActionGestureEventEnhancement200_1')); + let center = await text.getBoundsCenter(); + await driver.swipe(center.x,center.y,center.x,center.y-100); + await button.click(); + await Utils.sleep(3500); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0190 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0200 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0200 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0200', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0200 start.`); + Settings.createWindow("testability/pages/AceActionGestureEventEnhancement/AceActionGestureEventEnhancement200"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let text: Component = await driver.findComponent(ON.id('AceActionGestureEventEnhancement200')); + let button: Component = await driver.findComponent(ON.id('AceActionGestureEventEnhancement200_1')); + let center = await text.getBoundsCenter(); + await driver.swipe(center.x,center.y,center.x,center.y-100); + await button.click(); + await Utils.sleep(3500); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0200 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0210 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0210 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0210', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0210 start.`); + Settings.createWindow("testability/pages/AceActionGestureEventEnhancement/AceActionGestureEventEnhancement200"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let text: Component = await driver.findComponent(ON.id('AceActionGestureEventEnhancement200')); + let center = await text.getBoundsCenter(); + await driver.mouseDrag({x: center.x, y:center.y},{x: center.x, y:center.y-100}); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0210 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0130 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0130 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0130', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0130 start.`); + Settings.createWindow("testability/pages/AceActionGestureEventEnhancement/AceActionGestureEventEnhancement140"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let text: Component = await driver.findComponent(ON.id('AceActionGestureEventEnhancement140')); + await text.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0130 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0140 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0140 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0140', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0140 start.`); + Settings.createWindow("testability/pages/AceActionGestureEventEnhancement/AceActionGestureEventEnhancement140"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let text: Component = await driver.findComponent(ON.id('AceActionGestureEventEnhancement140')); + await text.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0140 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0150 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0150 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0150', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0150 start.`); + Settings.createWindow("testability/pages/AceActionGestureEventEnhancement/AceActionGestureEventEnhancement140"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let text: Component = await driver.findComponent(ON.id('AceActionGestureEventEnhancement140')); + let center = await text.getBoundsCenter(); + await driver.mouseClick({x:center.x,y:center.y},MouseButton.MOUSE_BUTTON_LEFT); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0150 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0090 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0090 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0090', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0090 start.`); + Settings.createWindow("testability/pages/AceActionGestureEventEnhancement/AceActionGestureEventEnhancement100"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let text: Component = await driver.findComponent(ON.id('AceActionGestureEventEnhancement100')); + let button: Component = await driver.findComponent(ON.id('AceActionGestureEventEnhancement100_1')); + let center = await text.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2,4); + pointers.setPoint(0,0,{x:center.x,y:center.y-110}); + pointers.setPoint(0,1,{x:center.x,y:center.y-120}); + pointers.setPoint(0,2,{x:center.x,y:center.y-130}); + pointers.setPoint(0,3,{x:center.x,y:center.y-140}); + pointers.setPoint(1,0,{x:center.x,y:center.y+110}); + pointers.setPoint(1,1,{x:center.x,y:center.y+120}); + pointers.setPoint(1,2,{x:center.x,y:center.y+130}); + pointers.setPoint(1,3,{x:center.x,y:center.y+140}); + await driver.injectMultiPointerAction(pointers); + await button.click(); + await Utils.sleep(3500); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0090 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0100 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0100 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0100', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0100 start.`); + Settings.createWindow("testability/pages/AceActionGestureEventEnhancement/AceActionGestureEventEnhancement100"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let text: Component = await driver.findComponent(ON.id('AceActionGestureEventEnhancement100')); + let button: Component = await driver.findComponent(ON.id('AceActionGestureEventEnhancement100_1')); + let center = await text.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2,4); + pointers.setPoint(0,0,{x:center.x,y:center.y-110}); + pointers.setPoint(0,1,{x:center.x,y:center.y-120}); + pointers.setPoint(0,2,{x:center.x,y:center.y-130}); + pointers.setPoint(0,3,{x:center.x,y:center.y-140}); + pointers.setPoint(1,0,{x:center.x,y:center.y+110}); + pointers.setPoint(1,1,{x:center.x,y:center.y+120}); + pointers.setPoint(1,2,{x:center.x,y:center.y+130}); + pointers.setPoint(1,3,{x:center.x,y:center.y+140}); + await driver.injectMultiPointerAction(pointers); + await button.click(); + await Utils.sleep(3500); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0100 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0120 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0120 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0120', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0120 start.`); + Settings.createWindow("testability/pages/AceActionGestureEventEnhancement/AceActionGestureEventEnhancement120"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let text: Component = await driver.findComponent(ON.id('AceActionGestureEventEnhancement120')); + let button: Component = await driver.findComponent(ON.id('AceActionGestureEventEnhancement120_1')); + let center = await text.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2,8); + pointers.setPoint(0,0,{x:center.x+10,y:center.y-110}); + pointers.setPoint(0,1,{x:center.x+120,y:center.y-120}); + pointers.setPoint(0,2,{x:center.x+130,y:center.y-130}); + pointers.setPoint(0,3,{x:center.x+140,y:center.y-140}); + pointers.setPoint(0,4,{x:center.x+150,y:center.y-150}); + pointers.setPoint(0,5,{x:center.x+160,y:center.y-160}); + pointers.setPoint(0,6,{x:center.x+170,y:center.y-170}); + pointers.setPoint(0,7,{x:center.x+180,y:center.y-180}); + pointers.setPoint(1,0,{x:center.x-110,y:center.y+110}); + pointers.setPoint(1,1,{x:center.x-120,y:center.y+120}); + pointers.setPoint(1,2,{x:center.x-130,y:center.y+130}); + pointers.setPoint(1,3,{x:center.x-140,y:center.y+140}); + pointers.setPoint(1,4,{x:center.x-150,y:center.y+150}); + pointers.setPoint(1,5,{x:center.x-160,y:center.y+160}); + pointers.setPoint(1,6,{x:center.x-170,y:center.y+170}); + pointers.setPoint(1,7,{x:center.x-180,y:center.y+180}); + await driver.injectMultiPointerAction(pointers); + await button.click(); + await Utils.sleep(3500); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0120 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0110 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0110 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0110', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0110 start.`); + Settings.createWindow("testability/pages/AceActionGestureEventEnhancement/AceActionGestureEventEnhancement120"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let text: Component = await driver.findComponent(ON.id('AceActionGestureEventEnhancement120')); + let button: Component = await driver.findComponent(ON.id('AceActionGestureEventEnhancement120_1')); + let center = await text.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2,8); + pointers.setPoint(0,0,{x:center.x+10,y:center.y-110}); + pointers.setPoint(0,1,{x:center.x+120,y:center.y-120}); + pointers.setPoint(0,2,{x:center.x+130,y:center.y-130}); + pointers.setPoint(0,3,{x:center.x+140,y:center.y-140}); + pointers.setPoint(0,4,{x:center.x+150,y:center.y-150}); + pointers.setPoint(0,5,{x:center.x+160,y:center.y-160}); + pointers.setPoint(0,6,{x:center.x+170,y:center.y-170}); + pointers.setPoint(0,7,{x:center.x+180,y:center.y-180}); + pointers.setPoint(1,0,{x:center.x-110,y:center.y+110}); + pointers.setPoint(1,1,{x:center.x-120,y:center.y+120}); + pointers.setPoint(1,2,{x:center.x-130,y:center.y+130}); + pointers.setPoint(1,3,{x:center.x-140,y:center.y+140}); + pointers.setPoint(1,4,{x:center.x-150,y:center.y+150}); + pointers.setPoint(1,5,{x:center.x-160,y:center.y+160}); + pointers.setPoint(1,6,{x:center.x-170,y:center.y+170}); + pointers.setPoint(1,7,{x:center.x-180,y:center.y+180}); + await driver.injectMultiPointerAction(pointers); + await button.click(); + await Utils.sleep(3500); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0110 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0030 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0030 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0030', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0030 start.`); + Settings.createWindow("testability/pages/AceActionGestureEventEnhancement/AceActionGestureEventEnhancement20"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let text: Component = await driver.findComponent(ON.id('AceActionGestureEventEnhancement20')); + await text.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0030 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0040 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0040 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0040', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0040 start.`); + Settings.createWindow("testability/pages/AceActionGestureEventEnhancement/AceActionGestureEventEnhancement20"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let text: Component = await driver.findComponent(ON.id('AceActionGestureEventEnhancement20')); + await text.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0040 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0020 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0020 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0020', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0020 start.`); + Settings.createWindow("testability/pages/AceActionGestureEventEnhancement/AceActionGestureEventEnhancement20"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let text: Component = await driver.findComponent(ON.id('AceActionGestureEventEnhancement20')); + let center = await text.getBoundsCenter(); + await driver.mouseClick({x:center.x,y:center.y},MouseButton.MOUSE_BUTTON_LEFT); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0020 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0050 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0050 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0050', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0050 start.`); + Settings.createWindow("testability/pages/AceActionGestureEventEnhancement/AceActionGestureEventEnhancement20"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let text: Component = await driver.findComponent(ON.id('AceActionGestureEventEnhancement20')); + await text.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0050 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0230 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0230 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0230', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0230 start.`); + Settings.createWindow("testability/pages/AceActionGestureEventEnhancement/AceActionGestureEventEnhancement230"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let text: Component = await driver.findComponent(ON.id('AceActionGestureEventEnhancement230')); + await text.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0230 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0220 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0220 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0220', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0220 start.`); + Settings.createWindow("testability/pages/AceActionGestureEventEnhancement/AceActionGestureEventEnhancement230"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let text: Component = await driver.findComponent(ON.id('AceActionGestureEventEnhancement230')); + let center = await text.getBoundsCenter(); + await driver.mouseMoveTo({x:center.x,y:center.y}); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0220 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0240 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0240 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0240', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0240 start.`); + Settings.createWindow("testability/pages/AceActionGestureEventEnhancement/AceActionGestureEventEnhancement230"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let text: Component = await driver.findComponent(ON.id('AceActionGestureEventEnhancement230')); + let center = await text.getBoundsCenter(); + await driver.mouseMoveTo({x:center.x,y:center.y}); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0240 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0260 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0260 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0260', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0260 start.`); + Settings.createWindow("testability/pages/AceActionGestureEventEnhancement/AceActionGestureEventEnhancement260"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let text: Component = await driver.findComponent(ON.id('AceActionGestureEventEnhancement260')); + let center = await text.getBoundsCenter(); + await driver.mouseMoveTo({x:center.x,y:center.y}); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0260 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0250 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0250 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0250', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0250 start.`); + Settings.createWindow("testability/pages/AceActionGestureEventEnhancement/AceActionGestureEventEnhancement260"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let text: Component = await driver.findComponent(ON.id('AceActionGestureEventEnhancement260')); + let center = await text.getBoundsCenter(); + await driver.mouseMoveTo({x:center.x,y:center.y}); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_ENHANCEMENT_0250 finish.`); + done() + }) + + }) +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/AceActionGestureGesturegroupInterfaceTest/AceActionGestureGesturegroupInterface.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/AceActionGestureGesturegroupInterfaceTest/AceActionGestureGesturegroupInterface.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..b22a2f9662844bd1bdcb451c9951425fd57efec7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/AceActionGestureGesturegroupInterfaceTest/AceActionGestureGesturegroupInterface.test.ets @@ -0,0 +1,1234 @@ +/* + * 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, ON ,PointerMatrix,MouseButton} from '@ohos.UiTest' + +export default function AceActionGestureGesturegroupInterface() { + + describe('AceActionGestureGesturegroupInterface', () => { + 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_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0110 + * @tc.name SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0110 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0110', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0110 start.`); + Settings.createWindow("testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface110"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionGestureGesturegroupInterface110')); + await button.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0110 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0120 + * @tc.name SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0120 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0120', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0120 start.`); + Settings.createWindow("testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface110"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionGestureGesturegroupInterface110')); + await button.longClick(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0120 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0130 + * @tc.name SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0130 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0130', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0130 start.`); + Settings.createWindow("testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface130"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionGestureGesturegroupInterface130')); + await button.longClick(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0130 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0140 + * @tc.name SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0140 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0140', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0140 start.`); + Settings.createWindow("testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface140"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionGestureGesturegroupInterface140')); + await button.longClick(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0140 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0160 + * @tc.name SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0160 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0160', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0160 start.`); + Settings.createWindow("testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface160"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionGestureGesturegroupInterface160')); + await button.longClick(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0160 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0170 + * @tc.name SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0170 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0170', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0170 start.`); + Settings.createWindow("testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface170"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionGestureGesturegroupInterface170')); + await button.longClick(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0170 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0180 + * @tc.name SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0180 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0180', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0180 start.`); + Settings.createWindow("testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface180"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionGestureGesturegroupInterface180')); + await button.doubleClick(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0180 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0150 + * @tc.name SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0150 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0150', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0150 start.`); + Settings.createWindow("testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface150"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionGestureGesturegroupInterface150')); + let center = await button.getBoundsCenter(); + await driver.swipe(center.x,center.y,center.x-50,center.y) + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0150 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0190 + * @tc.name SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0190 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0190', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0190 start.`); + Settings.createWindow("testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface190"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionGestureGesturegroupInterface190_1')); + let button2: Component = await driver.findComponent(ON.id('AceActionGestureGesturegroupInterface190_3')); + let center = await button.getBoundsCenter(); + await driver.swipe(center.x,center.y,center.x-100,center.y) + await button2.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0190 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0200 + * @tc.name SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0200 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0200', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0200 start.`); + Settings.createWindow("testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface190"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionGestureGesturegroupInterface190_2')); + let button2: Component = await driver.findComponent(ON.id('AceActionGestureGesturegroupInterface190_3')); + let center = await button.getBoundsCenter(); + await driver.swipe(center.x,center.y,center.x-100,center.y) + await button2.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0200 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0210 + * @tc.name SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0210 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0210', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0210 start.`); + Settings.createWindow("testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface210"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionGestureGesturegroupInterface210')); + await button.doubleClick(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0210 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0220 + * @tc.name SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0220 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0220', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0220 start.`); + Settings.createWindow("testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface210"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionGestureGesturegroupInterface210')); + await button.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0220 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0230 + * @tc.name SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0230 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0230', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0230 start.`); + Settings.createWindow("testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface230"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionGestureGesturegroupInterface230')); + await button.longClick(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0230 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0240 + * @tc.name SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0240 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0240', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0240 start.`); + Settings.createWindow("testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface230"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionGestureGesturegroupInterface230')); + let center = await button.getBoundsCenter(); + await driver.longClick(center.x,center.y-100); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0240 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0250 + * @tc.name SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0250 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0250', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0250 start.`); + Settings.createWindow("testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface250"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionGestureGesturegroupInterface250')); + await button.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0250 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0260 + * @tc.name SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0260 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0260', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0260 start.`); + Settings.createWindow("testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface250"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionGestureGesturegroupInterface250')); + await button.longClick(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0260 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0270 + * @tc.name SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0270 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0270', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0270 start.`); + Settings.createWindow("testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface250"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionGestureGesturegroupInterface250')); + let center = await button.getBoundsCenter(); + await driver.longClick(center.x,center.y-100); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0270 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0280 + * @tc.name SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0280 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0280', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0280 start.`); + Settings.createWindow("testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface280"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionGestureGesturegroupInterface280')); + await button.longClick(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0280 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0290 + * @tc.name SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0290 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0290', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0290 start.`); + Settings.createWindow("testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface280"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionGestureGesturegroupInterface280')); + let center = await button.getBoundsCenter(); + await driver.longClick(center.x,center.y-100); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0290 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0300 + * @tc.name SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0300 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0300', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0300 start.`); + Settings.createWindow("testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface300"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionGestureGesturegroupInterface300')); + await button.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0300 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0310 + * @tc.name SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0310 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0310', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0310 start.`); + Settings.createWindow("testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface300"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionGestureGesturegroupInterface300')); + await button.longClick(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0310 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0320 + * @tc.name SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0320 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0320', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0320 start.`); + Settings.createWindow("testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface300"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionGestureGesturegroupInterface300')); + let center = await button.getBoundsCenter(); + await driver.longClick(center.x,center.y-100); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0320 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0050 + * @tc.name SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0050 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0050', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0050 start.`); + Settings.createWindow("testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface50"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionGestureGesturegroupInterface50')); + await button.longClick(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0050 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0060 + * @tc.name SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0060 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0060', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0060 start.`); + Settings.createWindow("testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface50"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionGestureGesturegroupInterface50')); + let center = await button.getBoundsCenter(); + await driver.longClick(center.x,center.y-100); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0060 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0070 + * @tc.name SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0070 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0070', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0070 start.`); + Settings.createWindow("testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface70"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionGestureGesturegroupInterface70')); + await button.longClick(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0070 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0090 + * @tc.name SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0090 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0090', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0090 start.`); + Settings.createWindow("testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface90"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionGestureGesturegroupInterface90')); + let center = await button.getBoundsCenter(); + await driver.longClick(center.x,center.y-100); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0090 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0100 + * @tc.name SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0100 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0100', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0100 start.`); + Settings.createWindow("testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface90"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionGestureGesturegroupInterface90')); + await button.longClick(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0100 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0080 + * @tc.name SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0080 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0080', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0080 start.`); + Settings.createWindow("testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface70"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionGestureGesturegroupInterface70')); + let center = await button.getBoundsCenter(); + await driver.longClick(center.x,center.y-100); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0080 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0560 + * @tc.name SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0560 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0560', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0560 start.`); + Settings.createWindow("testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface560"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionGestureGesturegroupInterface560')); + let button1: Component = await driver.findComponent(ON.id('AceActionGestureGesturegroupInterface560_1')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 6); + pointers.setPoint(0, 0, {x: point.x-20, y: point.y+20}); + pointers.setPoint(0, 1, {x: point.x-20, y: point.y+10}); + pointers.setPoint(0, 2, {x: point.x-20, y: point.y}); + pointers.setPoint(0, 3, {x: point.x-20, y: point.y}); + pointers.setPoint(0, 4, {x: point.x-10, y: point.y}); + pointers.setPoint(0, 5, {x: point.x, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 20, y: point.y+20}); + pointers.setPoint(1, 1, {x: point.x + 20, y: point.y+10}); + pointers.setPoint(1, 2, {x: point.x + 20, y: point.y}); + pointers.setPoint(1, 3, {x: point.x + 20, y: point.y}); + pointers.setPoint(1, 4, {x: point.x + 10, y: point.y}); + pointers.setPoint(1, 5, {x: point.x , y: point.y}); + await driver.injectMultiPointerAction(pointers); + await button1.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0560 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0570 + * @tc.name SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0570 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0570', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0570 start.`); + Settings.createWindow("testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface560"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionGestureGesturegroupInterface560')); + let button1: Component = await driver.findComponent(ON.id('AceActionGestureGesturegroupInterface560_1')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x-20, y: point.y+20}); + pointers.setPoint(0, 1, {x: point.x-20, y: point.y+10}); + pointers.setPoint(0, 2, {x: point.x-20, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 20, y: point.y+20}); + pointers.setPoint(1, 1, {x: point.x + 20, y: point.y+10}); + pointers.setPoint(1, 2, {x: point.x + 20, y: point.y}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(500); + pointers.setPoint(0, 0, {x: point.x-20, y: point.y}); + pointers.setPoint(0, 1, {x: point.x-10, y: point.y}); + pointers.setPoint(0, 2, {x: point.x, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 20, y: point.y}); + pointers.setPoint(1, 1, {x: point.x + 10, y: point.y}); + pointers.setPoint(1, 2, {x: point.x , y: point.y}); + await driver.injectMultiPointerAction(pointers); + await button1.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0570 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0580 + * @tc.name SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0580 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0580', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0580 start.`); + Settings.createWindow("testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface580"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionGestureGesturegroupInterface580')); + let button1: Component = await driver.findComponent(ON.id('AceActionGestureGesturegroupInterface580_1')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 6); + pointers.setPoint(0, 0, {x: point.x-20, y: point.y}); + pointers.setPoint(0, 1, {x: point.x, y: point.y}); + pointers.setPoint(0, 2, {x: point.x+20, y: point.y}); + pointers.setPoint(0, 3, {x: point.x+20, y: point.y}); + pointers.setPoint(0, 4, {x: point.x+20, y: point.y}); + pointers.setPoint(0, 5, {x: point.x+20, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 20, y: point.y}); + pointers.setPoint(1, 1, {x: point.x + 40, y: point.y}); + pointers.setPoint(1, 2, {x: point.x + 60, y: point.y}); + pointers.setPoint(1, 3, {x: point.x + 70, y: point.y}); + pointers.setPoint(1, 4, {x: point.x + 80, y: point.y}); + pointers.setPoint(1, 5, {x: point.x + 90, y: point.y}); + await driver.injectMultiPointerAction(pointers); + await button1.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0580 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0340 + * @tc.name SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0340 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0340', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0340 start.`); + Settings.createWindow("testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface340"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionGestureGesturegroupInterface340')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 6); + pointers.setPoint(0, 0, {x: point.x-20, y: point.y}); + pointers.setPoint(0, 1, {x: point.x-20, y: point.y}); + pointers.setPoint(0, 2, {x: point.x-20, y: point.y}); + pointers.setPoint(0, 3, {x: point.x-20, y: point.y+10}); + pointers.setPoint(0, 4, {x: point.x-20, y: point.y+20}); + pointers.setPoint(0, 5, {x: point.x-20, y: point.y+30}); + pointers.setPoint(1, 0, {x: point.x + 20, y: point.y}); + pointers.setPoint(1, 1, {x: point.x + 20, y: point.y}); + pointers.setPoint(1, 2, {x: point.x + 20, y: point.y}); + pointers.setPoint(1, 3, {x: point.x + 20, y: point.y+10}); + pointers.setPoint(1, 4, {x: point.x + 20, y: point.y+20}); + pointers.setPoint(1, 5, {x: point.x + 20, y: point.y+30}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0340 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0350 + * @tc.name SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0350 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0350', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0350 start.`); + Settings.createWindow("testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface350"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionGestureGesturegroupInterface350')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x-20, y: point.y}); + pointers.setPoint(0, 1, {x: point.x-20, y: point.y+50}); + pointers.setPoint(0, 2, {x: point.x-20, y: point.y+100}); + pointers.setPoint(1, 0, {x: point.x + 20, y: point.y}); + pointers.setPoint(1, 1, {x: point.x + 20, y: point.y+50}); + pointers.setPoint(1, 2, {x: point.x + 20, y: point.y+100}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0350 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0360 + * @tc.name SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0360 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0360', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0360 start.`); + Settings.createWindow("testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface350"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionGestureGesturegroupInterface350')); + let point = await button.getBoundsCenter(); + await button.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0360 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0370 + * @tc.name SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0370 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0370', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0370 start.`); + Settings.createWindow("testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface340"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionGestureGesturegroupInterface340')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 6); + pointers.setPoint(0, 0, {x: point.x-20, y: point.y}); + pointers.setPoint(0, 1, {x: point.x-20, y: point.y}); + pointers.setPoint(0, 2, {x: point.x-20, y: point.y}); + pointers.setPoint(0, 3, {x: point.x-20, y: point.y}); + pointers.setPoint(0, 4, {x: point.x-20, y: point.y}); + pointers.setPoint(0, 5, {x: point.x-20, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 20, y: point.y}); + pointers.setPoint(1, 1, {x: point.x + 20, y: point.y}); + pointers.setPoint(1, 2, {x: point.x + 20, y: point.y}); + pointers.setPoint(1, 3, {x: point.x + 20, y: point.y}); + pointers.setPoint(1, 4, {x: point.x + 20, y: point.y}); + pointers.setPoint(1, 5, {x: point.x + 20, y: point.y}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0370 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0380 + * @tc.name SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0380 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0380', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0380 start.`); + Settings.createWindow("testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface380"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionGestureGesturegroupInterface380')); + await button.longClick(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0380 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0390 + * @tc.name SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0390 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0390', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0390 start.`); + Settings.createWindow("testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface390"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionGestureGesturegroupInterface390')); + await button.longClick(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0390 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0400 + * @tc.name SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0400 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0400', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0400 start.`); + Settings.createWindow("testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface400"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionGestureGesturegroupInterface400')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 6); + pointers.setPoint(0, 0, {x: point.x-20, y: point.y}); + pointers.setPoint(0, 1, {x: point.x-20, y: point.y}); + pointers.setPoint(0, 2, {x: point.x-20, y: point.y}); + pointers.setPoint(0, 3, {x: point.x-20, y: point.y+10}); + pointers.setPoint(0, 4, {x: point.x-20, y: point.y+20}); + pointers.setPoint(0, 5, {x: point.x-20, y: point.y+30}); + pointers.setPoint(1, 0, {x: point.x + 20, y: point.y}); + pointers.setPoint(1, 1, {x: point.x + 20, y: point.y}); + pointers.setPoint(1, 2, {x: point.x + 20, y: point.y}); + pointers.setPoint(1, 3, {x: point.x + 20, y: point.y+10}); + pointers.setPoint(1, 4, {x: point.x + 20, y: point.y+20}); + pointers.setPoint(1, 5, {x: point.x + 20, y: point.y+30}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0400 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0410 + * @tc.name SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0410 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0410', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0410 start.`); + Settings.createWindow("testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface410"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionGestureGesturegroupInterface410')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x-20, y: point.y+10}); + pointers.setPoint(0, 1, {x: point.x-20, y: point.y+20}); + pointers.setPoint(0, 2, {x: point.x-20, y: point.y+30}); + pointers.setPoint(1, 0, {x: point.x + 20, y: point.y+10}); + pointers.setPoint(1, 1, {x: point.x + 20, y: point.y+20}); + pointers.setPoint(1, 2, {x: point.x + 20, y: point.y+30}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0410 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0420 + * @tc.name SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0420 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0420', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0420 start.`); + Settings.createWindow("testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface410"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionGestureGesturegroupInterface410')); + await button.longClick(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0420 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0430 + * @tc.name SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0430 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0430', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0430 start.`); + Settings.createWindow("testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface430"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionGestureGesturegroupInterface430')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x-20, y: point.y+10}); + pointers.setPoint(0, 1, {x: point.x-20, y: point.y+20}); + pointers.setPoint(0, 2, {x: point.x-20, y: point.y+30}); + pointers.setPoint(1, 0, {x: point.x + 20, y: point.y+10}); + pointers.setPoint(1, 1, {x: point.x + 20, y: point.y+20}); + pointers.setPoint(1, 2, {x: point.x + 20, y: point.y+30}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0430 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0440 + * @tc.name SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0440 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0440', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0440 start.`); + Settings.createWindow("testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface440"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionGestureGesturegroupInterface440')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x-20, y: point.y+10}); + pointers.setPoint(0, 1, {x: point.x-20, y: point.y+20}); + pointers.setPoint(0, 2, {x: point.x-20, y: point.y+30}); + pointers.setPoint(1, 0, {x: point.x + 20, y: point.y+10}); + pointers.setPoint(1, 1, {x: point.x + 20, y: point.y+20}); + pointers.setPoint(1, 2, {x: point.x + 20, y: point.y+30}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0440 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0450 + * @tc.name SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0450 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0450', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0450 start.`); + Settings.createWindow("testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface450"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionGestureGesturegroupInterface450')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x-20, y: point.y+10}); + pointers.setPoint(0, 1, {x: point.x-20, y: point.y+20}); + pointers.setPoint(0, 2, {x: point.x-20, y: point.y+30}); + pointers.setPoint(1, 0, {x: point.x + 20, y: point.y+10}); + pointers.setPoint(1, 1, {x: point.x + 20, y: point.y+20}); + pointers.setPoint(1, 2, {x: point.x + 20, y: point.y+30}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0450 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0460 + * @tc.name SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0460 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0460', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0460 start.`); + Settings.createWindow("testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface460"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionGestureGesturegroupInterface460')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x-20, y: point.y+10}); + pointers.setPoint(0, 1, {x: point.x-20, y: point.y+20}); + pointers.setPoint(0, 2, {x: point.x-20, y: point.y+30}); + pointers.setPoint(1, 0, {x: point.x + 20, y: point.y+10}); + pointers.setPoint(1, 1, {x: point.x + 20, y: point.y+20}); + pointers.setPoint(1, 2, {x: point.x + 20, y: point.y+30}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0460 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0470 + * @tc.name SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0470 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0470', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0470 start.`); + Settings.createWindow("testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface470"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionGestureGesturegroupInterface470')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x-20, y: point.y+10}); + pointers.setPoint(0, 1, {x: point.x-20, y: point.y+20}); + pointers.setPoint(0, 2, {x: point.x-20, y: point.y+30}); + pointers.setPoint(1, 0, {x: point.x + 20, y: point.y+10}); + pointers.setPoint(1, 1, {x: point.x + 20, y: point.y+20}); + pointers.setPoint(1, 2, {x: point.x + 20, y: point.y+30}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0470 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0500 + * @tc.name SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0500 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0500', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0500 start.`); + Settings.createWindow("testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface500"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionGestureGesturegroupInterface500')); + await button.longClick(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0500 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0520 + * @tc.name SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0520 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0520', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0520 start.`); + Settings.createWindow("testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface520"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionGestureGesturegroupInterface520')); + await button.longClick(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0520 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0530 + * @tc.name SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0530 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0530', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0530 start.`); + Settings.createWindow("testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface530"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionGestureGesturegroupInterface530')); + await button.longClick(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0530 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0540 + * @tc.name SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0540 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0540', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0540 start.`); + Settings.createWindow("testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface540"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionGestureGesturegroupInterface540')); + await button.longClick(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0540 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0550 + * @tc.name SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0550 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0550', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0550 start.`); + Settings.createWindow("testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface540"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionGestureGesturegroupInterface540')); + await button.longClick(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0550 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0590 + * @tc.name SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0590 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0590', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0590 start.`); + Settings.createWindow("testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface580"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionGestureGesturegroupInterface580')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x-20, y: point.y}); + pointers.setPoint(0, 1, {x: point.x, y: point.y}); + pointers.setPoint(0, 2, {x: point.x+20, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 20, y: point.y}); + pointers.setPoint(1, 1, {x: point.x + 40, y: point.y}); + pointers.setPoint(1, 2, {x: point.x + 60, y: point.y}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(500); + pointers.setPoint(0, 0, {x: point.x-20, y: point.y}); + pointers.setPoint(0, 1, {x: point.x-10, y: point.y}); + pointers.setPoint(0, 2, {x: point.x, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 70, y: point.y}); + pointers.setPoint(1, 1, {x: point.x + 60, y: point.y}); + pointers.setPoint(1, 2, {x: point.x + 50, y: point.y}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0590 finish.`); + done() + }) + + }) +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/AceActionGestureJudgeTest/AceActionGestureJudge.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/AceActionGestureJudgeTest/AceActionGestureJudge.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..2360a832a7cff8713776d4980f7371ea15453b0d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/AceActionGestureJudgeTest/AceActionGestureJudge.test.ets @@ -0,0 +1,656 @@ +/* + * 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, ON ,PointerMatrix} from '@ohos.UiTest' + +export default function AceActionGestureJudge() { + + describe('AceActionGestureJudge', () => { + 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_ACTION_GESTURE_JUDGE_0010 + * @tc.name SUB_ACE_ACTION_GESTURE_JUDGE_0010 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_JUDGE_0010', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_JUDGE_0010 start.`); + Settings.createWindow("testability/pages/AceActionGestureJudge/AceActionGestureJudge10"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let Column1: Component = await driver.findComponent(ON.id('AceActionGestureJudge10')); + let info =await Column1.getBoundsCenter(); + await driver.click(info.x,info.y); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_JUDGE_0010 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_JUDGE_0020 + * @tc.name SUB_ACE_ACTION_GESTURE_JUDGE_0020 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_JUDGE_0020', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_JUDGE_0020 start.`); + Settings.createWindow("testability/pages/AceActionGestureJudge/AceActionGestureJudge20"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let Column1: Component = await driver.findComponent(ON.id('AceActionGestureJudge20')); + let info =await Column1.getBoundsCenter(); + await driver.click(info.x,info.y); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_JUDGE_0020 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_JUDGE_0030 + * @tc.name SUB_ACE_ACTION_GESTURE_JUDGE_0030 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_JUDGE_0030', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_JUDGE_0030 start.`); + Settings.createWindow("testability/pages/AceActionGestureJudge/AceActionGestureJudge30"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let Column1: Component = await driver.findComponent(ON.id('AceActionGestureJudge30')); + let info =await Column1.getBoundsCenter(); + await driver.click(info.x,info.y); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_JUDGE_0030 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_JUDGE_0040 + * @tc.name SUB_ACE_ACTION_GESTURE_JUDGE_0040 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_JUDGE_0040', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_JUDGE_0030 start.`); + Settings.createWindow("testability/pages/AceActionGestureJudge/AceActionGestureJudge40"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let Column1: Component = await driver.findComponent(ON.id('AceActionGestureJudge40')); + let info =await Column1.getBoundsCenter(); + await driver.doubleClick(info.x,info.y); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_JUDGE_0040 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_JUDGE_0180 + * @tc.name SUB_ACE_ACTION_GESTURE_JUDGE_0180 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_JUDGE_0180', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_JUDGE_0180 start.`); + Settings.createWindow("testability/pages/AceActionGestureJudge/AceActionGestureJudge180"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let Column1: Component = await driver.findComponent(ON.id('AceActionGestureJudge180')); + let info =await Column1.getBoundsCenter(); + await driver.doubleClick(info.x,info.y); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_JUDGE_0180 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_JUDGE_0120 + * @tc.name SUB_ACE_ACTION_GESTURE_JUDGE_0120 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_JUDGE_0120', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_JUDGE_0120 start.`); + Settings.createWindow("testability/pages/AceActionGestureJudge/AceActionGestureJudge120"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let Column1: Component = await driver.findComponent(ON.id('AceActionGestureJudge120')); + let info =await Column1.getBoundsCenter(); + await driver.doubleClick(info.x,info.y); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_JUDGE_0120 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_JUDGE_0130 + * @tc.name SUB_ACE_ACTION_GESTURE_JUDGE_0130 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_JUDGE_0130', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_JUDGE_0130 start.`); + Settings.createWindow("testability/pages/AceActionGestureJudge/AceActionGestureJudge130"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let Column: Component = await driver.findComponent(ON.id('AceActionGestureJudge130')); + await Column.longClick(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_JUDGE_0130 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_JUDGE_0190 + * @tc.name SUB_ACE_ACTION_GESTURE_JUDGE_0190 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_JUDGE_0190', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_JUDGE_0190 start.`); + Settings.createWindow("testability/pages/AceActionGestureJudge/AceActionGestureJudge190"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let Column: Component = await driver.findComponent(ON.id('AceActionGestureJudge190')); + await Column.longClick(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_JUDGE_0190 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_JUDGE_0050 + * @tc.name SUB_ACE_ACTION_GESTURE_JUDGE_0050 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_JUDGE_0050', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_JUDGE_0050 start.`); + Settings.createWindow("testability/pages/AceActionGestureJudge/AceActionGestureJudge50"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let Column: Component = await driver.findComponent(ON.id('AceActionGestureJudge50')); + await Column.longClick(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_JUDGE_0050 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_JUDGE_0160 + * @tc.name SUB_ACE_ACTION_GESTURE_JUDGE_0160 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_JUDGE_0160', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_JUDGE_0160 start.`); + Settings.createWindow("testability/pages/AceActionGestureJudge/AceActionGestureJudge160"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let Column: Component = await driver.findComponent(ON.id('AceActionGestureJudge160')); + let info =await Column.getBoundsCenter(); + await driver.fling({x:info.x-100,y:info.y},{x:info.x+100,y:info.y},2,10000); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_JUDGE_0160 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_JUDGE_0080 + * @tc.name SUB_ACE_ACTION_GESTURE_JUDGE_0080 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_JUDGE_0080', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_JUDGE_0080 start.`); + Settings.createWindow("testability/pages/AceActionGestureJudge/AceActionGestureJudge80"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let Column: Component = await driver.findComponent(ON.id('AceActionGestureJudge80')); + let info =await Column.getBoundsCenter(); + await driver.fling({x:info.x-100,y:info.y},{x:info.x+100,y:info.y},2,10000); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_JUDGE_0080 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_JUDGE_0220 + * @tc.name SUB_ACE_ACTION_GESTURE_JUDGE_0220 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_JUDGE_0220', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_JUDGE_0220 start.`); + Settings.createWindow("testability/pages/AceActionGestureJudge/AceActionGestureJudge220"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let Column: Component = await driver.findComponent(ON.id('AceActionGestureJudge220')); + let info =await Column.getBoundsCenter(); + await driver.fling({x:info.x-100,y:info.y},{x:info.x+100,y:info.y},2,10000); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_JUDGE_0220 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_JUDGE_0090 + * @tc.name SUB_ACE_ACTION_GESTURE_JUDGE_0090 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_JUDGE_0090', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_JUDGE_0090 start.`); + Settings.createWindow("testability/pages/AceActionGestureJudge/AceActionGestureJudge90"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button1: Component = await driver.findComponent(ON.id('AceActionGestureJudge90')); + let button2: Component = await driver.findComponent(ON.id('AceActionGestureJudge90_1')); + let info = await button1.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2,8); + pointers.setPoint(0,0,{x:info.x+10,y:info.y-110}); + pointers.setPoint(0,1,{x:info.x+120,y:info.y-120}); + pointers.setPoint(0,2,{x:info.x+130,y:info.y-130}); + pointers.setPoint(0,3,{x:info.x+140,y:info.y-140}); + pointers.setPoint(0,4,{x:info.x+150,y:info.y-150}); + pointers.setPoint(0,5,{x:info.x+160,y:info.y-160}); + pointers.setPoint(0,6,{x:info.x+170,y:info.y-170}); + pointers.setPoint(0,7,{x:info.x+180,y:info.y-180}); + pointers.setPoint(1,0,{x:info.x-110,y:info.y+110}); + pointers.setPoint(1,1,{x:info.x-120,y:info.y+120}); + pointers.setPoint(1,2,{x:info.x-130,y:info.y+130}); + pointers.setPoint(1,3,{x:info.x-140,y:info.y+140}); + pointers.setPoint(1,4,{x:info.x-150,y:info.y+150}); + pointers.setPoint(1,5,{x:info.x-160,y:info.y+160}); + pointers.setPoint(1,6,{x:info.x-170,y:info.y+170}); + pointers.setPoint(1,7,{x:info.x-180,y:info.y+180}); + await driver.injectMultiPointerAction(pointers); + await button2.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_JUDGE_0090 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_JUDGE_0230 + * @tc.name SUB_ACE_ACTION_GESTURE_JUDGE_0230 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_JUDGE_0230', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_JUDGE_0230 start.`); + Settings.createWindow("testability/pages/AceActionGestureJudge/AceActionGestureJudge230"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button1: Component = await driver.findComponent(ON.id('AceActionGestureJudge230')); + let info = await button1.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2,8); + pointers.setPoint(0,0,{x:info.x+10,y:info.y-110}); + pointers.setPoint(0,1,{x:info.x+120,y:info.y-120}); + pointers.setPoint(0,2,{x:info.x+130,y:info.y-130}); + pointers.setPoint(0,3,{x:info.x+140,y:info.y-140}); + pointers.setPoint(0,4,{x:info.x+150,y:info.y-150}); + pointers.setPoint(0,5,{x:info.x+160,y:info.y-160}); + pointers.setPoint(0,6,{x:info.x+170,y:info.y-170}); + pointers.setPoint(0,7,{x:info.x+180,y:info.y-180}); + pointers.setPoint(1,0,{x:info.x-110,y:info.y+110}); + pointers.setPoint(1,1,{x:info.x-120,y:info.y+120}); + pointers.setPoint(1,2,{x:info.x-130,y:info.y+130}); + pointers.setPoint(1,3,{x:info.x-140,y:info.y+140}); + pointers.setPoint(1,4,{x:info.x-150,y:info.y+150}); + pointers.setPoint(1,5,{x:info.x-160,y:info.y+160}); + pointers.setPoint(1,6,{x:info.x-170,y:info.y+170}); + pointers.setPoint(1,7,{x:info.x-180,y:info.y+180}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_JUDGE_0230 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_JUDGE_0170 + * @tc.name SUB_ACE_ACTION_GESTURE_JUDGE_0170 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_JUDGE_0170', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_JUDGE_0170 start.`); + Settings.createWindow("testability/pages/AceActionGestureJudge/AceActionGestureJudge170"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button1: Component = await driver.findComponent(ON.id('AceActionGestureJudge170')); + let info = await button1.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2,8); + pointers.setPoint(0,0,{x:info.x+10,y:info.y-110}); + pointers.setPoint(0,1,{x:info.x+120,y:info.y-120}); + pointers.setPoint(0,2,{x:info.x+130,y:info.y-130}); + pointers.setPoint(0,3,{x:info.x+140,y:info.y-140}); + pointers.setPoint(0,4,{x:info.x+150,y:info.y-150}); + pointers.setPoint(0,5,{x:info.x+160,y:info.y-160}); + pointers.setPoint(0,6,{x:info.x+170,y:info.y-170}); + pointers.setPoint(0,7,{x:info.x+180,y:info.y-180}); + pointers.setPoint(1,0,{x:info.x-110,y:info.y+110}); + pointers.setPoint(1,1,{x:info.x-120,y:info.y+120}); + pointers.setPoint(1,2,{x:info.x-130,y:info.y+130}); + pointers.setPoint(1,3,{x:info.x-140,y:info.y+140}); + pointers.setPoint(1,4,{x:info.x-150,y:info.y+150}); + pointers.setPoint(1,5,{x:info.x-160,y:info.y+160}); + pointers.setPoint(1,6,{x:info.x-170,y:info.y+170}); + pointers.setPoint(1,7,{x:info.x-180,y:info.y+180}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_JUDGE_0170 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_JUDGE_0150 + * @tc.name SUB_ACE_ACTION_GESTURE_JUDGE_0150 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_JUDGE_0150', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_JUDGE_0150 start.`); + Settings.createWindow("testability/pages/AceActionGestureJudge/AceActionGestureJudge150"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button1: Component = await driver.findComponent(ON.id('AceActionGestureJudge150')); + let button2: Component = await driver.findComponent(ON.id('AceActionGestureJudge150_1')); + let info = await button1.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2,4); + pointers.setPoint(0,0,{x:info.x,y:info.y-110}); + pointers.setPoint(0,1,{x:info.x,y:info.y-120}); + pointers.setPoint(0,2,{x:info.x,y:info.y-130}); + pointers.setPoint(0,3,{x:info.x,y:info.y-140}); + pointers.setPoint(1,0,{x:info.x,y:info.y+110}); + pointers.setPoint(1,1,{x:info.x,y:info.y+120}); + pointers.setPoint(1,2,{x:info.x,y:info.y+130}); + pointers.setPoint(1,3,{x:info.x,y:info.y+140}); + await driver.injectMultiPointerAction(pointers); + await button2.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_JUDGE_0150 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_JUDGE_0070 + * @tc.name SUB_ACE_ACTION_GESTURE_JUDGE_0070 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_JUDGE_0070', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_JUDGE_0070 start.`); + Settings.createWindow("testability/pages/AceActionGestureJudge/AceActionGestureJudge70"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button1: Component = await driver.findComponent(ON.id('AceActionGestureJudge70')); + let button2: Component = await driver.findComponent(ON.id('AceActionGestureJudge70_1')); + let info = await button1.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2,4); + pointers.setPoint(0,0,{x:info.x,y:info.y-110}); + pointers.setPoint(0,1,{x:info.x,y:info.y-120}); + pointers.setPoint(0,2,{x:info.x,y:info.y-130}); + pointers.setPoint(0,3,{x:info.x,y:info.y-140}); + pointers.setPoint(1,0,{x:info.x,y:info.y+110}); + pointers.setPoint(1,1,{x:info.x,y:info.y+120}); + pointers.setPoint(1,2,{x:info.x,y:info.y+130}); + pointers.setPoint(1,3,{x:info.x,y:info.y+140}); + await driver.injectMultiPointerAction(pointers); + await button2.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_JUDGE_0070 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_ACTION_GESTURE_JUDGE_0210 + * @tc.name SUB_ACE_ACTION_GESTURE_JUDGE_0210 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_JUDGE_0210', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_JUDGE_0210 start.`); + Settings.createWindow("testability/pages/AceActionGestureJudge/AceActionGestureJudge210"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button1: Component = await driver.findComponent(ON.id('AceActionGestureJudge210')); + let button2: Component = await driver.findComponent(ON.id('AceActionGestureJudge210_1')); + let info = await button1.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2,4); + pointers.setPoint(0,0,{x:info.x,y:info.y-110}); + pointers.setPoint(0,1,{x:info.x,y:info.y-120}); + pointers.setPoint(0,2,{x:info.x,y:info.y-130}); + pointers.setPoint(0,3,{x:info.x,y:info.y-140}); + pointers.setPoint(1,0,{x:info.x,y:info.y+110}); + pointers.setPoint(1,1,{x:info.x,y:info.y+120}); + pointers.setPoint(1,2,{x:info.x,y:info.y+130}); + pointers.setPoint(1,3,{x:info.x,y:info.y+140}); + await driver.injectMultiPointerAction(pointers); + await button2.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_JUDGE_0210 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_JUDGE_0140 + * @tc.name SUB_ACE_ACTION_GESTURE_JUDGE_0140 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_JUDGE_0140', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_JUDGE_0140 start.`); + Settings.createWindow("testability/pages/AceActionGestureJudge/AceActionGestureJudge140"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button1: Component = await driver.findComponent(ON.id('AceActionGestureJudge140')); + let button2: Component = await driver.findComponent(ON.id('AceActionGestureJudge140_1')); + let info = await button1.getBoundsCenter(); + await driver.drag(info.x,info.y,info.x+300,info.y); + await button2.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_JUDGE_0140 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_JUDGE_0200 + * @tc.name SUB_ACE_ACTION_GESTURE_JUDGE_0200 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_JUDGE_0200', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_JUDGE_0200 start.`); + Settings.createWindow("testability/pages/AceActionGestureJudge/AceActionGestureJudge200"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button1: Component = await driver.findComponent(ON.id('AceActionGestureJudge200')); + let button2: Component = await driver.findComponent(ON.id('AceActionGestureJudge200_1')); + let info = await button1.getBoundsCenter(); + await driver.drag(info.x,info.y,info.x+300,info.y); + await button2.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_JUDGE_0200 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_JUDGE_0060 + * @tc.name SUB_ACE_ACTION_GESTURE_JUDGE_0060 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_JUDGE_0060', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_JUDGE_0060 start.`); + Settings.createWindow("testability/pages/AceActionGestureJudge/AceActionGestureJudge60"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button1: Component = await driver.findComponent(ON.id('AceActionGestureJudge60')); + let button2: Component = await driver.findComponent(ON.id('AceActionGestureJudge60_1')); + let info = await button1.getBoundsCenter(); + await driver.drag(info.x,info.y,info.x+300,info.y); + await button2.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_JUDGE_0060 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_JUDGE_0270 + * @tc.name SUB_ACE_ACTION_GESTURE_JUDGE_0270 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_JUDGE_0270', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_JUDGE_0270 start.`); + Settings.createWindow("testability/pages/AceActionGestureJudge/AceActionGestureJudge270"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button1: Component = await driver.findComponent(ON.id('AceActionGestureJudge270')); + await button1.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_JUDGE_0270 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_JUDGE_0290 + * @tc.name SUB_ACE_ACTION_GESTURE_JUDGE_0290 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_JUDGE_0290', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_JUDGE_0290 start.`); + Settings.createWindow("testability/pages/AceActionGestureJudge/AceActionGestureJudge290"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let Imag: Component = await driver.findComponent(ON.id('AceActionGestureJudge290_1')); + let Text: Component = await driver.findComponent(ON.id('AceActionGestureJudge290_2')); + await Imag.dragTo(Text); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_JUDGE_0290 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_JUDGE_0300 + * @tc.name SUB_ACE_ACTION_GESTURE_JUDGE_0300 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_JUDGE_0300', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_JUDGE_0300 start.`); + Settings.createWindow("testability/pages/AceActionGestureJudge/AceActionGestureJudge300"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let Column1: Component = await driver.findComponent(ON.id('AceActionGestureJudge300_1')); + let Column2: Component = await driver.findComponent(ON.id('AceActionGestureJudge300_2')); + let info =await Column1.getBoundsCenter(); + await driver.doubleClick(info.x,info.y); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_JUDGE_0300 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_JUDGE_0310 + * @tc.name SUB_ACE_ACTION_GESTURE_JUDGE_0310 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_JUDGE_0310', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_JUDGE_0310 start.`); + Settings.createWindow("testability/pages/AceActionGestureJudge/AceActionGestureJudge300"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let Column1: Component = await driver.findComponent(ON.id('AceActionGestureJudge300_1')); + let Column2: Component = await driver.findComponent(ON.id('AceActionGestureJudge300_2')); + let info =await Column2.getBoundsCenter(); + await driver.doubleClick(info.x,info.y); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_JUDGE_0310 finish.`); + done() + }) + + + }) +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/AceActionGestureMonopolizeTest/AceActionGestureMonopolize.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/AceActionGestureMonopolizeTest/AceActionGestureMonopolize.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..389a6c279a82ed5455adef34bd1d3ff74510e710 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/AceActionGestureMonopolizeTest/AceActionGestureMonopolize.test.ets @@ -0,0 +1,193 @@ +/* + * 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, ON ,PointerMatrix} from '@ohos.UiTest' + +export default function AceActionGestureMonopolize() { + + describe('AceActionGestureMonopolize', () => { + 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_ACTION_GESTURE_MONOPOLIZE_0010 + * @tc.name SUB_ACE_ACTION_GESTURE_MONOPOLIZE_0010 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_MONOPOLIZE_0010', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_MONOPOLIZE_0010 start.`); + Settings.createWindow("testability/pages/AceActionGestureMonopolize/AceActionGestureMonopolize10"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button1: Component = await driver.findComponent(ON.id('AceActionGestureMonopolize10_1')); + let button2: Component = await driver.findComponent(ON.id('AceActionGestureMonopolize10_2')); + let info = await button1.getBoundsCenter(); + let center = await button2.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2,8); + pointers.setPoint(0,0,{x:info.x,y:center.y}); + pointers.setPoint(0,1,{x:info.x,y:center.y}); + pointers.setPoint(0,2,{x:info.x,y:center.y}); + pointers.setPoint(0,3,{x:info.x,y:center.y}); + pointers.setPoint(0,4,{x:info.x,y:center.y}); + pointers.setPoint(0,5,{x:info.x,y:center.y}); + pointers.setPoint(0,6,{x:info.x,y:center.y}); + pointers.setPoint(0,7,{x:info.x,y:center.y}); + pointers.setPoint(1,0,{x:center.x,y:center.y}); + pointers.setPoint(1,1,{x:center.x,y:center.y}); + pointers.setPoint(1,2,{x:center.x,y:center.y}); + pointers.setPoint(1,3,{x:center.x,y:center.y}); + pointers.setPoint(1,4,{x:center.x,y:center.y}); + pointers.setPoint(1,5,{x:center.x,y:center.y}); + pointers.setPoint(1,6,{x:center.x,y:center.y}); + pointers.setPoint(1,7,{x:center.x,y:center.y}); + await driver.injectMultiPointerAction(pointers,200); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_MONOPOLIZE_0010 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_MONOPOLIZE_0140 + * @tc.name SUB_ACE_ACTION_GESTURE_MONOPOLIZE_0140 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_MONOPOLIZE_0140', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_MONOPOLIZE_0140 start.`); + Settings.createWindow("testability/pages/AceActionGestureMonopolize/AceActionGestureMonopolize140"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button1: Component = await driver.findComponent(ON.id('AceActionGestureMonopolize140_1')); + let button2: Component = await driver.findComponent(ON.id('AceActionGestureMonopolize140_2')); + let info = await button1.getBoundsCenter(); + let center = await button2.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2,8); + pointers.setPoint(0,0,{x:info.x+100,y:center.y}); + pointers.setPoint(0,1,{x:info.x+100,y:center.y}); + pointers.setPoint(0,2,{x:info.x+100,y:center.y}); + pointers.setPoint(0,3,{x:info.x+100,y:center.y}); + pointers.setPoint(0,4,{x:info.x+100,y:center.y}); + pointers.setPoint(0,5,{x:info.x+100,y:center.y}); + pointers.setPoint(0,6,{x:info.x+100,y:center.y}); + pointers.setPoint(0,7,{x:info.x+100,y:center.y}); + pointers.setPoint(1,0,{x:center.x,y:center.y}); + pointers.setPoint(1,1,{x:center.x,y:center.y}); + pointers.setPoint(1,2,{x:center.x,y:center.y}); + pointers.setPoint(1,3,{x:center.x,y:center.y}); + pointers.setPoint(1,4,{x:center.x,y:center.y}); + pointers.setPoint(1,5,{x:center.x,y:center.y}); + pointers.setPoint(1,6,{x:center.x,y:center.y}); + pointers.setPoint(1,7,{x:center.x,y:center.y}); + await driver.injectMultiPointerAction(pointers,200); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_MONOPOLIZE_0140 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_MONOPOLIZE_0050 + * @tc.name SUB_ACE_ACTION_GESTURE_MONOPOLIZE_0050 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_MONOPOLIZE_0050', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_MONOPOLIZE_0050 start.`); + Settings.createWindow("testability/pages/AceActionGestureMonopolize/AceActionGestureMonopolize50"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionGestureMonopolize50_1')); + let Column: Component = await driver.findComponent(ON.id('AceActionGestureMonopolize50_2')); + let info = await Column.getBoundsCenter(); + await button.longClick(); + await driver.longClick(info.x,info.y+200); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_MONOPOLIZE_0050 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_MONOPOLIZE_0060 + * @tc.name SUB_ACE_ACTION_GESTURE_MONOPOLIZE_0060 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_MONOPOLIZE_0060', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_MONOPOLIZE_0060 start.`); + Settings.createWindow("testability/pages/AceActionGestureMonopolize/AceActionGestureMonopolize50") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionGestureMonopolize50_1')) + let Column: Component = await driver.findComponent(ON.id('AceActionGestureMonopolize50_2')) + let info = await Column.getBoundsCenter(); + await button.longClick(); + await driver.longClick(info.x,info.y+200); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_MONOPOLIZE_0060 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_MONOPOLIZE_0070 + * @tc.name SUB_ACE_ACTION_GESTURE_MONOPOLIZE_0070 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_MONOPOLIZE_0070', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_MONOPOLIZE_0070 start.`); + Settings.createWindow("testability/pages/AceActionGestureMonopolize/AceActionGestureMonopolize70"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('AceActionGestureMonopolize70_1')); + let Column: Component = await driver.findComponent(ON.id('AceActionGestureMonopolize70_2')); + let info = await Column.getBoundsCenter(); + await button.longClick(); + await driver.longClick(info.x,info.y+200); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_MONOPOLIZE_0070 finish.`); + done(); + }) + + + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionEvenTRegisterComponentsChangeEventCallbackActionsheetTest/ActionEvenTRegisterComponentsChangeEventCallbackActionsheet.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionEvenTRegisterComponentsChangeEventCallbackActionsheetTest/ActionEvenTRegisterComponentsChangeEventCallbackActionsheet.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..47e981b8fd03c1bc9256403763278c96f91e9974 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionEvenTRegisterComponentsChangeEventCallbackActionsheetTest/ActionEvenTRegisterComponentsChangeEventCallbackActionsheet.test.ets @@ -0,0 +1,88 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { 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, ON, Component, UiWindow, ResizeDirection, UiDriver, MouseButton } from '@ohos.UiTest'; + +export default function ActionEvenTRegisterComponentsChangeEventCallbackActionsheet() { + + describe('ActionEvenTRegisterComponentsChangeEventCallbackActionsheet', () => { + 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_ACTION_EVENT_REGISTER_COMPONENTS_CHANGE_EVENT_CALLBACK_ACTIONSHEET_020 + * @tc.name SUB_ACE_ACTION_EVENT_REGISTER_COMPONENTS_CHANGE_EVENT_CALLBACK_ACTIONSHEET_020 + * @tc.level Level 3 + */ + + it('SUB_ACE_ACTION_EVENT_REGISTER_COMPONENTS_CHANGE_EVENT_CALLBACK_ACTIONSHEET_020', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_REGISTER_COMPONENTS_CHANGE_EVENT_CALLBACK_ACTIONSHEET_020 start.`); + Settings.createWindow("testability/pages/ActionEvenTRegisterComponentsChangeEventCallbackActionsheet/ActionEvenTRegisterComponentsChangeEventCallbackActionsheet020"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + let showPrevious = await driver.findComponent(ON.id("callbackActionsheet020_1")); + await showPrevious.click(); + await Utils.sleep(1000); + let showPrevious2 = await driver.findComponent(ON.id("callbackActionsheet020_2")); + await showPrevious2.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_REGISTER_COMPONENTS_CHANGE_EVENT_CALLBACK_ACTIONSHEET_020 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_EVENT_REGISTER_COMPONENTS_CHANGE_EVENT_CALLBACK_ACTIONSHEET_010 + * @tc.name SUB_ACE_ACTION_EVENT_REGISTER_COMPONENTS_CHANGE_EVENT_CALLBACK_ACTIONSHEET_010 + * @tc.level Level 3 + */ + + it('SUB_ACE_ACTION_EVENT_REGISTER_COMPONENTS_CHANGE_EVENT_CALLBACK_ACTIONSHEET_010', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_REGISTER_COMPONENTS_CHANGE_EVENT_CALLBACK_ACTIONSHEET_010 start.`); + Settings.createWindow("testability/pages/ActionEvenTRegisterComponentsChangeEventCallbackActionsheet/ActionEvenTRegisterComponentsChangeEventCallbackActionsheet010"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + let showPrevious2 = await driver.findComponent(ON.id("callbackActionsheet010")); + await showPrevious2.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_REGISTER_COMPONENTS_CHANGE_EVENT_CALLBACK_ACTIONSHEET_010 finish.`); + done(); + }) + + + }) +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionEventCommoneventChangeTest/ActionEventCommoneventChange.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionEventCommoneventChangeTest/ActionEventCommoneventChange.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..41aaa7c70a786ca0a4ec25c729cc36bb2b06d2bb --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionEventCommoneventChangeTest/ActionEventCommoneventChange.test.ets @@ -0,0 +1,322 @@ +/* + * 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, ON, PointerMatrix } from '@ohos.UiTest' + +export default function ActionEventCommoneventChange() { + + describe('ActionEventCommoneventChange', () => { + 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_ACTION_EVENT_COMMONEVENT_CHANGE_0340 + * @tc.name SUB_ACE_ACTION_EVENT_COMMONEVENT_CHANGE_0340 + * @tc.desc + */ + it('SUB_ACE_ACTION_EVENT_COMMONEVENT_CHANGE_0340', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CHANGE_0340 start.`); + Settings.createWindow("testability/pages/ActionEventCommoneventChange/ActionEventCommoneventChange0340") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionEventCommoneventChange0340_001')); + let button2: Component = await driver.findComponent(ON.id('ActionEventCommoneventChange0340_002')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, { + x: point.x + 10, y: point.y + 20 + }); + pointers.setPoint(0, 1, { + x: point.x, y: point.y + 20 + }); + pointers.setPoint(0, 2, { + x: point.x - 10, y: point.y + 20 + }); + pointers.setPoint(1, 0, { + x: point.x + 30, y: point.y + 20 + }); + pointers.setPoint(1, 1, { + x: point.x + 40, y: point.y + 20 + }); + pointers.setPoint(1, 2, { + x: point.x + 50, y: point.y + 20 + }); + await driver.injectMultiPointerAction(pointers); + await button2.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CHANGE_0340 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_EVENT_COMMONEVENT_CHANGE_0140 + * @tc.name SUB_ACE_ACTION_EVENT_COMMONEVENT_CHANGE_0140 + * @tc.desc + */ + it('SUB_ACE_ACTION_EVENT_COMMONEVENT_CHANGE_0140', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CHANGE_0140 start.`); + Settings.createWindow("testability/pages/ActionEventCommoneventChange/ActionEventCommoneventChange0140") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionEventCommoneventChange0140_001')); + let button2: Component = await driver.findComponent(ON.id('ActionEventCommoneventChange0140_002')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 4); + pointers.setPoint(0, 0, { + x: point.x - 30, y: point.y + 10 + }); + pointers.setPoint(0, 1, { + x: point.x - 30, y: point.y + 10 + }); + pointers.setPoint(0, 2, { + x: point.x - 30, y: point.y + 10 + }); + pointers.setPoint(0, 3, { + x: point.x - 30, y: point.y + 10 + }); + pointers.setPoint(1, 0, { + x: point.x + 70, y: point.y + 10 + }); + pointers.setPoint(1, 1, { + x: point.x + 70, y: point.y + 60 + }); + pointers.setPoint(1, 2, { + x: point.x + 70, y: point.y + 70 + }); + pointers.setPoint(1, 3, { + x: point.x + 70, y: point.y + 80 + }); + await driver.injectMultiPointerAction(pointers); + await button2.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CHANGE_0140 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_EVENT_COMMONEVENT_CHANGE_0530 + * @tc.name SUB_ACE_ACTION_EVENT_COMMONEVENT_CHANGE_0530 + * @tc.desc + */ + it('SUB_ACE_ACTION_EVENT_COMMONEVENT_CHANGE_0530', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CHANGE_0530 start.`); + Settings.createWindow("testability/pages/ActionEventCommoneventChange/ActionEventCommoneventChange0530") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionEventCommoneventChange0530_001')); + let button2: Component = await driver.findComponent(ON.id('ActionEventCommoneventChange0530_002')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1, 4); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 30, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 3, { + x: point.x - 70, y: point.y + }); + await driver.injectMultiPointerAction(pointers, 200); + await button2.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CHANGE_0530 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_EVENT_COMMONEVENT_CHANGE_0110 + * @tc.name SUB_ACE_ACTION_EVENT_COMMONEVENT_CHANGE_0110 + * @tc.desc + */ + it('SUB_ACE_ACTION_EVENT_COMMONEVENT_CHANGE_0110', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CHANGE_0110 start.`); + Settings.createWindow("testability/pages/ActionEventCommoneventChange/ActionEventCommoneventChange0110") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionEventCommoneventChange0110_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1, 4); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 30, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 3, { + x: point.x - 70, y: point.y + }); + await driver.injectMultiPointerAction(pointers, 200); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CHANGE_0110 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_EVENT_COMMONEVENT_CHANGE_0120 + * @tc.name SUB_ACE_ACTION_EVENT_COMMONEVENT_CHANGE_0120 + * @tc.desc + */ + it('SUB_ACE_ACTION_EVENT_COMMONEVENT_CHANGE_0120', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CHANGE_0120 start.`); + Settings.createWindow("testability/pages/ActionEventCommoneventChange/ActionEventCommoneventChange0120") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionEventCommoneventChange0120_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1, 4); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 30, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 3, { + x: point.x - 70, y: point.y + }); + await driver.injectMultiPointerAction(pointers, 200); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CHANGE_0120 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_EVENT_COMMONEVENT_CHANGE_0490 + * @tc.name SUB_ACE_ACTION_EVENT_COMMONEVENT_CHANGE_0490 + * @tc.desc + */ + it('SUB_ACE_ACTION_EVENT_COMMONEVENT_CHANGE_0490', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CHANGE_0490 start.`); + Settings.createWindow("testability/pages/ActionEventCommoneventChange/ActionEventCommoneventChange0490") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionEventCommoneventChange0490_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1, 4); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 30, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 3, { + x: point.x - 70, y: point.y + }); + await driver.injectMultiPointerAction(pointers, 200); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CHANGE_0490 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_EVENT_COMMONEVENT_CHANGE_0520 + * @tc.name SUB_ACE_ACTION_EVENT_COMMONEVENT_CHANGE_0520 + * @tc.desc + */ + it('SUB_ACE_ACTION_EVENT_COMMONEVENT_CHANGE_0520', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CHANGE_0520 start.`); + Settings.createWindow("testability/pages/ActionEventCommoneventChange/ActionEventCommoneventChange0520") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionEventCommoneventChange0520_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1, 4); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 30, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 3, { + x: point.x - 70, y: point.y + }); + await driver.injectMultiPointerAction(pointers, 200); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CHANGE_0520 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_EVENT_COMMONEVENT_CHANGE_0550 + * @tc.name SUB_ACE_ACTION_EVENT_COMMONEVENT_CHANGE_0550 + * @tc.desc + */ + it('SUB_ACE_ACTION_EVENT_COMMONEVENT_CHANGE_0550', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CHANGE_0550 start.`); + Settings.createWindow("testability/pages/ActionEventCommoneventChange/ActionEventCommoneventChange0550") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionEventCommoneventChange0550_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1, 4); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 30, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 3, { + x: point.x - 70, y: point.y + }); + await driver.injectMultiPointerAction(pointers, 200); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CHANGE_0550 finish.`); + done(); + }) + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionEventCommoneventClickDfxTest/ActionEventCommoneventClickDfx.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionEventCommoneventClickDfxTest/ActionEventCommoneventClickDfx.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..e1e248bc22f9cc0ad42b599d2a61c84814a679d1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionEventCommoneventClickDfxTest/ActionEventCommoneventClickDfx.test.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. + */ +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, ON } from '@ohos.UiTest' + +export default function ActionEventCommoneventClickDfx() { + + describe('ActionEventCommoneventClickDfx', () => { + 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_ACTION_EVENT_COMMONEVENT_CLICKDFX_0030 + * @tc.name SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKDFX_0030 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKDFX_0030', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKDFX_0030 start.`); + Settings.createWindow("testability/pages/ActionEventCommoneventClickDfx/ActionEventCommoneventClickDfx0030"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('ActionEventCommoneventClickdfx0030')); + await scroll.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKDFX_0030 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKDFX_0040 + * @tc.name SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKDFX_0040 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKDFX_0040', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKDFX_0040 start.`); + Settings.createWindow("testability/pages/ActionEventCommoneventClickDfx/ActionEventCommoneventClickDfx0040"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('ActionEventCommoneventClickdfx0040_1')); + await scroll.click(); + await Utils.sleep(1000); + let scroll2: Component = await driver.findComponent(ON.id('ActionEventCommoneventClickdfx0040_2')); + await scroll2.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKDFX_0040 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKDFX_0050 + * @tc.name SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKDFX_0050 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKDFX_0050', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKDFX_0050 start.`); + Settings.createWindow("testability/pages/ActionEventCommoneventClickDfx/ActionEventCommoneventClickDfx0050"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('ActionEventCommoneventClickdfx0050')); + await scroll.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKDFX_0050 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKDFX_0010 + * @tc.name SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKDFX_0010 + */ + it('SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKDFX_0010', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKDFX_0010 start.`); + Settings.createWindow("testability/pages/ActionEventCommoneventClickDfx/ActionEventCommoneventClickDfx0010"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('ActionEventCommoneventClickdfx0010')); + await scroll.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKDFX_0010 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKDFX_0020 + * @tc.name SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKDFX_0020 + */ + it('SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKDFX_0020', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKDFX_0020 start.`); + Settings.createWindow("testability/pages/ActionEventCommoneventClickDfx/ActionEventCommoneventClickDfx0020"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('ActionEventCommoneventClickdfx0020')); + await scroll.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICKDFX_0020 finish.`); + done(); + }) + + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionEventCommoneventClickScenariosTest/ActionEventCommoneventClickScenarios.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionEventCommoneventClickScenariosTest/ActionEventCommoneventClickScenarios.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..5a26172e24311e88d409eb180e2e7e8048c4381f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionEventCommoneventClickScenariosTest/ActionEventCommoneventClickScenarios.test.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 { 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, ON } from '@ohos.UiTest' + +export default function ActionEventCommoneventClickScenarios() { + + describe('ActionEventCommoneventClickScenarios', () => { + 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_ACTION_EVENT_COMMONEVENT_CLICK_SCENARIOS_0020 + */ + it('SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICK_SCENARIOS_0020', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICK_SCENARIOS_0020 start.`); + Settings.createWindow("testability/pages/ActionEventCommoneventClickScenarios/ActionEventCommoneventClickScenarios0020"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let btn:Component = await driver.findComponent(ON.id('btn')); + await btn.click() + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICK_SCENARIOS_0020 finish.`); + done(); + }) + + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionEventCommoneventClickTest/ActionEventCommoneventClick.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionEventCommoneventClickTest/ActionEventCommoneventClick.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..e5139df5174e801cf7168ab6c5aa1978af67e66b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionEventCommoneventClickTest/ActionEventCommoneventClick.test.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 { 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, ON } from '@ohos.UiTest' + +export default function ActionEventCommoneventClick() { + + describe('ActionEventCommoneventClick', () => { + 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_ACTION_EVENT_COMMONEVENT_CLICK_0030 + * @tc.name SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICK_0030 + */ + it('SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICK_0030', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICK_0030 start.`); + Settings.createWindow("testability/pages/ActionEventCommoneventClick/ActionEventCommoneventClick0030"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICK_0030 finish.`); + done(); + }) + + + /** + * @tc.number SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICK_0040 + * @tc.name SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICK_0040 + */ + it('SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICK_0040', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICK_0040 start.`); + Settings.createWindow("testability/pages/ActionEventCommoneventClick/ActionEventCommoneventClick0040"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_COMMONEVENT_CLICK_0040 finish.`); + done(); + }) + + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionEventConnectTest/ActionEventConnect.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionEventConnectTest/ActionEventConnect.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..26c42a4fd2854dc1131fd0e4dae85e40e42bb56a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionEventConnectTest/ActionEventConnect.test.ets @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { 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, ON, Component, UiWindow, ResizeDirection, UiDriver, MouseButton } from '@ohos.UiTest'; + +export default function ActionEventConnect() { + + describe('ActionEventConnect', () => { + 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 ACTION_EVENT_CONNECT_010 + * @tc.name SUB_ACE ACTION_EVENT_CONNECT_010 + * @tc.level Level 3 + */ + + it('SUB_ACE_ACTION_EVENT_CONNECT_010', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE ACTION_EVENT_CONNECT_010 start.`); + Settings.createWindow("testability/pages/ActionEventConnect/ActionEventConnect010"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + let showPrevious = await driver.findComponent(ON.id("ActionEventConnect010")); + await showPrevious.click(); + + + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE ACTION_EVENT_CONNECT_010 finish.`); + done(); + }) + + + + + }) +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionEventRegisterComponentChangeEventCallbackActonsheetTest/ActionEventRegisterComponentChangeEventCallbackActonsheet.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionEventRegisterComponentChangeEventCallbackActonsheetTest/ActionEventRegisterComponentChangeEventCallbackActonsheet.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..3da0469109bae9cf97313608f0eabbc71aca7168 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionEventRegisterComponentChangeEventCallbackActonsheetTest/ActionEventRegisterComponentChangeEventCallbackActonsheet.test.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 { 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, ON, PointerMatrix, MouseButton } from '@ohos.UiTest' + +export default function ActionEventRegisterComponentChangeEventCallbackActonsheet() { + + describe('ActionEventRegisterComponentChangeEventCallbackActonsheet', () => { + afterEach(async (done: Function) => { + if (Settings.windowClass == undefined) { + return; + } + + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST',) + return; + } + Logger.info('TEST',); + }) + await Utils.sleep(1000); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_EVENT_REGISTER_COMPONENT_CHANGE_EVENT_CALLBACK_ACTONSHEET_010 + * @tc.name SUB_ACE_ACTION_EVENT_REGISTER_COMPONENT_CHANGE_EVENT_CALLBACK_ACTONSHEET_010 + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_EVENT_REGISTER_COMPONENT_CHANGE_EVENT_CALLBACK_ACTONSHEET_010', 0, async (done: Function) => { + Logger.info('TEST', 'SUB_ACE_ACTION_EVENT_REGISTER_COMPONENT_CHANGE_EVENT_CALLBACK_ACTONSHEET_010 start.'); + Settings.createWindow("testability/pages/ActionEventRegisterComponentChangeEventCallbackActonsheet/ActionEventRegisterComponentChangeEventCallbackActonsheet010"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('button')); + await Utils.sleep(2000); + await button.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', 'SUB_ACE_ACTION_EVENT_REGISTER_COMPONENT_CHANGE_EVENT_CALLBACK_ACTONSHEET_010 finish.'); + done(); + }) + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionEventRegisterComponentChangeEventCallbackAlertdialogTest/ActionEventRegisterComponentChangeEventCallbackAlertdialog.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionEventRegisterComponentChangeEventCallbackAlertdialogTest/ActionEventRegisterComponentChangeEventCallbackAlertdialog.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..83bc176329f5a7dab010cd73733a8f7a01d24635 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionEventRegisterComponentChangeEventCallbackAlertdialogTest/ActionEventRegisterComponentChangeEventCallbackAlertdialog.test.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 { 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, ON ,PointerMatrix,MouseButton} from '@ohos.UiTest' + +export default function ActionEventRegisterComponentChangeEventCallbackAlertdialog() { + + describe('ActionEventRegisterComponentChangeEventCallbackAlertdialog', () => { + 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 ActionEventRegisterComponentChangeEventCallbackAlertdialog020 + * @tc.name ActionEventRegisterComponentChangeEventCallbackAlertdialog020 + * @tc.level Level 3 + */ + it('ActionEventRegisterComponentChangeEventCallbackAlertdialog020', 0, async (done: Function) => { + Logger.info('TEST', `ActionEventRegisterComponentChangeEventCallbackAlertdialog020 start.`); + Settings.createWindow("testability/pages/ActionEventRegisterComponentChangeEventCallbackAlertdialog/ActionEventRegisterComponentChangeEventCallbackAlertdialog020"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('dialog')); + await Utils.sleep(2000); + await button.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `ActionEventRegisterComponentChangeEventCallbackAlertdialog020 finish.`); + done() + }) + }) +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionEventRegisterComponentChangeEventCallbackCounterTest/ActionEventRegisterComponentChangeEventCallbackCounter.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionEventRegisterComponentChangeEventCallbackCounterTest/ActionEventRegisterComponentChangeEventCallbackCounter.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..12719a591c3dfa67b3b4b26129edf7ee655e11d3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionEventRegisterComponentChangeEventCallbackCounterTest/ActionEventRegisterComponentChangeEventCallbackCounter.test.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 { 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, ON, PointerMatrix, MouseButton } from '@ohos.UiTest' + +export default function ActionEventRegisterComponentChangeEventCallbackCounter() { + + describe('ActionEventRegisterComponentChangeEventCallbackCounter', () => { + afterEach(async (done: Function) => { + if (Settings.windowClass == undefined) { + return; + } + + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST',) + return; + } + Logger.info('TEST',); + }) + await Utils.sleep(1000); + done(); + }) + /* + * @tc.number ACTION_EVENT_REGISTER_COMPONENT_CHANGE_EVENT_CALLBACK_COUNTER_030 + * @tc.name ACTION_EVENT_REGISTER_COMPONENT_CHANGE_EVENT_CALLBACK_COUNTER_030 + * @tc.level Level 3 + */ + it('ACTION_EVENT_REGISTER_COMPONENT_CHANGE_EVENT_CALLBACK_COUNTER_030', 0, async (done: Function) => { + Logger.info('TEST', 'ACTION_EVENT_REGISTER_COMPONENT_CHANGE_EVENT_CALLBACK_COUNTER_030 start.'); + Settings.createWindow("testability/pages/ActionEventRegisterComponentChangeEventCallbackCounter/ActionEventRegisterComponentChangeEventCallbackCounter030"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', 'ACTION_EVENT_REGISTER_COMPONENT_CHANGE_EVENT_CALLBACK_COUNTER_030 finish.'); + done(); + }) + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionEventRegisterComponentChangeEventCallbackGridTest/ActionEventRegisterComponentChangeEventCallbackGrid.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionEventRegisterComponentChangeEventCallbackGridTest/ActionEventRegisterComponentChangeEventCallbackGrid.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..68cc66fd3be02dfbf195ab71229de642cc571586 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionEventRegisterComponentChangeEventCallbackGridTest/ActionEventRegisterComponentChangeEventCallbackGrid.test.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 { 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, ON, PointerMatrix, MouseButton } from '@ohos.UiTest' + +export default function ActionEventRegisterComponentChangeEventCallbackGrid() { + + describe('ActionEventRegisterComponentChangeEventCallbackGrid', () => { + afterEach(async (done: Function) => { + if (Settings.windowClass == undefined) { + return; + } + + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST',) + return; + } + Logger.info('TEST',); + }) + await Utils.sleep(1000); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_EVENT_REGISTER_COMPONENT_CHANGE_EVENT_CALLBACK_GRID_040 + * @tc.name SUB_ACE_ACTION_EVENT_REGISTER_COMPONENT_CHANGE_EVENT_CALLBACK_GRID_040 + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_EVENT_REGISTER_COMPONENT_CHANGE_EVENT_CALLBACK_GRID_040', 0, async (done: Function) => { + Logger.info('TEST', 'SUB_ACE_ACTION_EVENT_REGISTER_COMPONENT_CHANGE_EVENT_CALLBACK_GRID_040 start.'); + Settings.createWindow("testability/pages/ActionEventRegisterComponentChangeEventCallbackGrid/ActionEventRegisterComponentChangeEventCallbackGrid040"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', 'SUB_ACE_ACTION_EVENT_REGISTER_COMPONENT_CHANGE_EVENT_CALLBACK_GRID_040 finish.'); + done(); + }) + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionEventRegisterComponentChangeEventCallbackTextinputTest/ActionEventRegisterComponentChangeEventCallbackTextinput.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionEventRegisterComponentChangeEventCallbackTextinputTest/ActionEventRegisterComponentChangeEventCallbackTextinput.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..5e6808e862e9e8dba07be2a0fed2966049888967 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionEventRegisterComponentChangeEventCallbackTextinputTest/ActionEventRegisterComponentChangeEventCallbackTextinput.test.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 { 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, ON, PointerMatrix, MouseButton } from '@ohos.UiTest' + +export default function ActionEventRegisterComponentChangeEventCallbackTextinput() { + + describe('ActionEventRegisterComponentChangeEventCallbackTextinput', () => { + afterEach(async (done: Function) => { + if (Settings.windowClass == undefined) { + return; + } + + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST',) + return; + } + Logger.info('TEST',); + }) + await Utils.sleep(1000); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_EVENT_REGISTER_COMPONENT_CHANGE_EVENT_CALLBACK_TEXTINPUT_150 + * @tc.name SUB_ACE_ACTION_EVENT_REGISTER_COMPONENT_CHANGE_EVENT_CALLBACK_TEXTINPUT_150 + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_EVENT_REGISTER_COMPONENT_CHANGE_EVENT_CALLBACK_TEXTINPUT_150', 0, async (done: Function) => { + Logger.info('TEST', 'SUB_ACE_ACTION_EVENT_REGISTER_COMPONENT_CHANGE_EVENT_CALLBACK_TEXTINPUT_150 start.'); + Settings.createWindow("testability/pages/ActionEventRegisterComponentChangeEventCallbackTextinput/ActionEventRegisterComponentChangeEventCallbackTextinput150"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', 'SUB_ACE_ACTION_EVENT_REGISTER_COMPONENT_CHANGE_EVENT_CALLBACK_TEXTINPUT_150 finish.'); + done(); + }) + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionEventRegisterComponentChangeEventCallbackToggleTest/ActionEventRegisterComponentChangeEventCallbackToggle.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionEventRegisterComponentChangeEventCallbackToggleTest/ActionEventRegisterComponentChangeEventCallbackToggle.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..158b07824072633b487fd07760c86381dbfbc4e8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionEventRegisterComponentChangeEventCallbackToggleTest/ActionEventRegisterComponentChangeEventCallbackToggle.test.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 { 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, ON, PointerMatrix, MouseButton } from '@ohos.UiTest' + +export default function ActionEventRegisterComponentChangeEventCallbackToggle() { + + describe('ActionEventRegisterComponentChangeEventCallbackToggle', () => { + afterEach(async (done: Function) => { + if (Settings.windowClass == undefined) { + return; + } + + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST',) + return; + } + Logger.info('TEST',); + }) + await Utils.sleep(1000); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_EVENT_REGISTER_COMPONENT_CHANGE_EVENT_CALLBACK_TOGGLE_160 + * @tc.name SUB_ACE_ACTION_EVENT_REGISTER_COMPONENT_CHANGE_EVENT_CALLBACK_TOGGLE_160 + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_EVENT_REGISTER_COMPONENT_CHANGE_EVENT_CALLBACK_TOGGLE_160', 0, async (done: Function) => { + Logger.info('TEST', 'SUB_ACE_ACTION_EVENT_REGISTER_COMPONENT_CHANGE_EVENT_CALLBACK_TOGGLE_160 start.'); + Settings.createWindow("testability/pages/ActionEventRegisterComponentChangeEventCallbackToggle/ActionEventRegisterComponentChangeEventCallbackToggle160"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', 'SUB_ACE_ACTION_EVENT_REGISTER_COMPONENT_CHANGE_EVENT_CALLBACK_TOGGLE_160 finish.'); + done(); + }) + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionEventRegisterComponentChangeEventCallbackWaterflowTest/ActionEventRegisterComponentChangeEventCallbackWaterflow.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionEventRegisterComponentChangeEventCallbackWaterflowTest/ActionEventRegisterComponentChangeEventCallbackWaterflow.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..44eb8f539cb30c0a4e911974ffedb2bf5eb380a9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionEventRegisterComponentChangeEventCallbackWaterflowTest/ActionEventRegisterComponentChangeEventCallbackWaterflow.test.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 { 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, ON, PointerMatrix, MouseButton } from '@ohos.UiTest' + +export default function ActionEventRegisterComponentChangeEventCallbackWaterflow() { + + describe('ActionEventRegisterComponentChangeEventCallbackWaterflow', () => { + afterEach(async (done: Function) => { + if (Settings.windowClass == undefined) { + return; + } + + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST',) + return; + } + Logger.info('TEST',); + }) + await Utils.sleep(1000); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_EVENT_REGISTER_COMPONENT_CHANGE_EVENT_CALLBACK_WATERFLOW_170 + * @tc.name SUB_ACE_ACTION_EVENT_REGISTER_COMPONENT_CHANGE_EVENT_CALLBACK_WATERFLOW_170 + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_EVENT_REGISTER_COMPONENT_CHANGE_EVENT_CALLBACK_WATERFLOW_170', 0, async (done: Function) => { + Logger.info('TEST', 'SUB_ACE_ACTION_EVENT_REGISTER_COMPONENT_CHANGE_EVENT_CALLBACK_WATERFLOW_170 start.'); + Settings.createWindow("testability/pages/ActionEventRegisterComponentChangeEventCallbackWaterflow/ActionEventRegisterComponentChangeEventCallbackWaterflow170"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', 'SUB_ACE_ACTION_EVENT_REGISTER_COMPONENT_CHANGE_EVENT_CALLBACK_WATERFLOW_170 finish.'); + done(); + }) + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionEventRegisterWebsearchEventCallbackTest/ActionEventRegisterWebsearchEventCallback.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionEventRegisterWebsearchEventCallbackTest/ActionEventRegisterWebsearchEventCallback.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..1b76747a57ed5952181c259b28e4106cf737f62b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionEventRegisterWebsearchEventCallbackTest/ActionEventRegisterWebsearchEventCallback.test.ets @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { 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, ON, Component, UiWindow, ResizeDirection, UiDriver, MouseButton } from '@ohos.UiTest'; + +export default function ActionEventRegisterWebsearchEventCallback() { + + describe('ActionEventRegisterWebsearchEventCallback', () => { + 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_ACTION_EVENT_REGISTER_WEBSEARCH_EVENT_CALLBACK010 + * @tc.name SUB_ACE_ACTION_EVENT_REGISTER_WEBSEARCH_EVENT_CALLBACK010 + * @tc.level Level 3 + */ + + it('SUB_ACE_ACTION_EVENT_REGISTER_WEBSEARCH_EVENT_CALLBACK010', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_REGISTER_WEBSEARCH_EVENT_CALLBACK010 start.`); + Settings.createWindow("testability/pages/ActionEventRegisterWebsearchEventCallback/ActionEventRegisterWebsearchEventCallback010"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + driver.triggerKey(2049) + await Utils.sleep(500); + driver.triggerKey(2049) + await Utils.sleep(1000); + let swiperArrow = await driver.findComponent(ON.id("websearchEventCallback010")); + let point2 = await swiperArrow.getBoundsCenter(); + await driver.click(point2.x, point2.y); + + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_ACTION_EVENT_REGISTER_WEBSEARCH_EVENT_CALLBACK010 finish.`); + done(); + }) + + + + + }) +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionGestureAttributemodifierTest/ActionGestureAttributemodifier.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionGestureAttributemodifierTest/ActionGestureAttributemodifier.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..e78f295c343a1442175c2e3619a48a515c171398 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionGestureAttributemodifierTest/ActionGestureAttributemodifier.test.ets @@ -0,0 +1,110 @@ +/* + * 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, ON } from '@ohos.UiTest' + +export default function ActionGestureAttributemodifier() { + + describe('ActionGestureAttributemodifier', () => { + 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_ACTION_GESTURE_ATTRIBUTEMODIFIER_0110 + * @tc.name SUB_ACE_ACTION_GESTURE_ATTRIBUTEMODIFIER_0110 + */ + it('SUB_ACE_ACTION_GESTURE_ATTRIBUTEMODIFIER_0110', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_ATTRIBUTEMODIFIER_0110 start.`); + Settings.createWindow("testability/pages/ActionGestureAttributemodifier/ActionGestureAttributemodifier0110"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_ATTRIBUTEMODIFIER_0110 finish.`); + done(); + }) + + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_ATTRIBUTEMODIFIER_0130 + * @tc.name SUB_ACE_ACTION_GESTURE_ATTRIBUTEMODIFIER_0130 + */ + it('SUB_ACE_ACTION_GESTURE_ATTRIBUTEMODIFIER_0130', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_ATTRIBUTEMODIFIER_0130 start.`); + Settings.createWindow("testability/pages/ActionGestureAttributemodifier/ActionGestureAttributemodifier0130"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_ATTRIBUTEMODIFIER_0130 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_ATTRIBUTEMODIFIER_0140 + * @tc.name SUB_ACE_ACTION_GESTURE_ATTRIBUTEMODIFIER_0140 + */ + it('SUB_ACE_ACTION_GESTURE_ATTRIBUTEMODIFIER_0140', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_ATTRIBUTEMODIFIER_0140 start.`); + Settings.createWindow("testability/pages/ActionGestureAttributemodifier/ActionGestureAttributemodifier0140"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_ATTRIBUTEMODIFIER_0140 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_ATTRIBUTEMODIFIER_0150 + * @tc.name SUB_ACE_ACTION_GESTURE_ATTRIBUTEMODIFIER_0150 + * @tc.level Level 3 + */ + + it('SUB_ACE_ACTION_GESTURE_ATTRIBUTEMODIFIER_0150', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_ATTRIBUTEMODIFIER_0150 start.`); + Settings.createWindow("testability/pages/ActionGestureAttributemodifier/ActionGestureAttributemodifier0150"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + let showPrevious = await driver.findComponent(ON.id("ActionGestureAttributemodifier0150")); + await showPrevious.longClick(); + await Utils.sleep(1000); + let swiperArrow = await driver.findComponent(ON.id("ActionGestureAttributemodifier0150_1")); + let point2 = await swiperArrow.getBoundsCenter(); + await Utils.sleep(1000); + await driver.fling({x: point2.x , y: point2.y}, {x: point2.x , y: point2.y-30}, 5, 1000); + + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_ATTRIBUTEMODIFIER_0150 finish.`); + done(); + }) + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionGestureEventMitigationTest/ActionGestureEventMitigation.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionGestureEventMitigationTest/ActionGestureEventMitigation.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..0fc56eed0285e9ac2ce2ae396433762260f4a940 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionGestureEventMitigationTest/ActionGestureEventMitigation.test.ets @@ -0,0 +1,370 @@ +/* + * 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, ON, PointerMatrix } from '@ohos.UiTest' + +export default function ActionGestureEventMitigation() { + + describe('ActionGestureEventMitigation', () => { + 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_ACTION_GESTURE_EVENT_MITIGATION_0020 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0020 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0020', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0020 start.`); + Settings.createWindow("testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation20"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('ActionGestureEventMitigation20')); + let point = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.swipe(center.x,point.bottom,center.x,point.top,20000); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0020 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0060 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0060 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0060', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0060 start.`); + Settings.createWindow("testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation60"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('ActionGestureEventMitigation60')); + let point = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.swipe(center.x,point.bottom,center.x,point.top,1000); + await driver.swipe(center.x,point.bottom,center.x,point.top,1000); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0060 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0010 + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0010', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0010 start.`); + Settings.createWindow("testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0010"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('ActionGestureEventMitigation10')); + let point = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.swipe(center.x, point.bottom, center.x, point.top, 20000); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0010 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0050 + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0050', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0050 start.`); + Settings.createWindow("testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0050"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('ActionGestureEventMitigation10')); + let point = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.swipe(center.x, point.bottom, center.x, point.top, 20000); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0050 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0040 + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0040', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0050 start.`); + Settings.createWindow("testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0040"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('ActionGestureEventMitigation0040')); + let point = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.swipe(center.x, point.bottom, center.x, point.top, 20000); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0040 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0080 + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0080', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0080 start.`); + Settings.createWindow("testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0080"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('ActionGestureEventMitigation0080')); + let point = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.swipe(center.x, point.bottom, center.x, point.top, 20000); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0080 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0120 + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0120', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0120 start.`); + Settings.createWindow("testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0120"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('ActionGestureEventMitigation0120')); + let point = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.swipe(center.x, point.bottom, center.x, point.top, 20000); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0120 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0190 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0190 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0190', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0190 start.`); + Settings.createWindow("testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0190") + await Utils.sleep(300); + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0190 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0090_1 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0090_1 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0090_1', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0090_1 start.`); + Settings.createWindow("testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0090") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0090_1 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0090_2 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0090_2 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0090_2', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0090_2 start.`); + Settings.createWindow("testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0090") + await Utils.sleep(300); + let driver: Driver = Driver.create(); + let inner: Component = await driver.findComponent(ON.id('ActionGestureEventMitigation0090_outer')); + let point = await inner.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1, 4); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x, y: point.y - 30 + }); + pointers.setPoint(0, 2, { + x: point.x, y: point.y - 50 + }); + pointers.setPoint(0, 3, { + x: point.x, y: point.y - 70 + }); + await driver.injectMultiPointerAction(pointers, 20000); + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0090_2 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0070 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0070 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0070', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0070 start.`); + Settings.createWindow("testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0070") + await Utils.sleep(300); + let driver: Driver = Driver.create(); + let inner: Component = await driver.findComponent(ON.id('outer')); + let point = await inner.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x, y: point.y - 10 + }); + pointers.setPoint(0, 2, { + x: point.x, y: point.y - 20 + }); + await driver.injectMultiPointerAction(pointers, 20000); + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0070 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0130 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0130 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0130', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0130 start.`); + Settings.createWindow("testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0130") + await Utils.sleep(300); + let driver: Driver = Driver.create(); + let inner: Component = await driver.findComponent(ON.id('outer')); + let point = await inner.getBoundsCenter(); + await driver.fling(point, { + x: point.x, y:point.y - 20 + }, 5, 10000) + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0130 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0110 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0110 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0110', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0110 start.`); + Settings.createWindow("testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0110"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('ActionGestureEventMitigation0110')); + let point = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.swipe(center.x, point.bottom, center.x, point.top, 20000); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0110 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0140 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0140 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0140', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0140 start.`); + Settings.createWindow("testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0140"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('inner')); + let point = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.fling(center, { + x: center.x, y:center.y - 20 + }, 5, 1000) + + await driver.fling(center, { + x: center.x, y:center.y + 20 + }, 5, 1000) + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0140 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0170 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0170 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0170', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0170 start.`); + Settings.createWindow("testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0170"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('inner')); + let point = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.fling(center, { + x: center.x, y:center.y - 20 + }, 5, 1000) + await driver.fling(center, { + x: center.x, y:center.y + 20 + }, 5, 1000) + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0170 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0180 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0180 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0180', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0180 start.`); + Settings.createWindow("testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0180"); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_MITIGATION_0180 finish.`); + done(); + }) + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionGestureEventRecognizerTest/ActionGestureEventRecognizer.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionGestureEventRecognizerTest/ActionGestureEventRecognizer.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..ca61aca05cfe425260d11cc87e847a6402cc9360 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionGestureEventRecognizerTest/ActionGestureEventRecognizer.test.ets @@ -0,0 +1,756 @@ +/* + * 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, ON } from '@ohos.UiTest' + +export default function ActionGestureEventRecognizer() { + + describe('ActionGestureEventRecognizer', () => { + 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_ACTION_GESTURE_EVENT_RECOGNIZER_0030 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0030 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0030', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0030 start.`); + Settings.createWindow("testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer30"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('ActionGestureEventRecognizer30')); + let point = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.swipe(center.x,point.bottom,center.x,point.top,20000); + await driver.swipe(center.x,point.bottom,center.x,point.top,1000); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0030 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0040 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0040 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0040', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0040 start.`); + Settings.createWindow("testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer40"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('ActionGestureEventRecognizer40')); + let point = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.swipe(center.x,point.bottom,center.x,point.top,20000); + await driver.swipe(center.x,point.bottom,center.x,point.top,1000); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0040 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0050 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0050 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0050', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0050 start.`); + Settings.createWindow("testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer50"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('ActionGestureEventRecognizer50')); + let point = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.swipe(center.x,point.bottom,center.x,point.top,2000); + await driver.swipe(center.x,point.bottom,center.x,point.top,2000); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0050 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0120 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0120 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0120', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0120 start.`); + Settings.createWindow("testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer120"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('ActionGestureEventRecognizer120')); + let point = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.swipe(center.x,point.bottom,center.x,point.top,2000); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0120 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0130 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0130 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0130', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0130 start.`); + Settings.createWindow("testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer130"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('ActionGestureEventRecognizer130')); + let point = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.swipe(center.x,point.bottom,center.x,point.top,2000); + await driver.swipe(center.x,point.bottom,center.x,point.top,2000); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0130 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0140 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0140 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0140', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0140 start.`); + Settings.createWindow("testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer140"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('ActionGestureEventRecognizer140')); + let point = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.swipe(center.x,point.bottom,center.x,point.top,2000); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0140 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0150 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0150 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0150', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0150 start.`); + Settings.createWindow("testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer150"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('ActionGestureEventRecognizer150')); + let point = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.swipe(center.x,point.bottom,center.x,point.top,2000); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0150 finish.`); + done(); + }) + + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0160 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0160 + * @tc.desc ActionGestureEventRecognizer + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0160', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0160 start.`); + Settings.createWindow("testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0160",) + await Utils.sleep(1000) + let driver:Driver= Driver.create() + await driver.fling({x: 300, y: 300},{x: 300, y: 10},5,200); + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0160 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0170 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0170 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0170', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0170 start.`); + Settings.createWindow("testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer170"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('ActionGestureEventRecognizer170')); + let point = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.swipe(center.x,point.bottom,center.x,point.top,2000); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0170 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0180 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0180 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0180', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0180 start.`); + Settings.createWindow("testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer180"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('ActionGestureEventRecognizer180')); + let point = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.swipe(center.x,point.bottom,center.x,point.top,2000); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0180 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0080 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0080 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0080', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0080 start.`); + Settings.createWindow("testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer80"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('ActionGestureEventRecognizer80')); + let point = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.swipe(center.x,point.bottom,center.x,point.top,2000); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0080 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0070 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0070 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0070', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0070 start.`); + Settings.createWindow("testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer70"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('ActionGestureEventRecognizer70')); + let point = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.swipe(center.x,point.bottom,center.x,point.top,2000); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0070 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0060 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0060 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0060', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0060 start.`); + Settings.createWindow("testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer60"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('ActionGestureEventRecognizer60')); + let point = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.swipe(center.x,point.bottom,center.x,point.top,2000); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0060 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0360 + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0360', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0360 start.`); + Settings.createWindow("testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0360"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('outer')); + let point = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.swipe(center.x,point.bottom,center.x,point.top,2000); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0360 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0090 + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0090', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0090 start.`); + Settings.createWindow("testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0090"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('ActionGestureEventRecognizer0090')); + let point = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.swipe(center.x,point.bottom,center.x,point.top,20000); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0090 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0020 + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0020', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0020 start.`); + Settings.createWindow("testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0020"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('ActionGestureEventRecognizer0020')); + let point = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.swipe(center.x,point.bottom,center.x,point.top,1000); + await driver.swipe(center.x,point.bottom,center.x,point.top,20000); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0020 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0010 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0010 + * @tc.desc ActionGestureEventRecognizer + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0010', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0010 start.`); + Settings.createWindow("testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0010",) + await Utils.sleep(1000) + let driver:Driver= Driver.create() + await driver.fling({x: 450, y: 100},{x: 450, y: 480},5,200); + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0010 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0190 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0190 + * @tc.desc ActionGestureEventRecognizer + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0190', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0190 start.`); + Settings.createWindow("testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0190",) + await Utils.sleep(1000) + let driver:Driver= Driver.create() + await driver.fling({x: 450, y: 100},{x: 450, y: 480},5,200); + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0190 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0260 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0260 + * @tc.desc ActionGestureEventRecognizer + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0260', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0260 start.`); + Settings.createWindow("testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0260",) + await Utils.sleep(1000) + let driver:Driver= Driver.create() + await driver.fling({x: 450, y: 100},{x: 450, y: 480},5,200); + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0260 finish.`); + done() + }) + + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0270 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0270 + * @tc.desc ActionGestureEventRecognizer + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0270', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0270 start.`); + Settings.createWindow("testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0270",) + await Utils.sleep(1000) + let driver:Driver= Driver.create() + await driver.fling({x: 200, y: 880},{x: 200, y: 10},5,200); + await Utils.sleep(1000) + await driver.fling({x: 200, y: 880},{x: 200, y: 10},5,200); + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0270 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0250 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0250 + * @tc.desc ActionGestureEventRecognizer + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0250', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0250 start.`); + Settings.createWindow("testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0250",) + await Utils.sleep(1000) + let driver:Driver= Driver.create() + await driver.fling({x: 200, y: 880},{x: 200, y: 10},5,200); + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0250 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0220 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0220 + * @tc.desc ActionGestureEventRecognizer + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0220', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0220 start.`); + Settings.createWindow("testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0220",) + await Utils.sleep(1000) + let driver:Driver= Driver.create() + await driver.fling({x: 200, y: 880},{x: 200, y: 10},5,200); + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0220 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0240 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0240 + * @tc.desc ActionGestureEventRecognizer + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0240', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0240 start.`); + Settings.createWindow("testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0240",) + await Utils.sleep(1000) + let driver:Driver= Driver.create() + await driver.fling({x: 200, y: 880},{x: 200, y: 10},5,200); + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0240 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0200 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0200 + * @tc.desc ActionGestureEventRecognizer + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0200', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0200 start.`); + Settings.createWindow("testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0200",) + await Utils.sleep(1000) + let driver:Driver= Driver.create() + await driver.fling({x: 200, y: 300},{x: 200, y: 10},5,200); + await driver.fling({x: 300, y: 300},{x: 300, y: 500},5,20000); + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0200 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0210 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0210 + * @tc.desc ActionGestureEventRecognizer + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0210', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0210 start.`); + Settings.createWindow("testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0210",) + await Utils.sleep(1000) + let driver:Driver= Driver.create() + await driver.fling({x: 300, y: 300},{x: 200, y: 300},5,200); + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0210 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0100 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0100 + * @tc.desc ActionGestureEventRecognizer + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0100', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0100 start.`); + Settings.createWindow("testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0100",) + await Utils.sleep(1000) + let driver:Driver= Driver.create() + await driver.fling({x: 300, y: 300},{x: 200, y: 300},5,200); + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0100 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0110 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0110 + * @tc.desc ActionGestureEventRecognizer + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0110', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0110 start.`); + Settings.createWindow("testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0110",) + await Utils.sleep(1000) + let driver:Driver= Driver.create() + await driver.fling({x: 300, y: 300},{x: 300, y: 10},5,200); + await driver.fling({x: 300, y: 300},{x: 300, y: 500},5,20000); + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0110 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0280 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0280 + * @tc.desc ActionGestureEventRecognizer + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0280', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0280 start.`); + Settings.createWindow("testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0280",) + await Utils.sleep(1000) + let driver:Driver= Driver.create() + await driver.fling({x: 450, y: 100},{x: 450, y: 480},5,200); + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0280 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0290 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0290 + * @tc.desc ActionGestureEventRecognizer + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0290', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0290 start.`); + Settings.createWindow("testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0290",) + await Utils.sleep(1000) + let driver:Driver= Driver.create() + await driver.fling({x: 450, y: 100},{x: 450, y: 480},5,200); + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0290 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0300 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0300 + * @tc.desc ActionGestureEventRecognizer + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0300', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0300 start.`); + Settings.createWindow("testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0300",) + await Utils.sleep(1000) + let driver:Driver= Driver.create() + await driver.fling({x: 450, y: 100},{x: 450, y: 480},5,200); + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0300 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0310 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0310 + * @tc.desc ActionGestureEventRecognizer + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0310', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0310 start.`); + Settings.createWindow("testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0310",) + await Utils.sleep(1000) + let driver:Driver= Driver.create() + await driver.fling({x: 450, y: 100},{x: 450, y: 480},5,200); + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0310 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0320 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0320 + * @tc.desc ActionGestureEventRecognizer + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0320', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0320 start.`); + Settings.createWindow("testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0320",) + await Utils.sleep(1000) + let driver:Driver= Driver.create() + await driver.fling({x: 450, y: 100},{x: 450, y: 480},5,200); + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0320 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0330 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0330 + * @tc.desc ActionGestureEventRecognizer + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0330', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0330 start.`); + Settings.createWindow("testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0330",) + await Utils.sleep(1000) + let driver:Driver= Driver.create() + await driver.fling({x: 450, y: 100},{x: 450, y: 480},5,200); + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0330 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0370 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0370 + * @tc.desc ActionGestureEventRecognizer + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0370', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0370 start.`); + Settings.createWindow("testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0370",) + await Utils.sleep(1000) + let driver:Driver= Driver.create() + await driver.fling({x: 450, y: 100},{x: 450, y: 480},5,200); + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0370 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0380 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0380 + * @tc.desc ActionGestureEventRecognizer + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0380', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0380 start.`); + Settings.createWindow("testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0380",) + await Utils.sleep(1000) + let driver:Driver= Driver.create() + await driver.fling({x: 450, y: 100},{x: 450, y: 480},5,200); + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0380 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0390 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0390 + * @tc.desc ActionGestureEventRecognizer + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0390', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0390 start.`); + Settings.createWindow("testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0390",) + await Utils.sleep(1000) + let driver:Driver= Driver.create() + await driver.fling({x: 450, y: 100},{x: 450, y: 480},5,200); + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0390 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0400 + * @tc.name SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0400 + * @tc.desc ActionGestureEventRecognizer + */ + it('SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0400', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0400 start.`); + Settings.createWindow("testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0400",) + await Utils.sleep(1000) + let driver:Driver= Driver.create() + await driver.fling({x: 450, y: 100},{x: 450, y: 480},5,200); + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EVENT_RECOGNIZER_0400 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionGestureExcepionHandingTest/ActionGestureExcepionHanding.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionGestureExcepionHandingTest/ActionGestureExcepionHanding.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..a0572dfbee53eda8cefabf905be1c5430a9fd284 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionGestureExcepionHandingTest/ActionGestureExcepionHanding.test.ets @@ -0,0 +1,75 @@ +/* + * 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, ON } from '@ohos.UiTest' + +export default function ActionGestureExcepionHanding() { + + describe('ActionGestureExcepionHanding', () => { + 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_ACTION_GESTURE_EXCEPION_HANDING_0570 + */ + it('SUB_ACE_ACTION_GESTURE_EXCEPION_HANDING_0570', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EXCEPION_HANDING_0570 start.`); + Settings.createWindow("testability/pages/ActionGestureExcepionHanding/ActionGestureExcepionHanding0570"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let grid:Component = await driver.findComponent(ON.id('grid')); + let point = await grid.getBoundsCenter() + await driver.mouseDrag({x: point.x , y: point.y+ 80},{x: point.x, y: point.y - 140}) + await Utils.sleep(1000); + await driver.mouseScroll({x: point.x , y: point.y+ 80}, true, 1) + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EXCEPION_HANDING_0570 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_EXCEPION_HANDING_0010 + */ + it('SUB_ACE_ACTION_GESTURE_EXCEPION_HANDING_0010', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EXCEPION_HANDING_0010 start.`); + Settings.createWindow("testability/pages/ActionGestureExcepionHanding/ActionGestureExcepionHanding0010"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_EXCEPION_HANDING_0010 finish.`); + done(); + }) + + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionGestureGesturegroupInterfaceTest/ActionGestureGesturegroupInterface.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionGestureGesturegroupInterfaceTest/ActionGestureGesturegroupInterface.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..5809b48dc89f8e92c47c8162841f0dc266c9310d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionGestureGesturegroupInterfaceTest/ActionGestureGesturegroupInterface.test.ets @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { 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, ON, Component, UiWindow, ResizeDirection, UiDriver, MouseButton } from '@ohos.UiTest'; + +export default function ActionGestureGesturegroupInterface() { + + describe('ActionGestureGesturegroupInterface', () => { + 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_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0040 + * @tc.name SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0040 + * @tc.level Level 3 + */ + + it('SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0040', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0040 start.`); + Settings.createWindow("testability/pages/ActionGestureGesturegroupInterface/ActionGestureGesturegroupInterface0040"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + let showPrevious = await driver.findComponent(ON.id("ActionGestureGesturegroupInterface0040")); + await showPrevious.longClick(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0040 finish.`); + done(); + }) + + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0020 + * @tc.name SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0020 + * @tc.level Level 3 + */ + + it('SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0020', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0020 start.`); + Settings.createWindow("testability/pages/ActionGestureGesturegroupInterface/ActionGestureGesturegroupInterface0020"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + let showPrevious = await driver.findComponent(ON.id("ActionGestureGesturegroupInterface0020")); + await showPrevious.longClick(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_GESTUREGROUP_INTERFACE_0020 finish.`); + done(); + }) + + + }) +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionGestureLonggestureDfxTest/ActionGestureLonggestureDfx.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionGestureLonggestureDfxTest/ActionGestureLonggestureDfx.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..8ed7a5ecf4b7575cb6568ace4ef88123ac8deba0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionGestureLonggestureDfxTest/ActionGestureLonggestureDfx.test.ets @@ -0,0 +1,83 @@ +/* + * 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, ON } from '@ohos.UiTest' + +export default function ActionGestureLonggestureDfx() { + + describe('ActionGestureLonggestureDfx', () => { + 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_ACTION_GESTURE_LONGGESTURE_DFX_0010 + * @tc.name SUB_ACE_ACTION_GESTURE_LONGGESTURE_DFX_0010 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_LONGGESTURE_DFX_0010', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_DFX_0010 start.`); + Settings.createWindow("testability/pages/ActionGestureLonggestureDfx/ActionGestureLonggestureDfx0010"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('ActionGestureLonggestureDfx0010')); + await scroll.longClick() + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_DFX_0010 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_LONGGESTURE_DFX_0020 + * @tc.name SUB_ACE_ACTION_GESTURE_LONGGESTURE_DFX_0020 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_LONGGESTURE_DFX_0020', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_DFX_0020 start.`); + Settings.createWindow("testability/pages/ActionGestureLonggestureDfx/ActionGestureLonggestureDfx0020"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('ActionGestureLonggestureDfx0020')); + await scroll.longClick() + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_DFX_0020 finish.`); + done(); + }) + + + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionGestureLonggestureInterfaceTest/ActionGestureLonggestureInterface.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionGestureLonggestureInterfaceTest/ActionGestureLonggestureInterface.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..077dc7f57088c54c4ecb51c665ac036b3d7c5b42 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionGestureLonggestureInterfaceTest/ActionGestureLonggestureInterface.test.ets @@ -0,0 +1,704 @@ +/* + * 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, ON, PointerMatrix } from '@ohos.UiTest' + +export default function ActionGestureLonggestureInterface() { + + describe('ActionGestureLonggestureInterface', () => { + 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_ACTION_GESTURE_LONGGESTURE_INTERFACE_0490 + * @tc.name SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0490 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0490', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0490 start.`); + Settings.createWindow("testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0490") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureLonggestureInterface0490_001')); + let point = await button.getBoundsCenter(); + await driver.click(point.x, point.y); + await driver.click(point.x, point.y + 60); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0490 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0010 + * @tc.name SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0010 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0010', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0010 start.`); + Settings.createWindow("testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0010") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureLonggestureInterface0010_001')); + let point = await button.getBoundsCenter(); + await driver.longClick(point.x, point.y); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0010 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0020 + * @tc.name SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0020 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0020', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0020 start.`); + Settings.createWindow("testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0020") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureLonggestureInterface0020_001')); + let point = await button.getBoundsCenter(); + await driver.longClick(point.x, point.y); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0020 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0030 + * @tc.name SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0030 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0030', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0030 start.`); + Settings.createWindow("testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0030") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureLonggestureInterface0030_001')); + let point = await button.getBoundsCenter(); + await driver.longClick(point.x, point.y); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0030 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0040 + * @tc.name SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0040 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0040', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0040 start.`); + Settings.createWindow("testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0040") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureLonggestureInterface0040_001')); + let point = await button.getBoundsCenter(); + await driver.longClick(point.x, point.y); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0040 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0050 + * @tc.name SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0050 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0050', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0050 start.`); + Settings.createWindow("testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0050") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureLonggestureInterface0050_001')); + let point = await button.getBoundsCenter(); + await driver.longClick(point.x, point.y); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0050 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0060 + * @tc.name SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0060 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0060', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0060 start.`); + Settings.createWindow("testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0060") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureLonggestureInterface0060_001')); + let point = await button.getBoundsCenter(); + await driver.longClick(point.x, point.y); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0060 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0070 + * @tc.name SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0070 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0070', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0070 start.`); + Settings.createWindow("testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0070") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureLonggestureInterface0070_001')); + let point = await button.getBoundsCenter(); + await driver.longClick(point.x, point.y); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0070 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0080 + * @tc.name SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0080 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0080', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0080 start.`); + Settings.createWindow("testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0080") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureLonggestureInterface0080_001')); + let point = await button.getBoundsCenter(); + await driver.longClick(point.x, point.y); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0080 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0090 + * @tc.name SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0090 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0090', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0090 start.`); + Settings.createWindow("testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0090") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureLonggestureInterface0090_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(10, 2) + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(2, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(3, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(4, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(5, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(6, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(7, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(8, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(9, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x, y: point.y + }); + pointers.setPoint(2, 1, { + x: point.x, y: point.y + }); + pointers.setPoint(3, 1, { + x: point.x, y: point.y + }); + pointers.setPoint(4, 1, { + x: point.x, y: point.y + }); + pointers.setPoint(5, 1, { + x: point.x, y: point.y + }); + pointers.setPoint(6, 1, { + x: point.x, y: point.y + }); + pointers.setPoint(7, 1, { + x: point.x, y: point.y + }); + pointers.setPoint(8, 1, { + x: point.x, y: point.y + }); + pointers.setPoint(9, 1, { + x: point.x, y: point.y + }); + await driver.injectMultiPointerAction(pointers, 200); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0090 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0100 + * @tc.name SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0100 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0100', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0100 start.`); + Settings.createWindow("testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0100") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureLonggestureInterface0100_001')); + let point = await button.getBoundsCenter(); + await driver.longClick(point.x, point.y); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0100 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0110 + * @tc.name SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0110 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0110', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0110 start.`); + Settings.createWindow("testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0110") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureLonggestureInterface0110_001')); + let point = await button.getBoundsCenter(); + await driver.longClick(point.x, point.y); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0110 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0260 + * @tc.name SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0260 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0260', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0260 start.`); + Settings.createWindow("testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0260") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureLonggestureInterface0260_001')); + let point = await button.getBoundsCenter(); + await driver.longClick(point.x, point.y); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0260 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0340 + * @tc.name SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0340 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0340', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0340 start.`); + Settings.createWindow("testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0340") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureLonggestureInterface0340_001')); + let point = await button.getBoundsCenter(); + await driver.longClick(point.x, point.y); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0340 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0350 + * @tc.name SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0350 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0350', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0350 start.`); + Settings.createWindow("testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0350") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureLonggestureInterface0350_001')); + let point = await button.getBoundsCenter(); + await driver.longClick(point.x, point.y); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0350 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0360 + * @tc.name SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0360 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0360', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0360 start.`); + Settings.createWindow("testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0360") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureLonggestureInterface0360_001')); + let point = await button.getBoundsCenter(); + await driver.longClick(point.x, point.y); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0360 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0400 + * @tc.name SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0400 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0400', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0400 start.`); + Settings.createWindow("testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0400") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureLonggestureInterface0400_001')); + let point = await button.getBoundsCenter(); + await driver.longClick(point.x, point.y); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0400 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0440 + * @tc.name SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0440 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0440', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0440 start.`); + Settings.createWindow("testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0440") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureLonggestureInterface0440_001')); + let point = await button.getBoundsCenter(); + await driver.longClick(point.x, point.y); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0440 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0120 + * @tc.name SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0120 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0120', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0120 start.`); + Settings.createWindow("testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0120") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureLonggestureInterface0120_001')); + let point = await button.getBoundsCenter(); + await driver.longClick(point.x, point.y); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0120 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0130 + * @tc.name SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0130 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0130', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0130 start.`); + Settings.createWindow("testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0130") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureLonggestureInterface0130_001')); + let point = await button.getBoundsCenter(); + await driver.longClick(point.x, point.y); + let pointers: PointerMatrix = PointerMatrix.create(2, 2) + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x, y: point.y + }); + await driver.injectMultiPointerAction(pointers, 200); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0130 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0140 + * @tc.name SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0140 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0140', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0140 start.`); + Settings.createWindow("testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0140") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureLonggestureInterface0140_001')); + let point = await button.getBoundsCenter(); + await driver.longClick(point.x, point.y); + let pointers: PointerMatrix = PointerMatrix.create(3, 2) + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x, y: point.y + }); + pointers.setPoint(2, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(2, 1, { + x: point.x, y: point.y + }); + await driver.injectMultiPointerAction(pointers, 200); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0140 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0150 + * @tc.name SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0150 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0150', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0150 start.`); + Settings.createWindow("testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0150") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureLonggestureInterface0150_001')); + let point = await button.getBoundsCenter(); + await driver.longClick(point.x, point.y); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0150 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0160 + * @tc.name SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0160 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0160', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0160 start.`); + Settings.createWindow("testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0160") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureLonggestureInterface0160_001')); + let point = await button.getBoundsCenter(); + await driver.longClick(point.x, point.y); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0160 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0180 + * @tc.name SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0180 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0180', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0180 start.`); + Settings.createWindow("testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0180") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureLonggestureInterface0180_001')); + let point = await button.getBoundsCenter(); + await driver.longClick(point.x, point.y); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0180 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0190 + * @tc.name SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0190 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0190', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0190 start.`); + Settings.createWindow("testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0190") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureLonggestureInterface0190_001')); + let point = await button.getBoundsCenter(); + await driver.longClick(point.x, point.y); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0190 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0270 + * @tc.name SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0270 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0270', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0270 start.`); + Settings.createWindow("testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0270") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureLonggestureInterface0270_001')); + let point = await button.getBoundsCenter(); + await driver.longClick(point.x, point.y); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0270 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0320 + * @tc.name SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0320 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0320', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0320 start.`); + Settings.createWindow("testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0320") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureLonggestureInterface0320_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1, 2) + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x + 5, y: point.y + }); + await driver.injectMultiPointerAction(pointers, 200); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0320 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0330 + * @tc.name SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0330 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0330', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0330 start.`); + Settings.createWindow("testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0330") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureLonggestureInterface0330_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1, 2) + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x, y: point.y + 20 + }); + await driver.injectMultiPointerAction(pointers, 200); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0330 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0170 + * @tc.name SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0170 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0170', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0170 start.`); + Settings.createWindow("testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0170") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureLonggestureInterface0170_001')); + let point = await button.getBoundsCenter(); + await driver.longClick(point.x, point.y); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_LONGGESTURE_INTERFACE_0170 finish.`); + done(); + }) + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionGesturePangestureInturefaceTest/ActionGesturePangestureIntureface.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionGesturePangestureInturefaceTest/ActionGesturePangestureIntureface.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..76af40fd204cc68cccfaeadb121b92ae40c3b496 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionGesturePangestureInturefaceTest/ActionGesturePangestureIntureface.test.ets @@ -0,0 +1,2086 @@ +/* + * 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, ON ,PointerMatrix} from '@ohos.UiTest' + +export default function ActionGesturePangestureIntureface() { + + describe('ActionGesturePangestureIntureface', () => { + 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_ACTION_GESTURE_PANGESTURE_INTUREFACE_0010 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0010 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0010', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0010 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface10") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface10')); + let center = await button.getBoundsCenter(); + await driver.drag(center.x,center.y,center.x,center.y+157) + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0010 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0020 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0020 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0020', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0020 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface20") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface20')); + let center = await button.getBoundsCenter(); + await driver.drag(center.x,center.y,center.x,center.y+400) + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0020 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0030 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0030 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0030', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0030 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface30") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface30')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y+30}); + pointers.setPoint(1,0,{x:center.x,y:center.y}); + pointers.setPoint(1,1,{x:center.x,y:center.y+30}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0030 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0040 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0040 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0040', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0040 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface30") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface30')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y+10}); + pointers.setPoint(1,0,{x:center.x,y:center.y}); + pointers.setPoint(1,1,{x:center.x,y:center.y+10}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0040 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0050 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0050 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0050', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0020 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface30") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface30')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(3,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y-30}); + pointers.setPoint(1,0,{x:center.x,y:center.y}); + pointers.setPoint(1,1,{x:center.x,y:center.y-30}); + pointers.setPoint(2,0,{x:center.x,y:center.y}); + pointers.setPoint(2,1,{x:center.x,y:center.y-30}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0050 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0060 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0060 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0060', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0060 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface30") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface30')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(3,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y+30}); + pointers.setPoint(1,0,{x:center.x,y:center.y}); + pointers.setPoint(1,1,{x:center.x,y:center.y+30}); + pointers.setPoint(2,0,{x:center.x,y:center.y}); + pointers.setPoint(2,1,{x:center.x,y:center.y+30}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0060 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0070 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0070 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0070', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0070 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface70") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface70')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(10,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y+30}); + pointers.setPoint(1,0,{x:center.x,y:center.y}); + pointers.setPoint(1,1,{x:center.x,y:center.y+30}); + pointers.setPoint(2,0,{x:center.x,y:center.y}); + pointers.setPoint(2,1,{x:center.x,y:center.y+30}); + pointers.setPoint(3,0,{x:center.x,y:center.y}); + pointers.setPoint(3,1,{x:center.x,y:center.y+30}); + pointers.setPoint(4,0,{x:center.x,y:center.y}); + pointers.setPoint(4,1,{x:center.x,y:center.y+30}); + pointers.setPoint(5,0,{x:center.x,y:center.y}); + pointers.setPoint(5,1,{x:center.x,y:center.y+30}); + pointers.setPoint(6,0,{x:center.x,y:center.y}); + pointers.setPoint(6,1,{x:center.x,y:center.y+30}); + pointers.setPoint(7,0,{x:center.x,y:center.y}); + pointers.setPoint(7,1,{x:center.x,y:center.y+30}); + pointers.setPoint(8,0,{x:center.x,y:center.y}); + pointers.setPoint(8,1,{x:center.x,y:center.y+30}); + pointers.setPoint(9,0,{x:center.x,y:center.y}); + pointers.setPoint(9,1,{x:center.x,y:center.y+30}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0070 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0080 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0080 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0080', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0080 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface80") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface80')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y+30}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000);; + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0080 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0090 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0090 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0090', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0090 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface90") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface90')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y+30}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0090 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0100 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0100 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0100', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0100 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface100") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface100')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y+30}); + pointers.setPoint(1,0,{x:center.x,y:center.y}); + pointers.setPoint(1,1,{x:center.x,y:center.y+30}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0100 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0110 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0110 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0110', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0110 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface100") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface100')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(3,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y+30}); + pointers.setPoint(1,0,{x:center.x,y:center.y}); + pointers.setPoint(1,1,{x:center.x,y:center.y+30}); + pointers.setPoint(2,0,{x:center.x,y:center.y}); + pointers.setPoint(2,1,{x:center.x,y:center.y+30}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0110 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0120 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0120 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0120', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0120 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface120") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface120')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y+100}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0120 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0130 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0130 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0130', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0130 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface130") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface130')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y+100}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0130 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0140 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0140 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0140', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0140 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface140") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface140')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y+100}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0140 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0150 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0150 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0150', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0150 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface140") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface140')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x+100,y:center.y}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0150 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0160 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0160 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0160', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0160 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface160") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface160')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y+100}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0160 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0170 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0170 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0170', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0170 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface160") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface160')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x+100,y:center.y}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0170 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0180 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0180 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0180', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0180 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface160") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface160')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x-100,y:center.y}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0180 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0190 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0190 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0190', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0190 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface190") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface190')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x-50,y:center.y+50}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0190 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0200 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0200 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0200', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0200 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface200") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface200')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x-10,y:center.y}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0200 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0210 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0210 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0210', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0210 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface200") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface200')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x-9,y:center.y}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0210 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0220 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0220 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0220', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0220 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface220") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface220')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y+100}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0220 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0230 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0230 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0230', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0230 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface220") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface220')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x-100,y:center.y}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0230 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0240 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0240 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0240', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0240 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface240") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface240')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x-100,y:center.y}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x+100,y:center.y}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y-100}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y+100}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0240 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0250 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0250 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0250', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0250 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface250") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface250')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y+100}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0250 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0260 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0260 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0260', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0260 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface250") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface250')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x+100,y:center.y}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0260 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0270 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0270 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0270', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0270 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface270") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface270')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y+100}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0270 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0280 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0280 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0280', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0280 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface270") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface270')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y-100}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0280 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0290 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0290 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0290', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0290 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface290") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface290')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y+100}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0290 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0300 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0300 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0300', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0300 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface290") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface290')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y-100}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0300 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0310 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0310 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0310', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0310 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface310") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface310')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y+100}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0310 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0320 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0320 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0320', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0320 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface310") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface310')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x+100,y:center.y}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0320 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0330 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0330 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0330', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0330 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface330") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface330')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x-100,y:center.y}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x+200,y:center.y}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y+200}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y+200}); + pointers.setPoint(0,1,{x:center.x,y:center.y+100}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0330 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0340 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0340 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0340', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0340 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface340") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface340')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x-100,y:center.y}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x+200,y:center.y}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y+200}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y+200}); + pointers.setPoint(0,1,{x:center.x,y:center.y+100}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0340 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0350 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0350 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0350', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0350 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface350") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface350')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x+5,y:center.y}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0350 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0360 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0360 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0360', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0360 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface350") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface350')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x-50,y:center.y}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0360 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0370 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0370 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0370', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0370 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface370") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface370')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x-15,y:center.y}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0370 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0380 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0380 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0380', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0380 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface370") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface370')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x-5,y:center.y}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0380 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0390 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0390 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0390', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0390 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface390") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface390')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x-100,y:center.y}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x+200,y:center.y}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y+200}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y+200}); + pointers.setPoint(0,1,{x:center.x,y:center.y+100}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0390 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0400 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0400 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0400', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0400 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface390") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface390')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x-100,y:center.y}); + pointers.setPoint(1,0,{x:center.x,y:center.y}); + pointers.setPoint(1,1,{x:center.x-100,y:center.y}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x+200,y:center.y}); + pointers.setPoint(1,0,{x:center.x,y:center.y}); + pointers.setPoint(1,1,{x:center.x+200,y:center.y}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y+200}); + pointers.setPoint(1,0,{x:center.x,y:center.y}); + pointers.setPoint(1,1,{x:center.x,y:center.y+200}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y+200}); + pointers.setPoint(0,1,{x:center.x,y:center.y+100}); + pointers.setPoint(1,0,{x:center.x,y:center.y+200}); + pointers.setPoint(1,1,{x:center.x,y:center.y+100}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0400 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0410 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0410 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0410', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0410 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface390") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface390')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(3,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x-100,y:center.y}); + pointers.setPoint(1,0,{x:center.x,y:center.y}); + pointers.setPoint(1,1,{x:center.x-100,y:center.y}); + pointers.setPoint(2,0,{x:center.x,y:center.y}); + pointers.setPoint(2,1,{x:center.x-100,y:center.y}); + await driver.injectMultiPointerAction(pointers,20000); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x+200,y:center.y}); + pointers.setPoint(1,0,{x:center.x,y:center.y}); + pointers.setPoint(1,1,{x:center.x+200,y:center.y}); + pointers.setPoint(2,0,{x:center.x,y:center.y}); + pointers.setPoint(2,1,{x:center.x+200,y:center.y}); + await driver.injectMultiPointerAction(pointers,20000); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y+200}); + pointers.setPoint(1,0,{x:center.x,y:center.y}); + pointers.setPoint(1,1,{x:center.x,y:center.y+200}); + pointers.setPoint(2,0,{x:center.x,y:center.y}); + pointers.setPoint(2,1,{x:center.x,y:center.y+200}); + await driver.injectMultiPointerAction(pointers,20000); + pointers.setPoint(0,0,{x:center.x,y:center.y+200}); + pointers.setPoint(0,1,{x:center.x,y:center.y+100}); + pointers.setPoint(1,0,{x:center.x,y:center.y+200}); + pointers.setPoint(1,1,{x:center.x,y:center.y+100}); + pointers.setPoint(2,0,{x:center.x,y:center.y+200}); + pointers.setPoint(2,1,{x:center.x,y:center.y+100}); + await driver.injectMultiPointerAction(pointers,20000); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0410 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0420 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0420 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0420', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0420 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface420") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface420')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x-4,y:center.y}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0420 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0430 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0430 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0430', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0430 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface420") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface420')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x-15,y:center.y}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0430 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0550 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0550 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0550', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0550 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface550") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface550')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x+100,y:center.y}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0550 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0530 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0530 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0530', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0530 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface530") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface530')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x+10,y:center.y}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0530 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0540 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0540 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0540', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0540 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface540") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface540')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y-50}); + pointers.setPoint(1,0,{x:center.x,y:center.y}); + pointers.setPoint(1,1,{x:center.x,y:center.y-50}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0540 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0560 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0560 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0560', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0560 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface560") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface560')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x+100,y:center.y}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0560 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0610 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0610 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0610', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0610 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface610") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface610')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x+100,y:center.y}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0610 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0660 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0660 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0660', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0660 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface660") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface660')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y-100}); + pointers.setPoint(1,0,{x:center.x,y:center.y}); + pointers.setPoint(1,1,{x:center.x,y:center.y-100}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0660 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0690 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0690 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0690', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0690 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface690") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface690')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x+100,y:center.y}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0690 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0670 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0670 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0670', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0670 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface670") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface670')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x+10,y:center.y}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0670 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0680 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0680 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0680', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0680 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface680") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface680')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y-50}); + pointers.setPoint(1,0,{x:center.x,y:center.y}); + pointers.setPoint(1,1,{x:center.x,y:center.y-50}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0680 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0750 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0750 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0750', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0750 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface750") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface750')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x+100,y:center.y}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0750 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0700 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0700 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0700', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0700 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface700") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface700')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x+100,y:center.y}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0700 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0800 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0800 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0800', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0800 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface800") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface800')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y-100}); + pointers.setPoint(1,0,{x:center.x,y:center.y}); + pointers.setPoint(1,1,{x:center.x,y:center.y-100}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0800 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0780 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0780 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0780', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0780 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface780") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface780')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y-100}); + pointers.setPoint(1,0,{x:center.x,y:center.y}); + pointers.setPoint(1,1,{x:center.x,y:center.y-100}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0780 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0790 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0790 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0790', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0790 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface790") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface790')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y-100}); + pointers.setPoint(1,0,{x:center.x,y:center.y}); + pointers.setPoint(1,1,{x:center.x,y:center.y-100}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0790 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0830 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0830 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0830', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0830 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface830") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface830')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x+100,y:center.y}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0830 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0810 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0810 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0810', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0530 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface810") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface810')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x+10,y:center.y}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0810 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0820 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0820 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0820', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0820 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface820") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface820')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y-50}); + pointers.setPoint(1,0,{x:center.x,y:center.y}); + pointers.setPoint(1,1,{x:center.x,y:center.y-50}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0820 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0890 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0890 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0890', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0890 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface890") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface890')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x+100,y:center.y}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0890 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0840 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0840 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0840', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0840 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface840") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface840')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x+100,y:center.y}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0840 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0940 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0940 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0940', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0940 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface940") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface940')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y-100}); + pointers.setPoint(1,0,{x:center.x,y:center.y}); + pointers.setPoint(1,1,{x:center.x,y:center.y-100}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0940 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0860 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0860 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0860', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0860 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface860") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface860')); + let center = await button.getBoundsCenter(); + await driver.mouseDrag({x:center.x,y:center.y},{x:center.x+100,y:center.y}) + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0860 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0440 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0440 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0440', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0440 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface440") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface440')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y-100}); + pointers.setPoint(1,0,{x:center.x,y:center.y}); + pointers.setPoint(1,1,{x:center.x,y:center.y-100}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0440 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0450 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0450 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0450', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0450 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface450") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface450')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y-100}); + pointers.setPoint(1,0,{x:center.x,y:center.y}); + pointers.setPoint(1,1,{x:center.x,y:center.y-100}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0450 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0460 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0460 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0460', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0460 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface460") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface460')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y-100}); + pointers.setPoint(1,0,{x:center.x,y:center.y}); + pointers.setPoint(1,1,{x:center.x,y:center.y-100}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0460 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0470 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0470 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0470', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0470 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface470") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface470')); + let center = await button.getBoundsCenter(); + await button.click(); + let pointers: PointerMatrix = PointerMatrix.create(2,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x+10,y:center.y}); + pointers.setPoint(1,0,{x:center.x,y:center.y}); + pointers.setPoint(1,1,{x:center.x+10,y:center.y}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0470 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0480 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0480 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0480', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0480 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface470") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface470')); + let center = await button.getBoundsCenter(); + await button.click(); + let pointers: PointerMatrix = PointerMatrix.create(2,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x-5,y:center.y}); + pointers.setPoint(1,0,{x:center.x,y:center.y}); + pointers.setPoint(1,1,{x:center.x-5,y:center.y}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0480 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0490 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0490 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0490', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0490 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface490") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface490')); + let center = await button.getBoundsCenter(); + await button.click(); + let pointers: PointerMatrix = PointerMatrix.create(2,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x-20,y:center.y}); + pointers.setPoint(1,0,{x:center.x,y:center.y}); + pointers.setPoint(1,1,{x:center.x-20,y:center.y}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0490 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0500 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0500 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0500', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0500 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface490") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface490')); + let center = await button.getBoundsCenter(); + await button.click(); + let pointers: PointerMatrix = PointerMatrix.create(2,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x-45,y:center.y}); + pointers.setPoint(1,0,{x:center.x,y:center.y}); + pointers.setPoint(1,1,{x:center.x-45,y:center.y}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0500 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0510 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0510 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0510', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0510 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface510") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface510')); + let center = await button.getBoundsCenter(); + await button.click(); + let pointers: PointerMatrix = PointerMatrix.create(2,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x-5,y:center.y}); + pointers.setPoint(1,0,{x:center.x,y:center.y}); + pointers.setPoint(1,1,{x:center.x-5,y:center.y}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0510 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0520 + * @tc.name SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0520 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0520', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0520 start.`); + Settings.createWindow("testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface510") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePangestureIntureface510')); + let center = await button.getBoundsCenter(); + await button.click(); + let pointers: PointerMatrix = PointerMatrix.create(3,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x-10,y:center.y}); + pointers.setPoint(1,0,{x:center.x,y:center.y}); + pointers.setPoint(1,1,{x:center.x-10,y:center.y}); + pointers.setPoint(2,0,{x:center.x,y:center.y}); + pointers.setPoint(2,1,{x:center.x-10,y:center.y}); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_PANGESTURE_INTUREFACE_0520 finish.`); + done(); + }) + + + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionGesturePinchgesrureInterfaceTest/ActionGesturePinchgesrureInterface.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionGesturePinchgesrureInterfaceTest/ActionGesturePinchgesrureInterface.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..84ba6c012b10914bed480db71d94c8447cbd7ec4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionGesturePinchgesrureInterfaceTest/ActionGesturePinchgesrureInterface.test.ets @@ -0,0 +1,2135 @@ +/* + * 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, ON, PointerMatrix } from '@ohos.UiTest' + +export default function ActionGesturePinchgesrureInterface() { + + describe('ActionGesturePinchgesrureInterface', () => { + 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_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0010 + * @tc.name SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0010 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0010', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0010 start.`); + Settings.createWindow("testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0010") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePinchgesrureInterface0010_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 4); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 130, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 140, y: point.y + }); + pointers.setPoint(0, 3, { + x: point.x - 150, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 10, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 160, y: point.y + }); + pointers.setPoint(1, 2, { + x: point.x + 170, y: point.y + }); + pointers.setPoint(1, 3, { + x: point.x + 180, y: point.y + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0010 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0030 + * @tc.name SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0030 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0030', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0030 start.`); + Settings.createWindow("testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0030") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePinchgesrureInterface0030_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 4); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 130, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 140, y: point.y + }); + pointers.setPoint(0, 3, { + x: point.x - 150, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 10, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 160, y: point.y + }); + pointers.setPoint(1, 2, { + x: point.x + 170, y: point.y + }); + pointers.setPoint(1, 3, { + x: point.x + 180, y: point.y + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0030 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0040_1 + * @tc.name SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0040_1 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0040_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0040_1 start.`); + Settings.createWindow("testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0040") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePinchgesrureInterface0040_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 4); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 130, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 140, y: point.y + }); + pointers.setPoint(0, 3, { + x: point.x - 150, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 10, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 160, y: point.y + }); + pointers.setPoint(1, 2, { + x: point.x + 170, y: point.y + }); + pointers.setPoint(1, 3, { + x: point.x + 180, y: point.y + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0040_1 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0040_2 + * @tc.name SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0040_2 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0040_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0040_2 start.`); + Settings.createWindow("testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0040") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePinchgesrureInterface0040_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 4); + pointers.setPoint(0, 0, { + x: point.x + 200, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 130, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 140, y: point.y + }); + pointers.setPoint(0, 3, { + x: point.x - 150, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 10, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 160, y: point.y + }); + pointers.setPoint(1, 2, { + x: point.x + 170, y: point.y + }); + pointers.setPoint(1, 3, { + x: point.x + 180, y: point.y + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0040_2 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0050 + * @tc.name SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0050 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0050', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0050 start.`); + Settings.createWindow("testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0050") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePinchgesrureInterface0050_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 4); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 330, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 340, y: point.y + }); + pointers.setPoint(0, 3, { + x: point.x - 350, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 20, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 560, y: point.y + }); + pointers.setPoint(1, 2, { + x: point.x + 570, y: point.y + }); + pointers.setPoint(1, 3, { + x: point.x + 580, y: point.y + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0050 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0060 + * @tc.name SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0060 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0060', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0060 start.`); + Settings.createWindow("testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0060") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePinchgesrureInterface0060_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 4); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 130, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 140, y: point.y + }); + pointers.setPoint(0, 3, { + x: point.x - 100, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 10, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 160, y: point.y + }); + pointers.setPoint(1, 2, { + x: point.x + 170, y: point.y + }); + pointers.setPoint(1, 3, { + x: point.x + 100, y: point.y + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0060 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0070 + * @tc.name SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0070 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0070', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0070 start.`); + Settings.createWindow("testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0070") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePinchgesrureInterface0070_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 130, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 140, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 10, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 160, y: point.y + }); + pointers.setPoint(1, 2, { + x: point.x + 170, y: point.y + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0070 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0080 + * @tc.name SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0080 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0080', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0080 start.`); + Settings.createWindow("testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0080") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePinchgesrureInterface0080_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 80, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 90, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 10, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 80, y: point.y + }); + pointers.setPoint(1, 2, { + x: point.x + 90, y: point.y + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0080 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0090 + * @tc.name SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0090 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0090', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0090 start.`); + Settings.createWindow("testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0090") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePinchgesrureInterface0090_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 130, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 140, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 10, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 160, y: point.y + }); + pointers.setPoint(1, 2, { + x: point.x + 170, y: point.y + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0090 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0100 + * @tc.name SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0100 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0100', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0100 start.`); + Settings.createWindow("testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0100") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePinchgesrureInterface0100_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 130, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 140, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 10, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 160, y: point.y + }); + pointers.setPoint(1, 2, { + x: point.x + 170, y: point.y + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0100 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0110 + * @tc.name SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0110 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0110', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0110 start.`); + Settings.createWindow("testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0110") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePinchgesrureInterface0110_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 130, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 140, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 10, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 160, y: point.y + }); + pointers.setPoint(1, 2, { + x: point.x + 170, y: point.y + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0110 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0120 + * @tc.name SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0120 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0120', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0120 start.`); + Settings.createWindow("testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0120") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePinchgesrureInterface0120_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 130, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 140, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 10, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 160, y: point.y + }); + pointers.setPoint(1, 2, { + x: point.x + 170, y: point.y + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0120 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0130 + * @tc.name SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0130 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0130', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0130 start.`); + Settings.createWindow("testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0130") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePinchgesrureInterface0130_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 130, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 140, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 10, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 160, y: point.y + }); + pointers.setPoint(1, 2, { + x: point.x + 170, y: point.y + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0130 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0140 + * @tc.name SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0140 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0140', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0140 start.`); + Settings.createWindow("testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0140") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePinchgesrureInterface0140_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 2); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 6, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 6, y: point.y + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0140 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0150 + * @tc.name SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0150 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0150', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0150 start.`); + Settings.createWindow("testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0150") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePinchgesrureInterface0150_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 20, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 30, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 20, y: point.y + }); + pointers.setPoint(1, 2, { + x: point.x + 30, y: point.y + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0150 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0160 + * @tc.name SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0160 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0160', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0160 start.`); + Settings.createWindow("testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0160") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePinchgesrureInterface0160_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 20, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 30, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 20, y: point.y + }); + pointers.setPoint(1, 2, { + x: point.x + 30, y: point.y + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0160 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0170 + * @tc.name SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0170 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0170', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0170 start.`); + Settings.createWindow("testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0170") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePinchgesrureInterface0170_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 20, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 30, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 20, y: point.y + }); + pointers.setPoint(1, 2, { + x: point.x + 30, y: point.y + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0170 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0180 + * @tc.name SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0180 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0180', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0180 start.`); + Settings.createWindow("testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0180") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePinchgesrureInterface0180_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(3, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 20, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 30, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 20, y: point.y + }); + pointers.setPoint(1, 2, { + x: point.x + 30, y: point.y + }); + pointers.setPoint(2, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(2, 1, { + x: point.x + 20, y: point.y + }); + pointers.setPoint(2, 2, { + x: point.x + 30, y: point.y + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0180 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0190 + * @tc.name SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0190 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0190', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0190 start.`); + Settings.createWindow("testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0190") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePinchgesrureInterface0190_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(4, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 20, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 30, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 20, y: point.y + }); + pointers.setPoint(1, 2, { + x: point.x + 30, y: point.y + }); + pointers.setPoint(2, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(2, 1, { + x: point.x + 20, y: point.y + }); + pointers.setPoint(2, 2, { + x: point.x + 30, y: point.y + }); + pointers.setPoint(3, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(3, 1, { + x: point.x - 20, y: point.y + }); + pointers.setPoint(3, 2, { + x: point.x - 30, y: point.y + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0190 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0200 + * @tc.name SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0200 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0200', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0200 start.`); + Settings.createWindow("testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0200") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePinchgesrureInterface0200_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(5, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 20, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 30, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 20, y: point.y + }); + pointers.setPoint(1, 2, { + x: point.x + 30, y: point.y + }); + pointers.setPoint(2, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(2, 1, { + x: point.x + 20, y: point.y + }); + pointers.setPoint(2, 2, { + x: point.x + 30, y: point.y + }); + pointers.setPoint(3, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(3, 1, { + x: point.x - 20, y: point.y + }); + pointers.setPoint(3, 2, { + x: point.x - 30, y: point.y + }); + pointers.setPoint(4, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(4, 1, { + x: point.x - 20, y: point.y + }); + pointers.setPoint(4, 2, { + x: point.x - 30, y: point.y + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0200 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0210 + * @tc.name SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0210 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0210', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0210 start.`); + Settings.createWindow("testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0210") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePinchgesrureInterface0210_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 20, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 30, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 20, y: point.y + }); + pointers.setPoint(1, 2, { + x: point.x + 30, y: point.y + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0210 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0220 + * @tc.name SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0220 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0220', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0220 start.`); + Settings.createWindow("testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0220") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePinchgesrureInterface0220_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 10, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 20, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 10, y: point.y + }); + pointers.setPoint(1, 2, { + x: point.x + 20, y: point.y + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0220 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0230 + * @tc.name SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0230 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0230', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0230 start.`); + Settings.createWindow("testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0230") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePinchgesrureInterface0230_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(3, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 10, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 20, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 10, y: point.y + }); + pointers.setPoint(1, 2, { + x: point.x + 20, y: point.y + }); + pointers.setPoint(2, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(2, 1, { + x: point.x + 10, y: point.y + }); + pointers.setPoint(2, 2, { + x: point.x + 20, y: point.y + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0230 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0240 + * @tc.name SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0240 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0240', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0240 start.`); + Settings.createWindow("testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0240") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePinchgesrureInterface0240_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(3, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 40, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 80, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 40, y: point.y + }); + pointers.setPoint(1, 2, { + x: point.x + 80, y: point.y + }); + pointers.setPoint(2, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(2, 1, { + x: point.x + 40, y: point.y + }); + pointers.setPoint(2, 2, { + x: point.x + 80, y: point.y + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0240 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0250 + * @tc.name SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0250 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0250', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0250 start.`); + Settings.createWindow("testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0250") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePinchgesrureInterface0250_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 40, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 80, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 40, y: point.y + }); + pointers.setPoint(1, 2, { + x: point.x + 80, y: point.y + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0250 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0260 + * @tc.name SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0260 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0260', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0260 start.`); + Settings.createWindow("testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0260") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePinchgesrureInterface0260_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 40, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 80, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 40, y: point.y + }); + pointers.setPoint(1, 2, { + x: point.x + 80, y: point.y + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0260 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0270 + * @tc.name SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0270 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0270', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0270 start.`); + Settings.createWindow("testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0270") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePinchgesrureInterface0270_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 40, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 80, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 40, y: point.y + }); + pointers.setPoint(1, 2, { + x: point.x + 80, y: point.y + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0270 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0280 + * @tc.name SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0280 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0280', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0280 start.`); + Settings.createWindow("testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0280") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePinchgesrureInterface0280_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 40, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 80, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 40, y: point.y + }); + pointers.setPoint(1, 2, { + x: point.x + 80, y: point.y + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0280 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0290 + * @tc.name SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0290 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0290', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0290 start.`); + Settings.createWindow("testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0290") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePinchgesrureInterface0290_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 130, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 140, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 10, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 160, y: point.y + }); + pointers.setPoint(1, 2, { + x: point.x + 170, y: point.y + }); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(1000); + let pointers2: PointerMatrix = PointerMatrix.create(2, 3); + pointers2.setPoint(0, 0, { + x: point.x - 100, y: point.y + }); + pointers2.setPoint(0, 1, { + x: point.x - 70, y: point.y + }); + pointers2.setPoint(0, 2, { + x: point.x, y: point.y + }); + pointers2.setPoint(1, 0, { + x: point.x + 60, y: point.y + }); + pointers2.setPoint(1, 1, { + x: point.x + 50, y: point.y + }); + pointers2.setPoint(1, 2, { + x: point.x, y: point.y + }); + await driver.injectMultiPointerAction(pointers2); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(5000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0290 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0300 + * @tc.name SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0300 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0300', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0300 start.`); + Settings.createWindow("testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0300") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePinchgesrureInterface0300_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 130, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 140, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 10, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 160, y: point.y + }); + pointers.setPoint(1, 2, { + x: point.x + 170, y: point.y + }); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(1000); + let pointers2: PointerMatrix = PointerMatrix.create(2, 3); + pointers2.setPoint(0, 0, { + x: point.x - 100, y: point.y + }); + pointers2.setPoint(0, 1, { + x: point.x - 70, y: point.y + }); + pointers2.setPoint(0, 2, { + x: point.x, y: point.y + }); + pointers2.setPoint(1, 0, { + x: point.x + 60, y: point.y + }); + pointers2.setPoint(1, 1, { + x: point.x + 50, y: point.y + }); + pointers2.setPoint(1, 2, { + x: point.x, y: point.y + }); + await driver.injectMultiPointerAction(pointers2); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(5000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0300 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0310 + * @tc.name SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0310 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0310', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0310 start.`); + Settings.createWindow("testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0310") + await Utils.sleep(5000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0310 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0320 + * @tc.name SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0320 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0320', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0320 start.`); + Settings.createWindow("testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0320") + await Utils.sleep(5000); + await windowSnap.snapShot(); + await Utils.sleep(5000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0320 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0330 + * @tc.name SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0330 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0330', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0330 start.`); + Settings.createWindow("testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0330") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePinchgesrureInterface0330_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 130, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 140, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 10, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 160, y: point.y + }); + pointers.setPoint(1, 2, { + x: point.x + 170, y: point.y + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0330 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0340 + * @tc.name SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0340 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0340', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0340 start.`); + Settings.createWindow("testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0340") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePinchgesrureInterface0340_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 130, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 140, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 10, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 160, y: point.y + }); + pointers.setPoint(1, 2, { + x: point.x + 170, y: point.y + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0340 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0350 + * @tc.name SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0350 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0350', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0350 start.`); + Settings.createWindow("testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0350") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePinchgesrureInterface0350_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 130, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 140, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 10, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 160, y: point.y + }); + pointers.setPoint(1, 2, { + x: point.x + 170, y: point.y + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0350 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0360 + * @tc.name SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0360 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0360', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0360 start.`); + Settings.createWindow("testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0360") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePinchgesrureInterface0360_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 130, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 140, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 10, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 160, y: point.y + }); + pointers.setPoint(1, 2, { + x: point.x + 170, y: point.y + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0360 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0370 + * @tc.name SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0370 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0370', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0370 start.`); + Settings.createWindow("testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0370") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePinchgesrureInterface0370_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 130, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 140, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 10, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 160, y: point.y + }); + pointers.setPoint(1, 2, { + x: point.x + 170, y: point.y + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0370 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0410 + * @tc.name SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0410 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0410', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0410 start.`); + Settings.createWindow("testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0410") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePinchgesrureInterface0410_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 130, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 140, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 10, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 160, y: point.y + }); + pointers.setPoint(1, 2, { + x: point.x + 170, y: point.y + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0410 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0420 + * @tc.name SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0420 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0420', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0420 start.`); + Settings.createWindow("testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0420") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePinchgesrureInterface0420_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 130, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 140, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 10, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 160, y: point.y + }); + pointers.setPoint(1, 2, { + x: point.x + 170, y: point.y + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0420 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0430 + * @tc.name SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0430 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0430', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0430 start.`); + Settings.createWindow("testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0430") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePinchgesrureInterface0430_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 130, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 140, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 10, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 160, y: point.y + }); + pointers.setPoint(1, 2, { + x: point.x + 170, y: point.y + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0430 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0440 + * @tc.name SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0440 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0440', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0440 start.`); + Settings.createWindow("testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0440") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePinchgesrureInterface0440_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 130, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 140, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 10, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 160, y: point.y + }); + pointers.setPoint(1, 2, { + x: point.x + 170, y: point.y + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0440 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0450 + * @tc.name SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0450 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0450', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0450 start.`); + Settings.createWindow("testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0450") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePinchgesrureInterface0450_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 130, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 140, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 10, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 160, y: point.y + }); + pointers.setPoint(1, 2, { + x: point.x + 170, y: point.y + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(5000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0450 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0460 + * @tc.name SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0460 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0460', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0460 start.`); + Settings.createWindow("testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0450") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePinchgesrureInterface0450_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 130, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 140, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 10, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 160, y: point.y + }); + pointers.setPoint(1, 2, { + x: point.x + 170, y: point.y + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0460 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0500 + * @tc.name SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0500 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0500', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0500 start.`); + Settings.createWindow("testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0500") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePinchgesrureInterface0500_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 130, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 140, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 10, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 160, y: point.y + }); + pointers.setPoint(1, 2, { + x: point.x + 170, y: point.y + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0500 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0510 + * @tc.name SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0510 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0510', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0510 start.`); + Settings.createWindow("testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0510") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePinchgesrureInterface0510_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 130, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 140, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 10, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 160, y: point.y + }); + pointers.setPoint(1, 2, { + x: point.x + 170, y: point.y + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0510 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0520 + * @tc.name SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0520 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0520', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0520 start.`); + Settings.createWindow("testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0520") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePinchgesrureInterface0520_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 130, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 140, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 10, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 160, y: point.y + }); + pointers.setPoint(1, 2, { + x: point.x + 170, y: point.y + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0520 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0530 + * @tc.name SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0530 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0530', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0530 start.`); + Settings.createWindow("testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0530") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePinchgesrureInterface0530_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 130, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 140, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 10, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 160, y: point.y + }); + pointers.setPoint(1, 2, { + x: point.x + 170, y: point.y + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0530 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0540 + * @tc.name SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0540 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0540', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0540 start.`); + Settings.createWindow("testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0540") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePinchgesrureInterface0540_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 130, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 140, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 10, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 160, y: point.y + }); + pointers.setPoint(1, 2, { + x: point.x + 170, y: point.y + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(5000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0540 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0550 + * @tc.name SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0550 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0550', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0550 start.`); + Settings.createWindow("testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0550") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePinchgesrureInterface0550_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 130, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 140, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 10, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 160, y: point.y + }); + pointers.setPoint(1, 2, { + x: point.x + 170, y: point.y + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0550 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0590 + * @tc.name SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0590 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0590', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0590 start.`); + Settings.createWindow("testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0590") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePinchgesrureInterface0590_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 130, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 140, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 10, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 160, y: point.y + }); + pointers.setPoint(1, 2, { + x: point.x + 170, y: point.y + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_INTERFACE_0590 finish.`); + done(); + }) + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionGesturePinchgesrureJumpTest/ActionGesturePinchgesrureJump.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionGesturePinchgesrureJumpTest/ActionGesturePinchgesrureJump.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..89f979fe7d59c890b319621bb3d158b369debe77 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionGesturePinchgesrureJumpTest/ActionGesturePinchgesrureJump.test.ets @@ -0,0 +1,107 @@ +/* + * 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, ON, PointerMatrix } from '@ohos.UiTest' + +export default function ActionGesturePinchgesrureJump() { + + describe('ActionGesturePinchgesrureJump', () => { + 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_ACTION_GESTURE_PINCHGESRURE_JUMP_0040 + * @tc.name SUB_ACE_ACTION_GESTURE_PINCHGESRURE_JUMP_0040 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_PINCHGESRURE_JUMP_0040', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_JUMP_0040 start.`); + Settings.createWindow("testability/pages/ActionGesturePinchgesrureJump/ActionGesturePinchgesrureJump0040") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePinchgesrureJump0040_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 30, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 40, y: point.y + }); + await driver.injectMultiPointerAction(pointers); + await driver.longClick(point.x - 40, point.y) + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_JUMP_0040 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_PINCHGESRURE_JUMP_0050 + * @tc.name SUB_ACE_ACTION_GESTURE_PINCHGESRURE_JUMP_0050 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_PINCHGESRURE_JUMP_0050', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_JUMP_0050 start.`); + Settings.createWindow("testability/pages/ActionGesturePinchgesrureJump/ActionGesturePinchgesrureJump0050") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGesturePinchgesrureJump0050_001')); + let point = await button.getBoundsCenter(); + await driver.longClick(point.x, point.y) + let pointers: PointerMatrix = PointerMatrix.create(1, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 30, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 40, y: point.y + }); + await driver.injectMultiPointerAction(pointers); + await driver.longClick(point.x - 40, point.y); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_PINCHGESRURE_JUMP_0050 finish.`); + done(); + }) + }) +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionGestureReplenishmentgertureInterfaceTest/ActionGestureReplenishmentgertureInterface.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionGestureReplenishmentgertureInterfaceTest/ActionGestureReplenishmentgertureInterface.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..d2eba74bd3752b838fbddd8688d2cec5e4d17072 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionGestureReplenishmentgertureInterfaceTest/ActionGestureReplenishmentgertureInterface.test.ets @@ -0,0 +1,952 @@ +/* + * 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, ON, PointerMatrix } from '@ohos.UiTest' + +export default function ActionGestureReplenishmentgertureInterface() { + + describe('ActionGestureReplenishmentgertureInterface', () => { + 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_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0220 + * @tc.name SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0220 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0220', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0220 start.`); + Settings.createWindow("testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0220") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureReplenishmentgertureInterface0220_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1, 2) + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x, y: point.y + 60 + }); + await driver.injectMultiPointerAction(pointers, 600); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0220 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0230 + * @tc.name SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0230 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0230', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0230 start.`); + Settings.createWindow("testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0230") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureReplenishmentgertureInterface0230_001')); + let point = await button.getBoundsCenter(); + await driver.click(point.x, point.y); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0230 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0140 + * @tc.name SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0140 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0140', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0140 start.`); + Settings.createWindow("testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0140") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureReplenishmentgertureInterface0140_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x + 10, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x + 20, y: point.y + }); + await driver.injectMultiPointerAction(pointers, 200); + let reset = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0140 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0150 + * @tc.name SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0150 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0150', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0150 start.`); + Settings.createWindow("testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0150") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureReplenishmentgertureInterface0150_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1, 3); + pointers.setPoint(0, 0, { + x: point.x + 50, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x + 100, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x + 150, y: point.y + }); + await driver.injectMultiPointerAction(pointers, 200); + let reset = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0150 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0160 + * @tc.name SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0160 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0160', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0160 start.`); + Settings.createWindow("testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0160") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureReplenishmentgertureInterface0160_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x + 10, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x + 20, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 50, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 100, y: point.y + }); + pointers.setPoint(1, 2, { + x: point.x + 150, y: point.y + }); + await driver.injectMultiPointerAction(pointers, 200); + let reset = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0150 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0370 + * @tc.name SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0370 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0370', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0370 start.`); + Settings.createWindow("testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0370") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureReplenishmentgertureInterface0370_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1, 3); + pointers.setPoint(0, 0, { + x: point.x - 30, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x + 20, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x + 50, y: point.y + }); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(1000); + let button2: Component = await driver.findComponent(ON.id('ActionGestureReplenishmentgertureInterface0370_002')); + let point2 = await button2.getBoundsCenter(); + let pointers2: PointerMatrix = PointerMatrix.create(1, 3); + pointers2.setPoint(0, 0, { + x: point2.x - 30, y: point2.y + }); + pointers2.setPoint(0, 1, { + x: point2.x + 20, y: point2.y + }); + pointers2.setPoint(0, 2, { + x: point2.x + 50, y: point2.y + }); + await driver.injectMultiPointerAction(pointers2); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0370 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0450 + * @tc.name SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0450 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0450', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0450 start.`); + Settings.createWindow("testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0450") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureReplenishmentgertureInterface0450_001')); + let point = await button.getBoundsCenter(); + await driver.click(point.x, point.y); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 30, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 10, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 40, y: point.y + }); + pointers.setPoint(1, 2, { + x: point.x + 60, y: point.y + }); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0450 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0260 + * @tc.name SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0260 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0260', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0260 start.`); + Settings.createWindow("testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0260") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureReplenishmentgertureInterface0260_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 6); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 3, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 4, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 5, { + x: point.x, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x, y: point.y + 250 + }); + pointers.setPoint(1, 1, { + x: point.x, y: point.y + 250 + }); + pointers.setPoint(1, 2, { + x: point.x, y: point.y + 250 + }); + pointers.setPoint(1, 3, { + x: point.x, y: point.y + 250 + }); + pointers.setPoint(1, 4, { + x: point.x, y: point.y + 250 + }); + pointers.setPoint(1, 5, { + x: point.x, y: point.y + 250 + }); + await driver.injectMultiPointerAction(pointers, 200); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0260 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0270 + * @tc.name SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0270 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0270', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0270 start.`); + Settings.createWindow("testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0270") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureReplenishmentgertureInterface0270_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 6); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 3, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 4, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 5, { + x: point.x, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x, y: point.y + 50 + }); + pointers.setPoint(1, 1, { + x: point.x, y: point.y + 50 + }); + pointers.setPoint(1, 2, { + x: point.x, y: point.y + 50 + }); + pointers.setPoint(1, 3, { + x: point.x, y: point.y + 50 + }); + pointers.setPoint(1, 4, { + x: point.x, y: point.y + 50 + }); + pointers.setPoint(1, 5, { + x: point.x, y: point.y + 50 + }); + await driver.injectMultiPointerAction(pointers, 200); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0270 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0290 + * @tc.name SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0290 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0290', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0290 start.`); + Settings.createWindow("testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0290") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureReplenishmentgertureInterface0290_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1, 8); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 3, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 4, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 5, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 6, { + x: point.x, y: point.y + 100 + }); + pointers.setPoint(0, 7, { + x: point.x, y: point.y + 200 + }); + await driver.injectMultiPointerAction(pointers, 200); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0290 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0320 + * @tc.name SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0320 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0320', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0320 start.`); + Settings.createWindow("testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0320") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureReplenishmentgertureInterface0320_001')); + let point = await button.getBoundsCenter(); + await driver.click(point.x, point.y); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x, y: point.y - 20 + }); + pointers.setPoint(0, 2, { + x: point.x, y: point.y - 30 + }); + pointers.setPoint(1, 0, { + x: point.x, y: point.y + 10 + }); + pointers.setPoint(1, 1, { + x: point.x, y: point.y + 20 + }); + pointers.setPoint(1, 2, { + x: point.x, y: point.y + 30 + }); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(1000); + let pointers2: PointerMatrix = PointerMatrix.create(1, 3); + pointers2.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers2.setPoint(0, 1, { + x: point.x - 20, y: point.y + }); + pointers2.setPoint(0, 2, { + x: point.x - 30, y: point.y + }); + await driver.injectMultiPointerAction(pointers2); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0320 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0400 + * @tc.name SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0400 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0400', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0400 start.`); + Settings.createWindow("testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0400") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureReplenishmentgertureInterface0400_001')); + let point = await button.getBoundsCenter(); + await driver.click(point.x, point.y); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 20, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 30, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 10, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 20, y: point.y + }); + pointers.setPoint(1, 2, { + x: point.x + 30, y: point.y + }); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(1000); + let reset = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0400 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0520 + */ + it('SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0520', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0520 start.`); + Settings.createWindow("testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0520"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0520 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0380 + */ + it('SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0380', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0380 start.`); + Settings.createWindow("testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0380"); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0380 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0580 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0580', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0580 start.`); + Settings.createWindow("testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0580") + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0580 finish.`); + done(); + }) + + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0550 + * @tc.name SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0550 + * @tc.level Level 3 + */ + + it('SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0550', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0550 start.`); + Settings.createWindow("testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0550"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + let showPrevious = await driver.findComponent(ON.id("ActionGestureReplenishmentgertureInterface0550")); + await showPrevious.longClick(); + await Utils.sleep(1000); + + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0550 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0110 + * @tc.name SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0110 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0110', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0110 start.`); + Settings.createWindow("testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0110") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureReplenishmentgertureInterface0110_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x + 10, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x + 20, y: point.y + }); + await driver.injectMultiPointerAction(pointers, 200); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0110 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0120 + * @tc.name SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0120 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0120', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0120 start.`); + Settings.createWindow("testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0120") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureReplenishmentgertureInterface0120_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x + 10, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x + 20, y: point.y + }); + await driver.injectMultiPointerAction(pointers, 200); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0120 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0180 + * @tc.name SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0180 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0180', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0180 start.`); + Settings.createWindow("testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0180") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureReplenishmentgertureInterface0180_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x + 10, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x + 20, y: point.y + }); + await driver.injectMultiPointerAction(pointers, 200); + await Utils.sleep(1000); + let reset = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0180 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0190 + * @tc.name SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0190 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0190', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0190 start.`); + Settings.createWindow("testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0190") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureReplenishmentgertureInterface0190_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x + 10, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x + 20, y: point.y + }); + await driver.injectMultiPointerAction(pointers, 200); + await Utils.sleep(1000); + let reset = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0190 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0200 + * @tc.name SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0200 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0200', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0200 start.`); + Settings.createWindow("testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0200") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureReplenishmentgertureInterface0200_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1, 2) + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x, y: point.y + 60 + }); + await driver.injectMultiPointerAction(pointers, 600); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0200 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0210 + * @tc.name SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0210 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0210', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0210 start.`); + Settings.createWindow("testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0210") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureReplenishmentgertureInterface0210_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1, 2) + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x, y: point.y + 60 + }); + await driver.injectMultiPointerAction(pointers, 600); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0210 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0250 + * @tc.name SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0250 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0250', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0250 start.`); + Settings.createWindow("testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0250") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureReplenishmentgertureInterface0250_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1, 2) + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x, y: point.y + 60 + }); + await driver.injectMultiPointerAction(pointers, 600); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0250 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0420 + * @tc.name SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0420 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0420', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0420 start.`); + Settings.createWindow("testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0420") + await Utils.sleep(1000); + + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0420 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0470 + * @tc.name SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0470 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0470', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0470 start.`); + Settings.createWindow("testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0470") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureReplenishmentgertureInterface0470_001')); + let point = await button.getBoundsCenter(); + await driver.click(point.x, point.y); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 30, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 10, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 40, y: point.y + }); + pointers.setPoint(1, 2, { + x: point.x + 60, y: point.y + }); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0470 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0310 + * @tc.name SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0310 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0310', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0310 start.`); + Settings.createWindow("testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0310") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureReplenishmentgertureInterface0310_001')); + let point = await button.getBoundsCenter(); + await driver.click(point.x, point.y); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x, y: point.y - 20 + }); + pointers.setPoint(0, 2, { + x: point.x, y: point.y - 30 + }); + pointers.setPoint(1, 0, { + x: point.x, y: point.y + 10 + }); + pointers.setPoint(1, 1, { + x: point.x, y: point.y + 20 + }); + pointers.setPoint(1, 2, { + x: point.x, y: point.y + 30 + }); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0310 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0330 + * @tc.name SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0330 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0330', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0330 start.`); + Settings.createWindow("testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0330") + await Utils.sleep(2000); + let driver = Driver.create(); + let grid: Component = await driver.findComponent(ON.id('grid')); + await grid.click() + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0330 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0340 + * @tc.name SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0340 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0340', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0340 start.`); + Settings.createWindow("testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0340") + await Utils.sleep(2000); + let driver = Driver.create(); + let grid: Component = await driver.findComponent(ON.id('grid1')); + await grid.longClick() + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0340 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0350 + * @tc.name SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0350 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0350', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0350 start.`); + Settings.createWindow("testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0350") + await Utils.sleep(2000); + let driver = Driver.create(); + let grid: Component = await driver.findComponent(ON.id('grid1')); + let point = await grid.getBoundsCenter() + await driver.swipe(point.x, point.y, point.x+100, point.y, 600) + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0350 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0360 + * @tc.name SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0360 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0360', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0360 start.`); + Settings.createWindow("testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0360") + await Utils.sleep(2000); + let driver = Driver.create(); + let grid: Component = await driver.findComponent(ON.id('grid1')); + let point = await grid.getBoundsCenter() + await driver.swipe(point.x, point.y, point.x+100, point.y, 600) + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_REPLENISHMENTGERTURE_INTERFACE_0360 finish.`); + done(); + }) + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionGestureRotationgestureInterfaceTest/ActionGestureRotationgestureInterface.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionGestureRotationgestureInterfaceTest/ActionGestureRotationgestureInterface.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..2a343942b84179b2ae56154a3cb6d11cdcbac545 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionGestureRotationgestureInterfaceTest/ActionGestureRotationgestureInterface.test.ets @@ -0,0 +1,1368 @@ +/* + * 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, ON, PointerMatrix } from '@ohos.UiTest' + +export default function ActionGestureRotationgestureInterface() { + + describe('ActionGestureRotationgestureInterface', () => { + 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_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0010 + * @tc.name SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0010 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0010', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0010 start.`); + Settings.createWindow("testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0010") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureRotationgestureInterface0010_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 4); + pointers.setPoint(0, 0, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 3, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 50, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 50, y: point.y + 50 + }); + pointers.setPoint(1, 2, { + x: point.x + 50, y: point.y + 50 + }); + pointers.setPoint(1, 3, { + x: point.x + 50, y: point.y + 90 + }); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(1000); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0010 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0020 + * @tc.name SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0020 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0020', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0020 start.`); + Settings.createWindow("testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0020") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureRotationgestureInterface0020_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 4); + pointers.setPoint(0, 0, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 3, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 50, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 50, y: point.y + 50 + }); + pointers.setPoint(1, 2, { + x: point.x + 50, y: point.y + 50 + }); + pointers.setPoint(1, 3, { + x: point.x + 50, y: point.y + 90 + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0020 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0030 + * @tc.name SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0030 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0030', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0030 start.`); + Settings.createWindow("testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0030") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureRotationgestureInterface0030_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 4); + pointers.setPoint(0, 0, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 3, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 50, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 50, y: point.y + 50 + }); + pointers.setPoint(1, 2, { + x: point.x + 50, y: point.y + 50 + }); + pointers.setPoint(1, 3, { + x: point.x + 50, y: point.y + 90 + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0030 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0040 + * @tc.name SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0040 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0040', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0040 start.`); + Settings.createWindow("testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0040") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureRotationgestureInterface0040_001')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureRotationgestureInterface0040_002')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 4); + pointers.setPoint(0, 0, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 3, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 50, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 50, y: point.y + 5 + }); + pointers.setPoint(1, 2, { + x: point.x + 50, y: point.y + 6 + }); + pointers.setPoint(1, 3, { + x: point.x + 50, y: point.y + 7 + }); + await driver.injectMultiPointerAction(pointers); + await button2.click(); + await Utils.sleep(5000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0040 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0050 + * @tc.name SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0050 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0050', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0050 start.`); + Settings.createWindow("testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0050") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureRotationgestureInterface0050_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 4); + pointers.setPoint(0, 0, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 3, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 50, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 50, y: point.y + 50 + }); + pointers.setPoint(1, 2, { + x: point.x + 50, y: point.y + 60 + }); + pointers.setPoint(1, 3, { + x: point.x + 50, y: point.y + 70 + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0050 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0060 + * @tc.name SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0060 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0060', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0060 start.`); + Settings.createWindow("testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0060") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureRotationgestureInterface0060_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(3, 4); + pointers.setPoint(0, 0, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 3, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 50, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 50, y: point.y + 50 + }); + pointers.setPoint(1, 2, { + x: point.x + 50, y: point.y + 60 + }); + pointers.setPoint(1, 3, { + x: point.x + 50, y: point.y + 70 + }); + pointers.setPoint(2, 0, { + x: point.x + 50, y: point.y + }); + pointers.setPoint(2, 1, { + x: point.x + 50, y: point.y + 50 + }); + pointers.setPoint(2, 2, { + x: point.x + 50, y: point.y + 60 + }); + pointers.setPoint(2, 3, { + x: point.x + 50, y: point.y + 70 + }); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0060 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0070 + * @tc.name SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0070 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0070', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0070 start.`); + Settings.createWindow("testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0070") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureRotationgestureInterface0070_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 4); + pointers.setPoint(0, 0, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 3, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 50, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 50, y: point.y + 50 + }); + pointers.setPoint(1, 2, { + x: point.x + 50, y: point.y + 60 + }); + pointers.setPoint(1, 3, { + x: point.x + 50, y: point.y + 70 + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0070 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0080 + * @tc.name SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0080 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0080', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0080 start.`); + Settings.createWindow("testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0080") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureRotationgestureInterface0080_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(4, 4); + pointers.setPoint(0, 0, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 3, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 50, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 50, y: point.y + 50 + }); + pointers.setPoint(1, 2, { + x: point.x + 50, y: point.y + 60 + }); + pointers.setPoint(1, 3, { + x: point.x + 50, y: point.y + 70 + }); + pointers.setPoint(2, 0, { + x: point.x + 50, y: point.y + }); + pointers.setPoint(2, 1, { + x: point.x + 50, y: point.y + 50 + }); + pointers.setPoint(2, 2, { + x: point.x + 50, y: point.y + 60 + }); + pointers.setPoint(2, 3, { + x: point.x + 50, y: point.y + 70 + }); + pointers.setPoint(3, 0, { + x: point.x + 50, y: point.y + }); + pointers.setPoint(3, 1, { + x: point.x + 50, y: point.y + 50 + }); + pointers.setPoint(3, 2, { + x: point.x + 50, y: point.y + 60 + }); + pointers.setPoint(3, 3, { + x: point.x + 50, y: point.y + 70 + }); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0080 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0090 + * @tc.name SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0090 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0090', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0090 start.`); + Settings.createWindow("testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0090") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureRotationgestureInterface0090_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(5, 4); + pointers.setPoint(0, 0, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 3, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 50, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 50, y: point.y + 50 + }); + pointers.setPoint(1, 2, { + x: point.x + 50, y: point.y + 60 + }); + pointers.setPoint(1, 3, { + x: point.x + 50, y: point.y + 70 + }); + pointers.setPoint(2, 0, { + x: point.x + 50, y: point.y + }); + pointers.setPoint(2, 1, { + x: point.x + 50, y: point.y + 50 + }); + pointers.setPoint(2, 2, { + x: point.x + 50, y: point.y + 60 + }); + pointers.setPoint(2, 3, { + x: point.x + 50, y: point.y + 70 + }); + pointers.setPoint(3, 0, { + x: point.x + 50, y: point.y + }); + pointers.setPoint(3, 1, { + x: point.x + 50, y: point.y + 50 + }); + pointers.setPoint(3, 2, { + x: point.x + 50, y: point.y + 60 + }); + pointers.setPoint(3, 3, { + x: point.x + 50, y: point.y + 70 + }); + pointers.setPoint(4, 0, { + x: point.x + 50, y: point.y + }); + pointers.setPoint(4, 1, { + x: point.x + 50, y: point.y + 50 + }); + pointers.setPoint(4, 2, { + x: point.x + 50, y: point.y + 60 + }); + pointers.setPoint(4, 3, { + x: point.x + 50, y: point.y + 70 + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0090 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0100 + * @tc.name SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0100 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0100', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0100 start.`); + Settings.createWindow("testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0100") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureRotationgestureInterface0100_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(6, 4); + pointers.setPoint(0, 0, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 3, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 50, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 50, y: point.y + 50 + }); + pointers.setPoint(1, 2, { + x: point.x + 50, y: point.y + 60 + }); + pointers.setPoint(1, 3, { + x: point.x + 50, y: point.y + 70 + }); + pointers.setPoint(2, 0, { + x: point.x + 50, y: point.y + }); + pointers.setPoint(2, 1, { + x: point.x + 50, y: point.y + 50 + }); + pointers.setPoint(2, 2, { + x: point.x + 50, y: point.y + 60 + }); + pointers.setPoint(2, 3, { + x: point.x + 50, y: point.y + 70 + }); + pointers.setPoint(3, 0, { + x: point.x + 50, y: point.y + }); + pointers.setPoint(3, 1, { + x: point.x + 50, y: point.y + 50 + }); + pointers.setPoint(3, 2, { + x: point.x + 50, y: point.y + 60 + }); + pointers.setPoint(3, 3, { + x: point.x + 50, y: point.y + 70 + }); + pointers.setPoint(4, 0, { + x: point.x + 50, y: point.y + }); + pointers.setPoint(4, 1, { + x: point.x + 50, y: point.y + 50 + }); + pointers.setPoint(4, 2, { + x: point.x + 50, y: point.y + 60 + }); + pointers.setPoint(4, 3, { + x: point.x + 50, y: point.y + 70 + }); + pointers.setPoint(5, 0, { + x: point.x + 50, y: point.y + }); + pointers.setPoint(5, 1, { + x: point.x + 50, y: point.y + 50 + }); + pointers.setPoint(5, 2, { + x: point.x + 50, y: point.y + 60 + }); + pointers.setPoint(5, 3, { + x: point.x + 50, y: point.y + 70 + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0100 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0110 + * @tc.name SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0110 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0110', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0110 start.`); + Settings.createWindow("testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0110") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureRotationgestureInterface0110_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(3, 4); + pointers.setPoint(0, 0, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 3, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 50, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 50, y: point.y + 50 + }); + pointers.setPoint(1, 2, { + x: point.x + 50, y: point.y + 60 + }); + pointers.setPoint(1, 3, { + x: point.x + 50, y: point.y + 70 + }); + pointers.setPoint(2, 0, { + x: point.x + 50, y: point.y + }); + pointers.setPoint(2, 1, { + x: point.x + 50, y: point.y + 50 + }); + pointers.setPoint(2, 2, { + x: point.x + 50, y: point.y + 60 + }); + pointers.setPoint(2, 3, { + x: point.x + 50, y: point.y + 70 + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0110 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0120 + * @tc.name SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0120 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0120', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0120 start.`); + Settings.createWindow("testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0120") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureRotationgestureInterface0120_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(3, 4); + pointers.setPoint(0, 0, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 3, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 50, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 50, y: point.y + 50 + }); + pointers.setPoint(1, 2, { + x: point.x + 50, y: point.y + 60 + }); + pointers.setPoint(1, 3, { + x: point.x + 50, y: point.y + 70 + }); + pointers.setPoint(2, 0, { + x: point.x + 50, y: point.y + }); + pointers.setPoint(2, 1, { + x: point.x + 50, y: point.y + 50 + }); + pointers.setPoint(2, 2, { + x: point.x + 50, y: point.y + 60 + }); + pointers.setPoint(2, 3, { + x: point.x + 50, y: point.y + 70 + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0120 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0130 + * @tc.name SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0130 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0130', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0130 start.`); + Settings.createWindow("testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0130") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureRotationgestureInterface0130_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(3, 4); + pointers.setPoint(0, 0, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 3, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 50, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 50, y: point.y + 50 + }); + pointers.setPoint(1, 2, { + x: point.x + 50, y: point.y + 60 + }); + pointers.setPoint(1, 3, { + x: point.x + 50, y: point.y + 70 + }); + pointers.setPoint(2, 0, { + x: point.x + 50, y: point.y + }); + pointers.setPoint(2, 1, { + x: point.x + 50, y: point.y + 50 + }); + pointers.setPoint(2, 2, { + x: point.x + 50, y: point.y + 60 + }); + pointers.setPoint(2, 3, { + x: point.x + 50, y: point.y + 70 + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0130 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0140 + * @tc.name SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0140 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0140', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0140 start.`); + Settings.createWindow("testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0140") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureRotationgestureInterface0140_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(3, 4); + pointers.setPoint(0, 0, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 3, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 50, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 50, y: point.y + 50 + }); + pointers.setPoint(1, 2, { + x: point.x + 50, y: point.y + 60 + }); + pointers.setPoint(1, 3, { + x: point.x + 50, y: point.y + 70 + }); + pointers.setPoint(2, 0, { + x: point.x + 50, y: point.y + }); + pointers.setPoint(2, 1, { + x: point.x + 50, y: point.y + 50 + }); + pointers.setPoint(2, 2, { + x: point.x + 50, y: point.y + 60 + }); + pointers.setPoint(2, 3, { + x: point.x + 50, y: point.y + 70 + }); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0140 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0150 + * @tc.name SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0150 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0150', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0150 start.`); + Settings.createWindow("testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0150") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureRotationgestureInterface0150_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(3, 4); + pointers.setPoint(0, 0, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 3, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 50, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 50, y: point.y + 50 + }); + pointers.setPoint(1, 2, { + x: point.x + 50, y: point.y + 60 + }); + pointers.setPoint(1, 3, { + x: point.x + 50, y: point.y + 70 + }); + pointers.setPoint(2, 0, { + x: point.x + 50, y: point.y + }); + pointers.setPoint(2, 1, { + x: point.x + 50, y: point.y + 50 + }); + pointers.setPoint(2, 2, { + x: point.x + 50, y: point.y + 60 + }); + pointers.setPoint(2, 3, { + x: point.x + 50, y: point.y + 70 + }); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0150 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0160 + * @tc.name SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0160 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0160', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0160 start.`); + Settings.createWindow("testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0160") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureRotationgestureInterface0160_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(3, 4); + pointers.setPoint(0, 0, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 3, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 50, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 50, y: point.y + 50 + }); + pointers.setPoint(1, 2, { + x: point.x + 50, y: point.y + 60 + }); + pointers.setPoint(1, 3, { + x: point.x + 50, y: point.y + 70 + }); + pointers.setPoint(2, 0, { + x: point.x + 50, y: point.y + }); + pointers.setPoint(2, 1, { + x: point.x + 50, y: point.y + 50 + }); + pointers.setPoint(2, 2, { + x: point.x + 50, y: point.y + 60 + }); + pointers.setPoint(2, 3, { + x: point.x + 50, y: point.y + 70 + }); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0160 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0170 + * @tc.name SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0170 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0170', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0170 start.`); + Settings.createWindow("testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0170") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureRotationgestureInterface0170_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(3, 4); + pointers.setPoint(0, 0, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 3, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 50, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 50, y: point.y + 50 + }); + pointers.setPoint(1, 2, { + x: point.x + 50, y: point.y + 60 + }); + pointers.setPoint(1, 3, { + x: point.x + 50, y: point.y + 70 + }); + pointers.setPoint(2, 0, { + x: point.x + 50, y: point.y + }); + pointers.setPoint(2, 1, { + x: point.x + 50, y: point.y + 50 + }); + pointers.setPoint(2, 2, { + x: point.x + 50, y: point.y + 60 + }); + pointers.setPoint(2, 3, { + x: point.x + 50, y: point.y + 70 + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0170 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0180 + * @tc.name SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0180 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0180', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0180 start.`); + Settings.createWindow("testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0180") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureRotationgestureInterface0180_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(3, 4); + pointers.setPoint(0, 0, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 3, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 50, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 50, y: point.y + 50 + }); + pointers.setPoint(1, 2, { + x: point.x + 50, y: point.y + 60 + }); + pointers.setPoint(1, 3, { + x: point.x + 50, y: point.y + 70 + }); + pointers.setPoint(2, 0, { + x: point.x + 50, y: point.y + }); + pointers.setPoint(2, 1, { + x: point.x + 50, y: point.y + 50 + }); + pointers.setPoint(2, 2, { + x: point.x + 50, y: point.y + 60 + }); + pointers.setPoint(2, 3, { + x: point.x + 50, y: point.y + 70 + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0180 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0260 + * @tc.name SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0260 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0260', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0260 start.`); + Settings.createWindow("testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0260") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureRotationgestureInterface0260_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(3, 4); + pointers.setPoint(0, 0, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 3, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 50, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 50, y: point.y + 50 + }); + pointers.setPoint(1, 2, { + x: point.x + 50, y: point.y + 60 + }); + pointers.setPoint(1, 3, { + x: point.x + 50, y: point.y + 70 + }); + pointers.setPoint(2, 0, { + x: point.x + 50, y: point.y + }); + pointers.setPoint(2, 1, { + x: point.x + 50, y: point.y + 50 + }); + pointers.setPoint(2, 2, { + x: point.x + 50, y: point.y + 60 + }); + pointers.setPoint(2, 3, { + x: point.x + 50, y: point.y + 70 + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0260 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0310 + * @tc.name SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0310 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0310', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0310 start.`); + Settings.createWindow("testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0310") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureRotationgestureInterface0310_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(3, 4); + pointers.setPoint(0, 0, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 3, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 50, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 50, y: point.y + 50 + }); + pointers.setPoint(1, 2, { + x: point.x + 50, y: point.y + 60 + }); + pointers.setPoint(1, 3, { + x: point.x + 50, y: point.y + 70 + }); + pointers.setPoint(2, 0, { + x: point.x + 50, y: point.y + }); + pointers.setPoint(2, 1, { + x: point.x + 50, y: point.y + 50 + }); + pointers.setPoint(2, 2, { + x: point.x + 50, y: point.y + 60 + }); + pointers.setPoint(2, 3, { + x: point.x + 50, y: point.y + 70 + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0310 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0340 + * @tc.name SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0340 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0340', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0340 start.`); + Settings.createWindow("testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0340") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureRotationgestureInterface0340_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(3, 4); + pointers.setPoint(0, 0, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 3, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 50, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 50, y: point.y + 50 + }); + pointers.setPoint(1, 2, { + x: point.x + 50, y: point.y + 60 + }); + pointers.setPoint(1, 3, { + x: point.x + 50, y: point.y + 70 + }); + pointers.setPoint(2, 0, { + x: point.x + 50, y: point.y + }); + pointers.setPoint(2, 1, { + x: point.x + 50, y: point.y + 50 + }); + pointers.setPoint(2, 2, { + x: point.x + 50, y: point.y + 60 + }); + pointers.setPoint(2, 3, { + x: point.x + 50, y: point.y + 70 + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0340 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0350 + * @tc.name SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0350 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0350', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0350 start.`); + Settings.createWindow("testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0350") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureRotationgestureInterface0350_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(3, 4); + pointers.setPoint(0, 0, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 3, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 50, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 50, y: point.y + 50 + }); + pointers.setPoint(1, 2, { + x: point.x + 50, y: point.y + 60 + }); + pointers.setPoint(1, 3, { + x: point.x + 50, y: point.y + 70 + }); + pointers.setPoint(2, 0, { + x: point.x + 50, y: point.y + }); + pointers.setPoint(2, 1, { + x: point.x + 50, y: point.y + 50 + }); + pointers.setPoint(2, 2, { + x: point.x + 50, y: point.y + 60 + }); + pointers.setPoint(2, 3, { + x: point.x + 50, y: point.y + 70 + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0350 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0400 + * @tc.name SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0400 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0400', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0400 start.`); + Settings.createWindow("testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0400") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureRotationgestureInterface0400_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(3, 4); + pointers.setPoint(0, 0, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(0, 3, { + x: point.x - 50, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 50, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 50, y: point.y + 50 + }); + pointers.setPoint(1, 2, { + x: point.x + 50, y: point.y + 60 + }); + pointers.setPoint(1, 3, { + x: point.x + 50, y: point.y + 70 + }); + pointers.setPoint(2, 0, { + x: point.x + 50, y: point.y + }); + pointers.setPoint(2, 1, { + x: point.x + 50, y: point.y + 50 + }); + pointers.setPoint(2, 2, { + x: point.x + 50, y: point.y + 60 + }); + pointers.setPoint(2, 3, { + x: point.x + 50, y: point.y + 70 + }); + await driver.injectMultiPointerAction(pointers); + let reset: Component = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_ROTATIONGESTURE_INTERFACE_0400 finish.`); + done(); + }) + }) +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionGestureSpeedInterfaceTest/ActionGestureSpeedInterface.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionGestureSpeedInterfaceTest/ActionGestureSpeedInterface.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..4e2d401b7d1da6affb8f39a2d272904c9f03109c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionGestureSpeedInterfaceTest/ActionGestureSpeedInterface.test.ets @@ -0,0 +1,78 @@ +/* + * 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, ON ,PointerMatrix,MouseButton} from '@ohos.UiTest' + +export default function ActionGestureSpeedInterface() { + + describe('ActionGestureSpeedInterface', () => { + 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_ACTION_GESTURE_SPEED_INTERFACE_0070 + * @tc.name SUB_ACE_ACTION_GESTURE_SPEED_INTERFACE_0070 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_SPEED_INTERFACE_0070', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SPEED_INTERFACE_0070 start.`); + Settings.createWindow("testability/pages/ActionGestureSpeedInterface/ActionGestureSpeedInterface0070"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let text: Component = await driver.findComponent(ON.id('ActionGestureSpeedInterface0070')); + let rect: Component = await driver.findComponent(ON.id('ActionGestureSpeedInterface0070_1')); + await text.dragTo(rect); + await Utils.sleep(2000); + let reset = await driver.findComponent(ON.id('reset')); + await reset.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SPEED_INTERFACE_0070 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_ACTION_GESTURE_SPEED_INTERFACE_0080 + * @tc.name SUB_ACE_ACTION_GESTURE_SPEED_INTERFACE_0080 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_SPEED_INTERFACE_0080', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SPEED_INTERFACE_0080 start.`); + Settings.createWindow("testability/pages/ActionGestureSpeedInterface/ActionGestureSpeedInterface0080"); + await Utils.sleep(5000); + await windowSnap.snapShot(); + await Utils.sleep(5000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SPEED_INTERFACE_0080 finish.`); + done(); + }) + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionGestureSwipegestureInterfaceTest/ActionGestureSwipegestureInterface.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionGestureSwipegestureInterfaceTest/ActionGestureSwipegestureInterface.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..de5673695bd51747bdbb134583e1a865e705e03c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionGestureSwipegestureInterfaceTest/ActionGestureSwipegestureInterface.test.ets @@ -0,0 +1,1013 @@ +/* + * 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, ON ,PointerMatrix} from '@ohos.UiTest' + +export default function ActionGestureSwipegestureInterface() { + + describe('ActionGestureSwipegestureInterface', () => { + 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_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0010 + * @tc.name SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0010 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0010', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0010 start.`); + Settings.createWindow("testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface10") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureSwipegestureInterface10')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x-100,y:center.y}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x+50,y:center.y}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y-50}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y+50}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0010 finish.`); + done(); + }) + + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0020 + * @tc.name SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0020 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0020', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0020 start.`); + Settings.createWindow("testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface20") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureSwipegestureInterface0020_001')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x, y: point.y + 10 + }); + pointers.setPoint(0, 2, { + x: point.x, y: point.y + 40 + }); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0020 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0040 + * @tc.name SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0040 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0040', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0040 start.`); + Settings.createWindow("testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface40") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureSwipegestureInterface40')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x-100,y:center.y}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x+50,y:center.y}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y-50}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y+50}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0040 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0050 + * @tc.name SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0050 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0050', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0050 start.`); + Settings.createWindow("testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface50") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureSwipegestureInterface50')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x-100,y:center.y}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x+50,y:center.y}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y-50}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y+50}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0050 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0060 + * @tc.name SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0060 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0060', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0060 start.`); + Settings.createWindow("testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface60") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureSwipegestureInterface60')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x-100,y:center.y}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x+50,y:center.y}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y-50}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y+50}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0060 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0070 + * @tc.name SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0070 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0070', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0070 start.`); + Settings.createWindow("testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface70") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureSwipegestureInterface70')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y-50}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0070 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0080 + * @tc.name SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0080 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0080', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0080 start.`); + Settings.createWindow("testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface70") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureSwipegestureInterface70')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y+50}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0080 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0090 + * @tc.name SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0090 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0090', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0090 start.`); + Settings.createWindow("testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface70") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureSwipegestureInterface70')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x-50,y:center.y}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0090 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0100 + * @tc.name SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0100 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0100', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0100 start.`); + Settings.createWindow("testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface100") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureSwipegestureInterface100')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x-100,y:center.y}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x+100,y:center.y}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y-100}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y+100}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0100 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0110 + * @tc.name SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0110 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0110', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0110 start.`); + Settings.createWindow("testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface110") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureSwipegestureInterface110')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y-50}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0110 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0120 + * @tc.name SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0120 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0120', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0120 start.`); + Settings.createWindow("testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface110") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureSwipegestureInterface110')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x+50,y:center.y}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0120 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0130 + * @tc.name SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0130 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0130', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0130 start.`); + Settings.createWindow("testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface110") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureSwipegestureInterface110')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x-50,y:center.y}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0130 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0140 + * @tc.name SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0140 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0140', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0140 start.`); + Settings.createWindow("testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface140") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureSwipegestureInterface140')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x-50,y:center.y}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0140 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0150 + * @tc.name SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0150 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0150', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0150 start.`); + Settings.createWindow("testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface150") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureSwipegestureInterface150')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(10,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x-100,y:center.y}); + pointers.setPoint(1,0,{x:center.x,y:center.y}); + pointers.setPoint(1,1,{x:center.x-100,y:center.y}); + pointers.setPoint(2,0,{x:center.x,y:center.y}); + pointers.setPoint(2,1,{x:center.x-100,y:center.y}); + pointers.setPoint(3,0,{x:center.x,y:center.y}); + pointers.setPoint(3,1,{x:center.x-100,y:center.y}); + pointers.setPoint(4,0,{x:center.x,y:center.y}); + pointers.setPoint(4,1,{x:center.x-100,y:center.y}); + pointers.setPoint(5,0,{x:center.x,y:center.y}); + pointers.setPoint(5,1,{x:center.x-100,y:center.y}); + pointers.setPoint(6,0,{x:center.x,y:center.y}); + pointers.setPoint(6,1,{x:center.x-100,y:center.y}); + pointers.setPoint(7,0,{x:center.x,y:center.y}); + pointers.setPoint(7,1,{x:center.x-100,y:center.y}); + pointers.setPoint(8,0,{x:center.x,y:center.y}); + pointers.setPoint(8,1,{x:center.x-100,y:center.y}); + pointers.setPoint(9,0,{x:center.x,y:center.y}); + pointers.setPoint(9,1,{x:center.x-100,y:center.y}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0150 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0160 + * @tc.name SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0160 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0160', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0160 start.`); + Settings.createWindow("testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface160") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureSwipegestureInterface160')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(10,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x-100,y:center.y}); + pointers.setPoint(1,0,{x:center.x,y:center.y}); + pointers.setPoint(1,1,{x:center.x-100,y:center.y}); + pointers.setPoint(2,0,{x:center.x,y:center.y}); + pointers.setPoint(2,1,{x:center.x-100,y:center.y}); + pointers.setPoint(3,0,{x:center.x,y:center.y}); + pointers.setPoint(3,1,{x:center.x-100,y:center.y}); + pointers.setPoint(4,0,{x:center.x,y:center.y}); + pointers.setPoint(4,1,{x:center.x-100,y:center.y}); + pointers.setPoint(5,0,{x:center.x,y:center.y}); + pointers.setPoint(5,1,{x:center.x-100,y:center.y}); + pointers.setPoint(6,0,{x:center.x,y:center.y}); + pointers.setPoint(6,1,{x:center.x-100,y:center.y}); + pointers.setPoint(7,0,{x:center.x,y:center.y}); + pointers.setPoint(7,1,{x:center.x-100,y:center.y}); + pointers.setPoint(8,0,{x:center.x,y:center.y}); + pointers.setPoint(8,1,{x:center.x-100,y:center.y}); + pointers.setPoint(9,0,{x:center.x,y:center.y}); + pointers.setPoint(9,1,{x:center.x-100,y:center.y}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0160 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0170 + * @tc.name SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0170 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0170', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0170 start.`); + Settings.createWindow("testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface170") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureSwipegestureInterface170')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x-100,y:center.y}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x+100,y:center.y}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y-100}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y+100}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0170 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0180 + * @tc.name SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0180 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0180', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0180 start.`); + Settings.createWindow("testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface180") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureSwipegestureInterface180')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x-100,y:center.y}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x+100,y:center.y}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y-100}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y+100}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0180 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0190 + * @tc.name SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0190 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0190', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0190 start.`); + Settings.createWindow("testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface180") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureSwipegestureInterface180')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(3,4); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x-80,y:center.y}); + pointers.setPoint(0,2,{x:center.x-150,y:center.y}); + pointers.setPoint(0,3,{x:center.x-200,y:center.y}); + pointers.setPoint(1,0,{x:center.x-10,y:center.y}); + pointers.setPoint(1,1,{x:center.x-80,y:center.y}); + pointers.setPoint(1,2,{x:center.x-150,y:center.y}); + pointers.setPoint(1,3,{x:center.x-200,y:center.y}); + pointers.setPoint(2,0,{x:center.x+10,y:center.y}); + pointers.setPoint(2,1,{x:center.x-70,y:center.y}); + pointers.setPoint(2,2,{x:center.x-150,y:center.y}); + pointers.setPoint(2,3,{x:center.x-200,y:center.y}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0190 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0200 + * @tc.name SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0200 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0200', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0200 start.`); + Settings.createWindow("testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface180") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureSwipegestureInterface180')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2,3); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x-80,y:center.y}); + pointers.setPoint(0,2,{x:center.x-150,y:center.y}); + pointers.setPoint(1,0,{x:center.x-10,y:center.y}); + pointers.setPoint(1,1,{x:center.x-80,y:center.y}); + pointers.setPoint(1,2,{x:center.x-150,y:center.y}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x+80,y:center.y}); + pointers.setPoint(0,2,{x:center.x+150,y:center.y}); + pointers.setPoint(1,0,{x:center.x+10,y:center.y}); + pointers.setPoint(1,1,{x:center.x+80,y:center.y}); + pointers.setPoint(1,2,{x:center.x+150,y:center.y}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y-80}); + pointers.setPoint(0,2,{x:center.x,y:center.y-150}); + pointers.setPoint(1,0,{x:center.x,y:center.y-10}); + pointers.setPoint(1,1,{x:center.x,y:center.y-80}); + pointers.setPoint(1,2,{x:center.x,y:center.y-150}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y+80}); + pointers.setPoint(0,2,{x:center.x,y:center.y+150}); + pointers.setPoint(1,0,{x:center.x,y:center.y+10}); + pointers.setPoint(1,1,{x:center.x,y:center.y+80}); + pointers.setPoint(1,2,{x:center.x,y:center.y+150}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0200 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0210 + * @tc.name SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0210 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0210', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0210 start.`); + Settings.createWindow("testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface210") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureSwipegestureInterface210')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x-150,y:center.y}); + await driver.injectMultiPointerAction(pointers,1000); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x+100,y:center.y}); + await driver.injectMultiPointerAction(pointers,1000); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y-100}); + await driver.injectMultiPointerAction(pointers,1000); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y+100}); + await driver.injectMultiPointerAction(pointers,1000); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0210 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0220 + * @tc.name SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0220 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0220', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0220 start.`); + Settings.createWindow("testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface210") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureSwipegestureInterface210')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x-150,y:center.y}); + await driver.injectMultiPointerAction(pointers,300); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x+100,y:center.y}); + await driver.injectMultiPointerAction(pointers,300); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y-100}); + await driver.injectMultiPointerAction(pointers,300); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y+100}); + await driver.injectMultiPointerAction(pointers,300); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0220 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0230 + * @tc.name SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0230 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0230', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0230 start.`); + Settings.createWindow("testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface230") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureSwipegestureInterface230')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(3,4); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y-80}); + pointers.setPoint(0,2,{x:center.x,y:center.y-150}); + pointers.setPoint(0,3,{x:center.x,y:center.y-200}); + pointers.setPoint(1,0,{x:center.x-10,y:center.y}); + pointers.setPoint(1,1,{x:center.x,y:center.y-80}); + pointers.setPoint(1,2,{x:center.x,y:center.y-150}); + pointers.setPoint(1,3,{x:center.x,y:center.y-200}); + pointers.setPoint(2,0,{x:center.x+10,y:center.y}); + pointers.setPoint(2,1,{x:center.x,y:center.y-80}); + pointers.setPoint(2,2,{x:center.x,y:center.y-150}); + pointers.setPoint(2,3,{x:center.x,y:center.y-200}); + await driver.injectMultiPointerAction(pointers,100); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0230 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0240 + * @tc.name SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0240 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0240', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0240 start.`); + Settings.createWindow("testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface230") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureSwipegestureInterface230')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(3,4); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y-80}); + pointers.setPoint(0,2,{x:center.x,y:center.y-150}); + pointers.setPoint(0,3,{x:center.x,y:center.y-200}); + pointers.setPoint(1,0,{x:center.x-10,y:center.y}); + pointers.setPoint(1,1,{x:center.x,y:center.y-80}); + pointers.setPoint(1,2,{x:center.x,y:center.y-150}); + pointers.setPoint(1,3,{x:center.x,y:center.y-200}); + pointers.setPoint(2,0,{x:center.x+10,y:center.y}); + pointers.setPoint(2,1,{x:center.x,y:center.y-80}); + pointers.setPoint(2,2,{x:center.x,y:center.y-150}); + pointers.setPoint(2,3,{x:center.x,y:center.y-200}); + await driver.injectMultiPointerAction(pointers,2000); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0240 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0250 + * @tc.name SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0250 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0250', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0250 start.`); + Settings.createWindow("testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface230") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureSwipegestureInterface230')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(3,4); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y+80}); + pointers.setPoint(0,2,{x:center.x,y:center.y+150}); + pointers.setPoint(0,3,{x:center.x,y:center.y+200}); + pointers.setPoint(1,0,{x:center.x-10,y:center.y}); + pointers.setPoint(1,1,{x:center.x,y:center.y+80}); + pointers.setPoint(1,2,{x:center.x,y:center.y+150}); + pointers.setPoint(1,3,{x:center.x,y:center.y+200}); + pointers.setPoint(2,0,{x:center.x+10,y:center.y}); + pointers.setPoint(2,1,{x:center.x,y:center.y+80}); + pointers.setPoint(2,2,{x:center.x,y:center.y+150}); + pointers.setPoint(2,3,{x:center.x,y:center.y+200}); + await driver.injectMultiPointerAction(pointers,2000); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0250 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0260 + * @tc.name SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0260 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0260', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0260 start.`); + Settings.createWindow("testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface230") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureSwipegestureInterface230')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2,4); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y-80}); + pointers.setPoint(0,2,{x:center.x,y:center.y-150}); + pointers.setPoint(0,3,{x:center.x,y:center.y-200}); + pointers.setPoint(1,0,{x:center.x-10,y:center.y}); + pointers.setPoint(1,1,{x:center.x,y:center.y-80}); + pointers.setPoint(1,2,{x:center.x,y:center.y-150}); + pointers.setPoint(1,3,{x:center.x,y:center.y-200}); + await driver.injectMultiPointerAction(pointers,200); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0260 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0270 + * @tc.name SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0270 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0270', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0270 start.`); + Settings.createWindow("testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface270") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureSwipegestureInterface270')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,3); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x+70,y:center.y-80}); + pointers.setPoint(0,2,{x:center.x+140,y:center.y-160}); + await driver.injectMultiPointerAction(pointers,2000); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0270 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0280 + * @tc.name SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0280 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0280', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0280 start.`); + Settings.createWindow("testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface270") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureSwipegestureInterface270')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,3); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x+80,y:center.y-70}); + pointers.setPoint(0,2,{x:center.x+160,y:center.y-140}); + await driver.injectMultiPointerAction(pointers,2000); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0280 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0290 + * @tc.name SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0290 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0290', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0290 start.`); + Settings.createWindow("testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface290") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureSwipegestureInterface290')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x-150,y:center.y}); + await driver.injectMultiPointerAction(pointers,1000); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x+100,y:center.y}); + await driver.injectMultiPointerAction(pointers,1000); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y-100}); + await driver.injectMultiPointerAction(pointers,1000); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y+100}); + await driver.injectMultiPointerAction(pointers,1000); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0290 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0300 + * @tc.name SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0300 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0300', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0300 start.`); + Settings.createWindow("testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface290") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureSwipegestureInterface290')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x-150,y:center.y}); + await driver.injectMultiPointerAction(pointers,100); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x+100,y:center.y}); + await driver.injectMultiPointerAction(pointers,100); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y-100}); + await driver.injectMultiPointerAction(pointers,100); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y+100}); + await driver.injectMultiPointerAction(pointers,100); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0300 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0310 + * @tc.name SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0310 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0310', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0310 start.`); + Settings.createWindow("testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface310") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureSwipegestureInterface310')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y-50}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0310 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0340 + * @tc.name SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0340 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0340', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0340 start.`); + Settings.createWindow("testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface340") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureSwipegestureInterface340')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y-50}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0340 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0030 + */ + it('SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0030', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0030 start.`); + Settings.createWindow("testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface0030") + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SWIPEGESTURE_INTERFACE_0030 finish.`); + done(); + }) + + }) +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionGestureTapgeatureInturefaceTest/ActionGestureTapgeatureIntureface.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionGestureTapgeatureInturefaceTest/ActionGestureTapgeatureIntureface.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..311bbeedd81de2c05c7bb477f3ff76a0f665f5bf --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionGestureTapgeatureInturefaceTest/ActionGestureTapgeatureIntureface.test.ets @@ -0,0 +1,922 @@ +/* + * 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, ON ,PointerMatrix} from '@ohos.UiTest' + +export default function ActionGestureTapgeatureIntureface() { + + describe('ActionGestureTapgeatureIntureface', () => { + 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_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0380 + * @tc.name SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0380 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0380', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0380 start.`); + Settings.createWindow("testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface380") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTapgeatureIntureface380')); + await button.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0380 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0330 + * @tc.name SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0330 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0330', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0330 start.`); + Settings.createWindow("testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface330") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTapgeatureIntureface330')); + await button.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0330 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0340 + * @tc.name SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0340 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0340', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0340 start.`); + Settings.createWindow("testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface340") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTapgeatureIntureface340')); + await button.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0340 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0390 + * @tc.name SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0390 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0390', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0390 start.`); + Settings.createWindow("testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface390") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTapgeatureIntureface390')); + await button.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0390 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0010 + * @tc.name SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0010 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0010', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0010 start.`); + Settings.createWindow("testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface10") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTapgeatureIntureface10')); + await button.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0010 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0020 + * @tc.name SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0020 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0020', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0020 start.`); + Settings.createWindow("testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface20") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTapgeatureIntureface20')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y}); + pointers.setPoint(1,0,{x:center.x,y:center.y}); + pointers.setPoint(1,1,{x:center.x,y:center.y}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y}); + pointers.setPoint(1,0,{x:center.x,y:center.y}); + pointers.setPoint(1,1,{x:center.x,y:center.y}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y}); + pointers.setPoint(1,0,{x:center.x,y:center.y}); + pointers.setPoint(1,1,{x:center.x,y:center.y}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y}); + pointers.setPoint(1,0,{x:center.x,y:center.y}); + pointers.setPoint(1,1,{x:center.x,y:center.y}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0020 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0030 + * @tc.name SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0030 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0030', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0030 start.`); + Settings.createWindow("testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface20") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTapgeatureIntureface20')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(3,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y}); + pointers.setPoint(1,0,{x:center.x,y:center.y}); + pointers.setPoint(1,1,{x:center.x,y:center.y}); + pointers.setPoint(2,0,{x:center.x,y:center.y}); + pointers.setPoint(2,1,{x:center.x,y:center.y}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y}); + pointers.setPoint(1,0,{x:center.x,y:center.y}); + pointers.setPoint(1,1,{x:center.x,y:center.y}); + pointers.setPoint(2,0,{x:center.x,y:center.y}); + pointers.setPoint(2,1,{x:center.x,y:center.y}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y}); + pointers.setPoint(1,0,{x:center.x,y:center.y}); + pointers.setPoint(1,1,{x:center.x,y:center.y}); + pointers.setPoint(2,0,{x:center.x,y:center.y}); + pointers.setPoint(2,1,{x:center.x,y:center.y}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0030 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0040 + * @tc.name SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0040 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0040', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0040 start.`); + Settings.createWindow("testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface20") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTapgeatureIntureface20')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(3,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y}); + pointers.setPoint(1,0,{x:center.x,y:center.y}); + pointers.setPoint(1,1,{x:center.x,y:center.y}); + pointers.setPoint(2,0,{x:center.x,y:center.y}); + pointers.setPoint(2,1,{x:center.x,y:center.y}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y}); + pointers.setPoint(1,0,{x:center.x,y:center.y}); + pointers.setPoint(1,1,{x:center.x,y:center.y}); + pointers.setPoint(2,0,{x:center.x,y:center.y}); + pointers.setPoint(2,1,{x:center.x,y:center.y}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y}); + pointers.setPoint(1,0,{x:center.x,y:center.y}); + pointers.setPoint(1,1,{x:center.x,y:center.y}); + pointers.setPoint(2,0,{x:center.x,y:center.y}); + pointers.setPoint(2,1,{x:center.x,y:center.y}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y}); + pointers.setPoint(1,0,{x:center.x,y:center.y}); + pointers.setPoint(1,1,{x:center.x,y:center.y}); + pointers.setPoint(2,0,{x:center.x,y:center.y}); + pointers.setPoint(2,1,{x:center.x,y:center.y}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0040 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0050 + * @tc.name SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0050 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0050', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0050 start.`); + Settings.createWindow("testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface20") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTapgeatureIntureface20')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(4,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y}); + pointers.setPoint(1,0,{x:center.x,y:center.y}); + pointers.setPoint(1,1,{x:center.x,y:center.y}); + pointers.setPoint(2,0,{x:center.x,y:center.y}); + pointers.setPoint(2,1,{x:center.x,y:center.y}); + pointers.setPoint(3,0,{x:center.x,y:center.y}); + pointers.setPoint(3,1,{x:center.x,y:center.y}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y}); + pointers.setPoint(1,0,{x:center.x,y:center.y}); + pointers.setPoint(1,1,{x:center.x,y:center.y}); + pointers.setPoint(2,0,{x:center.x,y:center.y}); + pointers.setPoint(2,1,{x:center.x,y:center.y}); + pointers.setPoint(3,0,{x:center.x,y:center.y}); + pointers.setPoint(3,1,{x:center.x,y:center.y}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y}); + pointers.setPoint(1,0,{x:center.x,y:center.y}); + pointers.setPoint(1,1,{x:center.x,y:center.y}); + pointers.setPoint(2,0,{x:center.x,y:center.y}); + pointers.setPoint(2,1,{x:center.x,y:center.y}); + pointers.setPoint(3,0,{x:center.x,y:center.y}); + pointers.setPoint(3,1,{x:center.x,y:center.y}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y}); + pointers.setPoint(1,0,{x:center.x,y:center.y}); + pointers.setPoint(1,1,{x:center.x,y:center.y}); + pointers.setPoint(2,0,{x:center.x,y:center.y}); + pointers.setPoint(2,1,{x:center.x,y:center.y}); + pointers.setPoint(3,0,{x:center.x,y:center.y}); + pointers.setPoint(3,1,{x:center.x,y:center.y}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0050 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0060 + * @tc.name SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0060 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0060', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0060 start.`); + Settings.createWindow("testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface60") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTapgeatureIntureface60')); + await button.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0060 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0070 + * @tc.name SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0070 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0070', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0070 start.`); + Settings.createWindow("testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface70") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTapgeatureIntureface70')); + await button.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0070 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0080 + * @tc.name SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0080 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0080', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0080 start.`); + Settings.createWindow("testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface80") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTapgeatureIntureface80')); + await button.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0080 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0090 + * @tc.name SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0090 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0090', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0090 start.`); + Settings.createWindow("testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface90") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTapgeatureIntureface90')); + await button.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0090 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0100 + * @tc.name SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0100 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0100', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0100 start.`); + Settings.createWindow("testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface100") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTapgeatureIntureface100')); + await button.longClick(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0100 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0110 + * @tc.name SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0110 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0110', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0110 start.`); + Settings.createWindow("testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface100") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTapgeatureIntureface100')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0110 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0120 + * @tc.name SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0120 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0120', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0120 start.`); + Settings.createWindow("testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface100") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTapgeatureIntureface100')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0120 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0130 + * @tc.name SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0130 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0130', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0130 start.`); + Settings.createWindow("testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface100") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTapgeatureIntureface100')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y}); + await driver.injectMultiPointerAction(pointers); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0130 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0140 + * @tc.name SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0140 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0140', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0140 start.`); + Settings.createWindow("testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface140") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTapgeatureIntureface140')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(10,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y}); + pointers.setPoint(1,0,{x:center.x,y:center.y}); + pointers.setPoint(1,1,{x:center.x,y:center.y}); + pointers.setPoint(2,0,{x:center.x,y:center.y}); + pointers.setPoint(2,1,{x:center.x,y:center.y}); + pointers.setPoint(3,0,{x:center.x,y:center.y}); + pointers.setPoint(3,1,{x:center.x,y:center.y}); + pointers.setPoint(4,0,{x:center.x,y:center.y}); + pointers.setPoint(4,1,{x:center.x,y:center.y}); + pointers.setPoint(5,0,{x:center.x,y:center.y}); + pointers.setPoint(5,1,{x:center.x,y:center.y}); + pointers.setPoint(6,0,{x:center.x,y:center.y}); + pointers.setPoint(6,1,{x:center.x,y:center.y}); + pointers.setPoint(7,0,{x:center.x,y:center.y}); + pointers.setPoint(7,1,{x:center.x,y:center.y}); + pointers.setPoint(8,0,{x:center.x,y:center.y}); + pointers.setPoint(8,1,{x:center.x,y:center.y}); + pointers.setPoint(9,0,{x:center.x,y:center.y}); + pointers.setPoint(9,1,{x:center.x,y:center.y}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0140 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0150 + * @tc.name SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0150 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0150', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0150 start.`); + Settings.createWindow("testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface150") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTapgeatureIntureface150')); + await button.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0150 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0160 + * @tc.name SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0160 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0160', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0160 start.`); + Settings.createWindow("testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface160") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTapgeatureIntureface160')); + await button.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0160 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0170 + * @tc.name SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0170 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0170', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0170 start.`); + Settings.createWindow("testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface170") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTapgeatureIntureface170')); + await button.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0170 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0200 + * @tc.name SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0200 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0200', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0200 start.`); + Settings.createWindow("testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface180") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTapgeatureIntureface180')); + await button.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0200 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0180 + * @tc.name SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0180 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0180', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0180 start.`); + Settings.createWindow("testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface180") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTapgeatureIntureface180')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y}); + pointers.setPoint(1,0,{x:center.x,y:center.y}); + pointers.setPoint(1,1,{x:center.x,y:center.y}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0180 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0190 + * @tc.name SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0190 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0190', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0190 start.`); + Settings.createWindow("testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface180") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTapgeatureIntureface180')); + let center = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(3,2); + pointers.setPoint(0,0,{x:center.x,y:center.y}); + pointers.setPoint(0,1,{x:center.x,y:center.y}); + pointers.setPoint(1,0,{x:center.x,y:center.y}); + pointers.setPoint(1,1,{x:center.x,y:center.y}); + pointers.setPoint(2,0,{x:center.x,y:center.y}); + pointers.setPoint(2,1,{x:center.x,y:center.y}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0190 finish.`); + done() + }) + + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0210 + * @tc.name SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0210 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0210', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0210 start.`); + Settings.createWindow("testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface0210") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTapgeatureIntureface0210_001')); + let point = await button.getBoundsCenter(); + await driver.click(point.x, point.y); + await driver.click(point.x + 60, point.y); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0210 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0220 + * @tc.name SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0220 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0220', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0220 start.`); + Settings.createWindow("testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface0220") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTapgeatureIntureface0220_001')); + let point = await button.getBoundsCenter(); + await driver.click(point.x, point.y); + await driver.click(point.x, point.y + 60); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0220 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0230 + * @tc.name SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0230 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0230', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0230 start.`); + Settings.createWindow("testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface0230") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTapgeatureIntureface0230_001')); + let point = await button.getBoundsCenter(); + await driver.click(point.x, point.y); + await Utils.sleep(300); + await driver.click(point.x, point.y); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0230 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0240 + * @tc.name SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0240 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0240', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0240 start.`); + Settings.createWindow("testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface0240") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTapgeatureIntureface0240_001')); + let point = await button.getBoundsCenter(); + await driver.click(point.x, point.y); + await Utils.sleep(200); + await driver.click(point.x, point.y); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0240 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0250 + * @tc.name SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0250 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0250', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0250 start.`); + Settings.createWindow("testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface0250") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTapgeatureIntureface0250_001')); + let point = await button.getBoundsCenter(); + await driver.mouseClick(point, 0); + await Utils.sleep(500); + await driver.mouseClick(point, 0); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0250 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0260 + * @tc.name SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0260 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0260', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0260 start.`); + Settings.createWindow("testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface0260") + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTapgeatureIntureface0260_001')); + let point = await button.getBoundsCenter(); + await driver.mouseClick(point, 0); + await Utils.sleep(200); + await driver.mouseClick(point, 0); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0260 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0290 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0290', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0290 start.`); + Settings.createWindow("testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface0290") + await Utils.sleep(2000); + let driver = Driver.create(); + let row1: Component = await driver.findComponent(ON.id('up')); + let row2: Component = await driver.findComponent(ON.id('next')); + for (let index = 0; index < 3; index++) { + await row1.doubleClick() + await Utils.sleep(800); + } + await row2.click() + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0290 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0310 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0310', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0310 start.`); + Settings.createWindow("testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface0310") + await Utils.sleep(2000); + let driver = Driver.create(); + let row1: Component = await driver.findComponent(ON.id('up')); + let row2: Component = await driver.findComponent(ON.id('next')); + await row1.doubleClick() + await Utils.sleep(1000); + await row2.click() + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0310 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0320 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0320', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0320 start.`); + Settings.createWindow("testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface0320") + await Utils.sleep(2000); + let driver = Driver.create(); + let row1: Component = await driver.findComponent(ON.id('up')); + let row2: Component = await driver.findComponent(ON.id('next')); + for (let index = 0; index < 3; index++) { + await row2.click() + await Utils.sleep(800); + } + await row1.click() + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0320 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0300 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0300', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0300 start.`); + Settings.createWindow("testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface0300") + await Utils.sleep(2000); + let driver = Driver.create(); + let row1: Component = await driver.findComponent(ON.id('up')); + let row2: Component = await driver.findComponent(ON.id('next')); + let point = await row2.getBoundsCenter() + for (let index = 0; index < 2; index++) { + await row1.doubleClick() + await Utils.sleep(500); + } + await driver.drag(point.x, point.y, point.x+100, point.y) + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TAPGEATURE_INTUREFACE_0300 finish.`); + done(); + }) + + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionGestureTapgestureDfxTest/ActionGestureTapgestureDfx.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionGestureTapgestureDfxTest/ActionGestureTapgestureDfx.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..5e3314778dac3e6fbd7433439d37f6807087e937 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionGestureTapgestureDfxTest/ActionGestureTapgestureDfx.test.ets @@ -0,0 +1,79 @@ +/* + * 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, ON } from '@ohos.UiTest' + +export default function ActionGestureTapgestureDfx() { + + describe('ActionGestureTapgestureDfx', () => { + 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_ACTION_GESTURE_TAPGESTURE_DFX_0010 + * @tc.name SUB_ACE_ACTION_GESTURE_TAPGESTURE_DFX_0010 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_TAPGESTURE_DFX_0010', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_TAPGESTURE_DFX_0010 start.`); + Settings.createWindow("testability/pages/ActionGestureTapgestureDfx/ActionGestureTapgestureDfx0010"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_TAPGESTURE_DFX_0010 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACTION_GESTURE_TAPGESTURE_DFX_0020 + * @tc.name SUB_ACE_ACTION_GESTURE_TAPGESTURE_DFX_0020 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_ACTION_GESTURE_TAPGESTURE_DFX_0020', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_TAPGESTURE_DFX_0020 start.`); + Settings.createWindow("testability/pages/ActionGestureTapgestureDfx/ActionGestureTapgestureDfx0020"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('ActionGestureTapgestureDfx0020')); + await scroll.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_TAPGESTURE_DFX_0020 finish.`); + done(); + }) + + + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionGestureTouchpadInterfaceTest/ActionGestureTouchpadInterface.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionGestureTouchpadInterfaceTest/ActionGestureTouchpadInterface.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..c50152e078614ad0e14fcdca7560a110871f5e23 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ActionGestureTouchpadInterfaceTest/ActionGestureTouchpadInterface.test.ets @@ -0,0 +1,2021 @@ +/* + * 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, ON, PointerMatrix } from '@ohos.UiTest' + +export default function ActionGestureTouchpadInterface() { + + describe('ActionGestureTouchpadInterface', () => { + 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(3000); + done(); + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0010 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0010 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0010', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0010 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface10") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface10')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface10_1')); + let point = await button.getBoundsCenter(); + await driver.mouseMoveTo(point); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x, y: point.y}); + pointers.setPoint(0, 1, {x: point.x, y: point.y}); + pointers.setPoint(0, 2, {x: point.x, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 20, y: point.y+100}); + pointers.setPoint(1, 1, {x: point.x + 40, y: point.y+80}); + pointers.setPoint(1, 2, {x: point.x + 80, y: point.y+60}); + await driver.injectMultiPointerAction(pointers); + + await button2.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0010 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0020 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0020 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0020', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0020 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface20") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface20')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface20_1')); + let point = await button.getBoundsCenter(); + await driver.mouseMoveTo(point); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x, y: point.y}); + pointers.setPoint(0, 1, {x: point.x, y: point.y}); + pointers.setPoint(0, 2, {x: point.x, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 20, y: point.y+100}); + pointers.setPoint(1, 1, {x: point.x + 40, y: point.y+80}); + pointers.setPoint(1, 2, {x: point.x + 80, y: point.y+60}); + await driver.injectMultiPointerAction(pointers); + await button2.click(); + + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0020 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0030 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0030 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0030', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0030 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface30") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface30')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface30_1')); + let point = await button.getBoundsCenter(); + await driver.mouseMoveTo(point); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x, y: point.y}); + pointers.setPoint(0, 1, {x: point.x, y: point.y}); + pointers.setPoint(0, 2, {x: point.x, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 20, y: point.y+100}); + pointers.setPoint(1, 1, {x: point.x + 40, y: point.y+80}); + pointers.setPoint(1, 2, {x: point.x + 80, y: point.y+60}); + await driver.injectMultiPointerAction(pointers); + await button2.click(); + + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0030 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0040 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0040 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0040', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0040 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface40") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface40')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface40_1')); + let point = await button.getBoundsCenter(); + await driver.mouseMoveTo(point); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x, y: point.y}); + pointers.setPoint(0, 1, {x: point.x, y: point.y}); + pointers.setPoint(0, 2, {x: point.x, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 20, y: point.y+100}); + pointers.setPoint(1, 1, {x: point.x + 22, y: point.y+99}); + pointers.setPoint(1, 2, {x: point.x + 24, y: point.y+98}); + await driver.injectMultiPointerAction(pointers); + await button2.click(); + + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0040 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0050 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0050 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0050', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0050 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface50") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface50')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface50_1')); + let point = await button.getBoundsCenter(); + await driver.mouseMoveTo(point); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x, y: point.y}); + pointers.setPoint(0, 1, {x: point.x, y: point.y}); + pointers.setPoint(0, 2, {x: point.x, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 20, y: point.y+100}); + pointers.setPoint(1, 1, {x: point.x + 25, y: point.y+99}); + pointers.setPoint(1, 2, {x: point.x + 30, y: point.y+98}); + await driver.injectMultiPointerAction(pointers); + await button2.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0050 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0060 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0060 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0060', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0060 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface60") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface60')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface60_1')); + let point = await button.getBoundsCenter(); + await driver.mouseMoveTo(point); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x, y: point.y}); + pointers.setPoint(0, 1, {x: point.x, y: point.y}); + pointers.setPoint(0, 2, {x: point.x, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 20, y: point.y+100}); + pointers.setPoint(1, 1, {x: point.x + 40, y: point.y+80}); + pointers.setPoint(1, 2, {x: point.x + 80, y: point.y+60}); + await driver.injectMultiPointerAction(pointers); + await button2.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0060 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0070 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0070 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0070', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0070 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface70") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface70')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface70_1')); + let point = await button.getBoundsCenter(); + await driver.mouseMoveTo(point); + let pointers: PointerMatrix = PointerMatrix.create(3, 3); + pointers.setPoint(0, 0, {x: point.x, y: point.y}); + pointers.setPoint(0, 1, {x: point.x, y: point.y}); + pointers.setPoint(0, 2, {x: point.x, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 20, y: point.y+100}); + pointers.setPoint(1, 1, {x: point.x + 40, y: point.y+80}); + pointers.setPoint(1, 2, {x: point.x + 80, y: point.y+60}); + pointers.setPoint(2, 0, {x: point.x + 30, y: point.y+100}); + pointers.setPoint(2, 1, {x: point.x + 50, y: point.y+80}); + pointers.setPoint(2, 2, {x: point.x + 90, y: point.y+60}); + await driver.injectMultiPointerAction(pointers); + await button2.click(); + + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0070 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0080 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0080 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0080', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0080 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface70") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface70')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface70_1')); + let point = await button.getBoundsCenter(); + await driver.mouseMoveTo(point); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x, y: point.y}); + pointers.setPoint(0, 1, {x: point.x, y: point.y}); + pointers.setPoint(0, 2, {x: point.x, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 20, y: point.y+100}); + pointers.setPoint(1, 1, {x: point.x + 40, y: point.y+80}); + pointers.setPoint(1, 2, {x: point.x + 80, y: point.y+60}); + await driver.injectMultiPointerAction(pointers); + await button2.click(); + + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0080 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0090 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0090 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0090', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0090 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface90") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface90')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface90_1')); + let point = await button.getBoundsCenter(); + await driver.mouseMoveTo(point); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x, y: point.y}); + pointers.setPoint(0, 1, {x: point.x, y: point.y}); + pointers.setPoint(0, 2, {x: point.x, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 20, y: point.y+100}); + pointers.setPoint(1, 1, {x: point.x + 40, y: point.y+80}); + pointers.setPoint(1, 2, {x: point.x + 80, y: point.y+60}); + await driver.injectMultiPointerAction(pointers); + + await button2.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0090 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0100 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0100 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0100', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0100 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface100") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface100')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface100_1')); + let point = await button.getBoundsCenter(); + await driver.mouseMoveTo(point); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x, y: point.y}); + pointers.setPoint(0, 1, {x: point.x, y: point.y}); + pointers.setPoint(0, 2, {x: point.x, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 20, y: point.y+100}); + pointers.setPoint(1, 1, {x: point.x + 40, y: point.y+80}); + pointers.setPoint(1, 2, {x: point.x + 80, y: point.y+60}); + await driver.injectMultiPointerAction(pointers); + + await button2.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0100 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0110 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0110 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0110', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0110 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface100") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface100')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface100_1')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x, y: point.y}); + pointers.setPoint(0, 1, {x: point.x, y: point.y}); + pointers.setPoint(0, 2, {x: point.x, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 20, y: point.y+100}); + pointers.setPoint(1, 1, {x: point.x + 40, y: point.y+80}); + pointers.setPoint(1, 2, {x: point.x + 80, y: point.y+60}); + await driver.injectMultiPointerAction(pointers); + + await button2.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0110 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0140 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0140 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0140', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0140 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface140") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface140')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface140_1')); + let point = await button.getBoundsCenter(); + await driver.mouseMoveTo(point); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x, y: point.y}); + pointers.setPoint(0, 1, {x: point.x, y: point.y}); + pointers.setPoint(0, 2, {x: point.x, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 20, y: point.y+100}); + pointers.setPoint(1, 1, {x: point.x + 40, y: point.y+80}); + pointers.setPoint(1, 2, {x: point.x + 80, y: point.y+60}); + await driver.injectMultiPointerAction(pointers); + + await button2.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0140 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0160 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0160 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0160', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0160 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface140") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface140')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface140_1')); + let point = await button.getBoundsCenter(); + await driver.mouseMoveTo(point); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x, y: point.y}); + pointers.setPoint(0, 1, {x: point.x, y: point.y}); + pointers.setPoint(0, 2, {x: point.x, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 20, y: point.y+100}); + pointers.setPoint(1, 1, {x: point.x + 25, y: point.y+99}); + pointers.setPoint(1, 2, {x: point.x + 30, y: point.y+98}); + await driver.injectMultiPointerAction(pointers); + + await button2.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0160 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0150 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0150 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0150', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0150 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface150") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface150')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface150_1')); + let point = await button.getBoundsCenter(); + await driver.mouseMoveTo(point); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x, y: point.y}); + pointers.setPoint(0, 1, {x: point.x, y: point.y}); + pointers.setPoint(0, 2, {x: point.x, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 20, y: point.y+100}); + pointers.setPoint(1, 1, {x: point.x + 40, y: point.y+80}); + pointers.setPoint(1, 2, {x: point.x + 80, y: point.y+60}); + await driver.injectMultiPointerAction(pointers); + + await button2.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0150 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0170 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0170 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0170', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0170 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface170") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface170')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface170_1')); + let point = await button.getBoundsCenter(); + await driver.mouseMoveTo(point); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x, y: point.y}); + pointers.setPoint(0, 1, {x: point.x, y: point.y}); + pointers.setPoint(0, 2, {x: point.x, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 20, y: point.y+100}); + pointers.setPoint(1, 1, {x: point.x + 40, y: point.y+80}); + pointers.setPoint(1, 2, {x: point.x + 80, y: point.y+60}); + await driver.injectMultiPointerAction(pointers); + + await button2.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0170 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0180 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0180 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0180', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0180 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface180") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface180')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface180_1')); + let point = await button.getBoundsCenter(); + await driver.mouseMoveTo(point); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x, y: point.y}); + pointers.setPoint(0, 1, {x: point.x, y: point.y}); + pointers.setPoint(0, 2, {x: point.x, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 20, y: point.y+100}); + pointers.setPoint(1, 1, {x: point.x + 40, y: point.y+80}); + pointers.setPoint(1, 2, {x: point.x + 80, y: point.y+60}); + await driver.injectMultiPointerAction(pointers); + + await button2.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0180 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0190 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0190 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0190', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0190 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface190") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface190')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface190_1')); + let point = await button.getBoundsCenter(); + await driver.mouseMoveTo(point); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x, y: point.y}); + pointers.setPoint(0, 1, {x: point.x, y: point.y}); + pointers.setPoint(0, 2, {x: point.x, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 20, y: point.y+100}); + pointers.setPoint(1, 1, {x: point.x + 40, y: point.y+80}); + pointers.setPoint(1, 2, {x: point.x + 80, y: point.y+60}); + await driver.injectMultiPointerAction(pointers); + + await button2.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0190 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0200 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0200 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0200', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0200 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface200") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface200')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface200_1')); + let point = await button.getBoundsCenter(); + await driver.mouseMoveTo(point); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x, y: point.y}); + pointers.setPoint(0, 1, {x: point.x, y: point.y}); + pointers.setPoint(0, 2, {x: point.x, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 20, y: point.y+100}); + pointers.setPoint(1, 1, {x: point.x + 40, y: point.y+80}); + pointers.setPoint(1, 2, {x: point.x + 80, y: point.y+60}); + await driver.injectMultiPointerAction(pointers); + + await button2.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0200 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0210 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0210 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0210', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0210 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface210") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface210')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface210_1')); + let point = await button.getBoundsCenter(); + await driver.mouseMoveTo(point); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x, y: point.y}); + pointers.setPoint(0, 1, {x: point.x, y: point.y}); + pointers.setPoint(0, 2, {x: point.x, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 20, y: point.y+100}); + pointers.setPoint(1, 1, {x: point.x + 40, y: point.y+80}); + pointers.setPoint(1, 2, {x: point.x + 80, y: point.y+60}); + await driver.injectMultiPointerAction(pointers); + + await button2.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0210 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0220 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0220 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0220', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0220 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface220") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface220')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface220_1')); + let point = await button.getBoundsCenter(); + await driver.mouseMoveTo(point); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x, y: point.y}); + pointers.setPoint(0, 1, {x: point.x, y: point.y}); + pointers.setPoint(0, 2, {x: point.x, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 20, y: point.y+100}); + pointers.setPoint(1, 1, {x: point.x + 40, y: point.y+80}); + pointers.setPoint(1, 2, {x: point.x + 80, y: point.y+60}); + await driver.injectMultiPointerAction(pointers); + + await button2.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0220 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0230 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0230 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0230', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0230 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface230") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface230')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface230_1')); + let point = await button.getBoundsCenter(); + await driver.mouseMoveTo(point); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x, y: point.y}); + pointers.setPoint(0, 1, {x: point.x, y: point.y}); + pointers.setPoint(0, 2, {x: point.x, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 20, y: point.y+100}); + pointers.setPoint(1, 1, {x: point.x + 40, y: point.y+80}); + pointers.setPoint(1, 2, {x: point.x + 80, y: point.y+60}); + await driver.injectMultiPointerAction(pointers); + + await button2.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0230 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0240 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0240 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0240', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0240 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface240") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface240')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface240_1')); + let point = await button.getBoundsCenter(); + await driver.mouseMoveTo(point); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x, y: point.y}); + pointers.setPoint(0, 1, {x: point.x, y: point.y}); + pointers.setPoint(0, 2, {x: point.x, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 20, y: point.y+100}); + pointers.setPoint(1, 1, {x: point.x + 40, y: point.y+80}); + pointers.setPoint(1, 2, {x: point.x + 80, y: point.y+60}); + await driver.injectMultiPointerAction(pointers); + + await button2.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0240 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0250 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0250 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0250', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0250 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface250") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface250')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface250_1')); + let point = await button.getBoundsCenter(); + await driver.mouseMoveTo(point); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x, y: point.y}); + pointers.setPoint(0, 1, {x: point.x, y: point.y}); + pointers.setPoint(0, 2, {x: point.x, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 20, y: point.y+100}); + pointers.setPoint(1, 1, {x: point.x + 40, y: point.y+80}); + pointers.setPoint(1, 2, {x: point.x + 80, y: point.y+60}); + await driver.injectMultiPointerAction(pointers); + + await button2.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0250 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0260 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0260 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0260', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0260 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface260") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface260')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface260_1')); + let point = await button.getBoundsCenter(); + await driver.mouseMoveTo(point); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x, y: point.y}); + pointers.setPoint(0, 1, {x: point.x, y: point.y}); + pointers.setPoint(0, 2, {x: point.x, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 20, y: point.y+100}); + pointers.setPoint(1, 1, {x: point.x + 40, y: point.y+80}); + pointers.setPoint(1, 2, {x: point.x + 80, y: point.y+60}); + await driver.injectMultiPointerAction(pointers); + + await button2.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0260 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0270 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0270 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0270', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0270 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface270") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface270')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface270_1')); + let point = await button.getBoundsCenter(); + await driver.mouseMoveTo(point); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x, y: point.y}); + pointers.setPoint(0, 1, {x: point.x, y: point.y}); + pointers.setPoint(0, 2, {x: point.x, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 20, y: point.y+100}); + pointers.setPoint(1, 1, {x: point.x + 40, y: point.y+80}); + pointers.setPoint(1, 2, {x: point.x + 80, y: point.y+60}); + await driver.injectMultiPointerAction(pointers); + + await button2.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0270 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0280 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0280 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0280', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0280 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface280") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface280')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface280_1')); + let point = await button.getBoundsCenter(); + await driver.mouseMoveTo(point); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x, y: point.y}); + pointers.setPoint(0, 1, {x: point.x, y: point.y}); + pointers.setPoint(0, 2, {x: point.x, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 20, y: point.y+100}); + pointers.setPoint(1, 1, {x: point.x + 40, y: point.y+80}); + pointers.setPoint(1, 2, {x: point.x + 80, y: point.y+60}); + await driver.injectMultiPointerAction(pointers); + + await button2.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0280 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0290 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0290 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0290', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0290 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface290") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface290')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface290_1')); + let point = await button.getBoundsCenter(); + await driver.mouseMoveTo(point); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x, y: point.y}); + pointers.setPoint(0, 1, {x: point.x, y: point.y}); + pointers.setPoint(0, 2, {x: point.x, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 20, y: point.y+100}); + pointers.setPoint(1, 1, {x: point.x + 40, y: point.y+80}); + pointers.setPoint(1, 2, {x: point.x + 80, y: point.y+60}); + await driver.injectMultiPointerAction(pointers); + + await button2.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0290 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0300 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0300 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0300', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0300 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface300") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface300')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface300_1')); + let point = await button.getBoundsCenter(); + await driver.mouseMoveTo(point); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x, y: point.y}); + pointers.setPoint(0, 1, {x: point.x, y: point.y}); + pointers.setPoint(0, 2, {x: point.x, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 20, y: point.y+100}); + pointers.setPoint(1, 1, {x: point.x + 40, y: point.y+80}); + pointers.setPoint(1, 2, {x: point.x + 80, y: point.y+60}); + await driver.injectMultiPointerAction(pointers); + + await button2.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0300 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0310 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0310 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0310', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0310 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface310") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface310')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface310_1')); + let point = await button.getBoundsCenter(); + await driver.mouseMoveTo(point); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x, y: point.y}); + pointers.setPoint(0, 1, {x: point.x, y: point.y}); + pointers.setPoint(0, 2, {x: point.x, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 20, y: point.y+100}); + pointers.setPoint(1, 1, {x: point.x + 40, y: point.y+80}); + pointers.setPoint(1, 2, {x: point.x + 80, y: point.y+60}); + await driver.injectMultiPointerAction(pointers); + + await button2.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0310 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0330 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0330 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0330', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0330 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface330") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface330')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface330_1')); + let point = await button.getBoundsCenter(); + await driver.mouseMoveTo(point); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x, y: point.y}); + pointers.setPoint(0, 1, {x: point.x, y: point.y}); + pointers.setPoint(0, 2, {x: point.x, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 20, y: point.y+100}); + pointers.setPoint(1, 1, {x: point.x + 40, y: point.y+80}); + pointers.setPoint(1, 2, {x: point.x + 80, y: point.y+60}); + await driver.injectMultiPointerAction(pointers); + + await button2.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0330 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0350 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0350 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0350', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0350 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface330") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface330')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface330_1')); + let point = await button.getBoundsCenter(); + await driver.triggerKey(2049); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x, y: point.y}); + pointers.setPoint(0, 1, {x: point.x, y: point.y}); + pointers.setPoint(0, 2, {x: point.x, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 20, y: point.y+100}); + pointers.setPoint(1, 1, {x: point.x + 40, y: point.y+80}); + pointers.setPoint(1, 2, {x: point.x + 80, y: point.y+60}); + await driver.injectMultiPointerAction(pointers); + + await button2.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0350 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0360 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0360 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0360', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0360 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface360") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface360')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface360_1')); + let point = await button.getBoundsCenter(); + await driver.mouseMoveTo(point); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x, y: point.y}); + pointers.setPoint(0, 1, {x: point.x - 10, y: point.y}); + pointers.setPoint(0, 2, {x: point.x - 20, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 10, y: point.y}); + pointers.setPoint(1, 1, {x: point.x + 10, y: point.y}); + pointers.setPoint(1, 2, {x: point.x + 10, y: point.y}); + await driver.injectMultiPointerAction(pointers); + + await button2.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0360 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0370 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0370 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0370', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0370 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface370") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface370')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface370_1')); + let point = await button.getBoundsCenter(); + await driver.mouseMoveTo(point); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x, y: point.y}); + pointers.setPoint(0, 1, {x: point.x - 10, y: point.y}); + pointers.setPoint(0, 2, {x: point.x - 20, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 10, y: point.y}); + pointers.setPoint(1, 1, {x: point.x + 10, y: point.y}); + pointers.setPoint(1, 2, {x: point.x + 10, y: point.y}); + await driver.injectMultiPointerAction(pointers); + + await button2.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0370 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0380 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0380 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0380', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0380 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface380") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface380')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface380_1')); + let point = await button.getBoundsCenter(); + await driver.mouseMoveTo(point); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x, y: point.y}); + pointers.setPoint(0, 1, {x: point.x - 10, y: point.y}); + pointers.setPoint(0, 2, {x: point.x - 20, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 10, y: point.y}); + pointers.setPoint(1, 1, {x: point.x + 10, y: point.y}); + pointers.setPoint(1, 2, {x: point.x + 10, y: point.y}); + await driver.injectMultiPointerAction(pointers); + await button2.click(); + + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0380 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0390 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0390 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0390', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0390 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface390") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface390')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface390_1')); + let point = await button.getBoundsCenter(); + await driver.mouseMoveTo(point); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x, y: point.y}); + pointers.setPoint(0, 1, {x: point.x - 10, y: point.y}); + pointers.setPoint(0, 2, {x: point.x - 20, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 10, y: point.y}); + pointers.setPoint(1, 1, {x: point.x + 10, y: point.y}); + pointers.setPoint(1, 2, {x: point.x + 10, y: point.y}); + await driver.injectMultiPointerAction(pointers); + await button2.click(); + + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0390 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0400 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0400 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0400', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0400 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface400") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface400')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface400_1')); + let point = await button.getBoundsCenter(); + await driver.mouseMoveTo(point); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x, y: point.y}); + pointers.setPoint(0, 1, {x: point.x - 10, y: point.y}); + pointers.setPoint(0, 2, {x: point.x - 20, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 10, y: point.y}); + pointers.setPoint(1, 1, {x: point.x + 10, y: point.y}); + pointers.setPoint(1, 2, {x: point.x + 10, y: point.y}); + await driver.injectMultiPointerAction(pointers); + + await button2.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0400 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0410 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0410 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0410', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0410 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface410") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface410')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface410_1')); + let point = await button.getBoundsCenter(); + await driver.mouseMoveTo(point); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x, y: point.y}); + pointers.setPoint(0, 1, {x: point.x - 10, y: point.y}); + pointers.setPoint(0, 2, {x: point.x - 20, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 10, y: point.y}); + pointers.setPoint(1, 1, {x: point.x + 10, y: point.y}); + pointers.setPoint(1, 2, {x: point.x + 10, y: point.y}); + await driver.injectMultiPointerAction(pointers); + await button2.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0410 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0420 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0420 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0420', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0420 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface410") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface410')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface410_1')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x, y: point.y}); + pointers.setPoint(0, 1, {x: point.x - 10, y: point.y}); + pointers.setPoint(0, 2, {x: point.x - 20, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 10, y: point.y}); + pointers.setPoint(1, 1, {x: point.x + 10, y: point.y}); + pointers.setPoint(1, 2, {x: point.x + 10, y: point.y}); + await driver.injectMultiPointerAction(pointers); + + await button2.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0420 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0440 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0440 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0440', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0440 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface410") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface410')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface410_1')); + let point = await button.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(3, 3); + pointers.setPoint(0, 0, {x: point.x, y: point.y}); + pointers.setPoint(0, 1, {x: point.x - 10, y: point.y}); + pointers.setPoint(0, 2, {x: point.x - 20, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 10, y: point.y}); + pointers.setPoint(1, 1, {x: point.x + 10, y: point.y}); + pointers.setPoint(1, 2, {x: point.x + 10, y: point.y}); + pointers.setPoint(2, 0, {x: point.x + 10, y: point.y+10}); + pointers.setPoint(2, 1, {x: point.x + 10, y: point.y+10}); + pointers.setPoint(2, 2, {x: point.x + 10, y: point.y+10}); + await driver.injectMultiPointerAction(pointers); + await button2.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0440 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0470 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0470 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0470', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0470 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface470") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface470')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface470_1')); + let point = await button.getBoundsCenter(); + await driver.mouseMoveTo(point); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x, y: point.y}); + pointers.setPoint(0, 1, {x: point.x - 10, y: point.y}); + pointers.setPoint(0, 2, {x: point.x - 20, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 10, y: point.y}); + pointers.setPoint(1, 1, {x: point.x + 10, y: point.y}); + pointers.setPoint(1, 2, {x: point.x + 10, y: point.y}); + await driver.injectMultiPointerAction(pointers); + + await button2.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0470 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0480 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0480 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0480', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0480 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface480") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface480')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface480_1')); + let point = await button.getBoundsCenter(); + await driver.mouseMoveTo(point); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x, y: point.y}); + pointers.setPoint(0, 1, {x: point.x - 10, y: point.y}); + pointers.setPoint(0, 2, {x: point.x - 20, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 10, y: point.y}); + pointers.setPoint(1, 1, {x: point.x + 10, y: point.y}); + pointers.setPoint(1, 2, {x: point.x + 10, y: point.y}); + await driver.injectMultiPointerAction(pointers); + + await button2.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0480 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0490 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0490 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0490', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0490 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface490") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface490')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface490_1')); + let point = await button.getBoundsCenter(); + await driver.mouseMoveTo(point); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x, y: point.y}); + pointers.setPoint(0, 1, {x: point.x - 10, y: point.y}); + pointers.setPoint(0, 2, {x: point.x - 20, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 10, y: point.y}); + pointers.setPoint(1, 1, {x: point.x + 10, y: point.y}); + pointers.setPoint(1, 2, {x: point.x + 10, y: point.y}); + await driver.injectMultiPointerAction(pointers); + await button2.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0490 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0500 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0500 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0500', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0500 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface500") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface500')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface500_1')); + let point = await button.getBoundsCenter(); + await driver.mouseMoveTo(point); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x, y: point.y}); + pointers.setPoint(0, 1, {x: point.x - 10, y: point.y}); + pointers.setPoint(0, 2, {x: point.x - 20, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 10, y: point.y}); + pointers.setPoint(1, 1, {x: point.x + 10, y: point.y}); + pointers.setPoint(1, 2, {x: point.x + 10, y: point.y}); + await driver.injectMultiPointerAction(pointers); + await button2.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0500 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0510 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0510 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0510', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0510 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface510") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface510')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface510_1')); + let point = await button.getBoundsCenter(); + await driver.mouseMoveTo(point); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x, y: point.y}); + pointers.setPoint(0, 1, {x: point.x - 10, y: point.y}); + pointers.setPoint(0, 2, {x: point.x - 20, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 10, y: point.y}); + pointers.setPoint(1, 1, {x: point.x + 10, y: point.y}); + pointers.setPoint(1, 2, {x: point.x + 10, y: point.y}); + await driver.injectMultiPointerAction(pointers); + await button2.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0510 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0520 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0520 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0520', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0520 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface520") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface520')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface520_1')); + let point = await button.getBoundsCenter(); + await driver.mouseMoveTo(point); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x, y: point.y}); + pointers.setPoint(0, 1, {x: point.x - 10, y: point.y}); + pointers.setPoint(0, 2, {x: point.x - 20, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 10, y: point.y}); + pointers.setPoint(1, 1, {x: point.x + 10, y: point.y}); + pointers.setPoint(1, 2, {x: point.x + 10, y: point.y}); + await driver.injectMultiPointerAction(pointers); + await button2.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0520 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0530 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0530 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0530', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0530 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface530") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface530')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface530_1')); + let point = await button.getBoundsCenter(); + await driver.mouseMoveTo(point); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x, y: point.y}); + pointers.setPoint(0, 1, {x: point.x - 10, y: point.y}); + pointers.setPoint(0, 2, {x: point.x - 20, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 10, y: point.y}); + pointers.setPoint(1, 1, {x: point.x + 10, y: point.y}); + pointers.setPoint(1, 2, {x: point.x + 10, y: point.y}); + await driver.injectMultiPointerAction(pointers); + + await button2.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0530 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0540 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0540 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0540', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0540 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface540") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface540')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface540_1')); + let point = await button.getBoundsCenter(); + await driver.mouseMoveTo(point); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x, y: point.y}); + pointers.setPoint(0, 1, {x: point.x - 10, y: point.y}); + pointers.setPoint(0, 2, {x: point.x - 20, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 10, y: point.y}); + pointers.setPoint(1, 1, {x: point.x + 10, y: point.y}); + pointers.setPoint(1, 2, {x: point.x + 10, y: point.y}); + await driver.injectMultiPointerAction(pointers); + + await button2.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0540 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0550 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0550 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0550', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0550 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface550") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface550')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface550_1')); + let point = await button.getBoundsCenter(); + await driver.mouseMoveTo(point); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x, y: point.y}); + pointers.setPoint(0, 1, {x: point.x - 10, y: point.y}); + pointers.setPoint(0, 2, {x: point.x - 20, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 10, y: point.y}); + pointers.setPoint(1, 1, {x: point.x + 10, y: point.y}); + pointers.setPoint(1, 2, {x: point.x + 10, y: point.y}); + await driver.injectMultiPointerAction(pointers); + + await button2.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0550 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0560 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0560 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0560', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0560 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface560") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface560')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface560_1')); + let point = await button.getBoundsCenter(); + await driver.mouseMoveTo(point); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x, y: point.y}); + pointers.setPoint(0, 1, {x: point.x - 10, y: point.y}); + pointers.setPoint(0, 2, {x: point.x - 20, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 10, y: point.y}); + pointers.setPoint(1, 1, {x: point.x + 10, y: point.y}); + pointers.setPoint(1, 2, {x: point.x + 10, y: point.y}); + await driver.injectMultiPointerAction(pointers); + + await button2.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0560 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0570 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0570 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0570', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0570 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface570") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface570')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface570_1')); + let point = await button.getBoundsCenter(); + await driver.mouseMoveTo(point); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x, y: point.y}); + pointers.setPoint(0, 1, {x: point.x - 10, y: point.y}); + pointers.setPoint(0, 2, {x: point.x - 20, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 10, y: point.y}); + pointers.setPoint(1, 1, {x: point.x + 10, y: point.y}); + pointers.setPoint(1, 2, {x: point.x + 10, y: point.y}); + await driver.injectMultiPointerAction(pointers); + + await button2.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0570 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0580 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0580 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0580', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0580 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface580") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface580')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface580_1')); + let point = await button.getBoundsCenter(); + await driver.mouseMoveTo(point); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x, y: point.y}); + pointers.setPoint(0, 1, {x: point.x - 10, y: point.y}); + pointers.setPoint(0, 2, {x: point.x - 20, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 10, y: point.y}); + pointers.setPoint(1, 1, {x: point.x + 10, y: point.y}); + pointers.setPoint(1, 2, {x: point.x + 10, y: point.y}); + await driver.injectMultiPointerAction(pointers); + + await button2.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0580 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0590 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0590 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0590', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0590 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface590") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface590')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface590_1')); + let point = await button.getBoundsCenter(); + await driver.mouseMoveTo(point); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x, y: point.y}); + pointers.setPoint(0, 1, {x: point.x - 10, y: point.y}); + pointers.setPoint(0, 2, {x: point.x - 20, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 10, y: point.y}); + pointers.setPoint(1, 1, {x: point.x + 10, y: point.y}); + pointers.setPoint(1, 2, {x: point.x + 10, y: point.y}); + await driver.injectMultiPointerAction(pointers); + + await button2.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0590 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0600 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0600 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0600', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0600 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface600") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface600')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface600_1')); + let point = await button.getBoundsCenter(); + await driver.mouseMoveTo(point); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x, y: point.y}); + pointers.setPoint(0, 1, {x: point.x - 10, y: point.y}); + pointers.setPoint(0, 2, {x: point.x - 20, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 10, y: point.y}); + pointers.setPoint(1, 1, {x: point.x + 10, y: point.y}); + pointers.setPoint(1, 2, {x: point.x + 10, y: point.y}); + await driver.injectMultiPointerAction(pointers); + await button2.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0600 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0610 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0610 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0610', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0610 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface610") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface610')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface610_1')); + let point = await button.getBoundsCenter(); + await driver.mouseMoveTo(point); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x, y: point.y}); + pointers.setPoint(0, 1, {x: point.x - 10, y: point.y}); + pointers.setPoint(0, 2, {x: point.x - 20, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 10, y: point.y}); + pointers.setPoint(1, 1, {x: point.x + 10, y: point.y}); + pointers.setPoint(1, 2, {x: point.x + 10, y: point.y}); + await driver.injectMultiPointerAction(pointers); + + await button2.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0610 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0620 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0620 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0620', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0620 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface620") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface620')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface620_1')); + let point = await button.getBoundsCenter(); + await driver.mouseMoveTo(point); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x - 20, y: point.y}); + pointers.setPoint(0, 1, {x: point.x - 10, y: point.y}); + pointers.setPoint(0, 2, {x: point.x, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 10, y: point.y}); + pointers.setPoint(1, 1, {x: point.x + 10, y: point.y}); + pointers.setPoint(1, 2, {x: point.x + 10, y: point.y}); + await driver.injectMultiPointerAction(pointers); + await button2.click(); + await Utils.sleep(5000); + await windowSnap.snapShot(); + await Utils.sleep(5000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0620 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0670 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0670 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0670', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0670 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface680") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface680')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface680_1')); + let point = await button.getBoundsCenter(); + await driver.triggerKey(2049); + await Utils.sleep(3000); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x - 20, y: point.y}); + pointers.setPoint(0, 1, {x: point.x - 10, y: point.y}); + pointers.setPoint(0, 2, {x: point.x, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 10, y: point.y}); + pointers.setPoint(1, 1, {x: point.x + 10, y: point.y}); + pointers.setPoint(1, 2, {x: point.x + 10, y: point.y}); + await driver.injectMultiPointerAction(pointers); + + await button2.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0670 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0660 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0660 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0660', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0660 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface660") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface660')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface660_1')); + let point = await button.getBoundsCenter(); + await driver.mouseMoveTo(point); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 10, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 20, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 10, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 10, y: point.y + }); + pointers.setPoint(1, 2, { + x: point.x + 10, y: point.y + }); + await driver.injectMultiPointerAction(pointers); + await button2.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0660 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0700 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0700 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0700', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0700 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface700") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface700')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface700_1')); + let point = await button.getBoundsCenter(); + await driver.mouseMoveTo(point); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 10, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 20, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 10, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 10, y: point.y + }); + pointers.setPoint(1, 2, { + x: point.x + 10, y: point.y + }); + await driver.injectMultiPointerAction(pointers); + + await button2.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0700 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0640 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0640 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0640', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0640 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface640") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface640')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface640_1')); + let point = await button.getBoundsCenter(); + await driver.mouseMoveTo(point); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 10, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 20, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 10, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 10, y: point.y + }); + pointers.setPoint(1, 2, { + x: point.x + 10, y: point.y + }); + await driver.injectMultiPointerAction(pointers); + + await button2.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0640 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0650 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0650 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0650', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0650 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface650") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface650')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface650_1')); + let point = await button.getBoundsCenter(); + await driver.mouseMoveTo(point); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 10, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 20, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 10, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 10, y: point.y + }); + pointers.setPoint(1, 2, { + x: point.x + 10, y: point.y + }); + await driver.injectMultiPointerAction(pointers); + await button2.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0650 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0690 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0690 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0690', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0690 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface690") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface690')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface690_1')); + let point = await button.getBoundsCenter(); + await driver.mouseMoveTo(point); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 10, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 20, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 10, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 10, y: point.y + }); + pointers.setPoint(1, 2, { + x: point.x + 10, y: point.y + }); + await driver.injectMultiPointerAction(pointers); + await button2.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0690 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0680 + * @tc.name SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0680 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0680', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0680 start.`); + Settings.createWindow("testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface680") + await Utils.sleep(3000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface680')); + let button2: Component = await driver.findComponent(ON.id('ActionGestureTouchpadInterface680_1')); + let point = await button.getBoundsCenter(); + await driver.mouseMoveTo(point); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 10, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x - 20, y: point.y + }); + pointers.setPoint(1, 0, { + x: point.x + 10, y: point.y + }); + pointers.setPoint(1, 1, { + x: point.x + 10, y: point.y + }); + pointers.setPoint(1, 2, { + x: point.x + 10, y: point.y + }); + await driver.injectMultiPointerAction(pointers); + await button2.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ACTION_GESTURE_TOUCHPAD_INTERFACE_0680 finish.`); + done(); + }) + + + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/AnalyseActionEventCommoneventDragTest/AnalyseActionEventCommoneventDrag.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/AnalyseActionEventCommoneventDragTest/AnalyseActionEventCommoneventDrag.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..8371a5fca0c39f54bfed90a07bde36b931f94e8d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/AnalyseActionEventCommoneventDragTest/AnalyseActionEventCommoneventDrag.test.ets @@ -0,0 +1,126 @@ +/* + * 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, ON, PointerMatrix, MouseButton } from '@ohos.UiTest' + +export default function AnalyseActionEventCommoneventDrag() { + + describe('AnalyseActionEventCommoneventDrag', () => { + afterEach(async (done: Function) => { + if (Settings.windowClass == undefined) { + return; + } + + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST',) + return; + } + Logger.info('TEST',); + }) + await Utils.sleep(1000); + done(); + }) + + + /* + * @tc.number SUB_ACE_ANALYSE_ACTION_EVENT_COMMONEVENT_DRAG_0210 + * @tc.name SUB_ACE_ANALYSE_ACTION_EVENT_COMMONEVENT_DRAG_0210 + * @tc.level Level 3 + */ + it('SUB_ACE_ANALYSE_ACTION_EVENT_COMMONEVENT_DRAG_0210', 0, async (done: Function) => { + Logger.info('TEST', 'SUB_ACE_ANALYSE_ACTION_EVENT_COMMONEVENT_DRAG_0210 start.'); + Settings.createWindow("testability/pages/AnalyseActionEventCommoneventDrag/AnalyseActionEventCommoneventDrag0210"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let image: Component = await driver.findComponent(ON.id('AnalyseActionEventCommoneventDrag0210_001')); + await Utils.sleep(2000); + let richEditor: Component = await driver.findComponent(ON.id('AnalyseActionEventCommoneventDrag0210_002')); + await image.dragTo(richEditor); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', 'SUB_ACE_ANALYSE_ACTION_EVENT_COMMONEVENT_DRAG_0210 finish.'); + done(); + }) + + + /* + * @tc.number SUB_ACE_ANALYSE_ACTION_EVENT_COMMONEVENT_DRAG_0220 + * @tc.name SUB_ACE_ANALYSE_ACTION_EVENT_COMMONEVENT_DRAG_0220 + * @tc.level Level 3 + */ + it('SUB_ACE_ANALYSE_ACTION_EVENT_COMMONEVENT_DRAG_0220', 0, async (done: Function) => { + Logger.info('TEST', 'SUB_ACE_ANALYSE_ACTION_EVENT_COMMONEVENT_DRAG_0220 start.'); + Settings.createWindow("testability/pages/AnalyseActionEventCommoneventDrag/AnalyseActionEventCommoneventDrag0220"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let image: Component = await driver.findComponent(ON.id('AnalyseActionEventCommoneventDrag0220_001')); + await Utils.sleep(2000); + let richEditor: Component = await driver.findComponent(ON.id('AnalyseActionEventCommoneventDrag0220_002')); + await image.dragTo(richEditor); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', 'SUB_ACE_ANALYSE_ACTION_EVENT_COMMONEVENT_DRAG_0220 finish.'); + done(); + }) + + + /* + * @tc.number SUB_ACE_ANALYSE_ACTION_EVENT_COMMONEVENT_DRAG_0230 + * @tc.name SUB_ACE_ANALYSE_ACTION_EVENT_COMMONEVENT_DRAG_0230 + * @tc.level Level 3 + */ + it('SUB_ACE_ANALYSE_ACTION_EVENT_COMMONEVENT_DRAG_0230', 0, async (done: Function) => { + Logger.info('TEST', 'SUB_ACE_ANALYSE_ACTION_EVENT_COMMONEVENT_DRAG_0230 start.'); + Settings.createWindow("testability/pages/AnalyseActionEventCommoneventDrag/AnalyseActionEventCommoneventDrag0230"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let image: Component = await driver.findComponent(ON.id('AnalyseActionEventCommoneventDrag0230_001')); + await Utils.sleep(2000); + let richEditor: Component = await driver.findComponent(ON.id('AnalyseActionEventCommoneventDrag0230_002')); + await image.dragTo(richEditor); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', 'SUB_ACE_ANALYSE_ACTION_EVENT_COMMONEVENT_DRAG_0230 finish.'); + done(); + }) + /* + * @tc.number SUB_ACE_ANALYSE_ACTION_EVENT_COMMONEVENT_DRAG_0200 + */ + it('SUB_ACE_ANALYSE_ACTION_EVENT_COMMONEVENT_DRAG_0200', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ANALYSE_ACTION_EVENT_COMMONEVENT_DRAG_0200 start.`); + Settings.createWindow("testability/pages/AnalyseActionEventCommoneventDrag/AnalyseActionEventCommoneventDrag0200") + await Utils.sleep(2000); + let driver = Driver.create(); + let img: Component = await driver.findComponent(ON.id('img')); + let txt: Component = await driver.findComponent(ON.id('txt')); + let point = await img.getBoundsCenter(); + let point2 = await txt.getBoundsCenter(); + await driver.drag(point.x, point.y, point.x+100, point.y+100, 600) + await Utils.sleep(1000); + await driver.drag(point2.x, point2.y, point2.x+100, point2.y+100, 600) + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.error('TEST', `SUB_ACE_ANALYSE_ACTION_EVENT_COMMONEVENT_DRAG_0200 finish.`); + done(); + }) + }) +} \ No newline at end of file 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..60d294a6a48879068dd8b8a913e868ca59397746 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,6 +149,76 @@ import UIComponentPopupBoxToastStyleInterface001 from './UIComponentPopupBoxToastStyleInterfaceTest/UIComponentPopupBoxToastStyleInterface001.test'; import UIComponentPopupBoxFullDialogInterface001 from './UIComponentPopupBoxFullDialogInterfaceTest/UIComponentPopupBoxFullDialogInterface001.test'; +import AceActionGestureMonopolize + from './AceActionGestureMonopolizeTest/AceActionGestureMonopolize.test' +import AceActionGestureJudge + from './AceActionGestureJudgeTest/AceActionGestureJudge.test' +import AceActionGestureDisableInterface + from './AceActionGestureDisableInterfaceTest/AceActionGestureDisableInterface.test' +import AceActionGestureGesturegroupInterface + from './AceActionGestureGesturegroupInterfaceTest/AceActionGestureGesturegroupInterface.test' +import AceActionGestureEventEnhancement + from './AceActionGestureEventEnhancementTest/AceActionGestureEventEnhancement.test' +import AceActionEventCommoneventClickInterface + from './AceActionEventCommoneventClickInterfaceTest/AceActionEventCommoneventClickInterface.test' +import AceActionEventCommoneventClickSpecification + from './AceActionEventCommoneventClickSpecificationTest/AceActionEventCommoneventClickSpecification.test' +import UIAttributesEnabledInterface + from './UIAttributesEnabledInterfaceTest/UIAttributesEnabledInterface.test' +import ActionGestureTapgeatureIntureface + from './ActionGestureTapgeatureInturefaceTest/ActionGestureTapgeatureIntureface.test' +import ActionGesturePangestureIntureface + from './ActionGesturePangestureInturefaceTest/ActionGesturePangestureIntureface.test' +import ActionGestureLonggestureInterface from './ActionGestureLonggestureInterfaceTest/ActionGestureLonggestureInterface.test'; +import ActionGestureReplenishmentgertureInterface from './ActionGestureReplenishmentgertureInterfaceTest/ActionGestureReplenishmentgertureInterface.test'; +import ActionGesturePinchgesrureInterface from './ActionGesturePinchgesrureInterfaceTest/ActionGesturePinchgesrureInterface.test'; +import ActionGestureRotationgestureInterface from './ActionGestureRotationgestureInterfaceTest/ActionGestureRotationgestureInterface.test'; +import ActionEventCommoneventChange from './ActionEventCommoneventChangeTest/ActionEventCommoneventChange.test'; +import ActionGesturePinchgesrureJump from './ActionGesturePinchgesrureJumpTest/ActionGesturePinchgesrureJump.test'; +import ActionGestureSwipegestureInterface from './ActionGestureSwipegestureInterfaceTest/ActionGestureSwipegestureInterface.test'; +import ActionGestureTouchpadInterface + from './ActionGestureTouchpadInterfaceTest/ActionGestureTouchpadInterface.test' +import UIAttributesTouchableInteraction + from './UIAttributesTouchableInteractionTest/UIAttributesTouchableInteraction.test' +import ActionGestureEventRecognizer + from './ActionGestureEventRecognizerTest/ActionGestureEventRecognizer.test' +import ActionGestureEventMitigation + from './ActionGestureEventMitigationTest/ActionGestureEventMitigation.test' +import UIActionEventIntercept from './UIActionEventInterceptTest/UIActionEventIntercept.test' +import ActionEventCommoneventClickScenarios from + './ActionEventCommoneventClickScenariosTest/ActionEventCommoneventClickScenarios.test' +import ActionGestureExcepionHanding from + './ActionGestureExcepionHandingTest/ActionGestureExcepionHanding.test' +import ActionEventCommoneventClickDfx from './ActionEventCommoneventClickDfxTest/ActionEventCommoneventClickDfx.test' +import ActionGestureTapgestureDfx from './ActionGestureTapgestureDfxTest/ActionGestureTapgestureDfx.test' +import ActionGestureLonggestureDfx from './ActionGestureLonggestureDfxTest/ActionGestureLonggestureDfx.test' +import ActionEventCommoneventClick from './ActionEventCommoneventClickTest/ActionEventCommoneventClick.test' +import ActionGestureAttributemodifier from './ActionGestureAttributemodifierTest/ActionGestureAttributemodifier.test' +import ActionEvenTRegisterComponentsChangeEventCallbackActionsheet + from './ActionEvenTRegisterComponentsChangeEventCallbackActionsheetTest/ActionEvenTRegisterComponentsChangeEventCallbackActionsheet.test' +import ActionEventConnect from './ActionEventConnectTest/ActionEventConnect.test' +import ActionEventRegisterWebsearchEventCallback + from './ActionEventRegisterWebsearchEventCallbackTest/ActionEventRegisterWebsearchEventCallback.test' +import ActionGestureGesturegroupInterface + from './ActionGestureGesturegroupInterfaceTest/ActionGestureGesturegroupInterface.test' +import AceActionEventGetinspectorTree from './AceActionEventGetinspectorTreeTest/AceActionEventGetinspectorTree.test' +import ActionEventRegisterComponentChangeEventCallbackAlertdialog from './ActionEventRegisterComponentChangeEventCallbackAlertdialogTest/ActionEventRegisterComponentChangeEventCallbackAlertdialog.test' +import ActionEventRegisterComponentChangeEventCallbackActonsheet from './ActionEventRegisterComponentChangeEventCallbackActonsheetTest/ActionEventRegisterComponentChangeEventCallbackActonsheet.test' +import ActionEventRegisterComponentChangeEventCallbackCounter from './ActionEventRegisterComponentChangeEventCallbackCounterTest/ActionEventRegisterComponentChangeEventCallbackCounter.test' +import ActionEventRegisterComponentChangeEventCallbackGrid from './ActionEventRegisterComponentChangeEventCallbackGridTest/ActionEventRegisterComponentChangeEventCallbackGrid.test' +import ActionEventRegisterComponentChangeEventCallbackTextinput from './ActionEventRegisterComponentChangeEventCallbackTextinputTest/ActionEventRegisterComponentChangeEventCallbackTextinput.test' +import ActionEventRegisterComponentChangeEventCallbackToggle from './ActionEventRegisterComponentChangeEventCallbackToggleTest/ActionEventRegisterComponentChangeEventCallbackToggle.test' +import ActionEventRegisterComponentChangeEventCallbackWaterflow from './ActionEventRegisterComponentChangeEventCallbackWaterflowTest/ActionEventRegisterComponentChangeEventCallbackWaterflow.test' +import AnalyseActionEventCommoneventDrag from './AnalyseActionEventCommoneventDragTest/AnalyseActionEventCommoneventDrag.test' +import SubAceActionGestureSpeedInterface from './SubAceActionGestureSpeedInterface/SubAceActionGestureSpeedInterface.test'; +import SubAceActionEventIntercept from './SubAceActionEventIntercept/SubAceActionEventIntercept.test'; +import SubAceActionGestureOnChildTouch from './SubAceActionGestureOnChildTouch/SubAceActionGestureOnChildTouch.test'; +import SubAceUIComponentCommonattrFocusoptimization from './SubAceUIComponentCommonattrFocusoptimization/SubAceUIComponentCommonattrFocusoptimization.test'; +import ActionGestureSpeedInterface from './ActionGestureSpeedInterfaceTest/ActionGestureSpeedInterface.test' +import UlComponentCommonattrlfocusoptimizatton + from './UlComponentCommonattrlfocusoptimizattonTest/UlComponentCommonattrlfocusoptimizatton.test' +import UIComponentCommonattrFocusoptimization2 + from './UlComponentCommonattrlfocusoptimizattonTest/UIComponentCommonattrFocusoptimization2.test' export default function testsuite() { ComponentTextRicheditorFontfeatures(); @@ -238,7 +308,55 @@ export default function testsuite() { UiComponentPopupboxDatePickerDialogInterface(); UIComponentPopupBoxAttribute(); UIComponentPopupBoxPromptToastSequence(); - UIComponentPopupBoxSpecificationsPopup(); + UIComponentPopupBoxSpecificationsPopup(); AceActionGestureMonopolize(); + AceActionGestureJudge(); + AceActionGestureDisableInterface(); + AceActionGestureGesturegroupInterface(); + AceActionGestureEventEnhancement(); + AceActionEventCommoneventClickInterface(); + ActionGestureTapgeatureIntureface(); + ActionGesturePangestureIntureface(); + UIAttributesEnabledInterface(); + ActionGestureLonggestureInterface(); + ActionGestureReplenishmentgertureInterface(); + ActionGesturePinchgesrureInterface(); + ActionGestureRotationgestureInterface(); + ActionEventCommoneventChange(); + AceActionEventCommoneventClickSpecification(); + ActionGesturePinchgesrureJump(); + ActionGestureSwipegestureInterface(); + ActionGestureTouchpadInterface(); + UIAttributesTouchableInteraction(); + ActionGestureEventRecognizer(); + ActionGestureEventMitigation(); + UIActionEventIntercept(); + ActionEventCommoneventClickScenarios(); + ActionGestureExcepionHanding() ; + ActionEventCommoneventClickDfx(); + ActionGestureTapgestureDfx(); + ActionGestureLonggestureDfx(); + ActionEventCommoneventClick(); + ActionGestureAttributemodifier(); + ActionEvenTRegisterComponentsChangeEventCallbackActionsheet(); + ActionEventConnect(); + ActionEventRegisterWebsearchEventCallback(); + ActionGestureGesturegroupInterface() + AceActionEventGetinspectorTree(); + ActionEventRegisterComponentChangeEventCallbackAlertdialog(); + ActionEventRegisterComponentChangeEventCallbackActonsheet(); + ActionEventRegisterComponentChangeEventCallbackCounter(); + ActionEventRegisterComponentChangeEventCallbackGrid(); + ActionEventRegisterComponentChangeEventCallbackTextinput(); + ActionEventRegisterComponentChangeEventCallbackToggle(); + ActionEventRegisterComponentChangeEventCallbackWaterflow(); + AnalyseActionEventCommoneventDrag(); + SubAceActionGestureSpeedInterface(); + SubAceActionEventIntercept(); + SubAceActionGestureOnChildTouch(); + SubAceUIComponentCommonattrFocusoptimization(); + ActionGestureSpeedInterface(); + UlComponentCommonattrlfocusoptimizatton(); + UIComponentCommonattrFocusoptimization2(); } diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/SubAceActionEventIntercept/SubAceActionEventIntercept.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/SubAceActionEventIntercept/SubAceActionEventIntercept.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..e46da02a28ac94e4c2c3d142cc477d0105b9ec4b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/SubAceActionEventIntercept/SubAceActionEventIntercept.test.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 { 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, ON } from '@ohos.UiTest' + +export default function SubAceActionEventIntercept() { + + describe('SubAceActionEventIntercept', () => { + 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 SUBACE_ACTION_EVENTINTERCEPT_0100 + * @tc.name SUBACE_ACTION_EVENTINTERCEPT_0100 + * @tc.desc + */ + it('SUBACE_ACTION_EVENTINTERCEPT_0100', 0, async (done: Function) => { + Logger.info('TEST', `SUBACE_ACTION_EVENTINTERCEPT_0100 start.`); + Settings.createWindow("testability/pages/SubAceActionEventIntercept/SubAceActionEventIntercept0100"); + await Utils.sleep(1000) + let driver: Driver = Driver.create() + await driver.triggerKey(2017); + await Utils.sleep(500) + await driver.triggerKey(2018); + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUBACE_ACTION_EVENTINTERCEPT_0100 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/SubAceActionGestureOnChildTouch/SubAceActionGestureOnChildTouch.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/SubAceActionGestureOnChildTouch/SubAceActionGestureOnChildTouch.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..e5cee146b9375a73792c217166b94418da8c04dc --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/SubAceActionGestureOnChildTouch/SubAceActionGestureOnChildTouch.test.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 { 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, ON } from '@ohos.UiTest' + +export default function SubAceActionGestureOnChildTouch() { + + describe('SubAceActionGestureOnChildTouch', () => { + 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_ACTION_GESTURE_ON-CHILD-TOUCH_0010 + * @tc.name SUB_ACE_ACTION_GESTURE_ON-CHILD-TOUCH_0010 + * @tc.desc 在手势事件中存点Touch Down + */ + it('SUB_ACE_ACTION_GESTURE_ON_CHILD_TOUCH_0010', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_ON_CHILD_TOUCH_0010 start.`); + Settings.createWindow("testability/pages/SubAceActionGestureOnChildTouch/SubAceActionGestureOnChildTouch0010"); + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_ON_CHILD_TOUCH_0010 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/SubAceActionGestureSpeedInterface/SubAceActionGestureSpeedInterface.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/SubAceActionGestureSpeedInterface/SubAceActionGestureSpeedInterface.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..086da04addc18718d6b378234c9271127da12adc --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/SubAceActionGestureSpeedInterface/SubAceActionGestureSpeedInterface.test.ets @@ -0,0 +1,163 @@ +/* + * 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, 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, ON } from '@ohos.UiTest' + +export default function SubAceActionGestureSpeedInterface() { + + describe('SubAceActionGestureSpeedInterface', () => { + 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_ACTION_GESTURE_SPEED_INTERFACE_0010 + * @tc.name SUB_ACE_ACTION_GESTURE_SPEED_INTERFACE_0010 + * @tc.desc 在手势事件中存点Touch Down + */ + it('SUB_ACE_ACTION_GESTURE_SPEED_INTERFACE_0010', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SPEED_INTERFACE_0010 start.`); + Settings.createWindow("testability/pages/SubAceActionGestureSpeedInterface/SubAceActionGestureSpeedInterface0010"); + await Utils.sleep(1000) + let driver: Driver = Driver.create() + let btn: Component = await driver.findComponent(ON.id('SubAceActionGestureSpeedInterface0010_btn')); + await Utils.sleep(500) + let point = await btn.getBoundsCenter() + await Utils.sleep(500) + await driver.fling(point, {x: point.x, y: point.y + 30}, 5, 600) + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SPEED_INTERFACE_0010 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_SPEED_INTERFACE_0020 + * @tc.name SUB_ACE_ACTION_GESTURE_SPEED_INTERFACE_0020 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_SPEED_INTERFACE_0020', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SPEED_INTERFACE_0020 start.`); + Settings.createWindow("testability/pages/SubAceActionGestureSpeedInterface/SubAceActionGestureSpeedInterface0020"); + await Utils.sleep(1000) + let driver: Driver = Driver.create() + let btn: Component = await driver.findComponent(ON.id('SubAceActionGestureSpeedInterface0020_btn')); + await Utils.sleep(500) + let point = await btn.getBoundsCenter() + await Utils.sleep(500) + await driver.fling(point, {x: point.x + 30, y: point.y + 30}, 5, 600) + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SPEED_INTERFACE_0020 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_SPEED_INTERFACE_0030 + * @tc.name SUB_ACE_ACTION_GESTURE_SPEED_INTERFACE_0030 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_SPEED_INTERFACE_0030', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SPEED_INTERFACE_0030 start.`); + Settings.createWindow("testability/pages/SubAceActionGestureSpeedInterface/SubAceActionGestureSpeedInterface0030"); + await Utils.sleep(1000) + let driver: Driver = Driver.create() + let btn: Component = await driver.findComponent(ON.id('SubAceActionGestureSpeedInterface0030_btn')); + await Utils.sleep(500) + let point = await btn.getBoundsCenter() + await Utils.sleep(500) + await driver.fling(point, {x: point.x, y: point.y - 30}, 5, 600) + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SPEED_INTERFACE_0030 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_SPEED_INTERFACE_0040 + * @tc.name SUB_ACE_ACTION_GESTURE_SPEED_INTERFACE_0040 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_SPEED_INTERFACE_0040', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SPEED_INTERFACE_0040 start.`); + Settings.createWindow("testability/pages/SubAceActionGestureSpeedInterface/SubAceActionGestureSpeedInterface0040"); + await Utils.sleep(1000) + let driver: Driver = Driver.create() + let btn: Component = await driver.findComponent(ON.id('SubAceActionGestureSpeedInterface0040_btn')); + await Utils.sleep(500) + let point = await btn.getBoundsCenter() + await Utils.sleep(500) + await driver.fling(point, {x: point.x, y: point.y - 30}, 5, 600) + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SPEED_INTERFACE_0040 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_SPEED_INTERFACE_0050 + * @tc.name SUB_ACE_ACTION_GESTURE_SPEED_INTERFACE_0050 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_SPEED_INTERFACE_0050', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SPEED_INTERFACE_0050 start.`); + Settings.createWindow("testability/pages/SubAceActionGestureSpeedInterface/SubAceActionGestureSpeedInterface0050"); + await Utils.sleep(1000) + let driver: Driver = Driver.create() + let btn: Component = await driver.findComponent(ON.id('SubAceActionGestureSpeedInterface0050_btn')); + await Utils.sleep(500) + let point = await btn.getBoundsCenter() + await Utils.sleep(500) + await driver.fling(point, {x: point.x, y: point.y + 30}, 5, 600) + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SPEED_INTERFACE_0050 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_ACTION_GESTURE_SPEED_INTERFACE_0060 + * @tc.name SUB_ACE_ACTION_GESTURE_SPEED_INTERFACE_0060 + * @tc.desc + */ + it('SUB_ACE_ACTION_GESTURE_SPEED_INTERFACE_0060', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SPEED_INTERFACE_0060 start.`); + Settings.createWindow("testability/pages/SubAceActionGestureSpeedInterface/SubAceActionGestureSpeedInterface0060"); + await Utils.sleep(3000) + let driver: Driver = Driver.create() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_ACTION_GESTURE_SPEED_INTERFACE_0060 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/SubAceUIComponentCommonattrFocusoptimization/SubAceUIComponentCommonattrFocusoptimization.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/SubAceUIComponentCommonattrFocusoptimization/SubAceUIComponentCommonattrFocusoptimization.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..5ec1a9841f91c3b497882ab8f1c24acb1ace95bf --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/SubAceUIComponentCommonattrFocusoptimization/SubAceUIComponentCommonattrFocusoptimization.test.ets @@ -0,0 +1,178 @@ +/* + * 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, 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, ON } from '@ohos.UiTest' + +export default function SubAceUIComponentCommonattrFocusoptimization() { + + describe('SubAceUIComponentCommonattrFocusoptimization', () => { + 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 SUBACE_ULCOMPONENT_COMMONATTRLFOCUSOPTIMIZATION_125 + * @tc.name SUBACE_ULCOMPONENT_COMMONATTRLFOCUSOPTIMIZATION_125 + * @tc.desc + */ + + it('SUBACE_ULCOMPONENT_COMMONATTRLFOCUSOPTIMIZATION_125', 0, async (done: Function) => { + Logger.info('TEST', `SUBACE_ULCOMPONENT_COMMONATTRLFOCUSOPTIMIZATION_125 start.`); + Settings.createWindow("testability/pages/SubAceUIComponentCommonattrFocusoptimization/SubAceUIComponentCommonattrFocusoptimization125"); + await Utils.sleep(1000) + let driver: Driver = Driver.create() + let btn1: Component = await driver.findComponent(ON.id('SubaceUlComponentCommonAttRlfocusOptimization125_four_btn')); + await Utils.sleep(500) + await btn1.click() + await Utils.sleep(1000) + let btn4: Component = await driver.findComponent(ON.id('SubaceUlComponentCommonAttRlfocusOptimization125_back_btn')); + await Utils.sleep(500) + await btn4.click() + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUBACE_ULCOMPONENT_COMMONATTRLFOCUSOPTIMIZATION_125 finish.`); + done() + }) + + /* + * @tc.number SUBACE_ULCOMPONENT_COMMONATTR_FOCUSOPTIMIZATION_128 + * @tc.name SUBACE_ULCOMPONENT_COMMONATTR_FOCUSOPTIMIZATION_128 + * @tc.desc + */ + + it('SUBACE_ULCOMPONENT_COMMONATTR_FOCUSOPTIMIZATION_128', 0, async (done: Function) => { + Logger.info('TEST', `SUBACE_ULCOMPONENT_COMMONATTR_FOCUSOPTIMIZATION_128 start.`); + Settings.createWindow("testability/pages/SubAceUIComponentCommonattrFocusoptimization/SubAceUIComponentCommonattrFocusoptimization128"); + await Utils.sleep(1000) + let driver: Driver = Driver.create() + let btn1: Component = await driver.findComponent(ON.id('SubaceUlComponentCommonAttRlfocusOptimization128_one_btn')); + await Utils.sleep(500) + await btn1.click() + await Utils.sleep(1000) + let btn4: Component = await driver.findComponent(ON.id('SubaceUlComponentCommonAttRlfocusOptimization128_back_btn')); + await Utils.sleep(500) + await btn4.click() + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUBACE_ULCOMPONENT_COMMONATTR_FOCUSOPTIMIZATION_128 finish.`); + done() + }) + + /* + * @tc.number SUBACE_ULCOMPONENT_COMMONATTR_FOCUSOPTIMIZATION_142 + * @tc.name SUBACE_ULCOMPONENT_COMMONATTR_FOCUSOPTIMIZATION_142 + * @tc.desc + */ + + it('SUBACE_ULCOMPONENT_COMMONATTR_FOCUSOPTIMIZATION_142', 0, async (done: Function) => { + Logger.info('TEST', `SUBACE_ULCOMPONENT_COMMONATTR_FOCUSOPTIMIZATION_142 start.`); + Settings.createWindow("testability/pages/SubAceUIComponentCommonattrFocusoptimization/SubAceUIComponentCommonattrFocusoptimization142"); + await Utils.sleep(1000) + let driver: Driver = Driver.create() + let btn1: Component = await driver.findComponent(ON.id('SubAceUIComponentCommonattrFocusoptimization142_column')); + await Utils.sleep(500) + await btn1.click() + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUBACE_ULCOMPONENT_COMMONATTR_FOCUSOPTIMIZATION_142 finish.`); + done() + }) + + /* + * @tc.number SUBACE_ULCOMPONENT_COMMONATTR_FOCUSOPTIMIZATION_143 + * @tc.name SUBACE_ULCOMPONENT_COMMONATTR_FOCUSOPTIMIZATION_143 + * @tc.desc + */ + + it('SUBACE_ULCOMPONENT_COMMONATTR_FOCUSOPTIMIZATION_143', 0, async (done: Function) => { + Logger.info('TEST', `SUBACE_ULCOMPONENT_COMMONATTR_FOCUSOPTIMIZATION_143 start.`); + Settings.createWindow("testability/pages/SubAceUIComponentCommonattrFocusoptimization/SubAceUIComponentCommonattrFocusoptimization143"); + await Utils.sleep(1000) + let driver: Driver = Driver.create() + let btn1: Component = await driver.findComponent(ON.id('SubaceUlComponentCommonAttRlfocusOptimization143_one_btn')); + await Utils.sleep(500) + await btn1.click() + await Utils.sleep(1000) + let btn2: Component = await driver.findComponent(ON.id('SubaceUlComponentCommonAttRlfocusOptimization143_two_btn')); + await Utils.sleep(500) + await btn2.click() + await Utils.sleep(1000) + let btn3: Component = await driver.findComponent(ON.id('SubaceUlComponentCommonAttRlfocusOptimization143_three_btn')); + await Utils.sleep(500) + await btn3.click() + await Utils.sleep(1000) + let btn4: Component = await driver.findComponent(ON.id('SubaceUlComponentCommonAttRlfocusOptimization143_back_btn')); + await Utils.sleep(500) + await btn4.click() + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUBACE_ULCOMPONENT_COMMONATTR_FOCUSOPTIMIZATION_143 finish.`); + done() + }) + + /* + * @tc.number SUBACE_ULCOMPONENT_COMMONATTR_FOCUSOPTIMIZATION_146 + * @tc.name SUBACE_ULCOMPONENT_COMMONATTR_FOCUSOPTIMIZATION_146 + * @tc.desc + */ + + it('SUBACE_ULCOMPONENT_COMMONATTR_FOCUSOPTIMIZATION_146', 0, async (done: Function) => { + Logger.info('TEST', `SUBACE_ULCOMPONENT_COMMONATTR_FOCUSOPTIMIZATION_146 start.`); + Settings.createWindow("testability/pages/SubAceUIComponentCommonattrFocusoptimization/SubAceUIComponentCommonattrFocusoptimization146"); + await Utils.sleep(1000) + let driver: Driver = Driver.create() + let btn1: Component = await driver.findComponent(ON.id('SubaceUlComponentCommonAttRlfocusOptimization146_one_btn')); + await Utils.sleep(500) + await btn1.click() + await Utils.sleep(1000) + let btn2: Component = await driver.findComponent(ON.id('SubaceUlComponentCommonAttRlfocusOptimization146_two_btn')); + await Utils.sleep(500) + await btn2.click() + await Utils.sleep(1000) + let btn3: Component = await driver.findComponent(ON.id('SubaceUlComponentCommonAttRlfocusOptimization146_three_btn')); + await Utils.sleep(500) + await btn3.click() + await Utils.sleep(1000) + let btn4: Component = await driver.findComponent(ON.id('SubaceUlComponentCommonAttRlfocusOptimization146_back_btn')); + await Utils.sleep(500) + await btn4.click() + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUBACE_ULCOMPONENT_COMMONATTR_FOCUSOPTIMIZATION_146 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIActionEventInterceptTest/UIActionEventIntercept.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIActionEventInterceptTest/UIActionEventIntercept.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..ce2f88b426e1895f08641761b891fca68bf39f73 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIActionEventInterceptTest/UIActionEventIntercept.test.ets @@ -0,0 +1,334 @@ +/* + * 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. + * zhangxixi + */ +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, ON, MouseButton, On } from '@ohos.UiTest' +import { KeyCode } from '@kit.InputKit' + +export default function UIActionEventIntercept() { + + describe('UIActionEventIntercept', () => { + 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_ACIION_EVENT_INTERCEPT_0050 + * @tc.name SUB_ACE_ACIION_EVENT_INTERCEPT_0050 + * @tc.desc 输入框绑定onKeyPrelme + */ + it('SUB_ACE_ACIION_EVENT_INTERCEPT_0050', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACIION_EVENT_INTERCEPT_0050 start.`); + Settings.createWindow("testability/pages/UIActionEventIntercept/UIActionEventIntercept0050"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + let mSearch: Component = await driver.findComponent(ON.id('mSearch')); + await Utils.sleep(1000); + await driver.triggerKey(2049); + await Utils.sleep(1000); + await driver.triggerKey(2017); + await Utils.sleep(1000); + await driver.triggerKey(2018); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_ACIION_EVENT_INTERCEPT_0050 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_ACIION_EVENT_INTERCEPT_0090 + * @tc.name SUB_ACE_ACIION_EVENT_INTERCEPT_0090 + * @tc.desc 输入框绑定快捷键 + */ + it('SUB_ACE_ACIION_EVENT_INTERCEPT_0090', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACIION_EVENT_INTERCEPT_0090 start.`); + Settings.createWindow("testability/pages/UIActionEventIntercept/UIActionEventIntercept0090"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + await driver.triggerKey(2049); + await Utils.sleep(1000); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_C); //绑定 CTRL+C快捷键 + await Utils.sleep(1000); + await driver.triggerCombineKeys(KeyCode.KEYCODE_C, KeyCode.KEYCODE_A); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_ACIION_EVENT_INTERCEPT_0090 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_ACIION_EVENT_INTERCEPT_0080 + * @tc.name SUB_ACE_ACIION_EVENT_INTERCEPT_0080 + * @tc.desc 输入框绑定Prelme、普通Key事件 + */ + it('SUB_ACE_ACIION_EVENT_INTERCEPT_0080', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACIION_EVENT_INTERCEPT_0080 start.`); + Settings.createWindow("testability/pages/UIActionEventIntercept/UIActionEventIntercept0080"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + await driver.triggerKey(2049); + await Utils.sleep(1000); + await driver.triggerKey(2017); + await Utils.sleep(1000); + await driver.triggerKey(2019); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_ACIION_EVENT_INTERCEPT_0080 finish.`); + done(); + }) + /** + * @tc.number SUBACE_SUPPORT_GLOBALSHORTCUT_KEY_REGISTRATION_0010 + * @tc.name SUBACE_SUPPORT_GLOBALSHORTCUT_KEY_REGISTRATION_0010 + * @tc.desc 原先禁止绑定的快捷键1(复制) + */ + it('SUBACE_SUPPORT_GLOBALSHORTCUT_KEY_REGISTRATION_0010', 0, async (done: Function) => { + Logger.info('TEST', `SUBACE_SUPPORT_GLOBALSHORTCUT_KEY_REGISTRATION_0010 start.`); + Settings.createWindow("testability/pages/UIActionEventIntercept/UISupportGlobalshortcutKeyRegistratton0010"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + await driver.triggerKey(2049); + await Utils.sleep(1000); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_C); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUBACE_SUPPORT_GLOBALSHORTCUT_KEY_REGISTRATION_0010 finish.`); + done(); + }) + /** + * @tc.number SUBACE_SUPPORT_GLOBALSHORTCUTKEY_REGISTRATION_0260 + * @tc.name SUBACE_SUPPORT_GLOBALSHORTCUTKEY_REGISTRATION_0260 + * @tc.desc 单独按键Functionkey:Tab + */ + it('SUBACE_SUPPORT_GLOBALSHORTCUTKEY_REGISTRATION_0260', 0, async (done: Function) => { + Logger.info('TEST', `SUBACE_SUPPORT_GLOBALSHORTCUTKEY_REGISTRATION_0260 start.`); + Settings.createWindow("testability/pages/UIActionEventIntercept/UISupportGlobalshortcutKeyRegistratton0260"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + await driver.triggerKey(2049); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUBACE_SUPPORT_GLOBALSHORTCUTKEY_REGISTRATION_0260 finish.`); + done(); + }) + /** + * @tc.number SUBACE_SUPPORT_GLOBAL SUBACE_SUPPORT_GLOBAL SHORTCUT_KEY_REGISTRATION_0100 + * @tc.name SUBACE_SUPPORT_GLOBAL SUBACE_SUPPORT_GLOBAL SHORTCUT_KEY_REGISTRATION_0100 + * @tc.desc Function key:F1-F12Modifierkey:Ctrl + */ + it('SUBACE_SUPPORT_GLOBAL_SHORTCUT_KEY_REGISTRATION_0100', 0, async (done: Function) => { + Logger.info('TEST', `SUBACE_SUPPORT_GLOBAL_SHORTCUT_KEY_REGISTRATION_0100 start.`); + Settings.createWindow("testability/pages/UIActionEventIntercept/UISupportGlobalshortcutKeyRegistratton0100"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + for (let index = KeyCode.KEYCODE_F1; index <= KeyCode.KEYCODE_F12; index++) { + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, index); + await Utils.sleep(100); + } + await Utils.sleep(1000); + let button: Component = await driver.findComponent(ON.id('button')); + button.click() + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUBACE_SUPPORT_GLOBAL_SHORTCUT_KEY_REGISTRATION_0100 finish.`); + done(); + }) + /** + * @tc.number SUBACE_SUPPORT_GLOBALSHORTCUT_KEY_REGISTRATION_0200 + * @tc.name SUBACE_SUPPORT_GLOBALSHORTCUT_KEY_REGISTRATION_0200 + * @tc.desc Function key:F1-F12Modifierkey:Alt + */ + it('SUBACE_SUPPORT_GLOBALSHORTCUT_KEY_REGISTRATION_0200', 0, async (done: Function) => { + Logger.info('TEST', `SUBACE_SUPPORT_GLOBALSHORTCUT_KEY_REGISTRATION_0200 start.`); + Settings.createWindow("testability/pages/UIActionEventIntercept/UISupportGlobalshortcutKeyRegistratton0200"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + for (let index = KeyCode.KEYCODE_F1; index <= KeyCode.KEYCODE_F12; index++) { + await driver.triggerCombineKeys(KeyCode.KEYCODE_ALT_LEFT, index); + await Utils.sleep(100); + } + await Utils.sleep(1000); + let button: Component = await driver.findComponent(ON.id('button')); + button.click() + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUBACE_SUPPORT_GLOBALSHORTCUT_KEY_REGISTRATION_0200 finish.`); + done(); + }) + /** + * @tc.number SUBACE_SUPPORT_GLOBALSHORTCUT_KEY_REGISTRATION_0150 + * @tc.name SUBACE_SUPPORT_GLOBALSHORTCUT_KEY_REGISTRATION_0150 + * @tc.desc Function key:F1-F12Modifierkey:Shift + */ + it('SUBACE_SUPPORT_GLOBALSHORTCUT_KEY_REGISTRATION_0150', 0, async (done: Function) => { + Logger.info('TEST', `SUBACE_SUPPORT_GLOBALSHORTCUT_KEY_REGISTRATION_0150 start.`); + Settings.createWindow("testability/pages/UIActionEventIntercept/UISupportGlobalshortcutKeyRegistratton0150"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + for (let index = KeyCode.KEYCODE_F1; index <= KeyCode.KEYCODE_F12; index++) { + await driver.triggerCombineKeys(KeyCode.KEYCODE_SHIFT_LEFT, index); + await Utils.sleep(100); + } + await Utils.sleep(1000); + let button: Component = await driver.findComponent(ON.id('button')); + button.click() + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUBACE_SUPPORT_GLOBALSHORTCUT_KEY_REGISTRATION_0150 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_ACIION_EVENT_INTERCEPT_0060 + * @tc.name SUB_ACE_ACIION_EVENT_INTERCEPT_0060 + * @tc.desc 输入框绑定Prelme、快捷键、普通Key事件 + */ + it('SUB_ACE_ACIION_EVENT_INTERCEPT_0060', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACIION_EVENT_INTERCEPT_0060 start.`); + Settings.createWindow("testability/pages/UIActionEventIntercept/UIActionEventIntercept0060"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_A); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_C); + await Utils.sleep(1000); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_C); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_ACIION_EVENT_INTERCEPT_0060 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_ACIION_EVENT_INTERCEPT_0030 + * @tc.name SUB_ACE_ACIION_EVENT_INTERCEPT_0030 + * @tc.desc 未获焦状态下,绑定Prelme、快捷键、输入法、普通Key事件 + */ + it('SUB_ACE_ACIION_EVENT_INTERCEPT_0030', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACIION_EVENT_INTERCEPT_0030 start.`); + Settings.createWindow("testability/pages/UIActionEventIntercept/UIActionEventIntercept0030"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_A); + await Utils.sleep(1000); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_C); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_C); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_ALT_LEFT); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_ACIION_EVENT_INTERCEPT_0030 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_ACIION_EVENT_INTERCEPT_0010 + * @tc.name SUB_ACE_ACIION_EVENT_INTERCEPT_0010 + * @tc.desc 当前焦点控件是WEB控件 + */ + it('SUB_ACE_ACIION_EVENT_INTERCEPT_0010', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACIION_EVENT_INTERCEPT_0010 start.`); + Settings.createWindow("testability/pages/UIActionEventIntercept/UIActionEventIntercept0010"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_A); + await Utils.sleep(1000); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_C); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_C); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_ALT_LEFT); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_ACIION_EVENT_INTERCEPT_0010 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_ACIION_EVENT_INTERCEPT_0070 + * @tc.name SUB_ACE_ACIION_EVENT_INTERCEPT_0070 + * @tc.desc 输入框绑定Prelme、快捷键、输入法、普通Key事件 + */ + it('SUB_ACE_ACIION_EVENT_INTERCEPT_0070', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_ACIION_EVENT_INTERCEPT_0070 start.`); + Settings.createWindow("testability/pages/UIActionEventIntercept/UIActionEventIntercept0070"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_A); + await Utils.sleep(1000); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_C); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_C); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_ALT_LEFT); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_ACIION_EVENT_INTERCEPT_0070 finish.`); + done(); + }) + + /** + * @tc.number SUBACEACTION_EVENT_INTERCEPT_0040 + * @tc.name SUBACEACTION_EVENT_INTERCEPT_0040 + * @tc.desc 输入框绑定keyEvent + */ + it('SUBACEACTION_EVENT_INTERCEPT_0040', 0, async (done: Function) => { + Logger.info('TEST', `SUBACEACTION_EVENT_INTERCEPT_0040 start.`); + Settings.createWindow("testability/pages/UIActionEventIntercept/UIActionEventIntercept0040"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + await driver.triggerKey(2049); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_C); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUBACEACTION_EVENT_INTERCEPT_0040 finish.`); + done(); + }) + }) +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesEnabledInterfaceTest/UIAttributesEnabledInterface.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesEnabledInterfaceTest/UIAttributesEnabledInterface.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..5666552aa3970c2dbc4fcf3fc12a2635f9ef99e4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesEnabledInterfaceTest/UIAttributesEnabledInterface.test.ets @@ -0,0 +1,78 @@ +/* + * 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, ON ,PointerMatrix,MouseButton} from '@ohos.UiTest' + +export default function UIAttributesEnabledInterface() { + + describe('UIAttributesEnabledInterface', () => { + 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_ATTRIBUTES_ENABLED_INTERFACE_0010 + * @tc.name SUB_ACE_UI_ATTRIBUTES_ENABLED_INTERFACE_0010 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_ATTRIBUTES_ENABLED_INTERFACE_0010', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_ENABLED_INTERFACE_0010 start.`); + Settings.createWindow("testability/pages/UIAttributesEnabledInterface/UIAttributesEnabledInterface20"); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_ENABLED_INTERFACE_0010 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_ENABLED_INTERFACE_0020 + * @tc.name SUB_ACE_UI_ATTRIBUTES_ENABLED_INTERFACE_0020 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_ATTRIBUTES_ENABLED_INTERFACE_0020', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_ENABLED_INTERFACE_0020 start.`); + Settings.createWindow("testability/pages/UIAttributesEnabledInterface/UIAttributesEnabledInterface20"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIAttributesEnabledInterface20')); + await button.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_ENABLED_INTERFACE_0020 finish.`); + done(); + }) + + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesTouchableInteractionTest/UIAttributesTouchableInteraction.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesTouchableInteractionTest/UIAttributesTouchableInteraction.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..5a2b10a37f5da23c2f3732d46d5532b7306c035a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesTouchableInteractionTest/UIAttributesTouchableInteraction.test.ets @@ -0,0 +1,1004 @@ +/* + * 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, ON ,PointerMatrix,MouseButton} from '@ohos.UiTest' + +export default function UIAttributesTouchableInteraction() { + + describe('UIAttributesTouchableInteraction', () => { + 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_ATTRIBUTES_TOUCHABLE_INTERACTION_0210 + * @tc.name SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0210 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0210', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0210 start.`); + Settings.createWindow("testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction210"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let rect: Component = await driver.findComponent(ON.id('UIAttributesTouchableInteraction210')); + let point = await rect.getBoundsCenter(); + await driver.mouseClick({ x:point.x,y:point.y},0); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0210 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0030 + * @tc.name SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0030 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0030', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0030 start.`); + Settings.createWindow("testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction30"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let rect: Component = await driver.findComponent(ON.id('UIAttributesTouchableInteraction30')); + let point = await rect.getBoundsCenter();; + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x - 20, y: point.y}); + pointers.setPoint(0, 1, {x: point.x - 10, y: point.y}); + pointers.setPoint(0, 2, {x: point.x, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 10, y: point.y}); + pointers.setPoint(1, 1, {x: point.x + 10, y: point.y}); + pointers.setPoint(1, 2, {x: point.x + 10, y: point.y}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0030 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0010 + * @tc.name SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0010 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0010', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0010 start.`); + Settings.createWindow("testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction10"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let rect: Component = await driver.findComponent(ON.id('UIAttributesTouchableInteraction10')); + let point = await rect.getBoundsCenter(); + await rect.longClick(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0010 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0020 + * @tc.name SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0020 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0020', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0020 start.`); + Settings.createWindow("testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction20"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let rect: Component = await driver.findComponent(ON.id('UIAttributesTouchableInteraction20')); + let point = await rect.getBoundsCenter();; + let pointers: PointerMatrix = PointerMatrix.create(1, 3); + pointers.setPoint(0, 0, {x: point.x - 20, y: point.y}); + pointers.setPoint(0, 1, {x: point.x - 10, y: point.y}); + pointers.setPoint(0, 2, {x: point.x, y: point.y}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0020 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0040 + * @tc.name SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0040 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0040', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0040 start.`); + Settings.createWindow("testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction40"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let rect: Component = await driver.findComponent(ON.id('UIAttributesTouchableInteraction40')); + let point = await rect.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x, y: point.y}); + pointers.setPoint(0, 1, {x: point.x, y: point.y}); + pointers.setPoint(0, 2, {x: point.x, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 20, y: point.y+100}); + pointers.setPoint(1, 1, {x: point.x + 40, y: point.y+80}); + pointers.setPoint(1, 2, {x: point.x + 80, y: point.y+60}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0040 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0050 + * @tc.name SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0050 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0050', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0050 start.`); + Settings.createWindow("testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction50"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let rect: Component = await driver.findComponent(ON.id('UIAttributesTouchableInteraction50')); + let point = await rect.getBoundsCenter();; + let pointers: PointerMatrix = PointerMatrix.create(1, 3); + pointers.setPoint(0, 0, {x: point.x , y: point.y+30}); + pointers.setPoint(0, 1, {x: point.x , y: point.y+10}); + pointers.setPoint(0, 2, {x: point.x, y: point.y}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0050 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0060 + * @tc.name SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0060 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0060', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0060 start.`); + Settings.createWindow("testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction60"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let rect: Component = await driver.findComponent(ON.id('UIAttributesTouchableInteraction60')); + let point = await rect.getBoundsCenter(); + await rect.longClick(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0060 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0070 + * @tc.name SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0070 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0070', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0070 start.`); + Settings.createWindow("testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction70"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let rect: Component = await driver.findComponent(ON.id('UIAttributesTouchableInteraction70')); + let point = await rect.getBoundsCenter();; + let pointers: PointerMatrix = PointerMatrix.create(1, 10); + pointers.setPoint(0, 0, {x: point.x , y: point.y}); + pointers.setPoint(0, 1, {x: point.x , y: point.y}); + pointers.setPoint(0, 2, {x: point.x , y: point.y}); + pointers.setPoint(0, 3, {x: point.x , y: point.y}); + pointers.setPoint(0, 4, {x: point.x , y: point.y}); + pointers.setPoint(0, 5, {x: point.x , y: point.y}); + pointers.setPoint(0, 6, {x: point.x , y: point.y}); + pointers.setPoint(0, 7, {x: point.x , y: point.y+10}); + pointers.setPoint(0, 8, {x: point.x , y: point.y+20}); + pointers.setPoint(0, 9, {x: point.x , y: point.y+50}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0070 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0080 + * @tc.name SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0080 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0080', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0080 start.`); + Settings.createWindow("testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction80"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let text: Component = await driver.findComponent(ON.id('UIAttributesTouchableInteraction80')); + let rect: Component = await driver.findComponent(ON.id('UIAttributesTouchableInteraction80_1')); + await text.dragTo(rect); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0080 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0100 + * @tc.name SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0100 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0100', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0100 start.`); + Settings.createWindow("testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction100"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let text: Component = await driver.findComponent(ON.id('UIAttributesTouchableInteraction100')); + let rect: Component = await driver.findComponent(ON.id('UIAttributesTouchableInteraction100_1')); + await text.dragTo(rect); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0100 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0110 + * @tc.name SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0110 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0110', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0110 start.`); + Settings.createWindow("testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction110"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let text: Component = await driver.findComponent(ON.id('UIAttributesTouchableInteraction110')); + let rect: Component = await driver.findComponent(ON.id('UIAttributesTouchableInteraction110_1')); + await text.dragTo(rect); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0110 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0120 + * @tc.name SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0120 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0120', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0120 start.`); + Settings.createWindow("testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction100"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let text: Component = await driver.findComponent(ON.id('UIAttributesTouchableInteraction100')); + let rect: Component = await driver.findComponent(ON.id('UIAttributesTouchableInteraction100_1')); + await text.dragTo(rect); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0120 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0140 + * @tc.name SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0140 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0140', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0140 start.`); + Settings.createWindow("testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction140"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0140 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0150 + * @tc.name SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0150 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0150', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0150 start.`); + Settings.createWindow("testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction140"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let text: Component = await driver.findComponent(ON.id('UIAttributesTouchableInteraction140')); + await text.click(); + await text.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0150 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0180 + * @tc.name SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0180 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0180', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0180 start.`); + Settings.createWindow("testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction180"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let text: Component = await driver.findComponent(ON.id('UIAttributesTouchableInteraction180')); + await text.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0180 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0190 + * @tc.name SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0190 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0190', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0190 start.`); + Settings.createWindow("testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction190"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let text: Component = await driver.findComponent(ON.id('UIAttributesTouchableInteraction190')); + let info =await text.getBoundsCenter(); + await driver.fling({x:info.x-100,y:info.y},{x:info.x+100,y:info.y},2,10000); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0190 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0220 + * @tc.name SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0220 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0220', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0220 start.`); + Settings.createWindow("testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction220"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let text: Component = await driver.findComponent(ON.id('UIAttributesTouchableInteraction220')); + let info =await text.getBoundsCenter(); + await driver.mouseMoveTo(info); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0220 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0230 + * @tc.name SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0230 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0230', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0230 start.`); + Settings.createWindow("testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction230"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let text: Component = await driver.findComponent(ON.id('UIAttributesTouchableInteraction230')); + await text.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0230 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0250 + * @tc.name SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0250 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0250', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0250 start.`); + Settings.createWindow("testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction250"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let text: Component = await driver.findComponent(ON.id('UIAttributesTouchableInteraction250')); + let info =await text.getBoundsCenter(); + await driver.fling({x:info.x,y:info.y},{x:info.x+100,y:info.y},2,10000); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0250 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0260 + * @tc.name SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0260 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0260', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0260 start.`); + Settings.createWindow("testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction260"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let text: Component = await driver.findComponent(ON.id('UIAttributesTouchableInteraction260')); + let button: Component = await driver.findComponent(ON.id('UIAttributesTouchableInteraction260_1')); + let point = await text.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x, y: point.y}); + pointers.setPoint(0, 1, {x: point.x - 10, y: point.y}); + pointers.setPoint(0, 2, {x: point.x - 20, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 10, y: point.y}); + pointers.setPoint(1, 1, {x: point.x + 10, y: point.y}); + pointers.setPoint(1, 2, {x: point.x + 10, y: point.y}); + await driver.injectMultiPointerAction(pointers); + await button.click(); + await Utils.sleep(5000); + await windowSnap.snapShot(); + await Utils.sleep(5000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0260 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0270 + * @tc.name SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0270 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0270', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0270 start.`); + Settings.createWindow("testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction270"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let text: Component = await driver.findComponent(ON.id('UIAttributesTouchableInteraction270')); + let point = await text.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(2, 3); + pointers.setPoint(0, 0, {x: point.x, y: point.y}); + pointers.setPoint(0, 1, {x: point.x, y: point.y}); + pointers.setPoint(0, 2, {x: point.x, y: point.y}); + pointers.setPoint(1, 0, {x: point.x + 20, y: point.y}); + pointers.setPoint(1, 1, {x: point.x + 40, y: point.y+20}); + pointers.setPoint(1, 2, {x: point.x + 80, y: point.y+40}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0270 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0290 + * @tc.name SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0290 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0290', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0290 start.`); + Settings.createWindow("testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction290"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let text: Component = await driver.findComponent(ON.id('UIAttributesTouchableInteraction290')); + let point = await text.getBoundsCenter(); + await text.longClick(); + let pointers: PointerMatrix = PointerMatrix.create(1, 3); + pointers.setPoint(0, 0, {x: point.x, y: point.y}); + pointers.setPoint(0, 1, {x: point.x+30, y: point.y}); + pointers.setPoint(0, 2, {x: point.x+60, y: point.y}); + await driver.injectMultiPointerAction(pointers); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0290 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0310 + * @tc.name SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0310 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0310', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0310 start.`); + Settings.createWindow("testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction310"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let text: Component = await driver.findComponent(ON.id('UIAttributesTouchableInteraction310')); + let column: Component = await driver.findComponent(ON.id('UIAttributesTouchableInteraction310_1')); + await text.dragTo(column); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0310 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0340 + * @tc.name SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0340 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0340', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0340 start.`); + Settings.createWindow("testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction340"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let text: Component = await driver.findComponent(ON.id('UIAttributesTouchableInteraction340')); + let column: Component = await driver.findComponent(ON.id('UIAttributesTouchableInteraction340_1')); + await text.dragTo(column); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0340 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0380 + * @tc.name SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0380 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0380', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0380 start.`); + Settings.createWindow("testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction380"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let text: Component = await driver.findComponent(ON.id('UIAttributesTouchableInteraction380')); + await text.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0380 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0390 + * @tc.name SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0390 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0390', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0390 start.`); + Settings.createWindow("testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction390"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let text: Component = await driver.findComponent(ON.id('UIAttributesTouchableInteraction390')); + await text.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0390 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0400 + * @tc.name SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0400 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0400', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0400 start.`); + Settings.createWindow("testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction400"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let text: Component = await driver.findComponent(ON.id('UIAttributesTouchableInteraction400')); + let info =await text.getBoundsCenter(); + await driver.drag(info.x,info.y+400,info.x,info.y-400,20000) + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0400 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0420 + * @tc.name SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0420 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0420', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0420 start.`); + Settings.createWindow("testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction420"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let text: Component = await driver.findComponent(ON.id('UIAttributesTouchableInteraction420')); + await text.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0420 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0200 + * @tc.name SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0200 + * @tc.desc + */ + it('SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0200', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0200 start.`); + Settings.createWindow("testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0200"); + await Utils.sleep(1000); + let driver = Driver.create(); + let rect = await driver.findComponent(ON.id('UIAttributesTouchableInteraction0200_001')); + let point = await rect.getBoundsCenter(); + await driver.click(point.x, point.y); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0200 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0090 + * @tc.name SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0090 + * @tc.desc + */ + it('SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0090', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0090 start.`); + Settings.createWindow("testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0090"); + await Utils.sleep(1000); + let driver = Driver.create(); + let rect = await driver.findComponent(ON.id('UIAttributesTouchableInteraction0090_001')); + let point = await rect.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1, 10); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 3, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 4, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 5, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 6, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 7, { + x: point.x, y: point.y + 10 + }); + pointers.setPoint(0, 8, { + x: point.x, y: point.y + 30 + }); + pointers.setPoint(0, 9, { + x: point.x, y: point.y + 50 + }); + await driver.injectMultiPointerAction(pointers, 200); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0090 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0130 + * @tc.name SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0130 + * @tc.desc + */ + it('SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0130', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0130 start.`); + Settings.createWindow("testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0130"); + await Utils.sleep(1000); + let driver = Driver.create(); + let rect = await driver.findComponent(ON.id('UIAttributesTouchableInteraction0130_001')); + let point = await rect.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1, 10); + pointers.setPoint(0, 0, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 3, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 4, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 5, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 6, { + x: point.x, y: point.y + }); + pointers.setPoint(0, 7, { + x: point.x, y: point.y + 10 + }); + pointers.setPoint(0, 8, { + x: point.x, y: point.y + 30 + }); + pointers.setPoint(0, 9, { + x: point.x, y: point.y + 50 + }); + await driver.injectMultiPointerAction(pointers, 200); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0130 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0160 + * @tc.name SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0160 + * @tc.desc + */ + it('SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0160', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0160 start.`); + Settings.createWindow("testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0160"); + await Utils.sleep(1000); + let driver = Driver.create(); + driver.triggerKey(2049); + await Utils.sleep(1000); + driver.triggerKey(2049); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0160 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0170 + * @tc.name SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0170 + * @tc.desc + */ + it('SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0170', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0170 start.`); + Settings.createWindow("testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0170"); + await Utils.sleep(1000); + let driver = Driver.create(); + let rect = await driver.findComponent(ON.id('UIAttributesTouchableInteraction0170_001')); + let point = await rect.getBoundsCenter(); + await driver.click(point.x, point.y); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0170 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0240 + * @tc.name SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0240 + * @tc.desc + */ + it('SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0240', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0240 start.`); + Settings.createWindow("testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0240"); + await Utils.sleep(1000); + let driver = Driver.create(); + let rect = await driver.findComponent(ON.id('UIAttributesTouchableInteraction0240_001')); + let point = await rect.getBoundsCenter(); + await driver.longClick(point.x, point.y); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0240 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0280 + * @tc.name SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0280 + * @tc.desc + */ + it('SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0280', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0280 start.`); + Settings.createWindow("testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0280"); + await Utils.sleep(1000); + let driver = Driver.create(); + let rect = await driver.findComponent(ON.id('UIAttributesTouchableInteraction0280_001')); + let point = await rect.getBoundsCenter(); + let pointers: PointerMatrix = PointerMatrix.create(1, 4); + pointers.setPoint(0, 0, { + x: point.x - 30, y: point.y + }); + pointers.setPoint(0, 1, { + x: point.x - 10, y: point.y + }); + pointers.setPoint(0, 2, { + x: point.x + 30, y: point.y + }); + pointers.setPoint(0, 3, { + x: point.x + 50, y: point.y + }); + await driver.injectMultiPointerAction(pointers); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0280 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0300 + * @tc.name SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0300 + * @tc.desc + */ + it('SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0300', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0300 start.`); + Settings.createWindow("testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0300"); + await Utils.sleep(1000); + let driver = Driver.create(); + let rect = await driver.findComponent(ON.id('UIAttributesTouchableInteraction0300_001')); + let point = await rect.getBoundsCenter(); + await driver.click(point.x, point.y); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0300 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0320 + * @tc.name SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0320 + * @tc.desc + */ + it('SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0320', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0320 start.`); + Settings.createWindow("testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0320"); + await Utils.sleep(1000); + let driver = Driver.create(); + let rect = await driver.findComponent(ON.id('UIAttributesTouchableInteraction0320_001')); + let point = await rect.getBoundsCenter(); + await driver.click(point.x, point.y); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0320 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0330 + * @tc.name SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0330 + * @tc.desc + */ + it('SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0330', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0330 start.`); + Settings.createWindow("testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0330"); + await Utils.sleep(1000); + let driver = Driver.create(); + let rect = await driver.findComponent(ON.id('UIAttributesTouchableInteraction0330_001')); + let point = await rect.getBoundsCenter(); + await driver.click(point.x, point.y); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0330 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0350 + * @tc.name SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0350 + * @tc.desc + */ + it('SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0350', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0350 start.`); + Settings.createWindow("testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0350"); + await Utils.sleep(1000); + let driver = Driver.create(); + let rect = await driver.findComponent(ON.id('UIAttributesTouchableInteraction0350_001')); + let point = await rect.getBoundsCenter(); + await driver.click(point.x, point.y); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0350 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0360 + * @tc.name SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0360 + * @tc.desc + */ + it('SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0360', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0360 start.`); + Settings.createWindow("testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0360"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button = await driver.findComponent(ON.id('UIAttributesTouchableInteraction0360_001')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0360 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0370 + * @tc.name SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0370 + * @tc.desc + */ + it('SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0370', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0370 start.`); + Settings.createWindow("testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0370"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button = await driver.findComponent(ON.id('UIAttributesTouchableInteraction0370_001')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0370 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0410 + * @tc.name SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0410 + * @tc.desc + */ + it('SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0410', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0410 start.`); + Settings.createWindow("testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0410"); + await Utils.sleep(1000); + let driver = Driver.create(); + let rect = await driver.findComponent(ON.id('UIAttributesTouchableInteraction0410_001')); + let point = await rect.getBoundsCenter(); + await driver.click(point.x, point.y); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_TOUCHABLE_INTERACTION_0410 finish.`); + done(); + }) + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UlComponentCommonattrlfocusoptimizattonTest/UIComponentCommonattrFocusoptimization2.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UlComponentCommonattrlfocusoptimizattonTest/UIComponentCommonattrFocusoptimization2.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..ee4440588f3fe50b176fbc79170940c2c23e9efc --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UlComponentCommonattrlfocusoptimizattonTest/UIComponentCommonattrFocusoptimization2.test.ets @@ -0,0 +1,433 @@ +/* + * 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, ON ,PointerMatrix,MouseButton} from '@ohos.UiTest' +import { KeyCode } from '@kit.InputKit' + +export default function UlComponentCommonattrlFocusoptimizatton() { + + describe('UlComponentCommonattrlFocusoptimizatton', () => { + 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_COMMONATTR_FOCUSOPTIMIZATION_179 + */ + it('SUB_ACE_UI_COMPONENT_COMMONATTR_FOCUSOPTIMIZATION_179', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_COMMONATTR_FOCUSOPTIMIZATION_179 start.`); + Settings.createWindow("testability/pages/UlComponentCommonattrlfocusoptimizatton/UIComponentCommonattrFocusoptimization179"); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_COMMONATTR_FOCUSOPTIMIZATION_179 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_COMMONATTR_FOCUSOPTIMIZATION_130 + */ + it('SUB_ACE_UI_COMPONENT_COMMONATTR_FOCUSOPTIMIZATION_130', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_COMMONATTR_FOCUSOPTIMIZATION_130 start.`); + Settings.createWindow("testability/pages/UlComponentCommonattrlfocusoptimizatton/UIComponentCommonattrFocusoptimization130"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let btn1: Component = await driver.findComponent(ON.id('btn1')); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_COMMONATTR_FOCUSOPTIMIZATION_130 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_COMPONENT_COMMONATTR_FOCUSOPTIMIZATION_135 + */ + it('SUB_ACE_UI_COMPONENT_COMMONATTR_FOCUSOPTIMIZATION_135', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_COMMONATTR_FOCUSOPTIMIZATION_135 start.`); + Settings.createWindow("testability/pages/UlComponentCommonattrlfocusoptimizatton/UIComponentCommonattrFocusoptimization135"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let btn1: Component = await driver.findComponent(ON.id('btn1')); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_COMMONATTR_FOCUSOPTIMIZATION_135 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_COMPONENT_COMMONATTR_FOCUSOPTIMIZATION_133 + */ + it('SUB_ACE_UI_COMPONENT_COMMONATTR_FOCUSOPTIMIZATION_133', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_COMMONATTR_FOCUSOPTIMIZATION_133 start.`); + Settings.createWindow("testability/pages/UlComponentCommonattrlfocusoptimizatton/UIComponentCommonattrFocusoptimization133"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let btn1: Component = await driver.findComponent(ON.id('btn1')); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_COMMONATTR_FOCUSOPTIMIZATION_133 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_COMPONENT_COMMONATTR_FOCUSOPTIMIZATION_173 + */ + it('SUB_ACE_UI_COMPONENT_COMMONATTR_FOCUSOPTIMIZATION_173', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_COMMONATTR_FOCUSOPTIMIZATION_173 start.`); + Settings.createWindow("testability/pages/UlComponentCommonattrlfocusoptimizatton/UIComponentCommonattrFocusoptimization173"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let btn1: Component = await driver.findComponent(ON.id('btn1')); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_COMMONATTR_FOCUSOPTIMIZATION_173 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_COMPONENT_COMMONATTR_FOCUSOPTIMIZATION_134 + */ + it('SUB_ACE_UI_COMPONENT_COMMONATTR_FOCUSOPTIMIZATION_134', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_COMMONATTR_FOCUSOPTIMIZATION_134 start.`); + Settings.createWindow("testability/pages/UlComponentCommonattrlfocusoptimizatton/UIComponentCommonattrFocusoptimization134"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let btn1: Component = await driver.findComponent(ON.id('btn1')); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_COMMONATTR_FOCUSOPTIMIZATION_134 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_COMPONENT_COMMONATTR_FOCUSOPTIMIZATION_175 + */ + it('SUB_ACE_UI_COMPONENT_COMMONATTR_FOCUSOPTIMIZATION_175', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_COMMONATTR_FOCUSOPTIMIZATION_175 start.`); + Settings.createWindow("testability/pages/UlComponentCommonattrlfocusoptimizatton/UIComponentCommonattrFocusoptimization175"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let btn1: Component = await driver.findComponent(ON.id('btn1')); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_COMMONATTR_FOCUSOPTIMIZATION_175 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_COMPONENT_COMMONATTR_FOCUSOPTIMIZATION_174 + */ + it('SUB_ACE_UI_COMPONENT_COMMONATTR_FOCUSOPTIMIZATION_174', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_COMMONATTR_FOCUSOPTIMIZATION_174 start.`); + Settings.createWindow("testability/pages/UlComponentCommonattrlfocusoptimizatton/UIComponentCommonattrFocusoptimization174"); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_COMMONATTR_FOCUSOPTIMIZATION_174 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_COMPONENT_COMMONATTR_FOCUSOPTIMIZATION_178 + */ + it('SUB_ACE_UI_COMPONENT_COMMONATTR_FOCUSOPTIMIZATION_178', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_COMMONATTR_FOCUSOPTIMIZATION_178 start.`); + Settings.createWindow("testability/pages/UlComponentCommonattrlfocusoptimizatton/UIComponentCommonattrFocusoptimization178"); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_COMMONATTR_FOCUSOPTIMIZATION_178 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_COMPONENT_COMMONATTR_FOCUSOPTIMIZATION_180 + */ + it('SUB_ACE_UI_COMPONENT_COMMONATTR_FOCUSOPTIMIZATION_180', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_COMMONATTR_FOCUSOPTIMIZATION_180 start.`); + Settings.createWindow("testability/pages/UlComponentCommonattrlfocusoptimizatton/UIComponentCommonattrFocusoptimization180"); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_COMMONATTR_FOCUSOPTIMIZATION_180 finish.`); + done(); + }) + + it('SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_126', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_126 start.`); + Settings.createWindow("testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton126"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + await Utils.sleep(1000); + await driver.click(200, 200) + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_DPAD_DOWN); + await Utils.sleep(500); + await driver.triggerKey(KeyCode.KEYCODE_DPAD_DOWN); + await Utils.sleep(500); + await driver.triggerKey(KeyCode.KEYCODE_DPAD_UP); + await Utils.sleep(1000); + await driver.triggerCombineKeys(KeyCode.KEYCODE_SHIFT_LEFT, KeyCode.KEYCODE_TAB); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_126 finish.`); + done() + }) + + it('SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_132', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_132 start.`); + Settings.createWindow("testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton132"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + await Utils.sleep(500); + await driver.click(200, 600) + await Utils.sleep(500); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(500); + let pushpageOne1: Component = await driver.findComponent(ON.id('pushpageOneID')) + await pushpageOne1.click(); + await Utils.sleep(1000); + let button1: Component = await driver.findComponent(ON.id('button1')) + await button1.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(500); + let backButton: Component = await driver.findComponent(ON.id('button2')) + await backButton.click() + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_132 finish.`); + done() + }) + + it('SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_137', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_137 start.`); + Settings.createWindow("testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton137"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + let bindSheetButton: Component = await driver.findComponent(ON.id('bindSheetButtonID')) + await Utils.sleep(500); + await bindSheetButton.longClick(); + await Utils.sleep(1000); + let button1: Component = await driver.findComponent(ON.id('button1ID')) + await Utils.sleep(500); + await button1.click(); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(1000); + let closeButton: Component = await driver.findComponent(ON.id('closeID')) + await closeButton.click() + await Utils.sleep(1000); + await driver.click(200, 200) + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_137 finish.`); + done() + }) + + it('SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_138', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_138 start.`); + Settings.createWindow("testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton138"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + let bindSheetButton: Component = await driver.findComponent(ON.id('bindSheetButtonID')) + await bindSheetButton.longClick(); + await Utils.sleep(1000); + let button1: Component = await driver.findComponent(ON.id('button1ID')) + await button1.click(); + await Utils.sleep(500); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(1000); + let closeButton: Component = await driver.findComponent(ON.id('closeID')) + await closeButton.click() + await Utils.sleep(1000); + let button2: Component = await driver.findComponent(ON.id('button2ID')) + await Utils.sleep(500); + await button2.click(); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_138 finish.`); + done() + }) + + it('SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_141', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_141 start.`); + Settings.createWindow("testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton141"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let bindSheetButton: Component = await driver.findComponent(ON.id('bindSheetButtonID')) + await Utils.sleep(500); + await bindSheetButton.longClick(); + await Utils.sleep(1000); + let button1: Component = await driver.findComponent(ON.id('button1ID')) + await Utils.sleep(500); + await button1.click(); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(1000); + let closeButton: Component = await driver.findComponent(ON.id('closeID')) + await closeButton.click() + await Utils.sleep(1000); + await driver.click(200, 200) + let button2: Component = await driver.findComponent(ON.id('button2ID')); + await button2.click(); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_141 finish.`); + done() + }) + + it('SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_149', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_149 start.`); + Settings.createWindow("testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton149"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + let buttonFouns: Component = await driver.findComponent(ON.id('getFocus')) + await buttonFouns.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(1000); + let button: Component = await driver.findComponent(ON.id('button')); + await button.click(); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(1000); + let textAreaComponent: Component = await driver.findComponent(ON.id('TextAreaID')); + await textAreaComponent.click(); + await Utils.sleep(1000); + let searchComponent: Component = await driver.findComponent(ON.id('SearchID')); + await searchComponent.click(); + await Utils.sleep(1000); + let cancelButton: Component = await driver.findComponent(ON.text('Cancel')); + await cancelButton.click(); + await Utils.sleep(1000); + await buttonFouns.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_149 finish.`); + done() + }) + + it('SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_151', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_151 start.`); + Settings.createWindow("testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton151"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ComponentDialog')); + await button.click(); + await Utils.sleep(1000); + await driver.click(100, 20); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(1000); + await driver.triggerCombineKeys(KeyCode.KEYCODE_SHIFT_LEFT, KeyCode.KEYCODE_TAB); + await Utils.sleep(500); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_151 finish.`); + done() + }) + + it('SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_158', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_158 start.`); + Settings.createWindow("testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton158"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('textID')); + await button.longClick(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(1000); + let item2: Component = await driver.findComponent(ON.id('item2ID')); + item2.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(1000); + let item1: Component = await driver.findComponent(ON.id('item1ID')); + item1.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_158 finish.`); + done() + }) + + it('SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_164', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_164 start.`); + Settings.createWindow("testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton164"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('button')); + await button.longClick(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(500); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(500); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(500); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(500); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(500); + await driver.triggerCombineKeys(KeyCode.KEYCODE_SHIFT_LEFT, KeyCode.KEYCODE_TAB); + await Utils.sleep(500); + await driver.triggerKey(KeyCode.KEYCODE_DPAD_DOWN); + await Utils.sleep(500); + await driver.triggerKey(KeyCode.KEYCODE_DPAD_DOWN); + await Utils.sleep(500); + await driver.triggerKey(KeyCode.KEYCODE_DPAD_UP); + await Utils.sleep(500); + await driver.triggerKey(KeyCode.KEYCODE_DPAD_UP); + await Utils.sleep(500); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_164 finish.`); + done() + }) + + }) +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UlComponentCommonattrlfocusoptimizattonTest/UlComponentCommonattrlfocusoptimizatton.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UlComponentCommonattrlfocusoptimizattonTest/UlComponentCommonattrlfocusoptimizatton.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..10ea1dbaadde5c6f0d02b70661f5e6be47a3e5b5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UlComponentCommonattrlfocusoptimizattonTest/UlComponentCommonattrlfocusoptimizatton.test.ets @@ -0,0 +1,587 @@ +/* + * 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, ON ,PointerMatrix,MouseButton} from '@ohos.UiTest' +import { KeyCode } from '@kit.InputKit' + +export default function UlComponentCommonattrlfocusoptimizatton() { + + describe('UlComponentCommonattrlfocusoptimizatton', () => { + 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_COMMONATTRLFOCUSOPTIMIZATION_162 + * @tc.name SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_162 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_162', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_162 start.`); + Settings.createWindow("testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton162"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UlComponentCommonattrlfocusoptimizatton_1')); + await button.longClick(); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_DPAD_DOWN); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_DPAD_DOWN); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_DPAD_DOWN); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_DPAD_DOWN); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_162 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_155 + * @tc.name SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_155 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_155', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_155 start.`); + Settings.createWindow("testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton155"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UlComponentCommonattrlfocusoptimizatton_155_1')); + await button.click(); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(2000); + let button2: Component = await driver.findComponent(ON.id('UlComponentCommonattrlfocusoptimizatton_155_2')); + await button2.click(); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(2000); + let button3: Component = await driver.findComponent(ON.id('UlComponentCommonattrlfocusoptimizatton_155_1')); + await button3.doubleClick(); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_155 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_160 + * @tc.name SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_160 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_160', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_160 start.`); + Settings.createWindow("testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton160"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UlComponentCommonattrlfocusoptimizatton_160')); + await button.longClick(); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_DPAD_DOWN); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_DPAD_DOWN); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_DPAD_DOWN); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_DPAD_DOWN); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_160 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_154 + * @tc.name SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_154 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_154', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_154 start.`); + Settings.createWindow("testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton154"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UlComponentCommonattrlfocusoptimizatton_154_1')); + await button.click(); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(2000); + let button2: Component = await driver.findComponent(ON.id('UlComponentCommonattrlfocusoptimizatton_154_2')); + await button2.click(); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_DPAD_LEFT); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_154 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_161 + * @tc.name SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_161 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_161', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_161 start.`); + Settings.createWindow("testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton161"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UlComponentCommonattrlfocusoptimizatton_161')); + await button.longClick(); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_DPAD_DOWN); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_DPAD_DOWN); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_DPAD_DOWN); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_161 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_159 + * @tc.name SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_159 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_159', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_159 start.`); + Settings.createWindow("testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton159"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UlComponentCommonattrlfocusoptimizatton_159_1')); + await button.click(); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(2000); + let button2: Component = await driver.findComponent(ON.id('UlComponentCommonattrlfocusoptimizatton_159_2')); + await button2.click(); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_DPAD_LEFT); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_159 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_168 + * @tc.name SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_168 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_168', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_168 start.`); + Settings.createWindow("testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton168"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(2000); + let button: Component = await driver.findComponent(ON.id('UlComponentCommonattrlfocusoptimizatton_168')); + await button.click(); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(2000); + let button2: Component = await driver.findComponent(ON.id('UlComponentCommonattrlfocusoptimizatton_168')); + await button2.click(); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_168 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_165 + * @tc.name SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_165 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_165', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_165 start.`); + Settings.createWindow("testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton165"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UlComponentCommonattrlfocusoptimizatton_165')); + await button.longClick(); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_DPAD_DOWN); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_DPAD_DOWN); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_DPAD_DOWN); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_DPAD_DOWN); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_165 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_157 + * @tc.name SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_157 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_157', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_157 start.`); + Settings.createWindow("testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton157"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UlComponentCommonattrlfocusoptimizatton_157_1')); + await button.click(); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(2000); + let button2: Component = await driver.findComponent(ON.id('UlComponentCommonattrlfocusoptimizatton_157_2')); + await button2.click(); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_DPAD_LEFT); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_157 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_153 + * @tc.name SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_153 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_153', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_153 start.`); + Settings.createWindow("testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton153"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(2000); + let button: Component = await driver.findComponent(ON.id('UlComponentCommonattrlfocusoptimizatton_153_1')); + await button.click(); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await driver.triggerKey(KeyCode.KEYCODE_DPAD_UP); + await driver.triggerKey(KeyCode.KEYCODE_DPAD_UP); + await driver.triggerKey(KeyCode.KEYCODE_DPAD_UP); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await driver.triggerKey(KeyCode.KEYCODE_DPAD_DOWN); + await driver.triggerKey(KeyCode.KEYCODE_DPAD_DOWN); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_153 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_150 + * @tc.name SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_150 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_150', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_150 start.`); + Settings.createWindow("testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton150"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(2000); + let button: Component = await driver.findComponent(ON.id('UlComponentCommonattrlfocusoptimizatton_150_1')); + await button.click(); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_ESCAPE); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_150 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_152 + * @tc.name SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_152 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_152', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_152 start.`); + Settings.createWindow("testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton152"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(2000); + let button: Component = await driver.findComponent(ON.id('UlComponentCommonattrlfocusoptimizatton_152_1')); + await button.click(); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_ESCAPE); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_152 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_167 + * @tc.name SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_167 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_167', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_167 start.`); + Settings.createWindow("testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton167"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(2000); + let button: Component = await driver.findComponent(ON.id('UlComponentCommonattrlfocusoptimizatton_167_1')); + await button.click(); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_167 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_170 + * @tc.name SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_170 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_170', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_170 start.`); + Settings.createWindow("testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton170"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(2000); + let button: Component = await driver.findComponent(ON.id('UlComponentCommonattrlfocusoptimizatton_170_1')); + await button.click(); + await Utils.sleep(2000); + let button2: Component = await driver.findComponent(ON.id('UlComponentCommonattrlfocusoptimizatton_170_2')); + await button2.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_170 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_166 + * @tc.name SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_166 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_166', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_166 start.`); + Settings.createWindow("testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton166"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(2000); + let button: Component = await driver.findComponent(ON.id('UlComponentCommonattrlfocusoptimizatton_166_1')); + await button.click(); + await Utils.sleep(2000); + let button2: Component = await driver.findComponent(ON.id('UlComponentCommonattrlfocusoptimizatton_166_2')); + await button2.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_166 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_136 + * @tc.name SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_136 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_136', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_136 start.`); + Settings.createWindow("testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton136"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UlComponentCommonattrlfocusoptimizatton_136_1')); + await button.click(); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_136 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_139 + * @tc.name SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_139 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_139', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_139 start.`); + Settings.createWindow("testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton139"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(2000); + let button: Component = await driver.findComponent(ON.id('UlComponentCommonattrlfocusoptimizatton_139_1')); + await button.click(); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_ESCAPE); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_139 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_140 + * @tc.name SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_140 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_140', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_140 start.`); + Settings.createWindow("testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton140"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(2000); + let button: Component = await driver.findComponent(ON.id('UlComponentCommonattrlfocusoptimizatton_140_1')); + await button.click(); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_ESCAPE); + await Utils.sleep(2000); + let button2: Component = await driver.findComponent(ON.id('UlComponentCommonattrlfocusoptimizatton_140_1')); + await button2.click(); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_TAB); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_COMMONATTRLFOCUSOPTIMIZATION_140 finish.`); + done() + }) + + + /** + * @tc.number SUBACE_ANALYSE_ACTION_EVENT_COMMONEVENT_DRAG_0140 + * @tc.name SUBACE_ANALYSE_ACTION_EVENT_COMMONEVENT_DRAG_0140 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUBACE_ANALYSE_ACTION_EVENT_COMMONEVENT_DRAG_0140', 0, async (done: Function) => { + Logger.info('TEST', `SUBACE_ANALYSE_ACTION_EVENT_COMMONEVENT_DRAG_0140 start.`); + Settings.createWindow("testability/pages/UlComponentCommonattrlfocusoptimizatton/UlActtonEventCommonattrlfocusoptimizatton140"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UlActtonEventCommonattrlfocusoptimizatton140_1')); + let point = await button.getBoundsCenter(); + await Utils.sleep(2000); + await driver.drag(point.x,point.y,point.x+0,point.y+300,600); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUBACE_ANALYSE_ACTION_EVENT_COMMONEVENT_DRAG_0140 finish.`); + done() + }) + }) +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionEventCommoneventClickInterface/AceActionEventCommoneventClickInterface10.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionEventCommoneventClickInterface/AceActionEventCommoneventClickInterface10.ets new file mode 100644 index 0000000000000000000000000000000000000000..da4526b96f8ec45a4ecd5f21d1a86fa3a0e74d3b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionEventCommoneventClickInterface/AceActionEventCommoneventClickInterface10.ets @@ -0,0 +1,30 @@ +/* + * 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 AceActionEventCommoneventClickInterface10 { + @State text:string=''; + + build() { + Column({ space: 5 }) { + Button(this.text) + .id('AceActionEventCommoneventClickInterface10') + .onClick((event?: ClickEvent)=> { + this.text = 'screen.x = ' +event?.screenX; + }) + .backgroundColor(0x317aff) + }.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/AceActionEventCommoneventClickInterface/AceActionEventCommoneventClickInterface20.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionEventCommoneventClickInterface/AceActionEventCommoneventClickInterface20.ets new file mode 100644 index 0000000000000000000000000000000000000000..d937b801a6e788a4c7737087e8ebba943783255f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionEventCommoneventClickInterface/AceActionEventCommoneventClickInterface20.ets @@ -0,0 +1,31 @@ +/* + * 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 AceActionEventCommoneventClickInterface20 { + @State text:string='screen.y = '; + @State number:number=0; + + build() { + Column({ space: 5 }) { + Button(this.text+this.number) + .id('AceActionEventCommoneventClickInterface20') + .onClick((event: ClickEvent)=> { + this.number = event.screenY; + }) + .backgroundColor(0x317aff) + }.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/AceActionEventCommoneventClickInterface/AceActionEventCommoneventClickInterface30.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionEventCommoneventClickInterface/AceActionEventCommoneventClickInterface30.ets new file mode 100644 index 0000000000000000000000000000000000000000..58a1cd471245b5829e5473ee4610493b11dce683 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionEventCommoneventClickInterface/AceActionEventCommoneventClickInterface30.ets @@ -0,0 +1,31 @@ +/* + * 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 AceActionEventCommoneventClickInterface30 { + @State text:string='x = '; + @State number:number=0; + + build() { + Column({ space: 5 }) { + Button(this.text+this.number) + .id('AceActionEventCommoneventClickInterface30') + .onClick((event: ClickEvent)=> { + this.number = event.x; + }) + .backgroundColor(0x317aff) + }.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/AceActionEventCommoneventClickInterface/AceActionEventCommoneventClickInterface40.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionEventCommoneventClickInterface/AceActionEventCommoneventClickInterface40.ets new file mode 100644 index 0000000000000000000000000000000000000000..5ccc737b949e5933f4e1ef304955c0be544231b7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionEventCommoneventClickInterface/AceActionEventCommoneventClickInterface40.ets @@ -0,0 +1,31 @@ +/* + * 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 AceActionEventCommoneventClickInterface40 { + @State text:string='y= '; + @State number:number=0; + + build() { + Column({ space: 5 }) { + Button(this.text+this.number) + .id('AceActionEventCommoneventClickInterface40') + .onClick((event: ClickEvent)=> { + this.number = event.y; + }) + .backgroundColor(0x317aff) + }.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/AceActionEventCommoneventClickInterface/AceActionEventCommoneventClickInterface60.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionEventCommoneventClickInterface/AceActionEventCommoneventClickInterface60.ets new file mode 100644 index 0000000000000000000000000000000000000000..f901c121097bcb0dfd33880d146a0c0b86908094 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionEventCommoneventClickInterface/AceActionEventCommoneventClickInterface60.ets @@ -0,0 +1,31 @@ +/* + * 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 AceActionEventCommoneventClickInterface60 { + @State text:string='sourceTool = '; + @State number:number=0; + + build() { + Column({ space: 5 }) { + Button(this.text+this.number) + .id('AceActionEventCommoneventClickInterface60') + .onClick((event: BaseEvent)=> { + this.number = event.sourceTool; + }) + .backgroundColor(0x317aff) + }.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/AceActionEventCommoneventClickInterface/AceActionEventCommoneventClickInterface80.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionEventCommoneventClickInterface/AceActionEventCommoneventClickInterface80.ets new file mode 100644 index 0000000000000000000000000000000000000000..981a0e3e90d81051c52bbe841cd660edc879a946 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionEventCommoneventClickInterface/AceActionEventCommoneventClickInterface80.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 AceActionEventCommoneventClickInterface80 { + @State btn_width:string = '' + @State btn_height:string = '' + @State position_x:string | undefined = '' + @State position_y:string | undefined = '' + @State g_position_x:string | undefined = '' + @State g_position_y:string | undefined = '' + + build() { + Column({ space: 5 }) { + Button('点击') + .fontSize(20) + .width(100) + .height(60) + .id('btn') + .onClick((event) => { + this.btn_width = event.target.area.width.toString() + this.btn_height = event.target.area.height.toString() + this.position_x = event.target.area.position.x?.toString() + this.position_y = event.target.area.position.y?.toString() + this.g_position_x = event.target.area.globalPosition.x?.toString() + this.g_position_y = event.target.area.globalPosition.y?.toString() + }) + + Text('宽:'+this.btn_width).fontSize(20).margin({top:10}) + Text('高:'+this.btn_height).fontSize(20).margin({top:10}) + Text('父组件偏移x:'+this.position_x).fontSize(20).margin({top:10}) + Text('父组件偏移y:'+this.position_y).fontSize(20).margin({top:10}) + Text('窗口偏移x:'+this.g_position_x).fontSize(20).margin({top:10}) + Text('窗口偏移y:'+this.g_position_y).fontSize(20).margin({top:10}) + } + .width(300) + .height(400) + .border({width: 1}) + .margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionEventCommoneventClickSpecification/AceActionEventCommoneventClickSpecification0120.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionEventCommoneventClickSpecification/AceActionEventCommoneventClickSpecification0120.ets new file mode 100644 index 0000000000000000000000000000000000000000..f9e79684fa2d2f3ba3c03198170898ca8f942c88 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionEventCommoneventClickSpecification/AceActionEventCommoneventClickSpecification0120.ets @@ -0,0 +1,41 @@ +/* + * 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 ActionEventCommoneventClickSpecification0120 { + @State tapInfo: string = ''; + + build() { + Column() { + Column() { + Text("SwipeGesture tapInfo\n" + this.tapInfo) + } + + Button('0120') + .height(50) + .width(100) + .responseRegion({ x: '100%', y: '100%', width: '100%', height: '100%' }) + .id('ActionEventCommoneventClickSpecification0120_001') + .gesture( + TapGesture() + .onAction((event: GestureEvent) => { + if (event) { + this.tapInfo = 'TapGesture GestureEvent'; + } + }) + ) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionEventCommoneventClickSpecification/AceActionEventCommoneventClickSpecification10.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionEventCommoneventClickSpecification/AceActionEventCommoneventClickSpecification10.ets new file mode 100644 index 0000000000000000000000000000000000000000..0cfeac2e0f4a09476d6bd2922dabee1f76c45518 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionEventCommoneventClickSpecification/AceActionEventCommoneventClickSpecification10.ets @@ -0,0 +1,35 @@ +/* + * 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 AceActionEventCommoneventClickSpecification10 { + @State text:string='button '; + + build() { + Column({ space: 5 }) { + Button(this.text) + .id('AceActionEventCommoneventClickSpecification10') + .gesture( + TapGesture({ count:1 ,fingers:2}) + .onAction((event: GestureEvent) => { + if (event) { + this.text = 'success' + } + }) + ) + .backgroundColor(0x317aff) + }.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/AceActionEventCommoneventClickSpecification/AceActionEventCommoneventClickSpecification140.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionEventCommoneventClickSpecification/AceActionEventCommoneventClickSpecification140.ets new file mode 100644 index 0000000000000000000000000000000000000000..a3a60a15b74a219d7b8f410cb50dbf08dde8a1de --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionEventCommoneventClickSpecification/AceActionEventCommoneventClickSpecification140.ets @@ -0,0 +1,35 @@ +/* + * 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 AceActionEventCommoneventClickSpecification140 { + @State text:string='button '; + + build() { + Column({ space: 5 }) { + Button(this.text) + .id('AceActionEventCommoneventClickSpecification140') + .gesture( + TapGesture({ count:2}) + .onAction((event: GestureEvent) => { + if (event) { + this.text = 'success' + } + }) + ) + .backgroundColor(0x317aff) + }.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/AceActionEventCommoneventClickSpecification/AceActionEventCommoneventClickSpecification40.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionEventCommoneventClickSpecification/AceActionEventCommoneventClickSpecification40.ets new file mode 100644 index 0000000000000000000000000000000000000000..f3137a8fe9ed138e016aec48f47f3f9134b4c94e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionEventCommoneventClickSpecification/AceActionEventCommoneventClickSpecification40.ets @@ -0,0 +1,35 @@ +/* + * 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 AceActionEventCommoneventClickSpecification40 { + @State text:string='button '; + + build() { + Column({ space: 5 }) { + Button(this.text) + .id('AceActionEventCommoneventClickSpecification40') + .gesture( + TapGesture({ count:2 ,fingers:2}) + .onAction((event: GestureEvent) => { + if (event) { + this.text = 'success' + } + }) + ) + .backgroundColor(0x317aff) + }.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/AceActionEventCommoneventClickSpecification/AceActionEventCommoneventClickSpecification80.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionEventCommoneventClickSpecification/AceActionEventCommoneventClickSpecification80.ets new file mode 100644 index 0000000000000000000000000000000000000000..130016e6b308db9911215740911db38a23140b14 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionEventCommoneventClickSpecification/AceActionEventCommoneventClickSpecification80.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. + */ + +@Entry +@Component +struct AceActionEventCommoneventClickSpecification80 { + controller: TextInputController = new TextInputController(); + @State inputValue: string = ""; + + @Builder CustomKeyboardBuilder() { + Column() { + Button('x').onClick(() => { + this.controller.stopEditing(); + }) + Button('0').onClick(() => { + this.inputValue += 0; + }) + .id('AceActionEventCommoneventClickSpecification80_1') + Grid() { + ForEach([1, 2, 3, 4, 5, 6, 7, 8, 9, '*', '#'], (item:number|string) => { + GridItem() { + Button(item + "") + .width(110).onClick(() => { + this.inputValue += item; + }) + } + }) + }.maxCount(3).columnsGap(10).rowsGap(10).padding(5) + }.backgroundColor(Color.Gray) + } + + build() { + Column() { + TextInput({ controller: this.controller, text: this.inputValue }) + .id('AceActionEventCommoneventClickSpecification80') + .customKeyboard(this.CustomKeyboardBuilder()).margin(10).border({ width: 1 }).height('48vp') + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionEventCommoneventClickSpecification/AceActionEventCommoneventClickSpecification90.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionEventCommoneventClickSpecification/AceActionEventCommoneventClickSpecification90.ets new file mode 100644 index 0000000000000000000000000000000000000000..d4452c607d19376b20d1bac8d8c00d11c945fcc3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionEventCommoneventClickSpecification/AceActionEventCommoneventClickSpecification90.ets @@ -0,0 +1,35 @@ +/* + * 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 AceActionEventCommoneventClickSpecification90 { + @State text:string='button '; + + build() { + Column({ space: 5 }) { + Button(this.text) + .id('AceActionEventCommoneventClickSpecification90') + .gesture( + TapGesture({ count:1}) + .onAction((event: GestureEvent) => { + if (event) { + this.text = 'success' + } + }) + ) + .backgroundColor(0x317aff) + }.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/AceActionEventGetinspectorTree/AceActionEventGetinspectorTree010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionEventGetinspectorTree/AceActionEventGetinspectorTree010.ets new file mode 100644 index 0000000000000000000000000000000000000000..025fc0c9b9f92ae273af5ce4806aac658157f756 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionEventGetinspectorTree/AceActionEventGetinspectorTree010.ets @@ -0,0 +1,28 @@ +/* + * 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 AceActionEventGetinspectorTree010 { + private imageOne: Resource = $r('app.media.icon'); + @State src: Resource = this.imageOne + build(){ + Column(){ + Text("get inspector") + Image(this.src) + .width(100) + .height(100) + }.width('100%').height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface0120.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface0120.ets new file mode 100644 index 0000000000000000000000000000000000000000..3976fbbad67f0f15ba707921beb48ef7c9f821e7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface0120.ets @@ -0,0 +1,32 @@ +/* + * 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 AceActionGestureDisableInterface0120 { + @State text1: string = '点击无效'; + @State text2: string = '点击无效' + + build() { + Column() { + Text(this.text1).fontSize(20) + Button('button1').onClick(undefined).width(100).height(80).id('btn1') + + Text(this.text2).fontSize(20).margin({top:20}) + Button('button2').onClick(undefined).width(100).height(80).id('btn2') + }.padding(30).width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface0210.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface0210.ets new file mode 100644 index 0000000000000000000000000000000000000000..d3a0c6ff9783b3b9b8da9f5dccf4859499e4bae1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface0210.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. + */ +@Entry +@Component +struct AceActionGestureDisableInterface0210 { + @State text1: string = '点击无效'; + @State text2: string = '点击无效'; + @State flag : boolean = false + + build() { + Column() { + Text(this.text1).fontSize(20) + Button('修改点击参数').onClick(() => { + this.text2 = '点击无效' + this.text1 = '点击参数已修改' + this.flag = true + }).fontSize(20).width(200).height(80).id('btn1') + + Text(this.text2).fontSize(20).margin({top:20}) + Button('button2').onClick(this.flag?undefined:() => { + this.text2 = '点击有效' + }).width(200).height(80).id('btn2') + }.padding(30).width('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface0220.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface0220.ets new file mode 100644 index 0000000000000000000000000000000000000000..629b4d0182e91cedd9e956dbe6010adaa4f6623e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface0220.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. + */ +@Entry +@Component +struct AceActionGestureDisableInterface0220 { + @State text1: string = '点击无效'; + @State text2: string = '点击无效'; + @State flag : boolean = true + + + + build() { + Column() { + Text(this.text1).fontSize(20) + Button('修改点击参数').onClick(() => { + this.text1 = '点击参数已修改' + this.flag = false + }).fontSize(20).width(200).height(80).id('btn1') + + Text(this.text2).fontSize(20).margin({top:20}) + Button('button2').onClick(this.flag?undefined:() => { + this.text2 = '点击有效' + }).width(200).height(80).id('btn2') + }.padding(30).width('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface10.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface10.ets new file mode 100644 index 0000000000000000000000000000000000000000..f66d227f04155afd8efaad0d0b63e6ef8f45e6e1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface10.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. + */ +@Entry +@Component +struct AceActionGestureDisableInterface10 { + @State count: number = 0; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + @State offsetX1: number = 0; + @State offsetY1: number = 0; + @State positionX1: number = 0; + @State positionY1: number = 0; + private panOption: PanGestureOptions = new PanGestureOptions({ direction: PanDirection.Left | PanDirection.Right }); + @State message1: string = 'button2 '; + @State message2: string = 'button1 '; + @State borderStyles: BorderStyle = BorderStyle.Solid; + build() { + Column() { + Column() { + Text('button1 log:'+this.message1).fontSize(15) + Text('button2 log:'+this.message2).fontSize(15) + } + .height(300) + .width(200) + .padding(30) + .margin(30) + Button('button1') + .id('AceActionGestureDisableInterface10_1') + .translate({ x: this.offsetX, y: this.offsetY, z: 0 }) + .fontSize(22) + .margin(10) + .monopolizeEvents(true) + .gesture( + PanGesture(this.panOption) + .onActionStart((event: GestureEvent) => { + console.info('Pan start') + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX + this.offsetY = this.positionY + event.offsetY + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX + this.positionY = this.offsetY + this.message1 += 'Pan end'; + }) + ) + + Button('button2') + .id('AceActionGestureDisableInterface10_2') + .fontSize(22) + .margin(10) + .onClick(undefined) + .gesture( + PanGesture(this.panOption) + .onActionStart((event: GestureEvent) => { + console.info('Pan start') + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX1 = this.positionX1 + event.offsetX + this.offsetY1 = this.positionY1 + event.offsetY + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX1 = this.offsetX1 + this.positionY1 = this.offsetY + this.message2 += 'Pan end'; + }) + ) + Button() + .id('AceActionGestureDisableInterface10_3') + .onClick(() =>{ + this.offsetX = 0; + this.offsetY = 0; + }) + } + .height('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface100.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface100.ets new file mode 100644 index 0000000000000000000000000000000000000000..604775b576e388ede26406a40c73bacdec6af0cb --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface100.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. + */ +@Entry +@Component +struct AceActionGestureDisableInterface100 { + @State text: string = 'null'; + @State eventType: string = ''; + @Builder MenuBuilder() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Button('Test ContextMenu1') + .id('AceActionGestureDisableInterface100_2') + .onClick(undefined) + .onKeyEvent(undefined) + Divider().strokeWidth(2).margin(5).color(Color.Black) + + Text(this.text).padding(15) + } + .width(200) + .height(160) + } + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Column() { + Text("Test ContextMenu") + .id('AceActionGestureDisableInterface100_1') + .fontSize(20) + .width('100%') + .height(500) + .backgroundColor(0xAFEEEE) + .textAlign(TextAlign.Center) + } + .bindContextMenu(this.MenuBuilder, ResponseType.LongPress) + .onDragStart(()=>{ + ContextMenu.close() + }) + + } + .width('100%') + .height('100%') + + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface110.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface110.ets new file mode 100644 index 0000000000000000000000000000000000000000..42366da47b4655ecea3d81b5f52c415fac89f510 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface110.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 '@kit.ArkUI' + +@Entry +@Component +struct AceActionGestureDisableInterface110 { + @State text: string = ''; + @State eventType: string = ''; + @State text2: string = ''; + @State eventType2: string = ''; + + build() { + Column() { + Button('Button') + .id('AceActionGestureDisableInterface110_1') + .onKeyEvent((event?: KeyEvent) => { + if(event){ + if (event.type === KeyType.Down) { + this.eventType = 'Down' + } + if (event.type === KeyType.Up) { + this.eventType = 'Up' + } + this.text = 'KeyType:' + this.eventType + '\nkeyCode:' + event.keyCode + '\nkeyText:' + event.keyText + '\nintentionCode:' + event.intentionCode + } + }) + Text(this.text).padding(15) + + Button('Button') + .id('AceActionGestureDisableInterface110_2') + .onKeyEvent((event?: KeyEvent) => { + if(event){ + if (event.type === KeyType.Down) { + this.eventType2 = 'Down' + } + if (event.type === KeyType.Up) { + this.eventType2 = 'Up' + } + this.text2 = 'KeyType:' + this.eventType2 + '\nkeyCode:' + event.keyCode + '\nkeyText:' + event.keyText + '\nintentionCode:' + event.intentionCode + } + }) + .onClick(undefined) + Text(this.text2).padding(15) + }.padding(30).width('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface130.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface130.ets new file mode 100644 index 0000000000000000000000000000000000000000..08b9c4ed289c0e292cd0120610304cd794e5e075 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface130.ets @@ -0,0 +1,47 @@ +/* + * 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 AceActionGestureDisableInterface130 { + private iconStr: ResourceStr = $r("app.media.icon") + + @Builder + MyMenu() { + Menu() { + MenuItem({ startIcon: this.iconStr, content: "菜单选项" }).backgroundColor(Color.Red) + .id('AceActionGestureDisableInterface130_2') + .onClick(undefined) + MenuItem({ startIcon: this.iconStr, content: "菜单选项" }) + MenuItem({ startIcon: this.iconStr, content: "菜单选项" }) + } + } + + build() { + Column({ space: 50 }) { + Column() { + Column() { + Button('Menu') + .id('AceActionGestureDisableInterface130_1') + .width(200) + .height(100) + .margin(100) + .fontSize(30) + .bindMenu(this.MyMenu) + .backgroundColor("#ff3df2f5") + } + }.width('100%') + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface140.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface140.ets new file mode 100644 index 0000000000000000000000000000000000000000..30a92423cc17d5a00f272dd6d48be7d6f0a05fea --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface140.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 AceActionGestureDisableInterface140 { + @State text: string = ''; + @State eventType: string = ''; + @State text2: string = ''; + @State eventType2: string = ''; + + build() { + Column() { + Button('Button1') + .id('AceActionGestureDisableInterface140_1') + .onClick(() => { + this.text = 'Button1 click '; + }) + Text(this.text).padding(15) + + Button('Button2') + .id('AceActionGestureDisableInterface140_2') + .onClick(undefined) + Text(this.text2).padding(15) + }.padding(30).width('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface150.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface150.ets new file mode 100644 index 0000000000000000000000000000000000000000..db8d97fb3df3343d415b77154fee27fcb58dc079 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface150.ets @@ -0,0 +1,47 @@ +/* + * 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 AceActionGestureDisableInterface150 { + private iconStr: ResourceStr = $r("app.media.icon") + + @Builder + MyMenu() { + Menu() { + MenuItem({ startIcon: this.iconStr, content: "菜单选项" }) + .id('AceActionGestureDisableInterface150_2') + .onFocus(undefined) + MenuItem({ startIcon: this.iconStr, content: "菜单选项" }) + MenuItem({ startIcon: this.iconStr, content: "菜单选项" }) + } + } + + build() { + Column({ space: 50 }) { + Column() { + Column() { + Button('Menu') + .id('AceActionGestureDisableInterface150_1') + .width(200) + .height(100) + .margin(100) + .fontSize(30) + .bindMenu(this.MyMenu) + .backgroundColor("#ff3df2f5") + } + }.width('100%') + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface160.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface160.ets new file mode 100644 index 0000000000000000000000000000000000000000..362d42dc666183d3b58c484458b5d73acdb00ff8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface160.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 AceActionGestureDisableInterface160 { + @State text: string = ''; + @State text2: string = ''; + @State oneButtonColor: string = '#FFC0CB'; + @State oneButton2Color: string = '#FFC0CB'; + + build() { + Column() { + Button('Button1') + .backgroundColor(this.oneButtonColor) + .id('AceActionGestureDisableInterface160_1') + .onFocus(() => { + this.oneButtonColor = '#FF0000'; + this.text = 'focus1 success'; + }) + .onBlur(() => { + this.oneButtonColor = '#FFC0CB'; + this.text = this.text + 'blur1 success'; + }) + Text(this.text).padding(15) + + Button('Button2') + .backgroundColor(this.oneButton2Color) + .id('AceActionGestureDisableInterface160_2') + .onFocus(() => { + this.oneButton2Color = '#FF0000'; + this.text2 = 'focus2 success'; + }) + .onBlur(() => { + this.oneButton2Color = '#FFC0CB'; + this.text2 = this.text2 + 'blur2 success'; + }) + .onClick(undefined) + Text(this.text2).padding(15) + }.padding(30).width('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface170.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface170.ets new file mode 100644 index 0000000000000000000000000000000000000000..911babe9ce036fe4914efaa1b88ed9ddcfb1e062 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface170.ets @@ -0,0 +1,104 @@ +/* + * 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. + */ +// xxx.ets +@Entry +@Component +struct AceActionGestureDisableInterface170 { + scroller: Scroller = new Scroller(); + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + @State testTextStr: string = 'test' + @State testRowStr: string = 'test' + + build() { + Column() { + Column() { + Text(this.testTextStr) + .fontSize(20) + + Text(this.testRowStr) + .fontSize(20) + } + .height(100) + .backgroundColor(Color.Gray) + .opacity(0.3) + + Scroll(this.scroller) { + Column() { + Button("Test Text Visible Change") + .fontSize(10) + .margin({ top: 50, bottom: 20 }) + .backgroundColor(Color.Green) + .onVisibleAreaChange([0.0, 1.0], (isVisible: boolean, currentRatio: number) => { + console.info('Test Text isVisible: ' + isVisible + ', currentRatio:' + currentRatio) + if (isVisible && currentRatio >= 1.0) { + console.info('Test Text is fully visible. currentRatio:' + currentRatio) + this.testTextStr = 'Test Text is fully visible' + } + + if (!isVisible && currentRatio <= 0.0) { + console.info('Test Text is completely invisible.') + this.testTextStr = 'Test Text is completely invisible' + } + }) + + Button('Test Row Visible Change') + .fontSize(10) + .margin({ bottom: 20 }) + .backgroundColor(Color.Yellow).onClick(undefined) + .onVisibleAreaChange([0.0, 1.0], (isVisible: boolean, currentRatio: number) => { + console.info('Test Row isVisible:' + isVisible + ', currentRatio:' + currentRatio) + if (isVisible && currentRatio >= 1.0) { + console.info('Test Row is fully visible.') + this.testRowStr = 'Test Row is fully visible' + } + + if (!isVisible && currentRatio <= 0.0) { + console.info('Test Row is completely invisible.') + this.testRowStr = 'Test Row is completely invisible' + } + }) + + ForEach(this.arr, (item:number) => { + Text(item.toString()) + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + }, (item:number) => (item.toString())) + + }.width('100%') + }.id('AceActionGestureDisableInterface170') + .backgroundColor(0x317aff) + .scrollable(ScrollDirection.Vertical) + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + .onWillScroll((xOffset: number, yOffset: number, scrollState: ScrollState) => { + console.info(xOffset + ' ' + yOffset) + }) + .onScrollEdge((side: Edge) => { + console.info('To the edge') + }) + .onScrollStop(() => { + console.info('Scroll Stop') + }) + + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface180.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface180.ets new file mode 100644 index 0000000000000000000000000000000000000000..ec88251b1d1cfd6570e9f60572875ce952f1b233 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface180.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 AceActionGestureDisableInterface180 { + @State message: string = 'Hello World' + + build() { + Row() { + Column({ space: 5 }) { + Text(this.message) + Button("Test short cut 1").onClick((event: ClickEvent) => { + this.message = "I clicked Button 1"; + console.log("I clicked 1"); + }).keyboardShortcut(FunctionKey.F5, [], () => { + this.message = "I clicked Button 1"; + }) + Button("Test short cut 2").onClick(undefined) + .keyboardShortcut(FunctionKey.F3, [], () => { + this.message = this.message+"I clicked Button 2"; + }) + } + .width('100%') + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface190.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface190.ets new file mode 100644 index 0000000000000000000000000000000000000000..e4d40d5826e190a6c0089476182f3c599da6d47e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface190.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 AceActionGestureDisableInterface190 { + private iconStr: ResourceStr = $r("app.media.icon"); + @State text: string = ''; + @State eventType: string = ''; + + @Builder + MyMenu() { + Menu() { + MenuItem({ startIcon: this.iconStr, content: "菜单选项" }) + .id('AceActionGestureDisableInterface190_2') + .onTouch(undefined) + MenuItem({ startIcon: this.iconStr, content: "菜单选项" }) + MenuItem({ startIcon: this.iconStr, content: "菜单选项" }) + } + } + + build() { + Column({ space: 50 }) { + Column() { + Column() { + Button('Menu') + .id('AceActionGestureDisableInterface190_1') + .width(200) + .height(100) + .margin(100) + .fontSize(30) + .bindMenu(this.MyMenu) + .backgroundColor("#ff3df2f5") + } + }.width('100%') + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface20.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface20.ets new file mode 100644 index 0000000000000000000000000000000000000000..8504e659a61df1c6c3f5e989107cc40dbc720ea4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface20.ets @@ -0,0 +1,98 @@ +/* + * 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 AceActionGestureDisableInterface20 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State scaleValue1: number = 1; + @State pinchValue1: number = 1; + @State pinchX1: number = 0; + @State pinchY1: number = 0; + @State message1: string = 'button2 '; + @State message2: string = 'button1 '; + @State borderStyles: BorderStyle = BorderStyle.Solid; + build() { + Column() { + Column() { + Text('button1 log:'+this.message1).fontSize(15) + Text('button2 log:'+this.message2).fontSize(15) + } + .height(300) + .width(200) + .padding(30) + .margin(30) + Row() { + Button('button1') + .id('AceActionGestureDisableInterface20_1') + .fontSize(22) + .margin(10) + .monopolizeEvents(true) + .scale({ x: this.scaleValue, y: this.scaleValue }) + .gesture( + PinchGesture({ fingers: 2 }) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.pinchValue = this.scaleValue; + this.message1 += 'onActionEnd'; + }) + ) + + Button('button2') + .id('AceActionGestureDisableInterface20_2') + .fontSize(22) + .margin(10) + .onClick(undefined) + .scale({ x: this.scaleValue1, y: this.scaleValue1 }) + .gesture( + PinchGesture({ fingers: 2 }) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue1 = this.pinchValue * event.scale + this.pinchX1 = event.pinchCenterX + this.pinchY1 = event.pinchCenterY + } + }) + .onActionEnd((event: GestureEvent) => { + this.pinchValue1 = this.scaleValue; + this.message2 += 'onActionEnd'; + }) + ) + Button('button2') + .id('AceActionGestureDisableInterface20_3') + .onClick(() =>{ + this.scaleValue = 1; + this.pinchValue = 1; + this.scaleValue1= 1; + this.pinchValue1 = 1; + }) + } + } + .height('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface200.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface200.ets new file mode 100644 index 0000000000000000000000000000000000000000..935ee507dbe17431487b50030f8b8c762cb21ac6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface200.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 AceActionGestureDisableInterface200 { + @State text: string = ''; + @State text2: string = ''; + @State eventType: string = ''; + @State eventType2: string = ''; + + build() { + Column() { + Button('Button1') + .id('AceActionGestureDisableInterface200_1') + .onTouch((event?: TouchEvent) => { + if(event){ + if (event.type === TouchType.Down) { + this.eventType = 'Down' + } + if (event.type === TouchType.Up) { + this.eventType = 'Up' + } + if (event.type === TouchType.Move) { + this.eventType = 'Move' + } + this.text = 'TouchType:' + this.eventType2 + '\nDistance between touch point and touch element:\nx: ' + + Math.round(event.touches[0].x) + '\n' + 'y: ' + Math.round(event.touches[0].y) + '\nComponent globalPos:(' + + (event.target.area.globalPosition.x) + ',' + event.target.area.globalPosition.y + ')\nwidth:' + + (event.target.area.width) + '\nheight:' + event.target.area.height + } + }) + Text(this.text).padding(15) + + Button('Button2') + .id('AceActionGestureDisableInterface200_2') + .onClick(undefined) + .onTouch((event?: TouchEvent) => { + if(event){ + if (event.type === TouchType.Down) { + this.eventType2 = 'Down' + } + if (event.type === TouchType.Up) { + this.eventType2 = 'Up' + } + if (event.type === TouchType.Move) { + this.eventType2 = 'Move' + } + this.text2 = 'TouchType:' + this.eventType2 + '\nDistance between touch point and touch element:\nx: ' + + Math.round(event.touches[0].x) + '\n' + 'y: ' + Math.round(event.touches[0].y) + '\nComponent globalPos:(' + + (event.target.area.globalPosition.x) + ',' + event.target.area.globalPosition.y + ')\nwidth:' + + (event.target.area.width) + '\nheight:' + event.target.area.height + } + }) + Text(this.text2).padding(15) + }.padding(30).width('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface230.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface230.ets new file mode 100644 index 0000000000000000000000000000000000000000..fe7f87113a96e07dfb6e87b7a3fcdcce4a0f18bc --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface230.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 AceActionGestureDisableInterface230 { + @State text: string = 'null'; + @State eventType: string = ''; + @Builder MenuBuilder() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Button('Test ContextMenu1') + .id('AceActionGestureDisableInterface230_2') + .onMouse(undefined) + Divider().strokeWidth(2).margin(5).color(Color.Black) + + Text(this.text).padding(15) + } + .width(200) + .height(160) + } + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Column() { + Text("Test ContextMenu") + .id('AceActionGestureDisableInterface230_1') + .fontSize(20) + .width('100%') + .height(500) + .backgroundColor(0xAFEEEE) + .textAlign(TextAlign.Center) + } + .bindContextMenu(this.MenuBuilder, ResponseType.LongPress) + .onDragStart(()=>{ + ContextMenu.close() + }) + + } + .width('100%') + .height('100%') + + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface240.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface240.ets new file mode 100644 index 0000000000000000000000000000000000000000..24672329c6d7564c97c4a2a520fc53a7b518d008 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface240.ets @@ -0,0 +1,118 @@ +/* + * 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 AceActionGestureDisableInterface240 { + @State text: string = ''; + @State text2: string = ''; + @State eventType: string = ''; + @State eventType2: string = ''; + @State action: string = ''; + @State mouseBtn: string = ''; + + build() { + Column() { + Button('Button1') + .id('AceActionGestureDisableInterface240_1') + .onMouse((event: MouseEvent):void => { + if(event){ + switch (event.button) { + case MouseButton.None: + this.mouseBtn = 'None'; + break; + case MouseButton.Left: + this.mouseBtn = 'Left'; + break; + case MouseButton.Right: + this.mouseBtn = 'Right'; + break; + case MouseButton.Back: + this.mouseBtn = 'Back'; + break; + case MouseButton.Forward: + this.mouseBtn = 'Forward'; + break; + case MouseButton.Middle: + this.mouseBtn = 'Middle'; + break; + } + switch (event.action) { + case MouseAction.Hover: + this.action = 'Hover'; + break; + case MouseAction.Press: + this.action = 'Press'; + break; + case MouseAction.Move: + this.action = 'Move'; + break; + case MouseAction.Release: + this.action = 'Release'; + break; + } this.text = 'onMouse:\nButton = ' + this.mouseBtn + + '\nAction = ' + this.action + '\nXY=(' + Math.round(event.x) + ',' + Math.round(event.y) + ')' + + '\nwindowXY=(' + Math.round(event.windowX) + ',' + Math.round(event.windowY) + ')'; + } + }) + Text(this.text).padding(15) + + Button('Button2') + .id('AceActionGestureDisableInterface240_2') + .onClick(undefined) + .onMouse((event: MouseEvent):void => { + if(event){ + switch (event.button) { + case MouseButton.None: + this.mouseBtn = 'None'; + break; + case MouseButton.Left: + this.mouseBtn = 'Left'; + break; + case MouseButton.Right: + this.mouseBtn = 'Right'; + break; + case MouseButton.Back: + this.mouseBtn = 'Back'; + break; + case MouseButton.Forward: + this.mouseBtn = 'Forward'; + break; + case MouseButton.Middle: + this.mouseBtn = 'Middle'; + break; + } + switch (event.action) { + case MouseAction.Hover: + this.action = 'Hover'; + break; + case MouseAction.Press: + this.action = 'Press'; + break; + case MouseAction.Move: + this.action = 'Move'; + break; + case MouseAction.Release: + this.action = 'Release'; + break; + } this.text2 = 'onMouse:\nButton = ' + this.mouseBtn + + '\nAction = ' + this.action + '\nXY=(' + Math.round(event.x) + ',' + Math.round(event.y) + ')' + + '\nwindowXY=(' + Math.round(event.windowX) + ',' + Math.round(event.windowY) + ')'; + } + }) + Text(this.text2).padding(15) + }.padding(30).width('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface30.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface30.ets new file mode 100644 index 0000000000000000000000000000000000000000..ea88dff9a5da250a056c62c1822176cbf89c4dbd --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface30.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 AceActionGestureDisableInterface30 { + @State angle: number = 0; + @State rotateValue: number = 0; + @State angle1: number = 0; + @State rotateValue1: number = 0; + @State message1: string = 'button2 '; + @State message2: string = 'button1 '; + @State borderStyles: BorderStyle = BorderStyle.Solid; + build() { + Column() { + Column() { + Text('button1 log:'+this.message1).fontSize(15) + Text('button2 log:'+this.message2).fontSize(15) + } + .height(300) + .width(200) + .padding(30) + .margin(30) + Row() { + Button('button1') + .id('AceActionGestureDisableInterface30_1') + .fontSize(22) + .margin(10) + .monopolizeEvents(true) + .rotate({ angle: this.angle }) + .gesture( + RotationGesture() + .onActionStart((event: GestureEvent) => { + console.info('Rotation start') + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle + this.message1 += 'Rotation end'; + }) + ) + + Button('button2') + .id('AceActionGestureDisableInterface30_2') + .fontSize(22) + .margin(10) + .onClick(undefined) + .rotate({ angle: this.angle1 }) + .gesture( + RotationGesture() + .onActionStart((event: GestureEvent) => { + console.info('Rotation start') + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle1 = this.rotateValue1 + event.angle + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue1 = this.angle + console.info('Rotation end') + }) + ) + Button('button2') + .id('AceActionGestureDisableInterface30_3') + .onClick(() =>{ + this.angle = 0; + this.angle1 = 0; + this.rotateValue= 0; + this.rotateValue1 = 0; + }) + } + } + .height('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface40.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface40.ets new file mode 100644 index 0000000000000000000000000000000000000000..f06fb24b5555905c9b9b643dd4474d1fd0bc2f51 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface40.ets @@ -0,0 +1,63 @@ +/* + * 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 AceActionGestureDisableInterface40 { + @State message1: string = 'button2 '; + @State message2: string = 'button1 '; + build() { + Column() { + Column() { + Text('button1 log:'+this.message1).fontSize(15) + Text('button2 log:'+this.message2).fontSize(15) + } + .height(300) + .width(200) + .padding(30) + .margin(30) + Row() { + Button('button1') + .id('AceActionGestureDisableInterface40_1') + .fontSize(22) + .margin(10) + .monopolizeEvents(true) + .gesture( + TapGesture({ count: 1 }) + .onAction((event: GestureEvent) => { + if (event) { + this.message1 = 'Button1 tap success'; + } + }) + ) + + Button('button2') + .id('AceActionGestureDisableInterface40_2') + .fontSize(22) + .margin(10) + .onClick(undefined) + .gesture( + TapGesture({ count: 1 }) + .onAction((event: GestureEvent) => { + if (event) { + this.message1 = 'Button1 tap success'; + } + }) + ) + } + } + .height('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface50.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface50.ets new file mode 100644 index 0000000000000000000000000000000000000000..61f788008745856d61fa647016c32ae4f590ba46 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface50.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 AceActionGestureDisableInterface50 { + @State message1: string = 'button2 '; + @State message2: string = 'button1 '; + + build() { + Column() { + Column() { + Text('button1 log:' + this.message1).fontSize(15) + Text('button2 log:' + this.message2).fontSize(15) + } + .height(300) + .width(200) + .padding(30) + .margin(30) + + Row() { + Button('button1') + .id('AceActionGestureDisableInterface50_1') + .fontSize(22) + .margin(10) + .monopolizeEvents(true) + .gesture( + TapGesture({ count: 1 }) + .onAction((event: GestureEvent) => { + if (event) { + this.message1 = 'Button1 tap success'; + } + }) + ) + + Button('button2') + .id('AceActionGestureDisableInterface50_2') + .fontSize(22) + .margin(10) + .onClick(undefined) + .gesture( + TapGesture({ count: 1 }) + .onAction((event: GestureEvent) => { + if (event) { + this.message1 = 'Button1 tap success'; + } + }) + ) + } + } + .height('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface60.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface60.ets new file mode 100644 index 0000000000000000000000000000000000000000..c52dc5438d155f1eda61b79dd64ac2f6fcf82181 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface60.ets @@ -0,0 +1,63 @@ +/* + * 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 AceActionGestureDisableInterface60 { + @State message1: string = 'button2 '; + @State message2: string = 'button1 '; + build() { + Column() { + Column() { + Text('button1 log:'+this.message1).fontSize(15) + Text('button2 log:'+this.message2).fontSize(15) + } + .height(300) + .width(200) + .padding(30) + .margin(30) + Row() { + Button('button1') + .id('AceActionGestureDisableInterface60_1') + .fontSize(22) + .margin(10) + .monopolizeEvents(true) + .gesture( + LongPressGesture({ repeat: true }) + .onAction((event: GestureEvent) => { + }) + .onActionEnd((event: GestureEvent) => { + this.message1 = 'Button1 LongPress success'; + }) + ) + + Button('button2') + .id('AceActionGestureDisableInterface60_2') + .fontSize(22) + .margin(10) + .onClick(undefined) + .gesture( + LongPressGesture({ repeat: true }) + .onAction((event: GestureEvent) => { + }) + .onActionEnd((event: GestureEvent) => { + this.message2 = 'Button2 LongPress success'; + }) + ) + } + } + .height('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface70.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface70.ets new file mode 100644 index 0000000000000000000000000000000000000000..2b0175bb9c01eeeff5198486da99eac96d4e0037 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface70.ets @@ -0,0 +1,48 @@ +/* + * 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 AceActionGestureDisableInterface70 { + @State message1: string = 'button2 '; + @State message2: string = 'button1 '; + build() { + Column() { + Column() { + Text('button1 log:'+this.message1).fontSize(15) + Text('button2 log:'+this.message2).fontSize(15) + } + .height(300) + .width(200) + .padding(30) + .margin(30) + Row() { + Button('button1') + .id('AceActionGestureDisableInterface70_1') + .fontSize(22) + .margin(10) + .monopolizeEvents(true) + .onAreaChange(undefined) + + Button('button2') + .id('AceActionGestureDisableInterface70_2') + .fontSize(22) + .margin(10) + .onClick(undefined) + } + } + .height('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface80.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface80.ets new file mode 100644 index 0000000000000000000000000000000000000000..4d4d9bb4c560b5e042330f91f4cf3afb78d84db5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface80.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. + */ +import { unifiedDataChannel, uniformTypeDescriptor } from '@kit.ArkData'; +@Entry +@Component +struct AceActionGestureDisableInterface80 { + @State uri: string = ""; + @State AblockArr: string[] = []; + @State BblockArr: string[] = []; + @State AVisible: Visibility = Visibility.Visible; + @State AVisible2: Visibility = Visibility.Visible; + @State dragSuccess :Boolean = false; + build() { + Column() { + Row() { + Button('button1') + .id('AceActionGestureDisableInterface80_1') + .fontSize(22) + .margin(10) + .monopolizeEvents(true) + .visibility(this.AVisible) + .draggable(true) + .onDragStart(() => { + }) + .onDragEnd((event: DragEvent) => { + let ret = event.getResult(); + if(ret == 0) { + this.AVisible = Visibility.Hidden; + } else { + this.AVisible = Visibility.Visible; + } + }) + + Button('button2') + .id('AceActionGestureDisableInterface80_2') + .fontSize(22) + .margin(10) + .onClick(undefined) + .visibility(this.AVisible2) + .draggable(true) + .onDragStart(() => { + }) + .onDragEnd((event: DragEvent) => { + let ret = event.getResult(); + if(ret == 0) { + console.log("enter ret == 0") + this.AVisible2 = Visibility.Hidden; + } else { + console.log("enter ret != 0") + this.AVisible2 = Visibility.Visible; + } + }) + } + Column(){ + Text('可释放区域') + .fontSize('15dp') + .height('10%') + List(){ + ForEach(this.BblockArr, (item:string, index) => { + ListItem() { + Image(item) + .width(100) + .height(100) + .border({width: 1}) + } + .margin({ left: 30 , top : 30}) + }, (item:string) => item) + }.id('AceActionGestureDisableInterface80_3') + .border({width: 1}) + .height('90%') + .width('100%') + .allowDrop([uniformTypeDescriptor.UniformDataType.IMAGE]) + .onDrop((event?: DragEvent, extraParams?: string) => { + console.log("enter onDrop") + let dragData:UnifiedData = (event as DragEvent).getData() as UnifiedData; + if(dragData != undefined) { + let arr:Array = dragData.getRecords(); + if(arr.length > 0) { + let image = arr[0] as unifiedDataChannel.Image; + this.uri = image.imageUri; + this.BblockArr.splice(JSON.parse(extraParams as string).insertIndex, 0, this.uri); + } else { + console.log(`dragData arr is null`) + } + } else { + console.log(`dragData is undefined`) + } + console.log("ondrop udmf data"); + this.dragSuccess = true + }) + } + .height("50%") + .width("45%") + .border({ width: 1 }) + .margin({ left: 12 }) + } + .height('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface90.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface90.ets new file mode 100644 index 0000000000000000000000000000000000000000..4acafcab570187b4cc4ac9571f966937d1993804 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface90.ets @@ -0,0 +1,78 @@ +/* + * 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 AceActionGestureDisableInterface90 { + @State isShow: boolean = false; + @State isShow2: boolean = false; + @State changeAppear: string = '点我卸载挂载组件'; + @State changeAppear2: string = 'button2点我卸载挂载组件'; + private myText: string = 'Text for onAppear'; + private myText2: string = 'Text2 for onAppear'; + + build() { + Column() { + Button(this.changeAppear) + .id('AceActionGestureDisableInterface90_1') + .onClick(() => { + this.isShow = !this.isShow + }).margin(15) + if (this.isShow) { + Text(this.myText).fontSize(26).fontWeight(FontWeight.Bold) + .onAttach(() => { + promptAction.showToast({ + message: 'The text is shown', + duration: 2000, + bottom: 500 + }) + }) + .onDetach(() => { + promptAction.showToast({ + message: 'The text is hidden', + duration: 2000, + bottom: 500 + }) + }) + } + + Button(this.changeAppear2) + .id('AceActionGestureDisableInterface90_2') + .onClick(() => { + this.isShow2 = !this.isShow2 + }).margin(15) + .onClick(undefined) + if (this.isShow2) { + Text(this.myText2).fontSize(26).fontWeight(FontWeight.Bold) + .onAttach(() => { + promptAction.showToast({ + message: 'The text2 is shown', + duration: 2500, + bottom: 400 + }) + }) + .onDetach(() => { + promptAction.showToast({ + message: 'The text2 is hidden', + duration: 2500, + bottom: 400 + }) + }) + } + }.padding(30).width('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureEventEnhancement/AceActionGestureEventEnhancement100.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureEventEnhancement/AceActionGestureEventEnhancement100.ets new file mode 100644 index 0000000000000000000000000000000000000000..b32576261bcb4455ccb3a1cc379f020abadd653b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureEventEnhancement/AceActionGestureEventEnhancement100.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 AceActionGestureEventEnhancement100 { + @State text: string = 'sourceTool :'; + @State text2: string = 'axisHorizontal:'; + @State text3: string = 'axisVertical:'; + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + + build() { + Column() { + Text(this.text+this.text2+this.text3) + .id('AceActionGestureEventEnhancement100') + .fontSize(20) + .width('100%') + .height(500) + .backgroundColor(0xAFEEEE) + .textAlign(TextAlign.Center) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 0 }) + // 三指捏合触发该手势事件 + .gesture( + PinchGesture({ fingers: 2 }) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.pinchValue = this.scaleValue; + this.text = this.text + event.sourceTool; + this.text2 = this.text2+event.axisHorizontal; + this.text3 = this.text3+event.axisVertical; + }) + ) + + Button('button2') + .id('AceActionGestureEventEnhancement100_1') + .onClick(() =>{ + this.scaleValue = 1; + this.pinchValue = 1; + }) + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureEventEnhancement/AceActionGestureEventEnhancement120.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureEventEnhancement/AceActionGestureEventEnhancement120.ets new file mode 100644 index 0000000000000000000000000000000000000000..6a428c6c797cf04237cac992967cf445ab375c47 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureEventEnhancement/AceActionGestureEventEnhancement120.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 AceActionGestureEventEnhancement120 { + @State text: string = 'sourceTool :'; + @State text2: string = 'axisHorizontal:'; + @State text3: string = 'axisVertical:'; + @State angle: number = 0; + @State rotateValue: number = 0; + + build() { + Column() { + Text(this.text+this.text2+this.text3) + .id('AceActionGestureEventEnhancement120') + .fontSize(20) + .width('100%') + .height(500) + .backgroundColor(0xAFEEEE) + .textAlign(TextAlign.Center) + .rotate({ angle: this.angle }) + .gesture( + RotationGesture() + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle; + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle; + this.text = this.text + event.sourceTool; + this.text2 = this.text2+event.axisHorizontal; + this.text3 = this.text3+event.axisVertical; + }) + ) + Button('restore') + .id('AceActionGestureEventEnhancement120_1') + .onClick(() =>{ + this.angle = 0; + this.rotateValue= 0; + }) + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureEventEnhancement/AceActionGestureEventEnhancement140.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureEventEnhancement/AceActionGestureEventEnhancement140.ets new file mode 100644 index 0000000000000000000000000000000000000000..bf379f73cfc4cca269fdd1f6e46c0c82fe720fcf --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureEventEnhancement/AceActionGestureEventEnhancement140.ets @@ -0,0 +1,48 @@ +/* + * 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 AceActionGestureEventEnhancement140 { + @State text: string = 'sourceTool :'; + @State text2: string = 'axisHorizontal:'; + @State text3: string = 'axisVertical:'; + @State rotateAngle: number = 0; + @State speed: number = 1; + + build() { + Column() { + Text(this.text+this.text2+this.text3) + .id('AceActionGestureEventEnhancement140') + .fontSize(20) + .width('100%') + .height(500) + .backgroundColor(0xAFEEEE) + .textAlign(TextAlign.Center) + .rotate({ angle: this.rotateAngle }) + .gesture( + TapGesture({ count: 1 }) + .onAction((event: GestureEvent) => { + if (event) { + this.text = this.text + event.sourceTool; + this.text2 = this.text2+event.axisHorizontal; + this.text3 = this.text3+event.axisVertical; + } + }) + ) + + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureEventEnhancement/AceActionGestureEventEnhancement180.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureEventEnhancement/AceActionGestureEventEnhancement180.ets new file mode 100644 index 0000000000000000000000000000000000000000..c2537bae0475444b9b9d25ff79ab3b187bf61f1a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureEventEnhancement/AceActionGestureEventEnhancement180.ets @@ -0,0 +1,45 @@ +/* + * 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 AceActionGestureEventEnhancement180 { + @State text: string = 'sourceTool'; + @State text2: string = 'axisHorizontal:'; + @State text3: string = 'axisVertical:'; + + build() { + Column() { + Text(this.text+this.text2+this.text3) + .id('AceActionGestureEventEnhancement180') + .fontSize(20) + .width('100%') + .height(500) + .backgroundColor(0xAFEEEE) + .textAlign(TextAlign.Center) + .gesture( + LongPressGesture({ repeat:true }) + .onAction((event: GestureEvent) => { + }) + .onActionEnd((event: BaseEvent) => { + this.text = this.text+event.sourceTool; + this.text2 = this.text2+event.axisHorizontal; + this.text3 = this.text3+event.axisVertical; + }) + ) + + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureEventEnhancement/AceActionGestureEventEnhancement20.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureEventEnhancement/AceActionGestureEventEnhancement20.ets new file mode 100644 index 0000000000000000000000000000000000000000..23b9a967614d8a72502a95e7191fd98a16ef0f13 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureEventEnhancement/AceActionGestureEventEnhancement20.ets @@ -0,0 +1,45 @@ +/* + * 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 AceActionGestureEventEnhancement20 { + @State text: string = 'sourceTool :'; + @State text2: string = 'axisHorizontal:'; + @State text3: string = 'axisVertical:'; + @State angle: number = 0; + @State rotateValue: number = 0; + + build() { + Column() { + Text(this.text+this.text2+this.text3) + .id('AceActionGestureEventEnhancement20') + .fontSize(20) + .width('100%') + .height(500) + .backgroundColor(0xAFEEEE) + .textAlign(TextAlign.Center) + .rotate({ angle: this.angle }) + .onClick((event?: ClickEvent) => { + if(event){ + this.text = this.text + event.sourceTool; + this.text2 = this.text2+event.axisHorizontal; + this.text3 = this.text3+event.axisVertical; + } + }, 20) + + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureEventEnhancement/AceActionGestureEventEnhancement200.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureEventEnhancement/AceActionGestureEventEnhancement200.ets new file mode 100644 index 0000000000000000000000000000000000000000..95e59e26eb4125dff5419ea66c72b556e5fd57fb --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureEventEnhancement/AceActionGestureEventEnhancement200.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 AceActionGestureEventEnhancement200 { + @State text: string = 'sourceTool :'; + @State text2: string = 'axisHorizontal:'; + @State text3: string = 'axisVertical:'; + @State rotateAngle: number = 0; + @State speed: number = 1; + + build() { + Column() { + Text(this.text+this.text2+this.text3) + .id('AceActionGestureEventEnhancement200') + .fontSize(20) + .width('100%') + .height(500) + .backgroundColor(0xAFEEEE) + .textAlign(TextAlign.Center) + .rotate({ angle: this.rotateAngle }) + .gesture( + SwipeGesture({ direction: SwipeDirection.Vertical }) + .onAction((event: GestureEvent) => { + if (event) { + this.speed = event.speed; + this.rotateAngle = event.angle; + this.text = this.text + event.sourceTool; + this.text2 = this.text2+event.axisHorizontal; + this.text3 = this.text3+event.axisVertical; + } + }) + ) + + Button('restore') + .id('AceActionGestureEventEnhancement200_1') + .onClick(() =>{ + this.rotateAngle = 0; + }) + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureEventEnhancement/AceActionGestureEventEnhancement230.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureEventEnhancement/AceActionGestureEventEnhancement230.ets new file mode 100644 index 0000000000000000000000000000000000000000..8b75929c8822a60378d5dafc1e8cac2bbf9348f5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureEventEnhancement/AceActionGestureEventEnhancement230.ets @@ -0,0 +1,45 @@ +/* + * 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 AceActionGestureEventEnhancement230 { + @State text: string = 'sourceTool :'; + @State text2: string = 'axisHorizontal:'; + @State text3: string = 'axisVertical:'; + @State angle: number = 0; + @State rotateValue: number = 0; + + build() { + Column() { + Text(this.text+this.text2+this.text3) + .id('AceActionGestureEventEnhancement230') + .fontSize(20) + .width('100%') + .height(500) + .backgroundColor(0xAFEEEE) + .textAlign(TextAlign.Center) + .rotate({ angle: this.angle }) + .onTouch((event?: TouchEvent) => { + if(event) { + this.text = this.text + event.sourceTool; + this.text2 = this.text2 + event.axisHorizontal; + this.text3 = this.text3 + event.axisVertical; + } + }) + + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureEventEnhancement/AceActionGestureEventEnhancement260.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureEventEnhancement/AceActionGestureEventEnhancement260.ets new file mode 100644 index 0000000000000000000000000000000000000000..7fabe8f97e21b2f36eab4a6010eb0de59de0bc09 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureEventEnhancement/AceActionGestureEventEnhancement260.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. + */ +@Entry +@Component +struct AceActionGestureEventEnhancement260 { + @State text: string = 'sourceTool :'; + @State text2: string = 'axisHorizontal:'; + @State text3: string = 'axisVertical:'; + @State angle: number = 0; + @State rotateValue: number = 0; + + build() { + Column() { + Text(this.text+this.text2+this.text3) + .id('AceActionGestureEventEnhancement260') + .fontSize(20) + .width('100%') + .height(500) + .backgroundColor(0xAFEEEE) + .textAlign(TextAlign.Center) + .rotate({ angle: this.angle }) + .onMouse((event: MouseEvent):void => { + if(event){ + this.text = this.text + event.sourceTool; + this.text2 = this.text2 + event.axisHorizontal; + this.text3 = this.text3 + event.axisVertical; + } + }) + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureEventEnhancement/AceActionGestureEventEnhancement60.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureEventEnhancement/AceActionGestureEventEnhancement60.ets new file mode 100644 index 0000000000000000000000000000000000000000..02fd964772700ae09f24e5e39cf839767f538a8d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureEventEnhancement/AceActionGestureEventEnhancement60.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 AceActionGestureEventEnhancement60 { + @State text: string = 'sourceTool :'; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + private panOption: PanGestureOptions = new PanGestureOptions({ direction: PanDirection.Left | PanDirection.Right }) + + build() { + Column() { + Text(this.text) + .id('AceActionGestureEventEnhancement60') + .fontSize(20) + .width('100%') + .height(500) + .backgroundColor(0xAFEEEE) + .textAlign(TextAlign.Center) + .translate({ x: this.offsetX, y: this.offsetY, z: 0 }) // 以组件左上角为坐标原点进行移动 + // 左右拖动触发该手势事件 + .gesture( + PanGesture(this.panOption) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + this.text = this.text + event.sourceTool; + }) + ) + Button('restore') + .id('AceActionGestureEventEnhancement60_1') + .onClick((event: ClickEvent) => { + this.offsetX = 0; + this.offsetY = 2; + }) + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface110.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface110.ets new file mode 100644 index 0000000000000000000000000000000000000000..e9884d0fadcc1811fa382534487f6bce42ab39ad --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface110.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. + */ +@Entry +@Component +struct AceActionGestureGesturegroupInterface110 { + @State text: string = 'null'; + @State eventType: string = ''; + + build() { + Column() { + Text(this.text) + .id('AceActionGestureGesturegroupInterface110') + .fontSize(20) + .width('100%') + .height(500) + .backgroundColor(0xAFEEEE) + .textAlign(TextAlign.Center) + .gesture( + TapGesture({ count: 1 }) + .onAction((event: GestureEvent) => { + this.text= 'TapGesture success'; + }) + ) + } + .gesture( + LongPressGesture({ repeat: true }) + .onAction((event: GestureEvent) => { + + }) + .onActionEnd((event: GestureEvent) => { + this.text = this.text+'LongPressGesture' + }) + ) + + + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface130.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface130.ets new file mode 100644 index 0000000000000000000000000000000000000000..258625dd7ead6f3bc1aee05aa2a4921e89638dcc --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface130.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 AceActionGestureGesturegroupInterface130 { + @State text: string = 'null'; + @State eventType: string = ''; + + build() { + Column() { + Text(this.text) + .id('AceActionGestureGesturegroupInterface130') + .fontSize(20) + .width('100%') + .height(500) + .backgroundColor(0xAFEEEE) + .textAlign(TextAlign.Center) + .gesture( + LongPressGesture({ repeat: true ,duration:4000}) + .onAction((event: GestureEvent) => { + + }) + .onActionEnd((event: GestureEvent) => { + this.text = this.text+'子组件 长按' + }) + ) + } + .parallelGesture( + LongPressGesture({ repeat: true ,duration:2000}) + .onAction((event: GestureEvent) => { + + }) + .onActionEnd((event: GestureEvent) => { + this.text = '父組件长按 ' + }) + ) + + + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface140.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface140.ets new file mode 100644 index 0000000000000000000000000000000000000000..35b0e9ffc82bde56debec38e8db808fd2dd12a1e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface140.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 AceActionGestureGesturegroupInterface140 { + @State text: string = 'null'; + @State eventType: string = ''; + + build() { + Column() { + Text(this.text) + .id('AceActionGestureGesturegroupInterface140') + .fontSize(20) + .width('100%') + .height(500) + .backgroundColor(0xAFEEEE) + .textAlign(TextAlign.Center) + .gesture( + LongPressGesture({ repeat: true ,duration:2000}) + .onAction((event: GestureEvent) => { + + }) + .onActionEnd((event: GestureEvent) => { + this.text = this.text+'子组件 长按' + }) + ) + } + .parallelGesture( + LongPressGesture({ repeat: true ,duration:4000}) + .onAction((event: GestureEvent) => { + + }) + .onActionEnd((event: GestureEvent) => { + this.text = '父組件长按 ' + }) + ) + + + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface150.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface150.ets new file mode 100644 index 0000000000000000000000000000000000000000..7d3bc9c9b6eb4b36df1d23a3dcc2ee3e6afd265c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface150.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. + */ +@Entry +@Component +struct AceActionGestureGesturegroupInterface150 { + @State text: string = '111'; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + @State rotateAngle: number = 0; + @State speed: number = 1; + private panOption: PanGestureOptions = new PanGestureOptions({ direction: PanDirection.Left | PanDirection.Right }); + + build() { + Column() { + Text(this.text) + .id('AceActionGestureGesturegroupInterface150') + .fontSize(20) + .width('100%') + .height(500) + .backgroundColor(0xAFEEEE) + .textAlign(TextAlign.Center) + .translate({ x: this.offsetX, y: this.offsetY, z: 0 }) + .gesture( + PanGesture(this.panOption) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + } + }) + .onActionEnd(() => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + this.text = this.text+'Pan end'; + }) + ) + }.rotate({ angle: this.rotateAngle }) + .parallelGesture( + SwipeGesture({ direction: SwipeDirection.Vertical }) + .onAction((event: GestureEvent) => { + if (event) { + this.speed = event.speed; + this.rotateAngle = event.angle; + + this.text = this.text+'swipe onAction'; + } + }) + ) + + + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface160.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface160.ets new file mode 100644 index 0000000000000000000000000000000000000000..47f232c8392bde167ef12ec501689856b45808f6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface160.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. + */ +@Entry +@Component +struct AceActionGestureGesturegroupInterface160 { + @State text: string = 'null'; + @State eventType: string = ''; + + build() { + Column() { + Text(this.text) + .id('AceActionGestureGesturegroupInterface160') + .fontSize(20) + .width('100%') + .height(500) + .backgroundColor(0xAFEEEE) + .textAlign(TextAlign.Center) + .gesture( + LongPressGesture({ repeat: true }) + .onAction((event: GestureEvent) => { + + }) + .onActionEnd((event: GestureEvent) => { + this.text = this.text+'子组件 长按' + }) + ) + } + .parallelGesture( + LongPressGesture({ repeat: true }) + .onAction((event: GestureEvent) => { + }) + .onActionEnd((event: GestureEvent) => { + this.text = '父組件长按 ' + }) + ) + + + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface170.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface170.ets new file mode 100644 index 0000000000000000000000000000000000000000..aed1c695966b186045f24fd71c5685a32547fd25 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface170.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. + */ +@Entry +@Component +struct AceActionGestureGesturegroupInterface170 { + @State text: string = 'null'; + @State eventType: string = ''; + + build() { + Column() { + Text(this.text) + .id('AceActionGestureGesturegroupInterface170') + .fontSize(20) + .width('100%') + .height(500) + .backgroundColor(0xAFEEEE) + .textAlign(TextAlign.Center) + .gesture( + LongPressGesture({ repeat: true }) + .onAction((event: GestureEvent) => { + + }) + .onActionEnd((event: GestureEvent) => { + this.text = this.text+'子组件 长按' + }) + ) + } + .parallelGesture( + LongPressGesture({ repeat: true }) + .onAction((event: GestureEvent) => { + }) + .onActionEnd((event: GestureEvent) => { + this.text = '父組件长按 ' + }), GestureMask.IgnoreInternal + ) + + + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface180.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface180.ets new file mode 100644 index 0000000000000000000000000000000000000000..4b2f9467856b75721ca2989765d419ca6db843f3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface180.ets @@ -0,0 +1,47 @@ +/* + * 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 AceActionGestureGesturegroupInterface180 { + @State text: string = 'null'; + @State eventType: string = ''; + + build() { + Column() { + Text(this.text) + .id('AceActionGestureGesturegroupInterface180') + .fontSize(20) + .width('100%') + .height(500) + .backgroundColor(0xAFEEEE) + .textAlign(TextAlign.Center) + .gesture( + TapGesture({ count: 2 }) + .onAction((event: GestureEvent) => { + this.text= this.text+ '子组件 TapGesture success'; + }) + ) + } + .parallelGesture( + TapGesture({ count: 2 }) + .onAction((event: GestureEvent) => { + this.text= this.text+ '父组件 TapGesture success'; + }) + ) + + + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface190.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface190.ets new file mode 100644 index 0000000000000000000000000000000000000000..cdace9fd91abacaccdc3e8c75ca924247a52da86 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface190.ets @@ -0,0 +1,100 @@ +/* + * 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 { LengthMetrics } from '@kit.ArkUI' + +@Entry +@Component +struct AceActionGestureGesturegroupInterface190 { + @State listPosition: number = 0; + @State offsetX: number = 0 + @State offsetY: number = 0 + @State positionX: number = 0 + @State positionY: number = 0 + private panOption: PanGestureOptions = new PanGestureOptions({ direction: PanDirection.Left | PanDirection.Right }) + private arr: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + @State text:string = '111'; + private scrollerForList: Scroller = new Scroller() + + build() { + Row() { + + List({ space: 20, scroller: this.scrollerForList }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text("ListItem" + item) + .width("100%") + .height("100%") + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .backgroundColor(Color.White) + }.width("100%").height(100) + }, (item: string) => item) + } + .id('AceActionGestureGesturegroupInterface190_1') + .width("30%") + .height("50%") + .edgeEffect(EdgeEffect.None) + .friction(0) + .align(Alignment.Start) + .translate({ x: this.offsetX, y: this.offsetY, z: 0 }) + .gesture( + PanGesture(this.panOption) + .onActionStart((event: GestureEvent) => { + this.text = this.text+'List Pan start' + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX + this.offsetY = this.positionY + event.offsetY + } + }) + .onActionEnd(() => { + this.positionX = this.offsetX + this.positionY = this.offsetY + this.text = this.text+'List Pan end' + }) + ) + + Text(this.text).fontColor(Color.Black).fontSize(20) + Button('restore') + .id('AceActionGestureGesturegroupInterface190_3') + .onClick((event: ClickEvent) => { + this.offsetX = 0; + this.offsetY = 2; + }) + + }.width('80%').height('80%').backgroundColor(Color.Red).padding(20).translate({ x: this.offsetX, y: this.offsetY, z: 0 }) + .id('AceActionGestureGesturegroupInterface190_2') + .priorityGesture( + PanGesture(this.panOption) + .onActionStart((event: GestureEvent) => { + this.text = this.text+'Column Pan start' + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX + this.offsetY = this.positionY + event.offsetY + } + }) + .onActionEnd(() => { + this.positionX = this.offsetX + this.positionY = this.offsetY + this.text = this.text+'Column Pan end' + }) + ) + + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface210.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface210.ets new file mode 100644 index 0000000000000000000000000000000000000000..4dd9dee4a19523da3957af847396d058dc09f1b8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface210.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. + */ +@Entry +@Component +struct AceActionGestureGesturegroupInterface210 { + @State text: string = 'Text'; + + build() { + Column() { + Text(this.text) + .id('AceActionGestureGesturegroupInterface210') + .fontSize(20) + .width('100%') + .height(500) + .backgroundColor(0xAFEEEE) + .textAlign(TextAlign.Center) + .gesture( + TapGesture({ count: 1 }) + .onAction((event: GestureEvent) => { + if (event) { + this.text = this.text + '子组件'; + } + }) + ) + } + .priorityGesture( + TapGesture({ count: 2 }) + .onAction((event: GestureEvent) => { + if (event) { + this.text = this.text + '父组件'; + } + }) + ) + + + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface230.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface230.ets new file mode 100644 index 0000000000000000000000000000000000000000..6bdfc9dbba652ee6280f58016e8094a322c31afc --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface230.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 AceActionGestureGesturegroupInterface230 { + @State text: string = 'null'; + @State eventType: string = ''; + + build() { + Column() { + Text(this.text) + .id('AceActionGestureGesturegroupInterface230') + .fontSize(20) + .width('100%') + .height(500) + .backgroundColor(0xAFEEEE) + .textAlign(TextAlign.Center) + .gesture( + LongPressGesture({ repeat: true ,duration:500}) + .onAction((event: GestureEvent) => { + + }) + .onActionEnd((event: GestureEvent) => { + this.text = this.text+'子组件 长按' + }) + ) + } + .priorityGesture( + LongPressGesture({ repeat: true ,duration:2000}) + .onAction((event: GestureEvent) => { + + }) + .onActionEnd((event: GestureEvent) => { + this.text = '父組件长按 ' + }) + ) + + + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface250.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface250.ets new file mode 100644 index 0000000000000000000000000000000000000000..a4a1e47e83b8254f7da1d5176fbf239827e43d0d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface250.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. + */ +@Entry +@Component +struct AceActionGestureGesturegroupInterface250 { + @State text: string = 'null'; + @State eventType: string = ''; + + build() { + Column() { + Text(this.text) + .id('AceActionGestureGesturegroupInterface250') + .fontSize(20) + .width('100%') + .height(500) + .backgroundColor(0xAFEEEE) + .textAlign(TextAlign.Center) + .gesture( + TapGesture({ count: 1 }) + .onAction((event: GestureEvent) => { + if (event) { + this.text = this.text + '子组件单机'; + } + }) + ) + } + .priorityGesture( + LongPressGesture({ repeat: true}) + .onAction((event: GestureEvent) => { + + }) + .onActionEnd((event: GestureEvent) => { + this.text = this.text +'父組件长按 ' + }) + ) + + + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface280.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface280.ets new file mode 100644 index 0000000000000000000000000000000000000000..c9667bac19b2aaa012a46a287d679ce087b7eecf --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface280.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 AceActionGestureGesturegroupInterface280 { + @State text: string = 'null'; + @State eventType: string = ''; + + build() { + Column() { + Text(this.text) + .id('AceActionGestureGesturegroupInterface280') + .fontSize(20) + .width('100%') + .height(500) + .backgroundColor(0xAFEEEE) + .textAlign(TextAlign.Center) + .gesture( + LongPressGesture({ repeat: true}) + .onAction((event: GestureEvent) => { + + }) + .onActionEnd((event: GestureEvent) => { + this.text = this.text+'子组件 长按' + }) + ) + } + .priorityGesture( + LongPressGesture({ repeat: true }) + .onAction((event: GestureEvent) => { + + }) + .onActionEnd((event: GestureEvent) => { + this.text = this.text+ '父組件长按 ' + }) + ) + + + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface300.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface300.ets new file mode 100644 index 0000000000000000000000000000000000000000..d7a3d678f6d36e93aecaac418c9fb3ad3fa01bd5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface300.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. + */ +@Entry +@Component +struct AceActionGestureGesturegroupInterface300 { + @State text: string = 'null'; + @State eventType: string = ''; + + build() { + Column() { + Text(this.text) + .id('AceActionGestureGesturegroupInterface300') + .fontSize(20) + .width('100%') + .height(500) + .backgroundColor(0xAFEEEE) + .textAlign(TextAlign.Center) + .gesture( + TapGesture({ count: 1 }) + .onAction((event: GestureEvent) => { + if (event) { + this.text = this.text + '子组件单机'; + } + }) + ) + } + .parallelGesture( + LongPressGesture({ repeat: true }) + .onAction((event: GestureEvent) => { + }) + .onActionEnd((event: GestureEvent) => { + this.text = '父組件长按 ' + }), GestureMask.IgnoreInternal) + + + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface340.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface340.ets new file mode 100644 index 0000000000000000000000000000000000000000..c993a1517e87b24c4dd7989d79aff364ca64908a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface340.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 AceActionGestureGesturegroupInterface340 { + @State rotateAngle: number = 0; + @State speed: number = 1; + @State borderStyles: BorderStyle = BorderStyle.Solid; + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State text: string = ''; + + build() { + Column() { + Button('button') + .id('AceActionGestureGesturegroupInterface340') + .height(150) + .width(200) + .padding(20) + .margin(20) + .border({ width: 3, style: this.borderStyles }) + .rotate({ angle: this.rotateAngle }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + GestureGroup(GestureMode.Exclusive, + LongPressGesture({ repeat: true,fingers:2,duration:1 }) + .onAction((event: GestureEvent) => { + if (event && event.repeat) { + } + }) + .onActionEnd((event: GestureEvent) => { + this.text += 'LongPressGesture success'; + }), + SwipeGesture({ direction: SwipeDirection.Vertical,fingers:2 }) + .onAction((event: GestureEvent) => { + if (event) { + this.speed = event.speed; + this.rotateAngle = event.angle; + } + this.text += 'SwipeGesture success'; + }) + + ) + .onCancel(() => { + }) + ) + + Text(this.text).margin({ top: 50 }) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface350.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface350.ets new file mode 100644 index 0000000000000000000000000000000000000000..cfa40b2924c7613542aa2fa21989d49104f5d20f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface350.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 AceActionGestureGesturegroupInterface350 { + @State rotateAngle: number = 0; + @State speed: number = 1; + @State borderStyles: BorderStyle = BorderStyle.Solid; + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State text: string = ''; + + build() { + Column() { + Button('button') + .id('AceActionGestureGesturegroupInterface350') + .height(150) + .width(200) + .padding(20) + .margin(20) + .border({ width: 3, style: this.borderStyles }) + .rotate({ angle: this.rotateAngle }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + GestureGroup(GestureMode.Exclusive, + LongPressGesture({ repeat: true,fingers:2 }) + .onAction((event: GestureEvent) => { + if (event && event.repeat) { + } + }) + .onActionEnd((event: GestureEvent) => { + this.text += 'LongPressGesture success'; + }), + SwipeGesture({ direction: SwipeDirection.Vertical,fingers:2 }) + .onAction((event: GestureEvent) => { + if (event) { + this.speed = event.speed; + this.rotateAngle = event.angle; + } + this.text += 'SwipeGesture success'; + }) + + ) + .onCancel(() => { + }) + ) + + Text(this.text).margin({ top: 50 }) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface380.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface380.ets new file mode 100644 index 0000000000000000000000000000000000000000..c2646678df85f3ae6dd30b61813b64360240e811 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface380.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 AceActionGestureGesturegroupInterface380 { + @State rotateAngle: number = 0; + @State speed: number = 1; + @State borderStyles: BorderStyle = BorderStyle.Solid; + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State text: string = ''; + + build() { + Column() { + Button('button') + .id('AceActionGestureGesturegroupInterface380') + .height(150) + .width(200) + .padding(20) + .margin(20) + .border({ width: 3, style: this.borderStyles }) + .rotate({ angle: this.rotateAngle }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + GestureGroup(GestureMode.Exclusive, + LongPressGesture({ repeat: true,duration:2000 }) + .onAction((event: GestureEvent) => { + if (event && event.repeat) { + } + }) + .onActionEnd((event: GestureEvent) => { + this.text += 'LongPressGesture2000 success'; + }), + LongPressGesture({ repeat: true ,duration:500}) + .onAction((event: GestureEvent) => { + if (event && event.repeat) { + } + }) + .onActionEnd((event: GestureEvent) => { + this.text += 'LongPressGesture500 success'; + }) + ) + .onCancel(() => { + }) + ) + + Text(this.text).margin({ top: 50 }) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface390.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface390.ets new file mode 100644 index 0000000000000000000000000000000000000000..50ee627b3c81f500020ef2888c1b95ee13827c81 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface390.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 AceActionGestureGesturegroupInterface390 { + @State rotateAngle: number = 0; + @State speed: number = 1; + @State borderStyles: BorderStyle = BorderStyle.Solid; + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State text: string = ''; + + build() { + Column() { + Button('button') + .id('AceActionGestureGesturegroupInterface390') + .height(150) + .width(200) + .padding(20) + .margin(20) + .border({ width: 3, style: this.borderStyles }) + .rotate({ angle: this.rotateAngle }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + GestureGroup(GestureMode.Exclusive, + LongPressGesture({ repeat: true,duration:500 }) + .onAction((event: GestureEvent) => { + if (event && event.repeat) { + } + }) + .onActionEnd((event: GestureEvent) => { + this.text += 'LongPressGesture500 success'; + }), + LongPressGesture({ repeat: true ,duration:2000}) + .onAction((event: GestureEvent) => { + if (event && event.repeat) { + } + }) + .onActionEnd((event: GestureEvent) => { + this.text += 'LongPressGesture2000 success'; + }) + ) + .onCancel(() => { + }) + ) + + Text(this.text).margin({ top: 50 }) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface400.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface400.ets new file mode 100644 index 0000000000000000000000000000000000000000..8a9b3f8bbdeb540cf7f88613eba0e9eb4e12ca0b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface400.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 AceActionGestureGesturegroupInterface400 { + @State rotateAngle: number = 0; + @State speed: number = 1; + @State borderStyles: BorderStyle = BorderStyle.Solid; + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State text: string = ''; + + build() { + Column() { + Button('button') + .id('AceActionGestureGesturegroupInterface400') + .height(150) + .width(200) + .padding(20) + .margin(20) + .border({ width: 3, style: this.borderStyles }) + .rotate({ angle: this.rotateAngle }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + GestureGroup(GestureMode.Parallel, + LongPressGesture({ repeat: true,fingers:2 ,duration:20}) + .onAction((event: GestureEvent) => { + if (event && event.repeat) { + } + }) + .onActionEnd((event: GestureEvent) => { + this.text += 'LongPressGesture success'; + }), + SwipeGesture({ direction: SwipeDirection.Vertical,fingers:2 }) + .onAction((event: GestureEvent) => { + if (event) { + this.speed = event.speed; + this.rotateAngle = event.angle; + } + this.text += 'SwipeGesture success'; + }) + + ) + .onCancel(() => { + }) + ) + + Text(this.text).margin({ top: 50 }) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface410.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface410.ets new file mode 100644 index 0000000000000000000000000000000000000000..d027f44d1645657730f0429205cb6d80fc02d361 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface410.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 AceActionGestureGesturegroupInterface410 { + @State rotateAngle: number = 0; + @State speed: number = 1; + @State borderStyles: BorderStyle = BorderStyle.Solid; + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State text: string = ''; + + build() { + Column() { + Button('button') + .id('AceActionGestureGesturegroupInterface410') + .height(150) + .width(200) + .padding(20) + .margin(20) + .border({ width: 3, style: this.borderStyles }) + .rotate({ angle: this.rotateAngle }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + GestureGroup(GestureMode.Parallel, + LongPressGesture({ repeat: true}) + .onAction((event: GestureEvent) => { + if (event && event.repeat) { + } + }) + .onActionEnd((event: GestureEvent) => { + this.text += 'LongPressGesture success'; + }), + SwipeGesture({ direction: SwipeDirection.Vertical,fingers:2 }) + .onAction((event: GestureEvent) => { + if (event) { + this.speed = event.speed; + this.rotateAngle = event.angle; + } + this.text += 'SwipeGesture success'; + }) + + ) + .onCancel(() => { + }) + ) + + Text(this.text).margin({ top: 50 }) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface430.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface430.ets new file mode 100644 index 0000000000000000000000000000000000000000..4eaa18e09952622cb1bd59d5feaffb117bc5c65c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface430.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 AceActionGestureGesturegroupInterface430 { + @State rotateAngle: number = 0; + @State speed: number = 1; + @State borderStyles: BorderStyle = BorderStyle.Solid; + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State text: string = ''; + + build() { + Column() { + Button('button') + .id('AceActionGestureGesturegroupInterface430') + .height(150) + .width(200) + .padding(20) + .margin(20) + .border({ width: 3, style: this.borderStyles }) + .rotate({ angle: this.rotateAngle }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + GestureGroup(GestureMode.Parallel, + LongPressGesture({ repeat: true}) + .onAction((event: GestureEvent) => { + if (event && event.repeat) { + } + }) + .onActionEnd((event: GestureEvent) => { + this.text += 'LongPressGesture success'; + }), + SwipeGesture({ direction: SwipeDirection.Vertical,fingers:2 }) + .onAction((event: GestureEvent) => { + if (event) { + this.speed = event.speed; + this.rotateAngle = event.angle; + } + this.text += 'SwipeGesture success'; + }) + + ) + .onCancel(() => { + }) + ) + + Text(this.text).margin({ top: 50 }) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface440.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface440.ets new file mode 100644 index 0000000000000000000000000000000000000000..24c39e6f39ec30ee4b7b214118927c991ba706f9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface440.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 AceActionGestureGesturegroupInterface440 { + @State rotateAngle: number = 0; + @State speed: number = 1; + @State borderStyles: BorderStyle = BorderStyle.Solid; + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State text: string = ''; + + build() { + Column() { + Button('button') + .id('AceActionGestureGesturegroupInterface440') + .height(150) + .width(200) + .padding(20) + .margin(20) + .border({ width: 3, style: this.borderStyles }) + .rotate({ angle: this.rotateAngle }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + GestureGroup(GestureMode.Parallel, + LongPressGesture({ repeat: true}) + .onAction((event: GestureEvent) => { + if (event && event.repeat) { + } + }) + .onActionEnd((event: GestureEvent) => { + this.text += 'LongPressGesture success'; + }), + SwipeGesture({ direction: SwipeDirection.Vertical,fingers:2 }) + .onAction((event: GestureEvent) => { + if (event) { + this.speed = event.speed; + this.rotateAngle = event.angle; + } + this.text += 'SwipeGesture success'; + }) + + ) + .onCancel(() => { + }) + ) + + Text(this.text).margin({ top: 50 }) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface450.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface450.ets new file mode 100644 index 0000000000000000000000000000000000000000..63f9711b9f261d02fc079197d5462b7a3aa2abbe --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface450.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 AceActionGestureGesturegroupInterface450 { + @State rotateAngle: number = 0; + @State speed: number = 1; + @State borderStyles: BorderStyle = BorderStyle.Solid; + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State text: string = ''; + + build() { + Column() { + Button('button') + .id('AceActionGestureGesturegroupInterface450') + .height(150) + .width(200) + .padding(20) + .margin(20) + .border({ width: 3, style: this.borderStyles }) + .rotate({ angle: this.rotateAngle }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + GestureGroup(GestureMode.Parallel, + LongPressGesture({ repeat: true}) + .onAction((event: GestureEvent) => { + if (event && event.repeat) { + } + }) + .onActionEnd((event: GestureEvent) => { + this.text += 'LongPressGesture success'; + }), + SwipeGesture({ direction: SwipeDirection.Vertical,fingers:2 }) + .onAction((event: GestureEvent) => { + if (event) { + this.speed = event.speed; + this.rotateAngle = event.angle; + } + this.text += 'SwipeGesture success'; + }) + + ) + .onCancel(() => { + }) + ) + + Text(this.text).margin({ top: 50 }) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface460.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface460.ets new file mode 100644 index 0000000000000000000000000000000000000000..1ca8f2242e058ef132a8d1e4446a5b3aab639d52 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface460.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 AceActionGestureGesturegroupInterface460 { + @State rotateAngle: number = 0; + @State speed: number = 1; + @State borderStyles: BorderStyle = BorderStyle.Solid; + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State text: string = ''; + + build() { + Column() { + Button('button') + .id('AceActionGestureGesturegroupInterface460') + .height(150) + .width(200) + .padding(20) + .margin(20) + .border({ width: 3, style: this.borderStyles }) + .rotate({ angle: this.rotateAngle }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + GestureGroup(GestureMode.Parallel, + LongPressGesture({ repeat: true}) + .onAction((event: GestureEvent) => { + if (event && event.repeat) { + } + }) + .onActionEnd((event: GestureEvent) => { + this.text += 'LongPressGesture success'; + }), + SwipeGesture({ direction: SwipeDirection.Vertical,fingers:2 }) + .onAction((event: GestureEvent) => { + if (event) { + this.speed = event.speed; + this.rotateAngle = event.angle; + } + this.text += 'SwipeGesture success'; + }) + + ) + .onCancel(() => { + }) + ) + + Text(this.text).margin({ top: 50 }) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface470.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface470.ets new file mode 100644 index 0000000000000000000000000000000000000000..27f96f77a039a6dd03a2b202afa00976d61a6e3f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface470.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 AceActionGestureGesturegroupInterface470 { + @State rotateAngle: number = 0; + @State speed: number = 1; + @State borderStyles: BorderStyle = BorderStyle.Solid; + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State text: string = ''; + + build() { + Column() { + Button('button') + .id('AceActionGestureGesturegroupInterface470') + .height(150) + .width(200) + .padding(20) + .margin(20) + .border({ width: 3, style: this.borderStyles }) + .rotate({ angle: this.rotateAngle }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + GestureGroup(GestureMode.Parallel, + LongPressGesture({ repeat: true}) + .onAction((event: GestureEvent) => { + if (event && event.repeat) { + } + }) + .onActionEnd((event: GestureEvent) => { + this.text += 'LongPressGesture success'; + }), + SwipeGesture({ direction: SwipeDirection.Vertical,fingers:2 }) + .onAction((event: GestureEvent) => { + if (event) { + this.speed = event.speed; + this.rotateAngle = event.angle; + } + this.text += 'SwipeGesture success'; + }) + + ) + .onCancel(() => { + }) + ) + + Text(this.text).margin({ top: 50 }) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface50.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface50.ets new file mode 100644 index 0000000000000000000000000000000000000000..9363d11af043719b444aab760caa7bf74c7f709f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface50.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 AceActionGestureGesturegroupInterface50 { + @State text: string = 'null'; + @State text2: string = ''; + + build() { + Column() { + Text(this.text+this.text2) + .id('AceActionGestureGesturegroupInterface50') + .fontSize(20) + .width('100%') + .height(500) + .backgroundColor(0xAFEEEE) + .textAlign(TextAlign.Center) + .gesture( + LongPressGesture({ repeat: true }) + .onAction((event: GestureEvent) => { + + }) + .onActionEnd((event: GestureEvent) => { + this.text = '子组件 长按' + }) + ) + } + .gesture( + LongPressGesture({ repeat: true}) + .onAction((event: GestureEvent) => { + + }) + .onActionEnd((event: GestureEvent) => { + this.text2 = '父組件长按 '; + }) + ) + + + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface500.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface500.ets new file mode 100644 index 0000000000000000000000000000000000000000..177f489728f1505d8c9e5d29970e193079e04f98 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface500.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. + */ +@Entry +@Component +struct AceActionGestureGesturegroupInterface500 { + @State borderStyles: BorderStyle = BorderStyle.Solid; + @State text: string = ''; + + build() { + Column() { + Button('button') + .id('AceActionGestureGesturegroupInterface500') + .height(150) + .width(200) + .padding(20) + .margin(20) + .border({ width: 3, style: this.borderStyles }) + .gesture( + GestureGroup(GestureMode.Sequence, + LongPressGesture({ repeat: true }) + .onAction((event: GestureEvent) => { + if (event && event.repeat) { + } + }) + .onActionEnd((event: GestureEvent) => { + this.text += 'LongPressGesture1 success'; + }), + LongPressGesture({ repeat: true }) + .onAction((event: GestureEvent) => { + if (event && event.repeat) { + } + }) + .onActionEnd((event: GestureEvent) => { + this.text += 'LongPressGesture2 success'; + }) + ) + .onCancel(() => { + }) + ) + + Text(this.text).margin({ top: 50 }) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface520.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface520.ets new file mode 100644 index 0000000000000000000000000000000000000000..5c062ee8e4b9ff962343fea185281879347f67fd --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface520.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. + */ +@Entry +@Component +struct AceActionGestureGesturegroupInterface520 { + @State borderStyles: BorderStyle = BorderStyle.Solid; + @State text: string = ''; + + build() { + Column() { + Button('button') + .id('AceActionGestureGesturegroupInterface520') + .height(150) + .width(200) + .padding(20) + .margin(20) + .border({ width: 3, style: this.borderStyles }) + .gesture( + GestureGroup(GestureMode.Sequence, + LongPressGesture({ repeat: true }) + .onAction((event: GestureEvent) => { + if (event && event.repeat) { + } + }) + .onActionEnd((event: GestureEvent) => { + this.text += 'LongPressGesture1 success'; + }), + LongPressGesture({ repeat: true }) + .onAction((event: GestureEvent) => { + if (event && event.repeat) { + } + }) + .onActionEnd((event: GestureEvent) => { + this.text += 'LongPressGesture2 success'; + }) + ) + .onCancel(() => { + }) + ) + + Text(this.text).margin({ top: 50 }) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface530.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface530.ets new file mode 100644 index 0000000000000000000000000000000000000000..2e256164030ddab5dc711fe6481a470dc2c5503c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface530.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. + */ +@Entry +@Component +struct AceActionGestureGesturegroupInterface530 { + @State borderStyles: BorderStyle = BorderStyle.Solid; + @State text: string = ''; + + build() { + Column() { + Button('button') + .id('AceActionGestureGesturegroupInterface530') + .height(150) + .width(200) + .padding(20) + .margin(20) + .border({ width: 3, style: this.borderStyles }) + .gesture( + GestureGroup(GestureMode.Sequence, + LongPressGesture({ repeat: true }) + .onAction((event: GestureEvent) => { + if (event && event.repeat) { + } + }) + .onActionEnd((event: GestureEvent) => { + this.text += 'LongPressGesture1 success'; + }), + LongPressGesture({ repeat: true }) + .onAction((event: GestureEvent) => { + if (event && event.repeat) { + } + }) + .onActionEnd((event: GestureEvent) => { + this.text += 'LongPressGesture2 success'; + }) + ) + .onCancel(() => { + }) + ) + + Text(this.text).margin({ top: 50 }) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface540.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface540.ets new file mode 100644 index 0000000000000000000000000000000000000000..2bcfddd9bc569031873fa2c035f18417411bf49c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface540.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. + */ +@Entry +@Component +struct AceActionGestureGesturegroupInterface540 { + @State borderStyles: BorderStyle = BorderStyle.Solid; + @State text: string = ''; + + build() { + Column() { + Button('button') + .id('AceActionGestureGesturegroupInterface540') + .height(150) + .width(200) + .padding(20) + .margin(20) + .border({ width: 3, style: this.borderStyles }) + .gesture( + GestureGroup(GestureMode.Sequence, + LongPressGesture({ repeat: true,duration:2000 }) + .onAction((event: GestureEvent) => { + if (event && event.repeat) { + } + }) + .onActionEnd((event: GestureEvent) => { + this.text += 'LongPressGesture2000 success'; + }), + LongPressGesture({ repeat: true ,duration:500}) + .onAction((event: GestureEvent) => { + if (event && event.repeat) { + } + }) + .onActionEnd((event: GestureEvent) => { + this.text += 'LongPressGesture500 success'; + }) + ) + .onCancel(() => { + }) + ) + + Text(this.text).margin({ top: 50 }) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface560.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface560.ets new file mode 100644 index 0000000000000000000000000000000000000000..85aecfc2fae8d7e82a78e9ae17ae01efbc7ba533 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface560.ets @@ -0,0 +1,75 @@ +/* + * 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 AceActionGestureGesturegroupInterface560 { + @State rotateAngle: number = 0; + @State speed: number = 1; + @State borderStyles: BorderStyle = BorderStyle.Solid; + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State text: string = ''; + + build() { + Column() { + Button('button') + .id('AceActionGestureGesturegroupInterface560') + .height(150) + .width(200) + .padding(20) + .margin(20) + .border({ width: 3, style: this.borderStyles }) + .rotate({ angle: this.rotateAngle }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + GestureGroup(GestureMode.Exclusive, + SwipeGesture({ direction: SwipeDirection.Vertical,fingers:2 }) + .onAction((event: GestureEvent) => { + if (event) { + this.speed = event.speed; + this.rotateAngle = event.angle; + } + this.text += 'SwipeGesture success'; + }), + PinchGesture({ fingers: 2 }) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.pinchValue = this.scaleValue; + this.text += 'PinchGesture success'; + }) + ) + .onCancel(() => { + }) + ) + Text(this.text).margin({ top: 50 }) + Button('restore') + .id('AceActionGestureGesturegroupInterface560_1') + .onClick(() =>{this.scaleValue = 1; + this.pinchValue = 1; + this.rotateAngle = 0; + }) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface580.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface580.ets new file mode 100644 index 0000000000000000000000000000000000000000..d3113fac9a3c281ff4d1c7d8ed2178c8629639d2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface580.ets @@ -0,0 +1,89 @@ +/* + * 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 AceActionGestureGesturegroupInterface580 { + @State count: number = 0; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + @State borderStyles: BorderStyle = BorderStyle.Solid; + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State text: string = ''; + + build() { + Column() { + Button('button') + .id('AceActionGestureGesturegroupInterface580') + .translate({ x: this.offsetX, y: this.offsetY, z: 0 }) + .height(150) + .width(200) + .padding(20) + .margin(20) + .border({ width: 3, style: this.borderStyles }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + GestureGroup(GestureMode.Exclusive, + PanGesture({ fingers: 2 }) + .onActionStart(() => { + this.borderStyles = BorderStyle.Dashed + }) + .onActionUpdate((event?: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + } + }) + .onActionEnd(() => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + this.borderStyles = BorderStyle.Solid; + this.text += 'PanGesture success'; + }), + PinchGesture({ fingers: 2 }) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.pinchValue = this.scaleValue; + this.text += 'PinchGesture success'; + }) + ) + .onCancel(() => { + }) + ) + + Text(this.text).margin({ top: 50 }) + Button('restore') + .id('AceActionGestureGesturegroupInterface580_1') + .onClick(() =>{ + this.offsetX = 0; + this.offsetY = 0; + this.scaleValue = 1; + this.pinchValue = 1; + }) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface70.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface70.ets new file mode 100644 index 0000000000000000000000000000000000000000..a55dceefc410aac3460eb55e88b74eac1fd72d75 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface70.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. + */ +@Entry +@Component +struct AceActionGestureGesturegroupInterface70 { + @State text: string = 'null'; + @State text2: string = ''; + + build() { + Column() { + Text(this.text+this.text2) + .id('AceActionGestureGesturegroupInterface70') + .fontSize(20) + .width('100%') + .height(500) + .backgroundColor(0xAFEEEE) + .textAlign(TextAlign.Center) + .gesture( + LongPressGesture({ repeat: true }) + .onAction((event: GestureEvent) => { + + }) + .onActionEnd((event: GestureEvent) => { + this.text = '子组件 长按' + }) + ) + } + .gesture( + LongPressGesture({ repeat: true}) + .onAction((event: GestureEvent) => { + + }) + .onActionEnd((event: GestureEvent) => { + this.text2 = '父組件长按 ' + }), GestureMask.IgnoreInternal) + + + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface90.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface90.ets new file mode 100644 index 0000000000000000000000000000000000000000..f2652ca575388a10ab71f0a23a8eceb9eb0806af --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface90.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 AceActionGestureGesturegroupInterface90 { + @State text: string = 'null'; + @State text2: string = ''; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + + + build() { + Column() { + Text(this.text+this.text2) + .id('AceActionGestureGesturegroupInterface90') + .fontSize(20) + .width('100%') + .height(500) + .backgroundColor(0xAFEEEE) + .textAlign(TextAlign.Center) + .gesture( + LongPressGesture({ repeat: true }) + .onAction((event: GestureEvent) => { + + }) + .onActionEnd((event: GestureEvent) => { + this.text = '子组件 长按' + }) + ) + } + .gesture( + PanGesture({ }) + .onActionStart(() => { + }) + .onActionUpdate((event?: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + }}), GestureMask.IgnoreInternal) + + + + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge10.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge10.ets new file mode 100644 index 0000000000000000000000000000000000000000..4814af48e4427242ec4a27dab767d4b30c0adde3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge10.ets @@ -0,0 +1,42 @@ +/* + * 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 AceActionGestureJudge10 { + @State messege2: string = ""; + + build() { + Column() { + Button('LongPressGestureEvent') + + Column(){ + Text( this.messege2) + }.backgroundColor(Color.Green) + .id('AceActionGestureJudge10') + .height(300) + .width('80%') + .gesture( + TapGesture({ count: 1 }) + .onAction((event: GestureEvent) => { + + }) + ) + .onGestureJudgeBegin((gestureInfo: GestureInfo, event: BaseGestureEvent) => { + this.messege2 = 'Tag: '+ gestureInfo.tag; + return GestureJudgeResult.CONTINUE; + }) + }.width('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge120.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge120.ets new file mode 100644 index 0000000000000000000000000000000000000000..0063e279eae5332219224b3adda1a5045a46417a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge120.ets @@ -0,0 +1,40 @@ +/* + * 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 AceActionGestureJudge120 { + @State messege2: string = ""; + + build() { + Column() { + Button('LongPressGestureEvent') + + Button('Click twice') + .id('AceActionGestureJudge120') + .gesture( + TapGesture({ count: 1 }) + .onAction((event: GestureEvent) => { + this.messege2 = 'TapGesture onAction' + }) + ) + .onGestureJudgeBegin((gestureInfo: GestureInfo, event: BaseGestureEvent) => { + this.messege2 = "pressure " + event.pressure + " fingerList.length " + event.fingerList.length + + " timeStamp " + event.timestamp + " sourceType " + event.source.toString() + " sourcePool " + event.sourceTool.toString() + return GestureJudgeResult.CONTINUE; + }) + Text(this.messege2) + }.width('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge130.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge130.ets new file mode 100644 index 0000000000000000000000000000000000000000..ce9d56b3abf8b24d2001bd97af4ed8ef3f33276b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge130.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. + */ +@Entry +@Component +struct AceActionGestureJudge130 { + @State messege2: string = ""; + + build() { + Column() { + Button('LongPressGestureEvent') + + Column(){ + Text('Log: '+ this.messege2) + }.backgroundColor(Color.Red) + .id('AceActionGestureJudge130') + .height(300) + .width('80%') + .gesture( + LongPressGesture({ repeat: true }) + .onAction((event: GestureEvent) => { + }) + .onActionEnd((event: GestureEvent) => { + }) + ) + .onGestureJudgeBegin((gestureInfo: GestureInfo, event: BaseGestureEvent) => { + this.messege2 = "pressure " + event.pressure + " fingerList.length " + event.fingerList.length + + " timeStamp " + event.timestamp + " sourceType " + event.source.toString() + " sourcePool " + event.sourceTool.toString() + return GestureJudgeResult.CONTINUE; + }) + }.width('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge140.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge140.ets new file mode 100644 index 0000000000000000000000000000000000000000..4bf79f8cc6dbaf790276f477adccbcd528c90199 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge140.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 AceActionGestureJudge140 { + @State messege2: string = ""; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + private panOption: PanGestureOptions = new PanGestureOptions({ direction: PanDirection.Left | PanDirection.Right }); + + build() { + Row() { + Column(){ + Button('PanGestureEvent') + .id('AceActionGestureJudge140') + .zIndex(20) + .margin({top:100}) + .translate({ x: this.offsetX, y: this.offsetY, z: 0 }) + .gesture( + PanGesture(this.panOption) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX; + this.positionY = this.offsetY + }) + ) + .onGestureJudgeBegin((gestureInfo: GestureInfo, event: BaseGestureEvent) => { + this.messege2 = 'isSystemGesture '+gestureInfo.isSystemGesture; + return GestureJudgeResult.CONTINUE; + }) + Button('restore') + .id('AceActionGestureJudge140_1') + .onClick(() =>{ + this.offsetX = 0; + this.offsetY = 0; + }) + }.backgroundColor(Color.Green).height(300) + .width('50%') + }.width('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge150.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge150.ets new file mode 100644 index 0000000000000000000000000000000000000000..92a4104aa6a04677dbef16b9d010fb49ce62f90f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge150.ets @@ -0,0 +1,66 @@ +/* + * 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 AceActionGestureJudge150 { + @State messege2: string = ""; + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + + build() { + Column() { + Button('SwipeGestureEvent') + + Column(){ + Text('Log: '+ this.messege2) + }.backgroundColor(Color.Red) + .id('AceActionGestureJudge150') + .height(300) + .width('80%') + .scale({ x: this.scaleValue, y: this.scaleValue }) + .gesture( + PinchGesture({ fingers: 2 }) + .onActionStart((event: GestureEvent) => { + console.info('Pinch start') + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale + this.pinchX = event.pinchCenterX + this.pinchY = event.pinchCenterY + } + }) + .onActionEnd((event: GestureEvent) => { + this.pinchValue = this.scaleValue + console.info('Pinch end') + }) + ) + .onGestureJudgeBegin((gestureInfo: GestureInfo, event: BaseGestureEvent) => { + this.messege2 = "pressure " + event.pressure + " fingerList.length " + event.fingerList.length + + " timeStamp " + event.timestamp + " sourceType " + event.source.toString() + " titleX " + event.tiltX + " titleY " + event.tiltY + " sourcePool " + event.sourceTool.toString() + return GestureJudgeResult.CONTINUE; + }) + + Button('restore') + .id('AceActionGestureJudge150_1') + .onClick(()=>{ + this.scaleValue = 1; + this.pinchValue = 1; + }) + }.width('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge160.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge160.ets new file mode 100644 index 0000000000000000000000000000000000000000..1430adaa135f27d2060db7d3692650266cfa6837 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge160.ets @@ -0,0 +1,43 @@ +/* + * 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 AceActionGestureJudge160 { + @State messege2: string = ""; + + build() { + Column() { + Button('SwipeGestureEvent') + + Column(){ + Text('Log: '+ this.messege2) + }.backgroundColor(Color.Red) + .id('AceActionGestureJudge160') + .height(300) + .width('80%') + .gesture( + SwipeGesture({ direction: SwipeDirection.Horizontal }) + .onAction((event: GestureEvent) => { + + }) + ) + .onGestureJudgeBegin((gestureInfo: GestureInfo, event: BaseGestureEvent) => { + this.messege2 = "pressure " + event.pressure + " fingerList.length " + event.fingerList.length + + " timeStamp " + event.timestamp + " sourceType " + event.source.toString() + " titleX " + event.tiltX + " titleY " + event.tiltY + " sourcePool " + event.sourceTool.toString() + return GestureJudgeResult.CONTINUE; + }) + }.width('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge170.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge170.ets new file mode 100644 index 0000000000000000000000000000000000000000..80d45e3c399e21f068c0cdbc5fcb792c980ec6f9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge170.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. + */ +@Entry +@Component +struct AceActionGestureJudge170 { + @State messege2: string = ""; + @State angle: number = 0; + @State rotateValue: number = 0; + + build() { + Column() { + Button('SwipeGestureEvent') + + Column(){ + Text('Log: '+ this.messege2) + }.backgroundColor(Color.Red) + .id('AceActionGestureJudge170') + .height(300) + .width('80%') + .rotate({ angle: this.angle }) + .gesture( + RotationGesture() + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + this.angle = this.rotateValue + event.angle; + }) + .onActionEnd((event: GestureEvent) => { + }) + ) + .onGestureJudgeBegin((gestureInfo: GestureInfo, event: BaseGestureEvent) => { + this.messege2 = "pressure " + event.pressure + " fingerList.length " + event.fingerList.length + + " timeStamp " + event.timestamp + " sourceType " + event.source.toString() + " titleX " + event.tiltX + " titleY " + event.tiltY + " sourcePool " + event.sourceTool.toString() + return GestureJudgeResult.CONTINUE; + }) + }.width('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge180.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge180.ets new file mode 100644 index 0000000000000000000000000000000000000000..a995318e2bd9ce98deea677c0a7e9fbd8c50a2a2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge180.ets @@ -0,0 +1,41 @@ +/* + * 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 AceActionGestureJudge180 { + @State messege2: string = ""; + + build() { + Column() { + Button('LongPressGestureEvent') + + Button('Click twice') + .id('AceActionGestureJudge180') + .gesture( + TapGesture({ count: 2 }) + .onAction((event: GestureEvent) => { + this.messege2 = 'TapGesture onAction' + }) + ) + .onGestureJudgeBegin((gestureInfo: GestureInfo, event: BaseGestureEvent) => { + if (gestureInfo.type == GestureControl.GestureType.TAP_GESTURE) { + return GestureJudgeResult.CONTINUE; + } + return GestureJudgeResult.REJECT; + }) + Text(this.messege2) + }.width('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge190.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge190.ets new file mode 100644 index 0000000000000000000000000000000000000000..8ba5a59a6a66446744129caeecea983bea8d08cd --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge190.ets @@ -0,0 +1,48 @@ +/* + * 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 AceActionGestureJudge190 { + @State messege2: string = ""; + + build() { + Column() { + Button('LongPressGestureEvent') + + Column(){ + Text('Log: '+ this.messege2) + }.backgroundColor(Color.Red) + .id('AceActionGestureJudge190') + .height(300) + .width('80%') + .gesture( + LongPressGesture({ repeat: true }) + .onAction((event: GestureEvent) => { + this.messege2 = this.messege2 +'gesturelnfo onAction' ; + + }) + .onActionEnd((event: GestureEvent) => { + this.messege2 = this.messege2 +'gesturelnfo onActionEnd'; + }) + ) + .onGestureJudgeBegin((gestureInfo: GestureInfo, event: BaseGestureEvent) => { + if (gestureInfo.type == GestureControl.GestureType.LONG_PRESS_GESTURE) { + return GestureJudgeResult.CONTINUE; + } + return GestureJudgeResult.REJECT; + }) + }.width('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge20.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge20.ets new file mode 100644 index 0000000000000000000000000000000000000000..473787d9163492bc71ddc7854a0f2ad6514449ca --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge20.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 AceActionGestureJudge20 { + @State messege2: string = ""; + + build() { + Column() { + Button('LongPressGestureEvent') + + Column(){ + Text('Log: '+ this.messege2) + }.backgroundColor(Color.Green) + .id('AceActionGestureJudge20') + .height(300) + .width('80%') + .gesture( + TapGesture({ count: 1 }) + .tag('TapGesture1') + .onAction((event: GestureEvent) => { + + }) + ) + .onGestureJudgeBegin((gestureInfo: GestureInfo, event: BaseGestureEvent) => { + if (gestureInfo.tag == 'TapGesture') { + this.messege2 = 'TapGesture success'; + } + console.log("gestureInfo Type " + gestureInfo.type.toString() + " isSystemGesture " + gestureInfo.isSystemGesture); + return GestureJudgeResult.CONTINUE; + }) + }.width('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge200.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge200.ets new file mode 100644 index 0000000000000000000000000000000000000000..55d4486a1160c5e38176cbea02e80d177185a997 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge200.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 AceActionGestureJudge200 { + @State messege2: string = ""; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + private panOption: PanGestureOptions = new PanGestureOptions({ direction: PanDirection.Left | PanDirection.Right }); + + build() { + Row() { + Column(){ + Text('log: '+ this.messege2) + Button('PanGestureEvent') + .id('AceActionGestureJudge200') + .zIndex(20) + .margin({top:100}) + .translate({ x: this.offsetX, y: this.offsetY, z: 0 }) + .gesture( + PanGesture(this.panOption) + .onActionStart((event: GestureEvent) => { + this.messege2 ='Pan start'; + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + if(this.messege2 == 'Pan start') { + this.messege2 = this.messege2 + 'pan onActionUpdate'; + } + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + this.messege2 = this.messege2+'Pan end'; + }) + ) + .onGestureJudgeBegin((gestureInfo: GestureInfo, event: BaseGestureEvent) => { + if (gestureInfo.type == GestureControl.GestureType.PAN_GESTURE) { + return GestureJudgeResult.CONTINUE; + } + return GestureJudgeResult.REJECT; + }) + Button('restore') + .id('AceActionGestureJudge200_1') + .onClick(() =>{ + this.offsetX = 0; + this.offsetY = 0; + }) + }.backgroundColor(Color.Green).height(300) + .width('50%') + }.width('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge210.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge210.ets new file mode 100644 index 0000000000000000000000000000000000000000..d0385a24e79468b207c6724840fc822b05428211 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge210.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 AceActionGestureJudge210 { + @State messege2: string = ""; + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + + build() { + Column() { + Button('SwipeGestureEvent') + + Column(){ + Text('Log: '+ this.messege2) + }.backgroundColor(Color.Red) + .id('AceActionGestureJudge210') + .height(300) + .width('80%') + .scale({ x: this.scaleValue, y: this.scaleValue }) + .gesture( + PinchGesture({ fingers: 2 }) + .onActionStart((event: GestureEvent) => { + this.messege2 = 'Pinch start' + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale + this.pinchX = event.pinchCenterX + this.pinchY = event.pinchCenterY + this.messege2 = this.messege2+ 'Pinch onActionUpdate' + } + }) + .onActionEnd((event: GestureEvent) => { + this.pinchValue = this.scaleValue + this.messege2 = this.messege2+ 'Pinch end' + }) + ) + .onGestureJudgeBegin((gestureInfo: GestureInfo, event: BaseGestureEvent) => { + if (gestureInfo.type == GestureControl.GestureType.PINCH_GESTURE) { + return GestureJudgeResult.CONTINUE; + } + return GestureJudgeResult.REJECT; + }) + + Button('restore') + .id('AceActionGestureJudge210_1') + .onClick(()=>{ + this.scaleValue = 1; + this.pinchValue = 1; + }) + }.width('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge220.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge220.ets new file mode 100644 index 0000000000000000000000000000000000000000..cb7048dbe5737ac38fd2633e02cd6db8c91f2049 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge220.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. + */ +@Entry +@Component +struct AceActionGestureJudge220 { + @State messege2: string = ""; + + build() { + Column() { + Button('SwipeGestureEvent') + + Column(){ + Text('Log: '+ this.messege2) + }.backgroundColor(Color.Red) + .id('AceActionGestureJudge220') + .height(300) + .width('80%') + .gesture( + SwipeGesture({ direction: SwipeDirection.Horizontal }) + .onAction((event: GestureEvent) => { + this.messege2 = 'SwipeGesture onAction' + }) + ) + .onGestureJudgeBegin((gestureInfo: GestureInfo, event: BaseGestureEvent) => { + if (gestureInfo.type == GestureControl.GestureType.SWIPE_GESTURE) { + return GestureJudgeResult.CONTINUE; + } + return GestureJudgeResult.REJECT; + }) + }.width('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge230.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge230.ets new file mode 100644 index 0000000000000000000000000000000000000000..f0d0e73dc2ebc3eaae99315d569d1c4993dc765e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge230.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 AceActionGestureJudge230 { + @State messege2: string = ""; + @State angle: number = 0; + @State rotateValue: number = 0; + + build() { + Column() { + Button('SwipeGestureEvent') + + Column(){ + Text('Log: '+ this.messege2) + }.backgroundColor(Color.Red) + .id('AceActionGestureJudge230') + .height(300) + .width('80%') + .rotate({ angle: this.angle }) + .gesture( + RotationGesture() + .onActionStart((event: GestureEvent) => { + this.messege2 = 'Rotation start' + }) + .onActionUpdate((event: GestureEvent) => { + + this.angle = this.rotateValue + event.angle; + if(this.messege2 == 'Rotation start'){ + this.messege2 = this.messege2 + 'Rotation onActionUpdate' + } + + }) + .onActionEnd((event: GestureEvent) => { + this.messege2 = this.messege2 + 'Rotation end' + }) + ) + .onGestureJudgeBegin((gestureInfo: GestureInfo, event: BaseGestureEvent) => { + if (gestureInfo.type == GestureControl.GestureType.ROTATION_GESTURE) { + return GestureJudgeResult.CONTINUE; + } + return GestureJudgeResult.REJECT; + }) + Button('restore') + .id('AceActionGestureJudge230_1') + .onClick(() =>{ + this.angle = 0; + this.rotateValue= 0; + }) + }.width('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge270.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge270.ets new file mode 100644 index 0000000000000000000000000000000000000000..4bf1e379b27fc20403db188f2ff4ebd3d6173275 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge270.ets @@ -0,0 +1,63 @@ +/* + * 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 AceActionGestureJudge270 { + @State text:string='Null' + build() { + Column({ space: 5 }) { + Button('one button dialog') + .id('AceActionGestureJudge270') + .onGestureJudgeBegin((gestureInfo: GestureInfo, event: BaseGestureEvent) => { + if (gestureInfo.type == GestureControl.GestureType.CLICK) { + this.text = 'GestureControl.GestureType.CLICKis true'; + } + return GestureJudgeResult.CONTINUE; + }) + .onClick(() => { + AlertDialog.show( + { + title: 'title', + message: this.text, + autoCancel: true, + alignment: DialogAlignment.Bottom, + offset: { dx: 0, dy: -20 }, + gridCount: 3, + confirm: { + value: 'button', + action: () => { + console.info('Button-clicking callback') + } + }, + cancel: () => { + console.info('Closed callbacks') + }, + 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() + } + } + } + ) + }) + .backgroundColor(0x317aff) + }.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/AceActionGestureJudge/AceActionGestureJudge290.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge290.ets new file mode 100644 index 0000000000000000000000000000000000000000..be116df61895ae4899c663d0d888b1df0c960f43 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge290.ets @@ -0,0 +1,119 @@ +/* + * 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 { unifiedDataChannel, uniformTypeDescriptor } from '@kit.ArkData'; + +@Entry +@Component +struct AceActionGestureJudge290 { + @State uri: string = ""; + @State AblockArr: string[] = []; + @State BblockArr: string[] = []; + @State AVisible: Visibility = Visibility.Visible; + @State dragSuccess :Boolean = false; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + + build() { + Column() { + Text('Image拖拽') + .fontSize('30dp') + Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceAround }) { + Image($r('app.media.icon')) + .width(100) + .height(100) + .border({ width: 1 }) + .visibility(this.AVisible) + .draggable(true) + .id('AceActionGestureJudge290_1') + .translate({ x: this.offsetX, y: this.offsetY, z: 0 }) + .gesture( + PanGesture() + .onActionStart((event: GestureEvent) => { + console.info('Pan start') + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX + this.offsetY = this.positionY + event.offsetY + } + }) + .onActionEnd(() => { + this.positionX = this.offsetX + this.positionY = this.offsetY + }) + ) + .onGestureJudgeBegin((gestureInfo: GestureInfo, event: BaseGestureEvent) => { + this.uri = 'GestureControl.GestureType.DRAG is true'; + return GestureJudgeResult.CONTINUE; + }) + } + .margin({ bottom: 20 }) + Row() { + Column(){ + Text('不允许释放区域') + .fontSize('15dp') + .height('10%') + List(){ + ForEach(this.AblockArr, (item:string, index) => { + ListItem() { + Image(item) + .width(100) + .height(100) + .border({width: 1}) + } + .margin({ left: 30 , top : 30}) + }, (item:string) => item) + } + .height('90%') + .width('100%') + .allowDrop([uniformTypeDescriptor.UniformDataType.TEXT]) + .border({width: 1}) + } + .height("50%") + .width("45%") + .border({ width: 1 }) + .margin({ left: 12 }) + Column(){ + Text('可释放区域') + .fontSize('15dp') + .height('10%') + List(){ + ForEach(this.BblockArr, (item:string, index) => { + ListItem() { + Image(item) + .width(100) + .height(100) + .border({width: 1}) + } + .margin({ left: 30 , top : 30}) + }, (item:string) => item) + } + .border({width: 1}) + .height('90%') + .width('100%') + .allowDrop([uniformTypeDescriptor.UniformDataType.IMAGE]) + } + .id('AceActionGestureJudge290_2') + .height("50%") + .width("45%") + .border({ width: 1 }) + .margin({ left: 12 }) + } + Text('log: ' + this.uri) + }.width('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge30.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge30.ets new file mode 100644 index 0000000000000000000000000000000000000000..040df0343b4597993e50d0e570dae4c3f5497a6f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge30.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 AceActionGestureJudge30 { + @State messege2: string = ""; + + build() { + Column() { + Button('LongPressGestureEvent') + + Column(){ + Text('Log: '+ this.messege2) + }.backgroundColor(Color.Green) + .id('AceActionGestureJudge30') + .height(300) + .width('80%') + .gesture( + TapGesture({ count: 1 }) + .tag('TapGesture') + .onAction((event: GestureEvent) => { + + }) + ) + .onGestureJudgeBegin((gestureInfo: GestureInfo, event: BaseGestureEvent) => { + if (gestureInfo.tag == 'TapGesture') { + this.messege2 = 'TapGesture success'; + } + console.log("gestureInfo Type " + gestureInfo.type.toString() + " isSystemGesture " + gestureInfo.isSystemGesture); + return GestureJudgeResult.CONTINUE; + }) + }.width('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge300.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge300.ets new file mode 100644 index 0000000000000000000000000000000000000000..edfafa7b9ee0c25948006b7f69f4b2ddb697846f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge300.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 { unifiedDataChannel, uniformTypeDescriptor } from '@kit.ArkData'; + +@Entry +@Component +struct AceActionGestureJudge300 { + @State messege1: string = ""; + + @State messege2: string = ""; + + build() { + Column() { + Column(){ + Text("上层区域" +this.messege1) + }.backgroundColor(Color.Red) + .id('AceActionGestureJudge300_1') + .height(300) + .width('80%') + .gesture( + TapGesture({ count: 2 }) + .onAction((event: GestureEvent) => { + this.messege1 = 'TapGesture success' + }) + ) + .onGestureJudgeBegin((gestureInfo: GestureInfo, event: BaseGestureEvent) => { + this.messege1 = 'TapGesture success' + return GestureJudgeResult.CONTINUE; + }) + Column(){ + Text('下层区域'+ this.messege2) + }.backgroundColor(Color.Green) + .id('AceActionGestureJudge300_2') + .height(300) + .width('80%') + .gesture( + TapGesture({ count: 2 }) + .onAction((event: GestureEvent) => { + }) + ) + .onGestureJudgeBegin((gestureInfo: GestureInfo, event: BaseGestureEvent) => { + this.messege2 = 'TapGesture success'; + return GestureJudgeResult.CONTINUE; + }) + }.width('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge40.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge40.ets new file mode 100644 index 0000000000000000000000000000000000000000..7105e5bd3c77dfaca990de18c296c2837a99d88c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge40.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. + */ +@Entry +@Component +struct AceActionGestureJudge40 { + @State messege2: string = ""; + + build() { + Column() { + Button('LongPressGestureEvent') + + Button('Click twice') + .id('AceActionGestureJudge40') + .gesture( + TapGesture({ count: 2 }) + .onAction((event: GestureEvent) => { + }) + ) + .onGestureJudgeBegin((gestureInfo: GestureInfo, event: BaseGestureEvent) => { + this.messege2 = 'isSystemGesture '+gestureInfo.isSystemGesture; + return GestureJudgeResult.CONTINUE; + }) + Text(this.messege2) + }.width('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge50.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge50.ets new file mode 100644 index 0000000000000000000000000000000000000000..37e312017e5b119201dd77e9e019932932135a34 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge50.ets @@ -0,0 +1,43 @@ +/* + * 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 AceActionGestureJudge50 { + @State messege2: string = ""; + + build() { + Column() { + Button('LongPressGestureEvent') + + Column(){ + Text('Log: '+ this.messege2) + }.backgroundColor(Color.Red) + .id('AceActionGestureJudge50') + .height(300) + .width('80%') + .gesture( + LongPressGesture({ repeat: true }) + .onAction((event: GestureEvent) => { + }) + .onActionEnd((event: GestureEvent) => { + }) + ) + .onGestureJudgeBegin((gestureInfo: GestureInfo, event: BaseGestureEvent) => { + this.messege2 = 'isSystemGesture '+gestureInfo.isSystemGesture; + return GestureJudgeResult.CONTINUE; + }) + }.width('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge60.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge60.ets new file mode 100644 index 0000000000000000000000000000000000000000..a0f9bf4a69267e50ba300a971e63ef841e0be8df --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge60.ets @@ -0,0 +1,63 @@ +/* + * 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 AceActionGestureJudge60 { + @State messege2: string = ""; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + private panOption: PanGestureOptions = new PanGestureOptions({ direction: PanDirection.Left | PanDirection.Right }); + + build() { + Row() { + Column(){ + Text('log: '+ this.messege2) + Button('PanGestureEvent') + .id('AceActionGestureJudge60') + .zIndex(20) + .margin({top:100}) + .translate({ x: this.offsetX, y: this.offsetY, z: 0 }) + .gesture( + PanGesture(this.panOption) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + }) + ) + .onGestureJudgeBegin((gestureInfo: GestureInfo, event: BaseGestureEvent) => { + this.messege2 = 'isSystemGesture '+gestureInfo.isSystemGesture; + return GestureJudgeResult.CONTINUE; + }) + Button('restore') + .id('AceActionGestureJudge60_1') + .onClick(() =>{ + this.offsetX = 0; + this.offsetY = 0; + }) + }.backgroundColor(Color.Green).height(300) + .width('50%') + }.width('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge70.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge70.ets new file mode 100644 index 0000000000000000000000000000000000000000..6c59e8edb99a21d97d221bde3fdb6cbea90f6d00 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge70.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 AceActionGestureJudge70 { + @State messege2: string = ""; + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + + build() { + Column() { + Button('SwipeGestureEvent') + + Column(){ + Text('Log: '+ this.messege2) + }.backgroundColor(Color.Red) + .id('AceActionGestureJudge70') + .height(300) + .width('80%') + .scale({ x: this.scaleValue, y: this.scaleValue }) + .gesture( + PinchGesture({ fingers: 2 }) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.pinchValue = this.scaleValue; + }) + ) + .onGestureJudgeBegin((gestureInfo: GestureInfo, event: BaseGestureEvent) => { + this.messege2 = 'isSystemGesture '+gestureInfo.isSystemGesture; + return GestureJudgeResult.CONTINUE; + }) + Button('restore') + .id('AceActionGestureJudge70_1') + .onClick(() =>{ + this.scaleValue = 1; + this.pinchValue = 1; + }) + }.width('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge80.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge80.ets new file mode 100644 index 0000000000000000000000000000000000000000..654e8ad0d40d44b9776bbeb3c975f47b4b798553 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge80.ets @@ -0,0 +1,41 @@ +/* + * 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 AceActionGestureJudge80 { + @State messege2: string = ""; + + build() { + Column() { + Button('SwipeGestureEvent') + + Column(){ + Text('Log: '+ this.messege2) + }.backgroundColor(Color.Red) + .id('AceActionGestureJudge80') + .height(300) + .width('80%') + .gesture( + SwipeGesture({ direction: SwipeDirection.Horizontal }) + .onAction((event: GestureEvent) => { + }) + ) + .onGestureJudgeBegin((gestureInfo: GestureInfo, event: BaseGestureEvent) => { + this.messege2 = 'isSystemGesture '+gestureInfo.isSystemGesture; + return GestureJudgeResult.CONTINUE; + }) + }.width('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge90.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge90.ets new file mode 100644 index 0000000000000000000000000000000000000000..7fb4886c01b815bbcdc30d038c6666e4223909fd --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureJudge/AceActionGestureJudge90.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 AceActionGestureJudge90 { + @State messege2: string = ""; + @State angle: number = 0; + @State rotateValue: number = 0; + + build() { + Column() { + Button('SwipeGestureEvent') + + Column(){ + Text('Log: '+ this.messege2) + }.backgroundColor(Color.Red) + .id('AceActionGestureJudge90') + .height(300) + .width('80%') + .rotate({ angle: this.angle }) + .gesture( + RotationGesture() + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle + } + }) + .onActionEnd((event: GestureEvent) => { + }) + ) + .onGestureJudgeBegin((gestureInfo: GestureInfo, event: BaseGestureEvent) => { + this.messege2 = 'isSystemGesture '+gestureInfo.isSystemGesture; + return GestureJudgeResult.CONTINUE; + }) + Button('restore') + .id('AceActionGestureJudge90_1') + .onClick(() =>{ + this.angle = 0; + this.rotateValue= 0; + }) + }.width('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureMonopolize/AceActionGestureMonopolize10.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureMonopolize/AceActionGestureMonopolize10.ets new file mode 100644 index 0000000000000000000000000000000000000000..0660bd62805e3294db87c22591a9129d96ca6676 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureMonopolize/AceActionGestureMonopolize10.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 AceActionGestureMonopolize10 { + @State count: number = 0; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + @State message1: string = 'button2 '; + @State message2: string = 'button1 '; + @State message3: string = 'button1 '; + @State borderStyles: BorderStyle = BorderStyle.Solid; + build() { + Column() { + Column() { + Text('button1 log:'+this.message1).fontSize(15) + Text('button2 log:'+this.message2).fontSize(15) + } + .height(300) + .width(200) + .padding(30) + .margin(30) + Button('button1') + .id('AceActionGestureMonopolize10_1') + .translate({ x: this.offsetX, y: this.offsetY, z: 0 }) + .fontSize(22) + .margin(10) + .monopolizeEvents(true) + .onTouch((event?: TouchEvent) => { + this.message1 ='onTouch success' + }) + Button('button2') + .id('AceActionGestureMonopolize10_2') + .fontSize(22) + .margin(10) + .onTouch((event?: TouchEvent) => { + this.message2 ='onTouch success' + }) + } + .height('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureMonopolize/AceActionGestureMonopolize140.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureMonopolize/AceActionGestureMonopolize140.ets new file mode 100644 index 0000000000000000000000000000000000000000..385ae06c065da6beb2551a6a1621832c561b8a44 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureMonopolize/AceActionGestureMonopolize140.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 AceActionGestureMonopolize140 { + @State message1: string = 'button2 '; + @State message2: string = 'button1 '; + @State borderStyles: BorderStyle = BorderStyle.Solid; + build() { + Column() { + Column() { + Text('button1 log:'+this.message1).fontSize(15) + Text('button2 log:'+this.message2).fontSize(15) + } + .height(300) + .width(200) + .padding(30) + .margin(30) + Button('button1') + .id('AceActionGestureMonopolize140_1') + .fontSize(22) + .margin(10) + .monopolizeEvents(true) + .onClick(() =>{ + this.message1='onClick success' + }) + + } + .height('100%') + .id('AceActionGestureMonopolize140_2') + .backgroundColor(Color.Gray) + .onTouch((event?: TouchEvent) => { + this.message2 ='outside columntouchdown' + }) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureMonopolize/AceActionGestureMonopolize50.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureMonopolize/AceActionGestureMonopolize50.ets new file mode 100644 index 0000000000000000000000000000000000000000..b77ed7ef951c970a00988a69c2f4fa1c58ffbc93 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureMonopolize/AceActionGestureMonopolize50.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 AceActionGestureMonopolize50 { + @State message1: string = 'Column '; + @State message2: string = 'button '; + @State borderStyles: BorderStyle = BorderStyle.Solid; + build() { + Column() { + Column() { + Text('button1 log:'+this.message1).fontSize(15) + Text('button2 log:'+this.message2).fontSize(15) + } + .height(300) + .width(200) + .padding(30) + .margin(30) + Button('button1') + .id('AceActionGestureMonopolize50_1') + .fontSize(22) + .margin(10) + .monopolizeEvents(false) + .gesture( + LongPressGesture({ repeat: true }) + .onAction((event: GestureEvent) => { + this.message2 = 'button LongPressGesture Sucesses' + }) + ) + + } + .height('100%') + .id('AceActionGestureMonopolize50_2') + .backgroundColor(Color.Gray) + .gesture( GestureGroup(GestureMode.Parallel, + LongPressGesture({ repeat: true }) + .onAction((event: GestureEvent) => { + this.message1 = 'Column LongPressGesture Sucesses' + }) + )) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureMonopolize/AceActionGestureMonopolize70.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureMonopolize/AceActionGestureMonopolize70.ets new file mode 100644 index 0000000000000000000000000000000000000000..a0ad7c6760b64f4a40458a39f5c41decfcf53069 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureMonopolize/AceActionGestureMonopolize70.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 AceActionGestureMonopolize70 { + @State message1: string = 'Column '; + @State message2: string = 'button '; + @State borderStyles: BorderStyle = BorderStyle.Solid; + build() { + Column() { + Column() { + Text(' colum log:'+this.message1).fontSize(15) + Text(' button log:'+this.message2).fontSize(15) + } + .height(300) + .width(200) + .padding(30) + .margin(30) + Button('button1') + .id('AceActionGestureMonopolize70_1') + .fontSize(22) + .margin(10) + .monopolizeEvents(true) + .gesture( + TapGesture({ count: 1 }) + .onAction((event: GestureEvent) => { + this.message2 = 'TapGesture success' + }) + ) + + } + .height('100%') + .id('AceActionGestureMonopolize70_2') + .backgroundColor(Color.Gray) + .gesture( GestureGroup(GestureMode.Parallel, + LongPressGesture({ repeat: true }) + .onAction((event: GestureEvent) => { + this.message1 = 'LongPressGesture onAction success' + }) + )) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureMonopolize/AceActionGestureMonopolize90.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureMonopolize/AceActionGestureMonopolize90.ets new file mode 100644 index 0000000000000000000000000000000000000000..41761cd1d3d43d21b6a5c481ae2ccf39c85fd3c8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AceActionGestureMonopolize/AceActionGestureMonopolize90.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. + */ +@Entry +@Component +struct AceActionGestureMonopolize90 { + @State count: number = 0; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + @State message1: string = 'button2 '; + @State message2: string = 'button1 '; + @State message3: string = 'button1 '; + @State borderStyles: BorderStyle = BorderStyle.Solid; + build() { + Column() { + Column() { + Text(this.message1).fontSize(15) + Text(this.message2).fontSize(15) + Text(this.message3).fontSize(15) + } + .height(300) + .width(200) + .padding(30) + .margin(30) + Button('button1') + .id('AceActionGestureMonopolize90_1') + .translate({ x: this.offsetX, y: this.offsetY, z: 0 }) + .fontSize(22) + .margin(10) + .monopolizeEvents(true) + .onClick(()=>{ + }) + .gesture( + // 以下组合手势为顺序识别,当长按手势事件未正常触发时则不会触发拖动手势事件 + GestureGroup(GestureMode.Sequence, + LongPressGesture({ fingers:2, repeat: true }) + .onAction((event?: GestureEvent) => { + if (event && event.repeat) { + this.count++ + } + this.message2 ='button1 LongPress ' + }), + PanGesture() + .onActionStart(() => { + this.borderStyles = BorderStyle.Dashed + this.message2 ='button1 pan start' + }) + .onActionUpdate((event?: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX + this.offsetY = this.positionY + event.offsetY + } + this.message2 ='button1 pan update' + }) + .onActionEnd(() => { + this.positionX = this.offsetX + this.positionY = this.offsetY + this.borderStyles = BorderStyle.Solid + this.message2 ='button1 pan end' + }) + )) + .gesture( + TapGesture({ count: 1 }) + .onAction((event: GestureEvent) => { + this.message3 = 'button1 tap' + }) + ) + Button('button2') + .id('AceActionGestureMonopolize90_2') + .fontSize(22) + .margin(10) + .gesture( + PanGesture() + .onActionStart(() => { + this.borderStyles = BorderStyle.Dashed + this.message1 = 'button2 pan start' + }) + .onActionUpdate((event?: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX + this.offsetY = this.positionY + event.offsetY + } + this.message1 ='button2 pan update' + }) + .onActionEnd(() => { + this.positionX = this.offsetX + this.positionY = this.offsetY + this.borderStyles = BorderStyle.Solid + this.message1 ='button2 pan end' + }) + ) + } + .height('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEvenTRegisterComponentsChangeEventCallbackActionsheet/ActionEvenTRegisterComponentsChangeEventCallbackActionsheet010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEvenTRegisterComponentsChangeEventCallbackActionsheet/ActionEvenTRegisterComponentsChangeEventCallbackActionsheet010.ets new file mode 100644 index 0000000000000000000000000000000000000000..96da9bf012dcf29ed178ea57fce41cfa2a1c528b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEvenTRegisterComponentsChangeEventCallbackActionsheet/ActionEvenTRegisterComponentsChangeEventCallbackActionsheet010.ets @@ -0,0 +1,41 @@ +/* + * 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 ActionEvenTRegisterComponentsChangeEventCallbackActionsheet010 { + @State strButton: string = "" + + build() { + Row() { + Column() { + + Button('Button') + .margin({ top: 30 }) + .fontSize(18) + .fontWeight(FontWeight.Bold) + .id("callbackActionsheet010") + .onClick(() => { + this.strButton = "onClick_Text" + }) + Text(this.strButton) + } + .margin({top:50}) + .width('100%') + + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEvenTRegisterComponentsChangeEventCallbackActionsheet/ActionEvenTRegisterComponentsChangeEventCallbackActionsheet020.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEvenTRegisterComponentsChangeEventCallbackActionsheet/ActionEvenTRegisterComponentsChangeEventCallbackActionsheet020.ets new file mode 100644 index 0000000000000000000000000000000000000000..28675b65853d82ac8f967e868b5cc8142d7a884a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEvenTRegisterComponentsChangeEventCallbackActionsheet/ActionEvenTRegisterComponentsChangeEventCallbackActionsheet020.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. + */ +@Entry +@Component +struct ActionEvenTRegisterComponentsChangeEventCallbackActionsheet020 { + @State strText: string = "" + @State strButton: string = "" + + build() { + Row() { + Column() { + Text('text') + .fontSize(18) + .fontWeight(FontWeight.Bold) + .id("callbackActionsheet020_1") + .onClick(() => { + this.strText = "onClick_Text" + }) + + Text(this.strText) + + Button('Button') + .margin({ top: 30 }) + .fontSize(18) + .fontWeight(FontWeight.Bold) + .id("callbackActionsheet020_2") + .onClick(() => { + this.strButton = "onClick_Text" + }) + Text(this.strButton) + } + .margin({top:50}) + .width('100%') + + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventCommoneventChange/ActionEventCommoneventChange0110.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventCommoneventChange/ActionEventCommoneventChange0110.ets new file mode 100644 index 0000000000000000000000000000000000000000..bda455af1ed7a1c61e40d48d62bbf06e3ff590e9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventCommoneventChange/ActionEventCommoneventChange0110.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 ActionEventCommoneventChange0110 { + @State angle: number = 0; + @State rotateValue: number = 0; + @State scaleValue: number = 1; + @State pinchValue: number = 1; + + build() { + Column() { + Button('Rotation') + .responseRegion( + { x: '20px', y: '10px', width: '100%', height: '100%' }) + .id('ActionEventCommoneventChange0110_001') + .rotate({ angle: this.angle }) + .gesture( + RotationGesture() + .onActionStart((event: GestureEvent) => { + console.info('Rotation start') + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle; + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle + console.info('Rotation end') + }) + ) + Column() { + Text('RotationGesture angle:' + this.angle) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(80) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventCommoneventChange/ActionEventCommoneventChange0120.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventCommoneventChange/ActionEventCommoneventChange0120.ets new file mode 100644 index 0000000000000000000000000000000000000000..3d9180996a3d79799403da6d4bb2f315138798e4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventCommoneventChange/ActionEventCommoneventChange0120.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 ActionEventCommoneventChange0120 { + @State angle: number = 0; + @State rotateValue: number = 0; + @State scaleValue: number = 1; + @State pinchValue: number = 1; + + build() { + Column() { + Button('Rotation') + .responseRegion( + { x: '20px', y: '10px', width: '100%', height: '100%' }) + .id('ActionEventCommoneventChange0120_001') + .rotate({ angle: this.angle }) + .gesture( + RotationGesture() + .onActionStart((event: GestureEvent) => { + console.info('Rotation start') + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle; + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle + console.info('Rotation end') + }) + ) + Column() { + Text('RotationGesture angle:' + this.angle) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(80) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventCommoneventChange/ActionEventCommoneventChange0140.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventCommoneventChange/ActionEventCommoneventChange0140.ets new file mode 100644 index 0000000000000000000000000000000000000000..00e8757865c65a3b4813d320ddcafef30e43a70c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventCommoneventChange/ActionEventCommoneventChange0140.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 ActionEventCommoneventChange0140 { + @State angle: number = 0; + @State rotateValue: number = 0; + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State text: string = 'RotationGesture angle:' + + build() { + Column() { + Button('Rotation') + .responseRegion( + { x: '20px', y: '10px', width: '100%', height: '100%' }) + .id('ActionEventCommoneventChange0140_001') + .rotate({ angle: this.angle }) + .gesture( + RotationGesture() + .onActionStart((event: GestureEvent) => { + console.info('Rotation start') + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle; + this.text += 'RotationGesture' + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle + console.info('Rotation end') + }) + ) + Button('restore') + .id('ActionEventCommoneventChange0140_002') + .onClick(() =>{ + this.angle = 0; + }) + Column() { + Text(this.text) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(80) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventCommoneventChange/ActionEventCommoneventChange0340.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventCommoneventChange/ActionEventCommoneventChange0340.ets new file mode 100644 index 0000000000000000000000000000000000000000..ba45f49a3d29bf504c73d7740a8455404bc6d64f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventCommoneventChange/ActionEventCommoneventChange0340.ets @@ -0,0 +1,63 @@ +/* + * 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 ActionEventCommoneventChange0340 { + @State angle: number = 0; + @State rotateValue: number = 0; + @State scaleValue: number = 1; + @State pinchValue: number = 1; + + build() { + Column() { + Button('Pinch') + .responseRegion( + { x: '10px', y: '20px', width: '100%', height: '100%' }) + .id('ActionEventCommoneventChange0340_001') + .rotate({ angle: this.angle }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture() + .onActionStart((event: GestureEvent) => { + console.info('Rotation start') + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle + this.scaleValue = this.pinchValue * event.scale; + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle + console.info('Rotation end') + }) + ) + Column() { + Text('RotationGesture angle:' + this.angle) + Button('restore') + .id('ActionEventCommoneventChange0340_002') + .onClick(() =>{ + this.scaleValue = 1; + this.pinchValue = 1; + }) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(80) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventCommoneventChange/ActionEventCommoneventChange0490.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventCommoneventChange/ActionEventCommoneventChange0490.ets new file mode 100644 index 0000000000000000000000000000000000000000..72362a650cdb8fcb8b9c6a9706efc767596f567f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventCommoneventChange/ActionEventCommoneventChange0490.ets @@ -0,0 +1,64 @@ +@Entry +@Component +struct ActionEventCommoneventChange0490 { + @State offsetX: number = 0 + @State offsetY: number = 0 + @State positionX: number = 0 + @State positionY: number = 0 + private panOption: PanGestureOptions = new PanGestureOptions({ direction: PanDirection.Left | PanDirection.Right }) + @State numbers: String[] = ['0', '1', '2', '3', '4'] + scroller: Scroller = new Scroller() + @State gridPosition: number = 0 + + build() { + Column() { + Column() { + Text('PanGesture offset:\nX: ' + this.offsetX + '\n' + 'Y: ' + this.offsetY) + Grid(this.scroller) { + ForEach(this.numbers, (day: string) => { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + }, (day: string) => day) + } + } + .id('ActionEventCommoneventChange0490_001') + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(50) + .translate({ x: this.offsetX, y: this.offsetY, z: 0 }) + .gesture( + PanGesture(this.panOption) + .onActionStart((event: GestureEvent) => { + console.info('Pan start') + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX + this.offsetY = this.positionY + event.offsetY + } + }) + .onActionEnd(() => { + this.positionX = this.offsetX + this.positionY = this.offsetY + console.info('Pan end') + }) + ) + + Button('修改PanGesture触发条件') + .onClick(() => { + this.panOption.setDirection(PanDirection.All) + this.panOption.setFingers(2) + }) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventCommoneventChange/ActionEventCommoneventChange0520.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventCommoneventChange/ActionEventCommoneventChange0520.ets new file mode 100644 index 0000000000000000000000000000000000000000..f3e1bf8b1afb2b5f7a837dc7e1ea86eacec04a34 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventCommoneventChange/ActionEventCommoneventChange0520.ets @@ -0,0 +1,64 @@ +@Entry +@Component +struct ActionEventCommoneventChange0520 { + @State offsetX: number = 0 + @State offsetY: number = 0 + @State positionX: number = 0 + @State positionY: number = 0 + private panOption: PanGestureOptions = new PanGestureOptions({ direction: PanDirection.Left | PanDirection.Right }) + @State numbers: String[] = ['0', '1', '2', '3', '4'] + scroller: Scroller = new Scroller() + @State gridPosition: number = 0 + + build() { + Column() { + Column() { + Text('PanGesture offset:\nX: ' + this.offsetX + '\n' + 'Y: ' + this.offsetY) + Grid(this.scroller) { + ForEach(this.numbers, (day: string) => { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + }, (day: string) => day) + } + } + .id('ActionEventCommoneventChange0520_001') + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(50) + .translate({ x: this.offsetX, y: this.offsetY, z: 0 }) + .gesture( + PanGesture(this.panOption) + .onActionStart((event: GestureEvent) => { + console.info('Pan start') + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX + this.offsetY = this.positionY + event.offsetY + } + }) + .onActionEnd(() => { + this.positionX = this.offsetX + this.positionY = this.offsetY + console.info('Pan end') + }) + ) + + Button('修改PanGesture触发条件') + .onClick(() => { + this.panOption.setDirection(PanDirection.All) + this.panOption.setFingers(2) + }) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventCommoneventChange/ActionEventCommoneventChange0530.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventCommoneventChange/ActionEventCommoneventChange0530.ets new file mode 100644 index 0000000000000000000000000000000000000000..4b52a4efc9096e3f2aad7bdfdc025670318fd208 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventCommoneventChange/ActionEventCommoneventChange0530.ets @@ -0,0 +1,71 @@ +@Entry +@Component +struct ActionEventCommoneventChange0530 { + @State offsetX: number = 0 + @State offsetY: number = 0 + @State positionX: number = 0 + @State positionY: number = 0 + private panOption: PanGestureOptions = new PanGestureOptions({ direction: PanDirection.Left | PanDirection.Right }) + @State numbers: String[] = ['0', '1', '2', '3', '4'] + scroller: Scroller = new Scroller() + @State gridPosition: number = 0 + + build() { + Column() { + Column() { + Text('PanGesture offset:\nX: ' + this.offsetX + '\n' + 'Y: ' + this.offsetY) + Grid(this.scroller) { + ForEach(this.numbers, (day: string) => { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + }, (day: string) => day) + } + } + .id('ActionEventCommoneventChange0530_001') + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(50) + .translate({ x: this.offsetX, y: this.offsetY, z: 0 }) + .gesture( + PanGesture(this.panOption) + .onActionStart((event: GestureEvent) => { + console.info('Pan start') + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX + this.offsetY = this.positionY + event.offsetY + } + }) + .onActionEnd(() => { + this.positionX = this.offsetX + this.positionY = this.offsetY + console.info('Pan end') + }) + ) + + Button('修改PanGesture触发条件') + .onClick(() => { + this.panOption.setDirection(PanDirection.All) + this.panOption.setFingers(2) + }) + + Button('restore') + .id('ActionEventCommoneventChange0530_002') + .onClick(() =>{ + this.offsetX = 0; + this.offsetY = 0; + }) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventCommoneventChange/ActionEventCommoneventChange0550.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventCommoneventChange/ActionEventCommoneventChange0550.ets new file mode 100644 index 0000000000000000000000000000000000000000..7f741fcf900ef4614e866a69049a643594b9b708 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventCommoneventChange/ActionEventCommoneventChange0550.ets @@ -0,0 +1,64 @@ +@Entry +@Component +struct ActionEventCommoneventChange0550 { + @State offsetX: number = 0 + @State offsetY: number = 0 + @State positionX: number = 0 + @State positionY: number = 0 + private panOption: PanGestureOptions = new PanGestureOptions({ direction: PanDirection.Left | PanDirection.Right }) + @State numbers: String[] = ['0', '1', '2', '3', '4'] + scroller: Scroller = new Scroller() + @State gridPosition: number = 0 + + build() { + Column() { + Column() { + Text('PanGesture offset:\nX: ' + this.offsetX + '\n' + 'Y: ' + this.offsetY) + Grid(this.scroller) { + ForEach(this.numbers, (day: string) => { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + }, (day: string) => day) + } + } + .id('ActionEventCommoneventChange0550_001') + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(50) + .translate({ x: this.offsetX, y: this.offsetY, z: 0 }) + .gesture( + PanGesture(this.panOption) + .onActionStart((event: GestureEvent) => { + console.info('Pan start') + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX + this.offsetY = this.positionY + event.offsetY + } + }) + .onActionEnd(() => { + this.positionX = this.offsetX + this.positionY = this.offsetY + console.info('Pan end') + }) + ) + + Button('修改PanGesture触发条件') + .onClick(() => { + this.panOption.setDirection(PanDirection.All) + this.panOption.setFingers(2) + }) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventCommoneventClick/ActionEventCommoneventClick0030.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventCommoneventClick/ActionEventCommoneventClick0030.ets new file mode 100644 index 0000000000000000000000000000000000000000..018c0c65550920c80dcba5b50974c995e7d175db --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventCommoneventClick/ActionEventCommoneventClick0030.ets @@ -0,0 +1,75 @@ +/* + * 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 { UIContext } from '@ohos.arkui.UIContext'; +import { NodeController, BuilderNode, Size, FrameNode } from '@ohos.arkui.node'; + +class Params { + text: string = "this is a text" +} + +@Builder +function buttonBuilder(params: Params) { + Column() { + Button(params.text) + .fontSize(12) + .borderRadius(8) + .borderWidth(2) + .backgroundColor(Color.Orange) + } +} + +class MyNodeController extends NodeController { + private buttonNode: BuilderNode<[Params]> | null = null; + private wrapBuilder: WrappedBuilder<[Params]> = wrapBuilder(buttonBuilder); + + makeNode(uiContext: UIContext): FrameNode { + if (this.buttonNode == null) { + this.buttonNode = new BuilderNode(uiContext); + this.buttonNode.build(this.wrapBuilder, { text: "This is a Button" }) + } + return this.buttonNode!.getFrameNode()!; + } + + aboutToResize(size: Size) { + console.log("aboutToResize width : " + size.width + " height : " + size.height) + } + + aboutToAppear() { + console.log("aboutToAppear") + } + + aboutToDisappear() { + console.log("aboutToDisappear"); + } + + onTouchEvent(event:TouchEvent) { + console.log("onTouchEvent"); + } +} + +@Entry +@Component +struct ActionEventCommoneventClick0030 { + private myNodeController: MyNodeController = new MyNodeController(); + + build() { + Column() { + NodeContainer(this.myNodeController) + } + .padding({ left: 35, right: 35, top: 35 }) + .width("100%") + .height("100%") + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventCommoneventClick/ActionEventCommoneventClick0040.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventCommoneventClick/ActionEventCommoneventClick0040.ets new file mode 100644 index 0000000000000000000000000000000000000000..149516a32f19a51265b09e1e8e9435d4fca1c177 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventCommoneventClick/ActionEventCommoneventClick0040.ets @@ -0,0 +1,29 @@ +/* + * 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 ActionEventCommoneventClick0040 { + @State txt: string = '111' + + build() { + Column({ space: 5 }) { + Button('button').onClick(() => { + this.txt = '触发点击事件' + }) + Text(this.txt).fontSize(20).margin(10) + }.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/ActionEventCommoneventClickDfx/ActionEventCommoneventClickDfx0010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventCommoneventClickDfx/ActionEventCommoneventClickDfx0010.ets new file mode 100644 index 0000000000000000000000000000000000000000..e5d0ba5bc47636b4fbfee70ee88387885509ba3b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventCommoneventClickDfx/ActionEventCommoneventClickDfx0010.ets @@ -0,0 +1,33 @@ +/* + * 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 ActionEventCommoneventClickDfx0010 { + @State num: string = "" + + build() { + Column({ space: 10 }) { + Button("点击300").onClick((event: ClickEvent) => { + this.num = "点击" + }) + .margin(10).id("ActionEventCommoneventClickdfx0010") + + Text(this.num) + + }.width('100%').height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventCommoneventClickDfx/ActionEventCommoneventClickDfx0020.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventCommoneventClickDfx/ActionEventCommoneventClickDfx0020.ets new file mode 100644 index 0000000000000000000000000000000000000000..8c9ccc4e95dbf20446320ecd7b261a829fb829e5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventCommoneventClickDfx/ActionEventCommoneventClickDfx0020.ets @@ -0,0 +1,33 @@ +/* + * 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 ActionEventCommoneventClickDfx0020 { + @State num: string = "" + + build() { + Column({ space: 10 }) { + Button("点击300").onClick((event: ClickEvent) => { + this.num = "点击" + }) + .margin(10).id("ActionEventCommoneventClickdfx0020") + + Text(this.num) + + }.width('100%').height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventCommoneventClickDfx/ActionEventCommoneventClickDfx0030.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventCommoneventClickDfx/ActionEventCommoneventClickDfx0030.ets new file mode 100644 index 0000000000000000000000000000000000000000..f0a3dab054d37e3352a0ac1d250b1768d7aa8626 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventCommoneventClickDfx/ActionEventCommoneventClickDfx0030.ets @@ -0,0 +1,33 @@ +/* + * 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 ActionEventCommoneventClickDfx0030 { + @State num: string = "" + + build() { + Column({ space: 10 }) { + Button("点击300").onClick((event: ClickEvent) => { + this.num = "点击" + }) + .margin(10).id("ActionEventCommoneventClickdfx0030") + + Text(this.num) + + }.width('100%').height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventCommoneventClickDfx/ActionEventCommoneventClickDfx0040.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventCommoneventClickDfx/ActionEventCommoneventClickDfx0040.ets new file mode 100644 index 0000000000000000000000000000000000000000..59fb98cad0f20c4987e9de28ae7decd592ffcc6f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventCommoneventClickDfx/ActionEventCommoneventClickDfx0040.ets @@ -0,0 +1,40 @@ +/* + * 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 ActionEventCommoneventClickDfx0040 { + @State num2:string = "" + @State num: string = "" + + build() { + Column({ space: 10 }) { + Button("按钮1点击300").onClick((event: ClickEvent) => { + this.num = "点击" + }) + .margin(10).id("ActionEventCommoneventClickdfx0040_1") + + Button("按钮2点击300").onClick((event: ClickEvent) => { + this.num2 = "点击2" + }) + .margin(10).id("ActionEventCommoneventClickdfx0040_2") + + Text(this.num) + Text(this.num2) + + }.width('100%').height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventCommoneventClickDfx/ActionEventCommoneventClickDfx0050.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventCommoneventClickDfx/ActionEventCommoneventClickDfx0050.ets new file mode 100644 index 0000000000000000000000000000000000000000..5f9bed782ba70993d414ec26fd2dc30ddeab46d7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventCommoneventClickDfx/ActionEventCommoneventClickDfx0050.ets @@ -0,0 +1,32 @@ +/* + * 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 ActionEventCommoneventClickDfx0050 { + @State num: string = "" + + build() { + Column({ space: 10 }) { + Button("按钮1点击300").onClick((event: ClickEvent) => { + this.num = "点击" + }) + .margin(10).id("ActionEventCommoneventClickdfx0050") + Text(this.num) + + }.width('100%').height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventCommoneventClickScenarios/ActionEventCommoneventClickScenarios0020.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventCommoneventClickScenarios/ActionEventCommoneventClickScenarios0020.ets new file mode 100644 index 0000000000000000000000000000000000000000..5f9367b19a986e57fdbf51e41af11dcaa00b87d8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventCommoneventClickScenarios/ActionEventCommoneventClickScenarios0020.ets @@ -0,0 +1,18 @@ +@Entry +@Component +struct ActionEventCommoneventClickScenarios0020 { + @State txt:string = '' + + + build() { + Scroll() { + Column({ space: 5 }) { + Button('button').onClick(() => { + this.txt = '触发点击事件' + }) + .id('btn') + Text(this.txt).fontSize(20).margin(10) + }.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/ActionEventConnect/ActionEventConnect010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventConnect/ActionEventConnect010.ets new file mode 100644 index 0000000000000000000000000000000000000000..bb460071cbeff8f3ee22c3135dd7f6cc1819932e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventConnect/ActionEventConnect010.ets @@ -0,0 +1,37 @@ +/* + * 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 ActionEventConnect010 { + private imageOne: Resource = $r('app.media.cat'); + @State src: Resource = this.imageOne + @State strname:string='' + build(){ + Column(){ + // 为图片添加点击事件,点击完成后加载特定图片 + Image(this.src) + .id("ActionEventConnect010") + .width(100) + .height(100) + .onClick(() => { + this.strname = "onClick" + }) + + Text(this.strname) + + }.width('100%').height('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventRegisterComponentChangeEventCallbackActonsheet/ActionEventRegisterComponentChangeEventCallbackActonsheet010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventRegisterComponentChangeEventCallbackActonsheet/ActionEventRegisterComponentChangeEventCallbackActonsheet010.ets new file mode 100644 index 0000000000000000000000000000000000000000..19119909f53e73a8e6c4a89599e4fcbb73ba2718 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventRegisterComponentChangeEventCallbackActonsheet/ActionEventRegisterComponentChangeEventCallbackActonsheet010.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 ActionEventRegisterComponentChangeEventCallbackActonsheet010 { + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Button('Click to Show ActionSheet') + .id('button') + .onClick(() => { + ActionSheet.show({ + title: 'ActionSheet title', + subtitle: 'ActionSheet subtitle', + message: 'message', + autoCancel: true, + confirm: { + defaultFocus: true, + value: 'Confirm button', + action: () => { + console.log('Get Alert Dialog handled') + } + }, + cancel: () => { + console.log('actionSheet canceled') + }, + alignment: DialogAlignment.Bottom, + offset: { dx: 0, dy: -10 }, + sheets: [ + { + title: 'apples', + action: () => { + console.log('apples') + } + }, + { + title: 'bananas', + action: () => { + console.log('bananas') + } + }, + { + title: 'pears', + action: () => { + console.log('pears') + } + } + ] + }) + }) + }.width('100%') + .height('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventRegisterComponentChangeEventCallbackAlertdialog/ActionEventRegisterComponentChangeEventCallbackAlertdialog020.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventRegisterComponentChangeEventCallbackAlertdialog/ActionEventRegisterComponentChangeEventCallbackAlertdialog020.ets new file mode 100644 index 0000000000000000000000000000000000000000..d9f81debdb6973c488a79c37ae045799bcad7957 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventRegisterComponentChangeEventCallbackAlertdialog/ActionEventRegisterComponentChangeEventCallbackAlertdialog020.ets @@ -0,0 +1,48 @@ +/* + * 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. + */ +// xxx.ets +@Entry +@Component +struct ActionEventRegisterComponentChangeEventCallbackAlertdialog020 { + build() { + Column({ space: 5 }) { + Button('dialog') + .id('dialog') + .onClick(() => { + AlertDialog.show( + { + title: 'title', + message: 'text', + autoCancel: true, + alignment: DialogAlignment.Bottom, + offset: { dx: 0, dy: -20 }, + gridCount: 3, + confirm: { + value: 'button', + action: () => { + console.info('Button-clicking callback') + } + }, + cancel: () => { + console.info('Closed callbacks') + }, + } + ) + }) + .backgroundColor(0x317aff) + + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventRegisterComponentChangeEventCallbackCounter/ActionEventRegisterComponentChangeEventCallbackCounter030.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventRegisterComponentChangeEventCallbackCounter/ActionEventRegisterComponentChangeEventCallbackCounter030.ets new file mode 100644 index 0000000000000000000000000000000000000000..c10c94b5fbe0844e279a28d155d451ffda84d1d8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventRegisterComponentChangeEventCallbackCounter/ActionEventRegisterComponentChangeEventCallbackCounter030.ets @@ -0,0 +1,34 @@ +/* + * 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 { CounterType, CounterComponent, DateData } from '@ohos.arkui.advanced.Counter'; + +@Entry +@Component +struct ActionEventRegisterComponentChangeEventCallbackCounter030 { + build() { + Column() { + CounterComponent({ + options: { + type: CounterType.INLINE_DATE, + dateOptions: { + year: 2016, + onDateChange: (date: DateData) => { + } + } + } + }) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventRegisterComponentChangeEventCallbackGrid/ActionEventRegisterComponentChangeEventCallbackGrid040.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventRegisterComponentChangeEventCallbackGrid/ActionEventRegisterComponentChangeEventCallbackGrid040.ets new file mode 100644 index 0000000000000000000000000000000000000000..1b40ed361a6e382ac08b0c15107e3f6ede58bfe7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventRegisterComponentChangeEventCallbackGrid/ActionEventRegisterComponentChangeEventCallbackGrid040.ets @@ -0,0 +1,90 @@ +/* + * 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. + */ + +// xxx.ets +@Entry +@Component +struct ActionEventRegisterComponentChangeEventCallbackGrid040 { + @State numbers1: String[] = ['0', '1', '2', '3', '4'] + @State numbers2: String[] = ['0', '1','2','3','4','5'] + + layoutOptions3: GridLayoutOptions = { + regularSize: [1, 1], + onGetRectByIndex: (index: number) => { + if (index == 0) + return [0, 0, 1, 1] + else if(index==1) + return [0, 1, 2, 2] + else if(index==2) + return [0 ,3 ,3 ,3] + else if(index==3) + return [3, 0, 3, 3] + else if(index==4) + return [4, 3, 2, 2] + else + return [5, 5, 1, 1] + } + } + + build() { + Column({ space: 5 }) { + Grid() { + ForEach(this.numbers1, (day: string) => { + ForEach(this.numbers1, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height('100%') + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + }, (day: string) => day) + } + .columnsTemplate('1fr 1fr 1fr 1fr 1fr') + .rowsTemplate('1fr 1fr 1fr 1fr 1fr') + .columnsGap(10) + .rowsGap(10) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + + Text('Use of GridLayoutOptions: onGetRectByIndex').fontColor(0xCCCCCC).fontSize(9).width('90%') + + Grid(undefined, this.layoutOptions3) { + ForEach(this.numbers2, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height("100%") + .textAlign(TextAlign.Center) + } + .height("100%") + .width('100%') + }, (day: string) => day) + } + .columnsTemplate('1fr 1fr 1fr 1fr 1fr 1fr') + .rowsTemplate('1fr 1fr 1fr 1fr 1fr 1fr') + .columnsGap(10) + .rowsGap(10) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventRegisterComponentChangeEventCallbackTextinput/ActionEventRegisterComponentChangeEventCallbackTextinput150.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventRegisterComponentChangeEventCallbackTextinput/ActionEventRegisterComponentChangeEventCallbackTextinput150.ets new file mode 100644 index 0000000000000000000000000000000000000000..7b5d9137df9e4e4f6c38512794115b76bd31f856 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventRegisterComponentChangeEventCallbackTextinput/ActionEventRegisterComponentChangeEventCallbackTextinput150.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. + */ + +// xxx.ets +@Entry +@Component +struct ActionEventRegisterComponentChangeEventCallbackTextinput150 { + @State text: string = '' + @State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 } + controller: TextInputController = new TextInputController() + + build() { + Column() { + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .caretColor(Color.Blue) + .width('95%') + .height(40) + .margin(20) + .fontSize(14) + .fontColor(Color.Black) + .inputFilter('[a-z]', (e) => { + console.log(JSON.stringify(e)) + }) + .onChange((value: string) => { + this.text = value + }) + Text(this.text) + Button('Set caretPosition 1') + .margin(15) + .onClick(() => { + // 将光标移动至第一个字符后 + this.controller.caretPosition(1) + }) + Button('Get CaretOffset') + .margin(15) + .onClick(() => { + this.positionInfo = this.controller.getCaretOffset() + }) + // 密码输入框 + TextInput({ placeholder: 'input your password...' }) + .width('95%') + .height(40) + .margin(20) + .type(InputType.Password) + .maxLength(9) + .showPasswordIcon(true) + // 内联风格输入框 + TextInput({ text: 'inline style' }) + .width('95%') + .height(50) + .margin(20) + .borderRadius(0) + .style(TextInputStyle.Inline) + }.width('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventRegisterComponentChangeEventCallbackToggle/ActionEventRegisterComponentChangeEventCallbackToggle160.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventRegisterComponentChangeEventCallbackToggle/ActionEventRegisterComponentChangeEventCallbackToggle160.ets new file mode 100644 index 0000000000000000000000000000000000000000..87caa7282e30f00d6fdc4c1b5a015f0fa9df3d66 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventRegisterComponentChangeEventCallbackToggle/ActionEventRegisterComponentChangeEventCallbackToggle160.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. + */ + +// xxx.ets +@Entry +@Component +struct ActionEventRegisterComponentChangeEventCallbackToggle160 { + build() { + Column({ space: 10 }) { + Text('type: Switch').fontSize(12).fontColor(0xcccccc).width('90%') + Flex({ justifyContent: FlexAlign.SpaceEvenly, alignItems: ItemAlign.Center }) { + Toggle({ type: ToggleType.Switch, isOn: false }) + .selectedColor('#007DFF') + .switchPointColor('#FFFFFF') + .onChange((isOn: boolean) => { + console.info('Component status:' + isOn) + }) + + Toggle({ type: ToggleType.Switch, isOn: true }) + .selectedColor('#007DFF') + .switchPointColor('#FFFFFF') + .onChange((isOn: boolean) => { + console.info('Component status:' + isOn) + }) + } + + Text('type: Checkbox').fontSize(12).fontColor(0xcccccc).width('90%') + Flex({ justifyContent: FlexAlign.SpaceEvenly, alignItems: ItemAlign.Center }) { + Toggle({ type: ToggleType.Checkbox, isOn: false }) + .size({ width: 20, height: 20 }) + .selectedColor('#007DFF') + .onChange((isOn: boolean) => { + console.info('Component status:' + isOn) + }) + + Toggle({ type: ToggleType.Checkbox, isOn: true }) + .size({ width: 20, height: 20 }) + .selectedColor('#007DFF') + .onChange((isOn: boolean) => { + console.info('Component status:' + isOn) + }) + } + + Text('type: Button').fontSize(12).fontColor(0xcccccc).width('90%') + Flex({ justifyContent: FlexAlign.SpaceEvenly, alignItems: ItemAlign.Center }) { + Toggle({ type: ToggleType.Button, isOn: false }) { + Text('status button').fontColor('#182431').fontSize(12) + }.width(106) + .selectedColor('rgba(0,125,255,0.20)') + .onChange((isOn: boolean) => { + console.info('Component status:' + isOn) + }) + + Toggle({ type: ToggleType.Button, isOn: true }) { + Text('status button').fontColor('#182431').fontSize(12) + }.width(106) + .selectedColor('rgba(0,125,255,0.20)') + .onChange((isOn: boolean) => { + console.info('Component status:' + isOn) + }) + } + }.width('100%').padding(24) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventRegisterComponentChangeEventCallbackWaterflow/ActionEventRegisterComponentChangeEventCallbackWaterflow170.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventRegisterComponentChangeEventCallbackWaterflow/ActionEventRegisterComponentChangeEventCallbackWaterflow170.ets new file mode 100644 index 0000000000000000000000000000000000000000..aa3c6a7514e9f5d0eddfcd812b42139eb535d0c7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventRegisterComponentChangeEventCallbackWaterflow/ActionEventRegisterComponentChangeEventCallbackWaterflow170.ets @@ -0,0 +1,236 @@ +/* + * 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. + */ +// WaterFlowDataSource.ets + +// Object that implements the IDataSource API, which is used by the WaterFlow component to load data. +export class WaterFlowDataSource implements IDataSource { + private dataArray: number[] = [] + private listeners: DataChangeListener[] = [] + + constructor() { + for (let i = 0; i < 100; i++) { + this.dataArray.push(i) + } + } + + // Obtain the data corresponding to the specified index. + public getData(index: number): number { + return this.dataArray[index] + } + + // Notify the controller of data reloading. + notifyDataReload(): void { + this.listeners.forEach(listener => { + listener.onDataReloaded() + }) + } + + // Notify the controller of data addition. + notifyDataAdd(index: number): void { + this.listeners.forEach(listener => { + listener.onDataAdd(index) + }) + } + + // Notify the controller of data changes. + notifyDataChange(index: number): void { + this.listeners.forEach(listener => { + listener.onDataChange(index) + }) + } + + // Notify the controller of data deletion. + notifyDataDelete(index: number): void { + this.listeners.forEach(listener => { + listener.onDataDelete(index) + }) + } + + // Notify the controller of the data location change. + notifyDataMove(from: number, to: number): void { + this.listeners.forEach(listener => { + listener.onDataMove(from, to) + }) + } + + // Notify the controller of batch data modification. + notifyDatasetChange(operations: DataOperation[]): void { + this.listeners.forEach(listener => { + listener.onDatasetChange(operations); + }) + } + + // Obtain the total number of data records. + public totalCount(): number { + return this.dataArray.length + } + + // Register the data change listener. + registerDataChangeListener(listener: DataChangeListener): void { + if (this.listeners.indexOf(listener) < 0) { + this.listeners.push(listener) + } + } + + // Unregister the data change listener. + unregisterDataChangeListener(listener: DataChangeListener): void { + const pos = this.listeners.indexOf(listener) + if (pos >= 0) { + this.listeners.splice(pos, 1) + } + } + + // Add data. + public add1stItem(): void { + this.dataArray.splice(0, 0, this.dataArray.length) + this.notifyDataAdd(0) + } + + // Add an item to the end of the data. + public addLastItem(): void { + this.dataArray.splice(this.dataArray.length, 0, this.dataArray.length) + this.notifyDataAdd(this.dataArray.length - 1) + } + + // Add an item to the position corresponding to the specified index. + public addItem(index: number): void { + this.dataArray.splice(index, 0, this.dataArray.length) + this.notifyDataAdd(index) + } + + // Delete the first item. + public delete1stItem(): void { + this.dataArray.splice(0, 1) + this.notifyDataDelete(0) + } + + // Delete the second item. + public delete2ndItem(): void { + this.dataArray.splice(1, 1) + this.notifyDataDelete(1) + } + + // Delete the last item. + public deleteLastItem(): void { + this.dataArray.splice(-1, 1) + this.notifyDataDelete(this.dataArray.length) + } + + // Delete an item at the specified index position. + public deleteItem(index: number): void { + this.dataArray.splice(index, 1) + this.notifyDataDelete(index) + } + + // Reload data. + public reload(): void { + this.dataArray.splice(1, 1) + this.dataArray.splice(3, 2) + this.notifyDataReload() + } +} + +@Entry +@Component +struct ActionEventRegisterComponentChangeEventCallbackWaterflow170 { + @State minSize: number = 80 + @State maxSize: number = 180 + @State fontSize: number = 24 + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F] + scroller: Scroller = new Scroller() + dataSource: WaterFlowDataSource = new WaterFlowDataSource() + private itemWidthArray: number[] = [] + private itemHeightArray: number[] = [] + + // Calculate the width and height of a water flow item. + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + // Set the width and height array of the water flow item. + setItemSizeArray() { + for (let i = 0; i < 10; i++) { + this.itemWidthArray.push(this.getSize()) + this.itemHeightArray.push(this.getSize()) + } + } + + aboutToAppear() { + this.setItemSizeArray() + } + + @Builder + itemFoot() { + Column() { + Text(`Footer`) + .fontSize(10) + .backgroundColor(Color.Red) + .width(50) + .height(50) + .align(Alignment.Center) + .margin({ top: 2 }) + } + } + + build() { + Column({ space: 2 }) { + WaterFlow() { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + // The image is displayed only when there is a corresponding JPG file. + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .onAppear(() => { + // Add data in advance when scrolling is about to end. + if (item + 20 == this.dataSource.totalCount()) { + for (let i = 0; i < 100; i++) { + this.dataSource.addLastItem() + } + } + }) + .width('100%') + .height(100) + .backgroundColor(Color.Yellow) + }, (item: string) => item) + } + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('100%') + .onReachStart(() => { + console.info('waterFlow reach start') + }) + .onScrollStart(() => { + console.info('waterFlow scroll start') + }) + .onScrollStop(() => { + console.info('waterFlow scroll stop') + }) + .onScrollFrameBegin((offset: number, state: ScrollState) => { + console.info('waterFlow scrollFrameBegin offset: ' + offset + ' state: ' + state.toString()) + return { offsetRemain: offset } + }) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventRegisterWebsearchEventCallback/ActionEventRegisterWebsearchEventCallback010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventRegisterWebsearchEventCallback/ActionEventRegisterWebsearchEventCallback010.ets new file mode 100644 index 0000000000000000000000000000000000000000..b69a8784db47e80cfd5a134623c2e4795c0f29bf --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionEventRegisterWebsearchEventCallback/ActionEventRegisterWebsearchEventCallback010.ets @@ -0,0 +1,34 @@ +/* + * 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 ActionEventRegisterWebsearchEventCallback010 { + + build(){ + Column(){ + // 为图片添加点击事件,点击完成后加载特定图片 + TextInput().width(300).height(50).margin({top:30}) + .id("websearchEventCallback010") + + Button("获焦").margin({top:30}) + + }.width('100%').height('100%') + } +} + + + + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureAttributemodifier/ActionGestureAttributemodifier0110.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureAttributemodifier/ActionGestureAttributemodifier0110.ets new file mode 100644 index 0000000000000000000000000000000000000000..cd671e77c42da2fd26d6788fa9248e042b3592a6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureAttributemodifier/ActionGestureAttributemodifier0110.ets @@ -0,0 +1,78 @@ +/* + * 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 ActionGestureAttributemodifier0110 { + @State count: number = 0; + @State value: string = ''; + @State rotateAngle: number = 0; + @State speed: number = 1; + @State onCancel: string = "" + @State onCancel2: string = "" + + build() { + Column() { + Button('repeat=true').fontSize(28) + .id('ActionGestureAttributemodifier0110') + .gesture( + GestureGroup(GestureMode.Sequence, + LongPressGesture({ repeat: true }) + .onAction((event?: GestureEvent) => { + if (event) { + this.count++; + } + console.info('LongPress onAction') + }), + ).onCancel(() => { + this.onCancel = "onCancel" + }) + + ) + + Text(this.count + '') + Text(this.onCancel) + + + Button('onActionUpdate') + .height(100) + .margin({ top: 50 }) + .id('ActionGestureAttributemodifier0110_1') + .rotate({ angle: this.rotateAngle }) + .gesture( + GestureGroup(GestureMode.Sequence, + SwipeGesture({ direction: SwipeDirection.All }) + .onAction((event: GestureEvent) => { + if (event) { + this.speed = event.speed; + this.rotateAngle = event.angle; + this.value += 'Swipe end'; + } + }) + ) + .onCancel(() => { + this.onCancel2 = "onCancel" + }) + ) + Text(this.value).margin({ top: 20 }) + Text(this.onCancel2) + + } + .height(400) + .width(400) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureAttributemodifier/ActionGestureAttributemodifier0130.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureAttributemodifier/ActionGestureAttributemodifier0130.ets new file mode 100644 index 0000000000000000000000000000000000000000..0cd84601805a3712166bbdc4d94d3a13082f0d1e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureAttributemodifier/ActionGestureAttributemodifier0130.ets @@ -0,0 +1,78 @@ +/* + * 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 ActionGestureAttributemodifier0130 { + @State count: number = 0; + @State value: string = ''; + @State rotateAngle: number = 0; + @State speed: number = 1; + @State onCancel: string = "" + @State onCancel2: string = "" + + build() { + Column() { + Button('repeat=true').fontSize(28) + .id('ActionGestureAttributemodifier0110') + .gesture( + GestureGroup(GestureMode.Sequence, + LongPressGesture({ repeat: true }) + .onAction((event?: GestureEvent) => { + if (event) { + this.count++; + } + console.info('LongPress onAction') + }), + ).onCancel(() => { + this.onCancel = "onCancel" + }) + + ) + + Text(this.count + '') + Text(this.onCancel) + + + Button('onActionUpdate') + .height(100) + .margin({ top: 50 }) + .id('ActionGestureAttributemodifier0130_1') + .rotate({ angle: this.rotateAngle }) + .gesture( + GestureGroup(GestureMode.Sequence, + SwipeGesture({ direction: SwipeDirection.All }) + .onAction((event: GestureEvent) => { + if (event) { + this.speed = event.speed; + this.rotateAngle = event.angle; + this.value += 'Swipe end'; + } + }) + ) + .onCancel(() => { + this.onCancel2 = "onCancel" + }) + ) + Text(this.value).margin({ top: 20 }) + Text(this.onCancel2) + + } + .height(400) + .width(400) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureAttributemodifier/ActionGestureAttributemodifier0140.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureAttributemodifier/ActionGestureAttributemodifier0140.ets new file mode 100644 index 0000000000000000000000000000000000000000..35889660a43beb861b414aeb59cf65c20e49cb83 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureAttributemodifier/ActionGestureAttributemodifier0140.ets @@ -0,0 +1,78 @@ +/* + * 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 ActionGestureAttributemodifier0140 { + @State count: number = 0; + @State value: string = ''; + @State rotateAngle: number = 0; + @State speed: number = 1; + @State onCancel: string = "" + @State onCancel2: string = "" + + build() { + Column() { + Button('repeat=true').fontSize(28) + .id('ActionGestureAttributemodifier0140') + .gesture( + GestureGroup(GestureMode.Sequence, + LongPressGesture({ repeat: true }) + .onAction((event?: GestureEvent) => { + if (event) { + this.count++; + } + console.info('LongPress onAction') + }), + ).onCancel(() => { + this.onCancel = "onCancel" + }) + + ) + + Text(this.count + '') + Text(this.onCancel) + + + Button('onActionUpdate') + .height(100) + .margin({ top: 50 }) + .id('ActionGestureAttributemodifier0140_1') + .rotate({ angle: this.rotateAngle }) + .gesture( + GestureGroup(GestureMode.Sequence, + SwipeGesture({ direction: SwipeDirection.All }) + .onAction((event: GestureEvent) => { + if (event) { + this.speed = event.speed; + this.rotateAngle = event.angle; + this.value += 'Swipe end'; + } + }) + ) + .onCancel(() => { + this.onCancel2 = "onCancel" + }) + ) + Text(this.value).margin({ top: 20 }) + Text(this.onCancel2) + + } + .height(400) + .width(400) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureAttributemodifier/ActionGestureAttributemodifier0150.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureAttributemodifier/ActionGestureAttributemodifier0150.ets new file mode 100644 index 0000000000000000000000000000000000000000..9cf6c74e734694ba51f1977e7fa587c1bb3116cc --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureAttributemodifier/ActionGestureAttributemodifier0150.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 ActionGestureAttributemodifier0150 { + @State count: number = 0; + @State value: string = ''; + @State rotateAngle: number = 0; + @State speed: number = 1; + @State onCancel: string = "" + @State onCancel2: string = "" + + build() { + Column() { + Button('repeat=true').fontSize(28) + .id('ActionGestureAttributemodifier0150') + .gesture( + GestureGroup(GestureMode.Sequence, + LongPressGesture({ repeat: true }) + .onAction((event?: GestureEvent) => { + if (event) { + this.count++; + } + console.info('LongPress onAction') + }), + ).onCancel(() => { + this.onCancel = "onCancel" + }) + + ) + + Text(this.count + '') + Text(this.onCancel) + + + Button('onActionUpdate').height(100) + .margin({top:50}) + .id('ActionGestureAttributemodifier0150_1') + .rotate({ angle: this.rotateAngle }) + .gesture( + GestureGroup(GestureMode.Sequence, + SwipeGesture({ direction: SwipeDirection.All }) + .onAction((event: GestureEvent) => { + if (event) { + this.speed = event.speed; + this.rotateAngle = event.angle; + this.value += 'Swipe end'; + } + }) + ) + .onCancel(() => { + this.onCancel2 = "onCancel" + }) + ) + Text(this.value).margin({ top: 20 }) + Text(this.onCancel2) + + } + .height(400) + .width(400) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0010.ets new file mode 100644 index 0000000000000000000000000000000000000000..4c7f714f0d694d0d6d7357317738138d1d826bcd --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0010.ets @@ -0,0 +1,172 @@ +/* + * 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 ActionGestureEventMitigation0010 { + scroller: Scroller = new Scroller(); + scroller2: Scroller = new Scroller(); + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + private childRecognizer: GestureRecognizer = new GestureRecognizer(); + private currentRecognizer: GestureRecognizer = new GestureRecognizer(); + private lastOffset: number = 0; + @State text: string = ''; + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { // 外部滚动容器 + Column() { + Text("Scroll Area") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Scroll(this.scroller2) { // 内部滚动容器 + Column() { + Text("Scroll Area2") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Column() { + ForEach(this.arr, (item: number) => { + Text(item.toString()) + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + }, (item: string) => item) + }.width('100%') + } + } + .id("inner") + .width('100%') + .height(800) + }.width('100%') + } + .id("ActionGestureEventMitigation10") + .height(600) + .scrollable(ScrollDirection.Vertical) // 滚动方向纵向 + .scrollBar(BarState.On) // 滚动条常驻显示 + .scrollBarColor(Color.Gray) // 滚动条颜色 + .scrollBarWidth(10) // 滚动条宽度 + .edgeEffect(EdgeEffect.None) + .shouldBuiltInRecognizerParallelWith((current: GestureRecognizer, others: Array) => { + // for (let i = 0; i < others.length; i++) { + // let target = others[i].getEventTargetInfo(); + // if (target) { + // if (target.getId() == "inner" && others[i].isBuiltIn() && others[i].getType() == GestureControl.GestureType.PAN_GESTURE) { // 找到将要组成并行手势的识别器 + // this.currentRecognizer = current; // 保存当前组件的识别器 + // this.childRecognizer = others[i]; // 保存将要组成并行手势的识别器 + // return others[i]; // 返回将要组成并行手势的识别器 + // } + // } + // } + this.text ='Tag:'+ current.getTag() +' Type:'+current.getType()+' isBuiltIn:'+current.isBuiltIn()+' isEnabled:'+current.isEnabled() + +'getEventTargetInfo:'+current.getEventTargetInfo(); + console.info('+++'+this.text) + return undefined; + }) + .onGestureRecognizerJudgeBegin((event: BaseGestureEvent, current: GestureRecognizer, others: Array) => { // 在识别器即将要成功时,根据当前组件状态,设置识别器使能状态 + if (current) { + let target = current.getEventTargetInfo(); + if (target) { + if (target.getId() == "outer" && current.isBuiltIn() && current.getType() == GestureControl.GestureType.PAN_GESTURE) { + if (others) { + for (let i = 0; i < others.length; i++) { + let target = others[i].getEventTargetInfo() as ScrollableTargetInfo; + if (target instanceof ScrollableTargetInfo && target.getId() == "inner") { // 找到响应链上对应并行的识别器 + let panEvent = event as PanGestureEvent; + if (target.isEnd()) { // 根据当前组件状态以及移动方向动态控制识别器使能状态 + if (panEvent && panEvent.offsetY < 0) { + this.childRecognizer.setEnabled(false) + this.currentRecognizer.setEnabled(true) + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } else if (target.isBegin()) { + if (panEvent.offsetY > 0) { + this.childRecognizer.setEnabled(false) + this.currentRecognizer.setEnabled(true) + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } + } + } + } + } + } + return GestureJudgeResult.CONTINUE; + }) + // .gesture( // 绑定一个Pan手势作为动态控制器 + // PanGesture() + // .onActionUpdate((event: GestureEvent)=>{ + // if (this.childRecognizer.getState() != GestureRecognizerState.SUCCESSFUL || this.currentRecognizer.getState() != GestureRecognizerState.SUCCESSFUL) { // 如果识别器状态不是SUCCESSFUL,则不做控制 + // return; + // } + // let target = this.childRecognizer.getEventTargetInfo() as ScrollableTargetInfo; + // let currentTarget = this.currentRecognizer.getEventTargetInfo() as ScrollableTargetInfo; + // if (target instanceof ScrollableTargetInfo && currentTarget instanceof ScrollableTargetInfo) { + // if (target.isEnd()) { // 在移动过程中实时根据当前组件状态,控制识别器的开闭状态 + // if ((event.offsetY - this.lastOffset) < 0) { + // this.childRecognizer.setEnabled(false) + // if (currentTarget.isEnd()) { + // this.currentRecognizer.setEnabled(false) + // } else { + // this.currentRecognizer.setEnabled(true) + // } + // } else { + // this.childRecognizer.setEnabled(true) + // this.currentRecognizer.setEnabled(false) + // } + // } else if (target.isBegin()) { + // if ((event.offsetY - this.lastOffset) > 0) { + // this.childRecognizer.setEnabled(false) + // if (currentTarget.isBegin()) { + // this.currentRecognizer.setEnabled(false) + // } else { + // this.currentRecognizer.setEnabled(true) + // } + // } else { + // this.childRecognizer.setEnabled(true) + // this.currentRecognizer.setEnabled(false) + // } + // } else { + // this.childRecognizer.setEnabled(true) + // this.currentRecognizer.setEnabled(false) + // } + // } + // this.lastOffset = event.offsetY + // }) + // ) + Text(this.text).width(400).margin(20) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0040.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0040.ets new file mode 100644 index 0000000000000000000000000000000000000000..22d1d75ea04089fe7029ae0b69464b8579ce917b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0040.ets @@ -0,0 +1,174 @@ +/* + * 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 ActionGestureEventMitigation0040 { + scroller: Scroller = new Scroller(); + scroller2: Scroller = new Scroller(); + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + private childRecognizer: GestureRecognizer = new GestureRecognizer(); + private currentRecognizer: GestureRecognizer = new GestureRecognizer(); + private lastOffset: number = 0; + @State text: string = ''; + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { // 外部滚动容器 + Column() { + Text("Scroll Area") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Scroll(this.scroller2) { // 内部滚动容器 + Column() { + Text("Scroll Area2") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Column() { + ForEach(this.arr, (item: number) => { + Text(item.toString()) + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + }, (item: string) => item) + }.width('100%') + } + } + .id("inner") + .width('100%') + .height(800) + }.width('100%') + } + .id("ActionGestureEventMitigation0040") + .height(600) + .scrollable(ScrollDirection.Vertical) // 滚动方向纵向 + .scrollBar(BarState.On) // 滚动条常驻显示 + .scrollBarColor(Color.Gray) // 滚动条颜色 + .scrollBarWidth(10) // 滚动条宽度 + .edgeEffect(EdgeEffect.None) + .shouldBuiltInRecognizerParallelWith((current: GestureRecognizer, others: Array) => { + // console.info('++++++') + if(others.length > 0) { + this.text ='Tag:'+ others[0].getTag() +' Type:'+others[0].getType()+' isBuiltIn:'+others[0].isBuiltIn()+' isEnabled:'+others[0].isEnabled() + +'getEventTargetInfo:'+JSON.stringify(others[0].getEventTargetInfo()); + } + for (let i = 0; i < others.length; i++) { + let target = others[i].getEventTargetInfo(); + if (target) { + if (target.getId() == "inner" && others[i].isBuiltIn() && others[i].getType() == GestureControl.GestureType.PAN_GESTURE) { // 找到将要组成并行手势的识别器 + this.currentRecognizer = current; // 保存当前组件的识别器 + this.childRecognizer = others[i]; // 保存将要组成并行手势的识别器 + return others[i]; // 返回将要组成并行手势的识别器 + } + } + } + return undefined; + }) + .onGestureRecognizerJudgeBegin((event: BaseGestureEvent, current: GestureRecognizer, others: Array) => { // 在识别器即将要成功时,根据当前组件状态,设置识别器使能状态 + if (current) { + let target = current.getEventTargetInfo(); + if (target) { + if (target.getId() == "outer" && current.isBuiltIn() && current.getType() == GestureControl.GestureType.PAN_GESTURE) { + if (others) { + for (let i = 0; i < others.length; i++) { + let target = others[i].getEventTargetInfo() as ScrollableTargetInfo; + if (target instanceof ScrollableTargetInfo && target.getId() == "inner") { // 找到响应链上对应并行的识别器 + let panEvent = event as PanGestureEvent; + if (target.isEnd()) { // 根据当前组件状态以及移动方向动态控制识别器使能状态 + if (panEvent && panEvent.offsetY < 0) { + this.childRecognizer.setEnabled(false) + this.currentRecognizer.setEnabled(true) + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } else if (target.isBegin()) { + if (panEvent.offsetY > 0) { + this.childRecognizer.setEnabled(false) + this.currentRecognizer.setEnabled(true) + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } + } + } + } + } + } + return GestureJudgeResult.CONTINUE; + }) + .gesture( // 绑定一个Pan手势作为动态控制器 + PanGesture() + .onActionUpdate((event: GestureEvent)=>{ + if (this.childRecognizer.getState() != GestureRecognizerState.SUCCESSFUL || this.currentRecognizer.getState() != GestureRecognizerState.SUCCESSFUL) { // 如果识别器状态不是SUCCESSFUL,则不做控制 + return; + } + let target = this.childRecognizer.getEventTargetInfo() as ScrollableTargetInfo; + let currentTarget = this.currentRecognizer.getEventTargetInfo() as ScrollableTargetInfo; + if (target instanceof ScrollableTargetInfo && currentTarget instanceof ScrollableTargetInfo) { + if (target.isEnd()) { // 在移动过程中实时根据当前组件状态,控制识别器的开闭状态 + if ((event.offsetY - this.lastOffset) < 0) { + this.childRecognizer.setEnabled(false) + if (currentTarget.isEnd()) { + this.currentRecognizer.setEnabled(false) + } else { + this.currentRecognizer.setEnabled(true) + } + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } else if (target.isBegin()) { + if ((event.offsetY - this.lastOffset) > 0) { + this.childRecognizer.setEnabled(false) + if (currentTarget.isBegin()) { + this.currentRecognizer.setEnabled(false) + } else { + this.currentRecognizer.setEnabled(true) + } + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } + this.lastOffset = event.offsetY + }) + ) + Text(this.text).width(400).margin(20) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0050.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0050.ets new file mode 100644 index 0000000000000000000000000000000000000000..37486b5c480e6f70464eae9fba24bf28e2caf00d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0050.ets @@ -0,0 +1,173 @@ +/* + * 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 ActionGestureEventMitigation0050 { + scroller: Scroller = new Scroller(); + scroller2: Scroller = new Scroller(); + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + private childRecognizer: GestureRecognizer = new GestureRecognizer(); + private currentRecognizer: GestureRecognizer = new GestureRecognizer(); + private lastOffset: number = 0; + @State text: string = ''; + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { // 外部滚动容器 + Column() { + Text("Scroll Area") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Scroll(this.scroller2) { // 内部滚动容器 + Column() { + Text("Scroll Area2") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Column() { + ForEach(this.arr, (item: number) => { + Text(item.toString()) + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + }, (item: string) => item) + }.width('100%') + } + } + .id("inner") + .width('100%') + .height(800) + }.width('100%') + } + .id("ActionGestureEventMitigation10") + .height(600) + .scrollable(ScrollDirection.Vertical) // 滚动方向纵向 + .scrollBar(BarState.On) // 滚动条常驻显示 + .scrollBarColor(Color.Gray) // 滚动条颜色 + .scrollBarWidth(10) // 滚动条宽度 + .edgeEffect(EdgeEffect.None) + .shouldBuiltInRecognizerParallelWith((current: GestureRecognizer, others: Array) => { + if(others.length > 0) { + this.text ='Tag:'+ others[0].getTag() +' Type:'+others[0].getType()+' isBuiltIn:'+others[0].isBuiltIn()+' isEnabled:'+others[0].isEnabled() + +'getEventTargetInfo:'+others[0].getEventTargetInfo(); + } + // for (let i = 0; i < others.length; i++) { + // let target = others[i].getEventTargetInfo(); + // if (target) { + // if (target.getId() == "inner" && others[i].isBuiltIn() && others[i].getType() == GestureControl.GestureType.PAN_GESTURE) { // 找到将要组成并行手势的识别器 + // this.currentRecognizer = current; // 保存当前组件的识别器 + // this.childRecognizer = others[i]; // 保存将要组成并行手势的识别器 + // return others[i]; // 返回将要组成并行手势的识别器 + // } + // } + // } + return undefined; + }) + .onGestureRecognizerJudgeBegin((event: BaseGestureEvent, current: GestureRecognizer, others: Array) => { // 在识别器即将要成功时,根据当前组件状态,设置识别器使能状态 + if (current) { + let target = current.getEventTargetInfo(); + if (target) { + if (target.getId() == "outer" && current.isBuiltIn() && current.getType() == GestureControl.GestureType.PAN_GESTURE) { + if (others) { + for (let i = 0; i < others.length; i++) { + let target = others[i].getEventTargetInfo() as ScrollableTargetInfo; + if (target instanceof ScrollableTargetInfo && target.getId() == "inner") { // 找到响应链上对应并行的识别器 + let panEvent = event as PanGestureEvent; + if (target.isEnd()) { // 根据当前组件状态以及移动方向动态控制识别器使能状态 + if (panEvent && panEvent.offsetY < 0) { + this.childRecognizer.setEnabled(false) + this.currentRecognizer.setEnabled(true) + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } else if (target.isBegin()) { + if (panEvent.offsetY > 0) { + this.childRecognizer.setEnabled(false) + this.currentRecognizer.setEnabled(true) + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } + } + } + } + } + } + return GestureJudgeResult.CONTINUE; + }) + // .gesture( // 绑定一个Pan手势作为动态控制器 + // PanGesture() + // .onActionUpdate((event: GestureEvent)=>{ + // if (this.childRecognizer.getState() != GestureRecognizerState.SUCCESSFUL || this.currentRecognizer.getState() != GestureRecognizerState.SUCCESSFUL) { // 如果识别器状态不是SUCCESSFUL,则不做控制 + // return; + // } + // let target = this.childRecognizer.getEventTargetInfo() as ScrollableTargetInfo; + // let currentTarget = this.currentRecognizer.getEventTargetInfo() as ScrollableTargetInfo; + // if (target instanceof ScrollableTargetInfo && currentTarget instanceof ScrollableTargetInfo) { + // if (target.isEnd()) { // 在移动过程中实时根据当前组件状态,控制识别器的开闭状态 + // if ((event.offsetY - this.lastOffset) < 0) { + // this.childRecognizer.setEnabled(false) + // if (currentTarget.isEnd()) { + // this.currentRecognizer.setEnabled(false) + // } else { + // this.currentRecognizer.setEnabled(true) + // } + // } else { + // this.childRecognizer.setEnabled(true) + // this.currentRecognizer.setEnabled(false) + // } + // } else if (target.isBegin()) { + // if ((event.offsetY - this.lastOffset) > 0) { + // this.childRecognizer.setEnabled(false) + // if (currentTarget.isBegin()) { + // this.currentRecognizer.setEnabled(false) + // } else { + // this.currentRecognizer.setEnabled(true) + // } + // } else { + // this.childRecognizer.setEnabled(true) + // this.currentRecognizer.setEnabled(false) + // } + // } else { + // this.childRecognizer.setEnabled(true) + // this.currentRecognizer.setEnabled(false) + // } + // } + // this.lastOffset = event.offsetY + // }) + // ) + Text(this.text).width(400).margin(20) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0070.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0070.ets new file mode 100644 index 0000000000000000000000000000000000000000..28ec117715994b12e2360f3f8fadbfab2c080ce3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0070.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 json from '@ohos.util.json' + +@Entry +@Component +struct ActionGestureEventMitigation0070 { + scroller: Scroller = new Scroller() + private arr: number[] = [0, 1, 2, 3, 4, 5] + private childRecognizer: GestureRecognizer = new GestureRecognizer() + private currentRecognizer: GestureRecognizer = new GestureRecognizer() + private lastOffset: number = 0 + @State flag1: boolean | null | undefined = undefined + @State flag2: boolean | null | undefined = false + @State currenttext:string = '' + @State childInfo:string = '' + @State fatherInfo:string = '' + build() { + Column() { + Scroll(this.scroller) { // 外部滚动容器 + Column() { + Text("Scroll Area") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%').height(100).fontSize(16) + .backgroundColor(Color.Blue) + .textAlign(TextAlign.Center).borderRadius(10) + } + }, (item: string) => item) + } + .listDirection(Axis.Vertical) // 排列方向 + .scrollBar(BarState.Off) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) // 每行之间的分界线 + .edgeEffect(EdgeEffect.None) // 边缘效果设置为Spring + // .height(1000) + .width('90%') + .id("inner") + }.width('100%').id("column") + } + .id("outer") + .height(600) + .backgroundColor(Color.Pink) + .scrollable(ScrollDirection.Vertical) // 滚动方向纵向 + .edgeEffect(EdgeEffect.None) + .shouldBuiltInRecognizerParallelWith((current: GestureRecognizer, others: Array) => { + this.childRecognizer = current; + let pan = current as PanRecognizer; + this.fatherInfo = current.getTag() + "; type" + current.getType() + "; isBuiltIn: " + + current.isBuiltIn() + "; getState:" + current.getState() + "; isEnable: " + current.isEnabled() + + "; getEventTargetInfo:" + current.getEventTargetInfo().getId() + "; PanRecognizer:" + json.stringify(pan.getPanGestureOptions().getDirection()) + return undefined; + }) + .parallelGesture( + GestureGroup(GestureMode.Parallel, + ) + ) + + Text("childInfo:" + this.childInfo) + Text("fatherInfo:" + this.fatherInfo) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0080.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0080.ets new file mode 100644 index 0000000000000000000000000000000000000000..145f10fe51fd1c8bd048875b5d27f785cd142f67 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0080.ets @@ -0,0 +1,173 @@ +/* + * 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 ActionGestureEventMitigation0080 { + scroller: Scroller = new Scroller(); + scroller2: Scroller = new Scroller(); + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + private childRecognizer: GestureRecognizer = new GestureRecognizer(); + private currentRecognizer: GestureRecognizer = new GestureRecognizer(); + private lastOffset: number = 0; + @State text: string = ''; + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { // 外部滚动容器 + Column() { + Text("Scroll Area") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Scroll(this.scroller2) { // 内部滚动容器 + Column() { + Text("Scroll Area2") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Column() { + ForEach(this.arr, (item: number) => { + Text(item.toString()) + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + }, (item: string) => item) + }.width('100%') + } + } + .id("inner") + .width('100%') + .height(800) + }.width('100%') + } + .id("ActionGestureEventMitigation0080") + .height(600) + .enabled(false) + .scrollBarColor(Color.Gray) // 滚动条颜色 + .scrollBarWidth(10) // 滚动条宽度 + .edgeEffect(EdgeEffect.None) + .shouldBuiltInRecognizerParallelWith((current: GestureRecognizer, others: Array) => { + console.info('++++++') + if(others.length > 0) { + this.text ='Tag:'+ others[0].getTag() +' Type:'+others[0].getType()+' isBuiltIn:'+others[0].isBuiltIn()+' isEnabled:'+others[0].isEnabled() + +'getEventTargetInfo:'+others[0].getEventTargetInfo(); + } + for (let i = 0; i < others.length; i++) { + let target = others[i].getEventTargetInfo(); + if (target) { + if (target.getId() == "inner" && others[i].isBuiltIn() && others[i].getType() == GestureControl.GestureType.PAN_GESTURE) { // 找到将要组成并行手势的识别器 + this.currentRecognizer = current; // 保存当前组件的识别器 + this.childRecognizer = others[i]; // 保存将要组成并行手势的识别器 + return others[i]; // 返回将要组成并行手势的识别器 + } + } + } + return undefined; + }) + .onGestureRecognizerJudgeBegin((event: BaseGestureEvent, current: GestureRecognizer, others: Array) => { // 在识别器即将要成功时,根据当前组件状态,设置识别器使能状态 + if (current) { + let target = current.getEventTargetInfo(); + if (target) { + if (target.getId() == "outer" && current.isBuiltIn() && current.getType() == GestureControl.GestureType.PAN_GESTURE) { + if (others) { + for (let i = 0; i < others.length; i++) { + let target = others[i].getEventTargetInfo() as ScrollableTargetInfo; + if (target instanceof ScrollableTargetInfo && target.getId() == "inner") { // 找到响应链上对应并行的识别器 + let panEvent = event as PanGestureEvent; + if (target.isEnd()) { // 根据当前组件状态以及移动方向动态控制识别器使能状态 + if (panEvent && panEvent.offsetY < 0) { + this.childRecognizer.setEnabled(false) + this.currentRecognizer.setEnabled(true) + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } else if (target.isBegin()) { + if (panEvent.offsetY > 0) { + this.childRecognizer.setEnabled(false) + this.currentRecognizer.setEnabled(true) + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } + } + } + } + } + } + return GestureJudgeResult.CONTINUE; + }) + // .gesture( // 绑定一个Pan手势作为动态控制器 + // PanGesture() + // .onActionUpdate((event: GestureEvent)=>{ + // if (this.childRecognizer.getState() != GestureRecognizerState.SUCCESSFUL || this.currentRecognizer.getState() != GestureRecognizerState.SUCCESSFUL) { // 如果识别器状态不是SUCCESSFUL,则不做控制 + // return; + // } + // let target = this.childRecognizer.getEventTargetInfo() as ScrollableTargetInfo; + // let currentTarget = this.currentRecognizer.getEventTargetInfo() as ScrollableTargetInfo; + // if (target instanceof ScrollableTargetInfo && currentTarget instanceof ScrollableTargetInfo) { + // if (target.isEnd()) { // 在移动过程中实时根据当前组件状态,控制识别器的开闭状态 + // if ((event.offsetY - this.lastOffset) < 0) { + // this.childRecognizer.setEnabled(false) + // if (currentTarget.isEnd()) { + // this.currentRecognizer.setEnabled(false) + // } else { + // this.currentRecognizer.setEnabled(true) + // } + // } else { + // this.childRecognizer.setEnabled(true) + // this.currentRecognizer.setEnabled(false) + // } + // } else if (target.isBegin()) { + // if ((event.offsetY - this.lastOffset) > 0) { + // this.childRecognizer.setEnabled(false) + // if (currentTarget.isBegin()) { + // this.currentRecognizer.setEnabled(false) + // } else { + // this.currentRecognizer.setEnabled(true) + // } + // } else { + // this.childRecognizer.setEnabled(true) + // this.currentRecognizer.setEnabled(false) + // } + // } else { + // this.childRecognizer.setEnabled(true) + // this.currentRecognizer.setEnabled(false) + // } + // } + // this.lastOffset = event.offsetY + // }) + // ) + Text(this.text).width(400).margin(20) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0090.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0090.ets new file mode 100644 index 0000000000000000000000000000000000000000..51191f3aae260494ccc6df7852f0fbc29663c268 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0090.ets @@ -0,0 +1,93 @@ +/* + * 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 json from '@ohos.util.json' +import { InputMethodListDialog } from '@ohos.inputMethodList' + +@Entry +@Component +struct ActionGestureEventMitigation0090 { + scroller: Scroller = new Scroller() + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + private childRecognizer: GestureRecognizer = new GestureRecognizer() + private currentRecognizer: GestureRecognizer = new GestureRecognizer() + private lastOffset: number = 0 + @State flag1: boolean | null | undefined = undefined + @State flag2: boolean | null | undefined = false + @State currenttext:string = '' + @State childInfo:string = '' + @State fatherInfo:string = '' + build() { + Column() { + Scroll(this.scroller) { // 外部滚动容器 + Column() { + Text("Scroll Area") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%').height(100).fontSize(16) + .backgroundColor(Color.Blue) + .textAlign(TextAlign.Center).borderRadius(10) + } + }, (item: string) => item) + }.id('ActionGestureEventMitigation0090_inner') + .listDirection(Axis.Vertical) // 排列方向 + .scrollBar(BarState.Off) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) // 每行之间的分界线 + .edgeEffect(EdgeEffect.None) // 边缘效果设置为Spring + // .height(1000) + .width('90%') + .id("inner") + }.width('100%').id("ActionGestureEventMitigation0090_outer") + } + .id("outer") + .height(600) + .backgroundColor(Color.Pink) + .scrollable(ScrollDirection.Vertical) // 滚动方向纵向 + .edgeEffect(EdgeEffect.None) + .shouldBuiltInRecognizerParallelWith((current: GestureRecognizer, others: Array) => { + this.childRecognizer = current; + let pan = current as PanRecognizer; + this.fatherInfo = current.getTag() + "; type" + current.getType() + "; isBuiltIn: " + + current.isBuiltIn() + "; getState:" + current.getState() + "; isEnable: " + current.isEnabled() + + "; getEventTargetInfo:" + current.getEventTargetInfo().getId() + "; PanRecognizer:" + json.stringify(pan.getPanGestureOptions().getDirection()) + return undefined; + }) + .parallelGesture( + GestureGroup(GestureMode.Parallel, + PanGesture({ + // distance: 100, + // fingers:2 + }) + .onActionStart(()=>{ + console.log("触发scroll嵌套button *** 父组件 ***自定义手势") + }) + .tag("father_pan_gesture"), + ) + ) + + Text("childInfo:" + this.childInfo) + Text("fatherInfo:" + this.fatherInfo) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0110.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0110.ets new file mode 100644 index 0000000000000000000000000000000000000000..80f1c2cbf0b9ee1705c74a95f13407559a7bbb6a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0110.ets @@ -0,0 +1,168 @@ +/* + * 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 ActionGestureEventMitigation0110 { + scroller: Scroller = new Scroller(); + scroller2: Scroller = new Scroller(); + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + private childRecognizer: GestureRecognizer = new GestureRecognizer(); + private currentRecognizer: GestureRecognizer = new GestureRecognizer(); + private lastOffset: number = 0; + @State text: string = ''; + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { // 外部滚动容器 + Column() { + Text("Scroll Area") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Scroll(this.scroller2) { // 内部滚动容器 + Column() { + Text("Scroll Area2") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Column() { + ForEach(this.arr, (item: number) => { + Text(item.toString()) + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + }, (item: string) => item) + }.width('100%') + } + } + .id("inner") + .width('100%') + .height(800) + }.width('100%') + } + .id("ActionGestureEventMitigation0110") + .height(600) + .scrollBarColor(Color.Gray) // 滚动条颜色 + .scrollBarWidth(10) // 滚动条宽度 + .edgeEffect(EdgeEffect.None) + .shouldBuiltInRecognizerParallelWith((current: GestureRecognizer, others: Array) => { + this.text = current.isEnabled() +'' + for (let i = 0; i < others.length; i++) { + let target = others[i].getEventTargetInfo(); + if (target) { + if (target.getId() == "inner" && others[i].isBuiltIn() && others[i].getType() == GestureControl.GestureType.PAN_GESTURE) { // 找到将要组成并行手势的识别器 + this.currentRecognizer = current; // 保存当前组件的识别器 + this.childRecognizer = others[i]; // 保存将要组成并行手势的识别器 + return others[i]; // 返回将要组成并行手势的识别器 + } + } + } + return undefined; + }) + .onGestureRecognizerJudgeBegin((event: BaseGestureEvent, current: GestureRecognizer, others: Array) => { // 在识别器即将要成功时,根据当前组件状态,设置识别器使能状态 + if (current) { + let target = current.getEventTargetInfo(); + if (target) { + if (target.getId() == "outer" && current.isBuiltIn() && current.getType() == GestureControl.GestureType.PAN_GESTURE) { + if (others) { + for (let i = 0; i < others.length; i++) { + let target = others[i].getEventTargetInfo() as ScrollableTargetInfo; + if (target instanceof ScrollableTargetInfo && target.getId() == "inner") { // 找到响应链上对应并行的识别器 + let panEvent = event as PanGestureEvent; + if (target.isEnd()) { // 根据当前组件状态以及移动方向动态控制识别器使能状态 + if (panEvent && panEvent.offsetY < 0) { + this.childRecognizer.setEnabled(false) + this.currentRecognizer.setEnabled(true) + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } else if (target.isBegin()) { + if (panEvent.offsetY > 0) { + this.childRecognizer.setEnabled(false) + this.currentRecognizer.setEnabled(true) + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } + } + } + } + } + } + return GestureJudgeResult.CONTINUE; + }) + // .gesture( // 绑定一个Pan手势作为动态控制器 + // PanGesture() + // .onActionUpdate((event: GestureEvent)=>{ + // if (this.childRecognizer.getState() != GestureRecognizerState.SUCCESSFUL || this.currentRecognizer.getState() != GestureRecognizerState.SUCCESSFUL) { // 如果识别器状态不是SUCCESSFUL,则不做控制 + // return; + // } + // let target = this.childRecognizer.getEventTargetInfo() as ScrollableTargetInfo; + // let currentTarget = this.currentRecognizer.getEventTargetInfo() as ScrollableTargetInfo; + // if (target instanceof ScrollableTargetInfo && currentTarget instanceof ScrollableTargetInfo) { + // if (target.isEnd()) { // 在移动过程中实时根据当前组件状态,控制识别器的开闭状态 + // if ((event.offsetY - this.lastOffset) < 0) { + // this.childRecognizer.setEnabled(false) + // if (currentTarget.isEnd()) { + // this.currentRecognizer.setEnabled(false) + // } else { + // this.currentRecognizer.setEnabled(true) + // } + // } else { + // this.childRecognizer.setEnabled(true) + // this.currentRecognizer.setEnabled(false) + // } + // } else if (target.isBegin()) { + // if ((event.offsetY - this.lastOffset) > 0) { + // this.childRecognizer.setEnabled(false) + // if (currentTarget.isBegin()) { + // this.currentRecognizer.setEnabled(false) + // } else { + // this.currentRecognizer.setEnabled(true) + // } + // } else { + // this.childRecognizer.setEnabled(true) + // this.currentRecognizer.setEnabled(false) + // } + // } else { + // this.childRecognizer.setEnabled(true) + // this.currentRecognizer.setEnabled(false) + // } + // } + // this.lastOffset = event.offsetY + // }) + // ) + Text('isEnable: ' + this.text).width(400).margin(30) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0120.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0120.ets new file mode 100644 index 0000000000000000000000000000000000000000..5f8cee439df764d603f1ad0d8929faf5d7f48705 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0120.ets @@ -0,0 +1,168 @@ +/* + * 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 ActionGestureEventMitigation0120 { + scroller: Scroller = new Scroller(); + scroller2: Scroller = new Scroller(); + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + private childRecognizer: GestureRecognizer = new GestureRecognizer(); + private currentRecognizer: GestureRecognizer = new GestureRecognizer(); + private lastOffset: number = 0; + @State text: string = ''; + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { // 外部滚动容器 + Column() { + Text("Scroll Area") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Scroll(this.scroller2) { // 内部滚动容器 + Column() { + Text("Scroll Area2") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Column() { + ForEach(this.arr, (item: number) => { + Text(item.toString()) + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + }, (item: string) => item) + }.width('100%') + } + } + .id("inner") + .width('100%') + .height(800) + }.width('100%') + } + .id("ActionGestureEventMitigation0120") + .height(600) + .scrollBarColor(Color.Gray) // 滚动条颜色 + .scrollBarWidth(10) // 滚动条宽度 + .edgeEffect(EdgeEffect.None) + .shouldBuiltInRecognizerParallelWith((current: GestureRecognizer, others: Array) => { + this.text = current.isEnabled() +'' + for (let i = 0; i < others.length; i++) { + let target = others[i].getEventTargetInfo(); + if (target) { + if (target.getId() == "inner" && others[i].isBuiltIn() && others[i].getType() == GestureControl.GestureType.PAN_GESTURE) { // 找到将要组成并行手势的识别器 + this.currentRecognizer = current; // 保存当前组件的识别器 + this.childRecognizer = others[i]; // 保存将要组成并行手势的识别器 + return others[i]; // 返回将要组成并行手势的识别器 + } + } + } + return undefined; + }) + .onGestureRecognizerJudgeBegin((event: BaseGestureEvent, current: GestureRecognizer, others: Array) => { // 在识别器即将要成功时,根据当前组件状态,设置识别器使能状态 + if (current) { + let target = current.getEventTargetInfo(); + if (target) { + if (target.getId() == "outer" && current.isBuiltIn() && current.getType() == GestureControl.GestureType.PAN_GESTURE) { + if (others) { + for (let i = 0; i < others.length; i++) { + let target = others[i].getEventTargetInfo() as ScrollableTargetInfo; + if (target instanceof ScrollableTargetInfo && target.getId() == "inner") { // 找到响应链上对应并行的识别器 + let panEvent = event as PanGestureEvent; + if (target.isEnd()) { // 根据当前组件状态以及移动方向动态控制识别器使能状态 + if (panEvent && panEvent.offsetY < 0) { + this.childRecognizer.setEnabled(false) + this.currentRecognizer.setEnabled(true) + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } else if (target.isBegin()) { + if (panEvent.offsetY > 0) { + this.childRecognizer.setEnabled(false) + this.currentRecognizer.setEnabled(true) + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } + } + } + } + } + } + return GestureJudgeResult.CONTINUE; + }) + // .gesture( // 绑定一个Pan手势作为动态控制器 + // PanGesture() + // .onActionUpdate((event: GestureEvent)=>{ + // if (this.childRecognizer.getState() != GestureRecognizerState.SUCCESSFUL || this.currentRecognizer.getState() != GestureRecognizerState.SUCCESSFUL) { // 如果识别器状态不是SUCCESSFUL,则不做控制 + // return; + // } + // let target = this.childRecognizer.getEventTargetInfo() as ScrollableTargetInfo; + // let currentTarget = this.currentRecognizer.getEventTargetInfo() as ScrollableTargetInfo; + // if (target instanceof ScrollableTargetInfo && currentTarget instanceof ScrollableTargetInfo) { + // if (target.isEnd()) { // 在移动过程中实时根据当前组件状态,控制识别器的开闭状态 + // if ((event.offsetY - this.lastOffset) < 0) { + // this.childRecognizer.setEnabled(false) + // if (currentTarget.isEnd()) { + // this.currentRecognizer.setEnabled(false) + // } else { + // this.currentRecognizer.setEnabled(true) + // } + // } else { + // this.childRecognizer.setEnabled(true) + // this.currentRecognizer.setEnabled(false) + // } + // } else if (target.isBegin()) { + // if ((event.offsetY - this.lastOffset) > 0) { + // this.childRecognizer.setEnabled(false) + // if (currentTarget.isBegin()) { + // this.currentRecognizer.setEnabled(false) + // } else { + // this.currentRecognizer.setEnabled(true) + // } + // } else { + // this.childRecognizer.setEnabled(true) + // this.currentRecognizer.setEnabled(false) + // } + // } else { + // this.childRecognizer.setEnabled(true) + // this.currentRecognizer.setEnabled(false) + // } + // } + // this.lastOffset = event.offsetY + // }) + // ) + Text('isEnable: ' + this.text).width(400).margin(30) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0130.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0130.ets new file mode 100644 index 0000000000000000000000000000000000000000..bb4a1d28336f582753e06c88116569662ae5e3ec --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0130.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. + */ +import json from '@ohos.util.json' + +@Entry +@Component +struct ActionGestureEventMitigation0130 { + scroller: Scroller = new Scroller() + private arr: number[] = [0, 1, 2, 3, 4, 5] + private childRecognizer: GestureRecognizer = new GestureRecognizer() + private currentRecognizer: GestureRecognizer = new GestureRecognizer() + private lastOffset: number = 0 + @State flag1: boolean | null | undefined = undefined + @State flag2: boolean | null | undefined = false + @State currenttext:string = '' + @State childInfo:string = '' + @State fatherInfo:string = '' + build() { + Column() { + Scroll(this.scroller) { // 外部滚动容器 + Column() { + Text("Scroll Area") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%').height(100).fontSize(16) + .backgroundColor(Color.Blue) + .textAlign(TextAlign.Center).borderRadius(10) + } + }, (item: string) => item) + } + .listDirection(Axis.Vertical) // 排列方向 + .scrollBar(BarState.Off) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) // 每行之间的分界线 + .edgeEffect(EdgeEffect.None) // 边缘效果设置为Spring + // .height(1000) + .width('90%') + .id("inner") + }.width('100%').id("column") + } + .id("outer") + .height(600) + .backgroundColor(Color.Pink) + .scrollable(ScrollDirection.Vertical) // 滚动方向纵向 + .edgeEffect(EdgeEffect.None) + .shouldBuiltInRecognizerParallelWith((current: GestureRecognizer, others: Array) => { + this.childRecognizer = current; + let pan = current as PanRecognizer; + this.fatherInfo = current.getTag() + "; type" + current.getType() + "; isBuiltIn: " + + current.isBuiltIn() + "; getState:" + current.getState() + "; isEnable: " + current.isEnabled() + + "; getEventTargetInfo:" + current.getEventTargetInfo().getId() + "; PanRecognizer:" + json.stringify(pan.getPanGestureOptions().getDirection()) + return undefined; + }) + .parallelGesture( + GestureGroup(GestureMode.Parallel, + PanGesture({ + // distance: 100, + // fingers:2 + }) + .onActionStart(()=>{ + console.log("触发scroll嵌套button *** 父组件 ***自定义手势") + }) + .tag("father_pan_gesture"), + ) + ) + + Text("childInfo:" + this.childInfo) + Text("fatherInfo:" + this.fatherInfo) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0140.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0140.ets new file mode 100644 index 0000000000000000000000000000000000000000..75594d0471159e3b54397cd1a07be6d5879277f4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0140.ets @@ -0,0 +1,78 @@ +import json from '@ohos.util.json' + +@Entry +@Component +struct ActionGestureEventMitigation0140 { + scroller: Scroller = new Scroller() + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + private childRecognizer: GestureRecognizer = new GestureRecognizer() + private currentRecognizer: GestureRecognizer = new GestureRecognizer() + private lastOffset: number = 0 + @State flag1: boolean | null | undefined = undefined + @State flag2: boolean | null | undefined = false + @State currenttext:string = '' + @State childInfo:string = '' + @State fatherInfo:string = '' + build() { + Column() { + Scroll(this.scroller) { // 外部滚动容器 + Column() { + Text("Scroll Area") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%').height(100).fontSize(16) + .backgroundColor(Color.Blue) + .textAlign(TextAlign.Center).borderRadius(10) + } + }, (item: string) => item) + } + .listDirection(Axis.Vertical) // 排列方向 + .scrollBar(BarState.Off) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) // 每行之间的分界线 + .edgeEffect(EdgeEffect.None) // 边缘效果设置为Spring + // .height(1000) + .width('90%') + .id("inner") + }.width('100%').id("column") + } + .id("outer") + .height(600) + .backgroundColor(Color.Pink) + .scrollable(ScrollDirection.Vertical) // 滚动方向纵向 + .edgeEffect(EdgeEffect.None) + .shouldBuiltInRecognizerParallelWith((current: GestureRecognizer, others: Array) => { + this.childRecognizer = current; + let pan = current as PanRecognizer; + this.fatherInfo = current.getTag() + "; type" + current.getType() + "; isBuiltIn: " + + current.isBuiltIn() + "; getState:" + current.getState() + "; isEnable: " + current.isEnabled() + + "; getEventTargetInfo:" + current.getEventTargetInfo().getId() + "; PanRecognizer:" + json.stringify(pan.getPanGestureOptions().getDirection()) + return undefined; + }) + .parallelGesture( + GestureGroup(GestureMode.Parallel, + PanGesture({ + // distance: 100, + // fingers:2 + }) + .onActionStart(()=>{ + console.log("触发scroll嵌套button *** 父组件 ***自定义手势") + }) + .tag("father_pan_gesture"), + ) + ) + + Text("childInfo:" + this.childInfo) + Text("fatherInfo:" + this.fatherInfo) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0170.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0170.ets new file mode 100644 index 0000000000000000000000000000000000000000..10a3ac3e81c93351d0d566a87cb9a39409864a44 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0170.ets @@ -0,0 +1,78 @@ +import json from '@ohos.util.json' + +@Entry +@Component +struct ActionGestureEventMitigation0170 { + scroller: Scroller = new Scroller() + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + private childRecognizer: GestureRecognizer = new GestureRecognizer() + private currentRecognizer: GestureRecognizer = new GestureRecognizer() + private lastOffset: number = 0 + @State flag1: boolean | null | undefined = undefined + @State flag2: boolean | null | undefined = false + @State currenttext:string = '' + @State childInfo:string = '' + @State fatherInfo:string = '' + build() { + Column() { + Scroll(this.scroller) { // 外部滚动容器 + Column() { + Text("Scroll Area") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%').height(100).fontSize(16) + .backgroundColor(Color.Blue) + .textAlign(TextAlign.Center).borderRadius(10) + } + }, (item: string) => item) + } + .listDirection(Axis.Vertical) // 排列方向 + .scrollBar(BarState.Off) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) // 每行之间的分界线 + .edgeEffect(EdgeEffect.None) // 边缘效果设置为Spring + // .height(1000) + .width('90%') + .id("inner") + }.width('100%').id("column") + } + .id("outer") + .height(600) + .backgroundColor(Color.Pink) + .scrollable(ScrollDirection.Vertical) // 滚动方向纵向 + .edgeEffect(EdgeEffect.None) + .shouldBuiltInRecognizerParallelWith((current: GestureRecognizer, others: Array) => { + this.childRecognizer = current; + let pan = current as PanRecognizer; + this.fatherInfo = current.getTag() + "; type" + current.getType() + "; isBuiltIn: " + + current.isBuiltIn() + "; getState:" + current.getState() + "; isEnable: " + current.isEnabled() + + "; getEventTargetInfo:" + current.getEventTargetInfo().getId() + "; PanRecognizer:" + json.stringify(pan.getPanGestureOptions().getDirection()) + return undefined; + }) + .parallelGesture( + GestureGroup(GestureMode.Parallel, + PanGesture({ + // distance: 100, + // fingers:2 + }) + .onActionStart(()=>{ + console.log("触发scroll嵌套button *** 父组件 ***自定义手势") + }) + .tag("father_pan_gesture"), + ) + ) + + Text("childInfo:" + this.childInfo) + Text("fatherInfo:" + this.fatherInfo) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0180.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0180.ets new file mode 100644 index 0000000000000000000000000000000000000000..0fb513b2a65a70f965819513ffac681691a71fe4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0180.ets @@ -0,0 +1,78 @@ +import json from '@ohos.util.json' + +@Entry +@Component +struct ActionGestureEventMitigation0180 { + scroller: Scroller = new Scroller() + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + private childRecognizer: GestureRecognizer = new GestureRecognizer() + private currentRecognizer: GestureRecognizer = new GestureRecognizer() + private lastOffset: number = 0 + @State flag1: boolean | null | undefined = undefined + @State flag2: boolean | null | undefined = false + @State currenttext:string = '' + @State childInfo:string = '' + @State fatherInfo:string = '' + build() { + Column() { + Scroll(this.scroller) { // 外部滚动容器 + Column() { + Text("Scroll Area") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%').height(100).fontSize(16) + .backgroundColor(Color.Blue) + .textAlign(TextAlign.Center).borderRadius(10) + } + }, (item: string) => item) + } + .listDirection(Axis.Vertical) // 排列方向 + .scrollBar(BarState.Off) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) // 每行之间的分界线 + .edgeEffect(EdgeEffect.None) // 边缘效果设置为Spring + // .height(1000) + .width('90%') + .id("inner") + }.width('100%').id("column") + } + .id("outer") + .height(600) + .backgroundColor(Color.Pink) + .scrollable(ScrollDirection.Vertical) // 滚动方向纵向 + .edgeEffect(EdgeEffect.None) + .shouldBuiltInRecognizerParallelWith((current: GestureRecognizer, others: Array) => { + this.childRecognizer = current; + let pan = current as PanRecognizer; + this.fatherInfo = current.getTag() + "; type" + current.getType() + "; isBuiltIn: " + + current.isBuiltIn() + "; getState:" + current.getState() + "; isEnable: " + current.isEnabled() + + "; getEventTargetInfo:" + current.getEventTargetInfo().getId() + "; PanRecognizer:" + json.stringify(pan.getPanGestureOptions().getDirection()) + return undefined; + }) + .parallelGesture( + GestureGroup(GestureMode.Parallel, + PanGesture({ + // distance: 100, + // fingers:2 + }) + .onActionStart(()=>{ + console.log("触发scroll嵌套button *** 父组件 ***自定义手势") + }) + .tag("father_pan_gesture"), + ) + ) + + Text("childInfo:" + this.childInfo) + Text("fatherInfo:" + this.fatherInfo) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0190.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0190.ets new file mode 100644 index 0000000000000000000000000000000000000000..3f9215e63d6c8a2bf092ff3d6ab9a4dc54233b38 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0190.ets @@ -0,0 +1,218 @@ +/* + * 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. + */ + +class MyButtonModifier implements GestureModifier { + supportDoubleTap: boolean = true + + applyGesture(event: UIGestureEvent): void { + if (this.supportDoubleTap) { + event.addGesture( + new PanGestureHandler() + .onActionStart(() => { + console.log("Pan start"); + }).tag("GestureModifier") + + ) + } else { + event.addGesture( + new PanGestureHandler() + .onActionStart(() => { + console.log("Pan start"); + }) + ) + } + } +} + +@Entry +@Component +struct ActionGestureEventMitigation0190 { + scroller: Scroller = new Scroller() + scroller2: Scroller = new Scroller() + scroller3: Scroller = new Scroller() + @State text: string = "hello world" + @State flag1: boolean | null | undefined = true + @State flag2: boolean | null | undefined = true + @State modifier: MyButtonModifier = new MyButtonModifier() + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + private childRecognizer: GestureRecognizer = new GestureRecognizer() + private currentRecognizer: GestureRecognizer = new GestureRecognizer() + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + Column() { + Column() { + Row() { + Button("Father:" + this.flag1).width("45%") + .onClick(() => { + this.flag2 = !this.flag2 + }) + Button("Child:" + this.flag2).width("45%") + .onClick(() => { + this.flag2 = !this.flag2 + }) + } + + Row() { + Button("Father:null").width("45%") + .onClick(() => { + this.flag1 = null + }) + Button("Child:null").width("45%") + .onClick(() => { + this.flag2 = null + }) + } + + Row() { + Button("Father:undefined").width("45%") + .onClick(() => { + this.flag1 = undefined + }) + Button("Child:undefined").width("45%") + .onClick(() => { + this.flag2 = undefined + }) + } + } + // Text("Scroll Area") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + // .fontSize(16) + // .textAlign(TextAlign.Center) + .margin({ top: 10 }) + + Scroll(this.scroller2) { + Column() { + Text("Scroll Area2") + .width('90%') + .height(150) + .backgroundColor("#ff5ae3de") + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Column() { + ForEach(this.arr, (item: number) => { + Text(item.toString()) + .width('90%') + .height(150) + .backgroundColor("#ff5ae3de") + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + }, (item: string) => item) + }.width('100%') + } + .id("Column") + } + .gestureModifier(this.modifier) + .gesture(PanGesture({ + // distance: 100, + // fingers:2 + }) + .onActionStart(() => { + console.log("xushijie: pan ") + }) + .tag("pan") + ) + .parallelGesture( + GestureGroup(GestureMode.Parallel, + PanGesture({ + // distance: 100, + // fingers:2 + }) + .onActionStart(() => { + console.log("xushijie: 触发scroll嵌套scroll *** 子组件 ***自定义手势") + }) + .tag("child_pan_gesture"), + ) + ) + .id("inner") + .width('100%') + .height(800) + }.width('100%') + } + .id("outer") + .height(600) + .scrollable(ScrollDirection.Vertical) // 滚动方向纵向 + .scrollBar(BarState.On) // 滚动条常驻显示 + .scrollBarColor(Color.Red) // 滚动条颜色 + .scrollBarWidth(30) // 滚动条宽度 + .edgeEffect(EdgeEffect.None) + .onScroll((xOffset: number, yOffset: number) => { + console.info(xOffset + ' ' + yOffset) + }) + .onScrollEdge((side: Edge) => { + console.info('xushijie: To the edge') + }) + .onScrollStop(() => { + console.info('xushijie: Scroll Stop') + }) + .parallelGesture( + GestureGroup(GestureMode.Parallel, + PanGesture({ + // distance: 100, + // fingers:2 + }) + .onActionStart(() => { + console.log("xushijie: 触发scroll嵌套scroll *** 父组件 ***自定义手势") + }) + .tag("father_pan_gesture"), + ) + ) + .shouldBuiltInRecognizerParallelWith((current: GestureRecognizer, others: Array) => { + this.currentRecognizer = current; + // 打印current信息 + console.log("xushijie: shouldBuiltInRecognizerParallelWith *** father current ***: " + current.getTag() + "; type" + current.getType() + "; isBuiltIn: " + + current.isBuiltIn() + "; getID: " + current.getEventTargetInfo() + .getId() + "; getState:" + current.getState() + "; isEnable: " + current.isEnabled()) + + for (let i = 0; i < others.length; i++) { + // 循环打印other[i] + others[i].setEnabled(this.flag2) + console.log("xushijie: shouldBuiltInRecognizerParallelWith *** father others[i] ***: " + others[i].getTag() + "; i: " + i.toString() + "; length:" + others.length.toString() + + "; type" + others[i].getType() + "; isBuiltIn: " + others[i].isBuiltIn() + "; getID: " + + others[i].getEventTargetInfo() + .getId() + "; getState:" + others[i].getState() + "; isEnable: " + others[i].isEnabled()) + + let pan = others[i] as PanRecognizer; + if (pan) { + console.log("xushijie: shouldBuiltInRecognizerParallelWith father *** pan ***: ", pan.getType() + " getDirection " + pan.getPanGestureOptions() + .getDirection()); + } + let target = others[i].getEventTargetInfo(); + if (target) { + let id = target.getId(); + if (id == "inner" && others[i].isBuiltIn() && others[i].getType() == GestureControl.GestureType.PAN_GESTURE) { + // 是子组件的手势 && 系统内置手势 && others[i]手势为 PAN_GESTURE 拖动手势 + console.log('xushijie: shouldBuiltInRecognizerParallelWith father all fit') + this.childRecognizer = others[i]; + // return others[i]; + } + + } + } + + return this.childRecognizer; + }) + + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation20.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation20.ets new file mode 100644 index 0000000000000000000000000000000000000000..edab69aa4e624b617d35aba1735885f639f8093c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation20.ets @@ -0,0 +1,171 @@ +/* + * 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 ActionGestureEventMitigation20 { + scroller: Scroller = new Scroller(); + scroller2: Scroller = new Scroller(); + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + private childRecognizer: GestureRecognizer = new GestureRecognizer(); + private currentRecognizer: GestureRecognizer = new GestureRecognizer(); + private lastOffset: number = 0; + @State text: string = ''; + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { // 外部滚动容器 + Column() { + Text("Scroll Area") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Scroll(this.scroller2) { // 内部滚动容器 + Column() { + Text("Scroll Area2") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Column() { + ForEach(this.arr, (item: number) => { + Text(item.toString()) + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + }, (item: string) => item) + }.width('100%') + } + } + .id("inner") + .width('100%') + .height(800) + }.width('100%') + } + .id("ActionGestureEventMitigation20") + .height(600) + .scrollable(ScrollDirection.Vertical) // 滚动方向纵向 + .scrollBar(BarState.On) // 滚动条常驻显示 + .scrollBarColor(Color.Gray) // 滚动条颜色 + .scrollBarWidth(10) // 滚动条宽度 + .edgeEffect(EdgeEffect.None) + .shouldBuiltInRecognizerParallelWith((current: GestureRecognizer, others: Array) => { + for (let i = 0; i < others.length; i++) { + let target = others[i].getEventTargetInfo(); + if (target) { + if (target.getId() == "inner" && others[i].isBuiltIn() && others[i].getType() == GestureControl.GestureType.PAN_GESTURE) { // 找到将要组成并行手势的识别器 + this.currentRecognizer = current; // 保存当前组件的识别器 + this.childRecognizer = others[i]; // 保存将要组成并行手势的识别器 + return others[i]; // 返回将要组成并行手势的识别器 + } + } + } + this.text ='Tag:'+ current.getTag() +' Type:'+current.getType()+' isBuiltIn:'+current.isBuiltIn()+' isEnabled:'+current.isEnabled() + +'getEventTargetInfo:'+current.getEventTargetInfo(); + return undefined; + }) + .onGestureRecognizerJudgeBegin((event: BaseGestureEvent, current: GestureRecognizer, others: Array) => { // 在识别器即将要成功时,根据当前组件状态,设置识别器使能状态 + if (current) { + let target = current.getEventTargetInfo(); + if (target) { + if (target.getId() == "outer" && current.isBuiltIn() && current.getType() == GestureControl.GestureType.PAN_GESTURE) { + if (others) { + for (let i = 0; i < others.length; i++) { + let target = others[i].getEventTargetInfo() as ScrollableTargetInfo; + if (target instanceof ScrollableTargetInfo && target.getId() == "inner") { // 找到响应链上对应并行的识别器 + let panEvent = event as PanGestureEvent; + if (target.isEnd()) { // 根据当前组件状态以及移动方向动态控制识别器使能状态 + if (panEvent && panEvent.offsetY < 0) { + this.childRecognizer.setEnabled(false) + this.currentRecognizer.setEnabled(true) + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } else if (target.isBegin()) { + if (panEvent.offsetY > 0) { + this.childRecognizer.setEnabled(false) + this.currentRecognizer.setEnabled(true) + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } + } + } + } + } + } + return GestureJudgeResult.CONTINUE; + }) + .gesture( // 绑定一个Pan手势作为动态控制器 + PanGesture() + .onActionUpdate((event: GestureEvent)=>{ + if (this.childRecognizer.getState() != GestureRecognizerState.SUCCESSFUL || this.currentRecognizer.getState() != GestureRecognizerState.SUCCESSFUL) { // 如果识别器状态不是SUCCESSFUL,则不做控制 + return; + } + let target = this.childRecognizer.getEventTargetInfo() as ScrollableTargetInfo; + let currentTarget = this.currentRecognizer.getEventTargetInfo() as ScrollableTargetInfo; + if (target instanceof ScrollableTargetInfo && currentTarget instanceof ScrollableTargetInfo) { + if (target.isEnd()) { // 在移动过程中实时根据当前组件状态,控制识别器的开闭状态 + if ((event.offsetY - this.lastOffset) < 0) { + this.childRecognizer.setEnabled(false) + if (currentTarget.isEnd()) { + this.currentRecognizer.setEnabled(false) + } else { + this.currentRecognizer.setEnabled(true) + } + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } else if (target.isBegin()) { + if ((event.offsetY - this.lastOffset) > 0) { + this.childRecognizer.setEnabled(false) + if (currentTarget.isBegin()) { + this.currentRecognizer.setEnabled(false) + } else { + this.currentRecognizer.setEnabled(true) + } + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } + this.lastOffset = event.offsetY + }) + ) + Text(this.text).margin({top:20}) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation60.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation60.ets new file mode 100644 index 0000000000000000000000000000000000000000..e5c097f1bbd0b4603045fc57d91fbaef5b820795 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation60.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. + */ +@Entry +@Component +struct ActionGestureEventMitigation60 { + scroller: Scroller = new Scroller(); + scroller2: Scroller = new Scroller(); + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + private childRecognizer: GestureRecognizer = new GestureRecognizer(); + private currentRecognizer: GestureRecognizer = new GestureRecognizer(); + private lastOffset: number = 0; + @State text: string = ''; + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { // 外部滚动容器 + Column() { + Text("Scroll Area") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Scroll(this.scroller2) { // 内部滚动容器 + Column() { + Text("Scroll Area2") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Column() { + ForEach(this.arr, (item: number) => { + Text(item.toString()) + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + }, (item: string) => item) + }.width('100%') + } + } + .id("inner") + .width('100%') + .height(800) + }.width('100%') + } + .id("ActionGestureEventMitigation60") + .height(600) + .scrollable(ScrollDirection.Vertical) // 滚动方向纵向 + .scrollBar(BarState.On) // 滚动条常驻显示 + .scrollBarColor(Color.Gray) // 滚动条颜色 + .scrollBarWidth(10) // 滚动条宽度 + .edgeEffect(EdgeEffect.None) + .shouldBuiltInRecognizerParallelWith((current: GestureRecognizer, others: Array) => { + for (let i = 0; i < others.length; i++) { + let target = others[i].getEventTargetInfo(); + if (target) { + if (target.getId() == "inner" && others[i].isBuiltIn() && others[i].getType() == GestureControl.GestureType.PAN_GESTURE) { // 找到将要组成并行手势的识别器 + this.currentRecognizer = current; // 保存当前组件的识别器 + this.childRecognizer = others[i]; // 保存将要组成并行手势的识别器 + return others[i]; // 返回将要组成并行手势的识别器 + } + } + } + this.text = JSON.stringify(others[0]); + return undefined; + }) + .onGestureRecognizerJudgeBegin((event: BaseGestureEvent, current: GestureRecognizer, others: Array) => { // 在识别器即将要成功时,根据当前组件状态,设置识别器使能状态 + if (current) { + let target = current.getEventTargetInfo(); + if (target) { + if (target.getId() == "outer" && current.isBuiltIn() && current.getType() == GestureControl.GestureType.PAN_GESTURE) { + if (others) { + for (let i = 0; i < others.length; i++) { + let target = others[i].getEventTargetInfo() as ScrollableTargetInfo; + if (target instanceof ScrollableTargetInfo && target.getId() == "inner") { // 找到响应链上对应并行的识别器 + let panEvent = event as PanGestureEvent; + if (target.isEnd()) { // 根据当前组件状态以及移动方向动态控制识别器使能状态 + if (panEvent && panEvent.offsetY < 0) { + this.childRecognizer.setEnabled(false) + this.currentRecognizer.setEnabled(true) + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } else if (target.isBegin()) { + if (panEvent.offsetY > 0) { + this.childRecognizer.setEnabled(false) + this.currentRecognizer.setEnabled(true) + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } + } + } + } + } + } + return GestureJudgeResult.CONTINUE; + }) + .parallelGesture( // 绑定一个Pan手势作为动态控制器 + PanGesture() + .onActionUpdate((event: GestureEvent)=>{ + if (this.childRecognizer.getState() != GestureRecognizerState.SUCCESSFUL || this.currentRecognizer.getState() != GestureRecognizerState.SUCCESSFUL) { // 如果识别器状态不是SUCCESSFUL,则不做控制 + return; + } + let target = this.childRecognizer.getEventTargetInfo() as ScrollableTargetInfo; + let currentTarget = this.currentRecognizer.getEventTargetInfo() as ScrollableTargetInfo; + if (target instanceof ScrollableTargetInfo && currentTarget instanceof ScrollableTargetInfo) { + if (target.isEnd()) { // 在移动过程中实时根据当前组件状态,控制识别器的开闭状态 + if ((event.offsetY - this.lastOffset) < 0) { + this.childRecognizer.setEnabled(false) + if (currentTarget.isEnd()) { + this.currentRecognizer.setEnabled(false) + } else { + this.currentRecognizer.setEnabled(true) + } + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } else if (target.isBegin()) { + if ((event.offsetY - this.lastOffset) > 0) { + this.childRecognizer.setEnabled(false) + if (currentTarget.isBegin()) { + this.currentRecognizer.setEnabled(false) + } else { + this.currentRecognizer.setEnabled(true) + } + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } + this.lastOffset = event.offsetY + }) + ) + Text(this.text).margin({top:20}) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0010.ets new file mode 100644 index 0000000000000000000000000000000000000000..7711325df93dc0843b256f5160a09bb10d07b0d0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0010.ets @@ -0,0 +1,88 @@ +/* + * 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 ActionGestureEventRecognizer0010 { + scroller: Scroller = new Scroller(); + scroller2: Scroller = new Scroller(); + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + private childRecognizer: GestureRecognizer = new GestureRecognizer(); + private currentRecognizer: GestureRecognizer = new GestureRecognizer(); + private lastOffset: number = 0; + @State text :string = ''; + @State eventInfo:string = ""; + @State fingerInfo:string = "" + @State touchPointInfo:string = "" + + build() { + Column() { + Scroll(this.scroller) { + Column() { + Text("Scroll Area") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Scroll(this.scroller2) { + Column() { + Text("Scroll Area2") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Column() { + ForEach(this.arr, (item: number) => { + Button(item.toString()) + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .margin({ top: 10 }) + }, (item: string) => item) + }.width('100%') + } + } + .id("inner") + .width('100%') + .height(700) + }.width('100%') + } + .id("ActionGestureEventRecognizer130") + .friction(0) + .height(500) + .scrollable(ScrollDirection.Vertical) + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + .edgeEffect(EdgeEffect.None) + .onGestureRecognizerJudgeBegin((event: BaseGestureEvent, current: GestureRecognizer, others: Array) => { + this.eventInfo = JSON.stringify(event) + this.fingerInfo = JSON.stringify(event.fingerList[0]) + this.touchPointInfo = JSON.stringify(event.fingerList[0].globalX) + " point y=" + JSON.stringify(event.fingerList[0].globalY) + return GestureJudgeResult.CONTINUE; + }) + Text("first eventInfo:" + this.eventInfo) + Text("second fingerInfo:" + this.fingerInfo) + Text("second touchPointInfo:" + this.touchPointInfo) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0020.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0020.ets new file mode 100644 index 0000000000000000000000000000000000000000..5f7b5bcf81c53c1c72eb136cff82e952f9dffdb7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0020.ets @@ -0,0 +1,130 @@ +/* + * 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 { JSON } from '@kit.ArkTS'; + +@Entry +@Component +struct ActionGestureEventRecognizer0020 { + scroller: Scroller = new Scroller(); + scroller2: Scroller = new Scroller(); + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + private childRecognizer: GestureRecognizer = new GestureRecognizer(); + private currentRecognizer: GestureRecognizer = new GestureRecognizer(); + private lastOffset: number = 0; + @State text :string = ''; + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + Column() { + Text("Scroll Area") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Scroll(this.scroller2) { + Column() { + Text("Scroll Area2") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Column() { + ForEach(this.arr, (item: number) => { + Text(item.toString()) + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + }, (item: string) => item) + }.width('100%') + } + } + .id("inner") + .width('100%') + .height(800) + }.width('100%') + } + .id("ActionGestureEventRecognizer0020") + .friction(0) + .height(600) + .scrollable(ScrollDirection.Vertical) + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + .edgeEffect(EdgeEffect.None) + .shouldBuiltInRecognizerParallelWith((current: GestureRecognizer, others: Array) => { + for (let i = 0; i < others.length; i++) { + let target = others[i].getEventTargetInfo(); + if (target) { + if (target.getId() == "inner" && others[i].isBuiltIn() && others[i].getType() == GestureControl.GestureType.PAN_GESTURE) { // 找到将要组成并行手势的识别器 + this.currentRecognizer = current; + this.childRecognizer = others[i]; + return others[i]; + } + } + } + return undefined; + }) + .onGestureRecognizerJudgeBegin((event: BaseGestureEvent, current: GestureRecognizer, others: Array) => { + // console.info('+++'+JSON.stringify(current)) + this.text = JSON.stringify(current) + if (current) { + let target = current.getEventTargetInfo(); + if (target) { + if (target.getId() == "outer" && current.isBuiltIn() && current.getType() == GestureControl.GestureType.PAN_GESTURE) { + if (others) { + for (let i = 0; i < others.length; i++) { + let target = others[i].getEventTargetInfo() as ScrollableTargetInfo; + if (target instanceof ScrollableTargetInfo && target.getId() == "inner") { + let panEvent = event as PanGestureEvent; + this.childRecognizer.setEnabled(true); + this.currentRecognizer.setEnabled(true); + } + } + } + } + } + } + return GestureJudgeResult.REJECT; + }) + .parallelGesture( + PanGesture() + .onActionUpdate((event: GestureEvent)=>{ + if (this.childRecognizer.getState() != GestureRecognizerState.SUCCESSFUL || this.currentRecognizer.getState() != GestureRecognizerState.SUCCESSFUL) { // 如果识别器状态不是SUCCESSFUL,则不做控制 + return; + } + let target = this.childRecognizer.getEventTargetInfo() as ScrollableTargetInfo; + let currentTarget = this.currentRecognizer.getEventTargetInfo() as ScrollableTargetInfo; + if (target instanceof ScrollableTargetInfo && currentTarget instanceof ScrollableTargetInfo) { + this.childRecognizer.setEnabled(true); + this.currentRecognizer.setEnabled(true); + } + this.lastOffset = event.offsetY + }) + ) + Text(this.text).fontSize(40).margin(20) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0030.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0030.ets new file mode 100644 index 0000000000000000000000000000000000000000..345216ee54e6678fe11e98c09e1cd6f21d6f2068 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0030.ets @@ -0,0 +1,66 @@ +//judegeBugein +import json from '@ohos.util.json' + +@Entry +@Component +struct ActionGestureEventRecognizer0200 { + scroller: Scroller = new Scroller() + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + private childRecognizer: GestureRecognizer = new GestureRecognizer() + private currentRecognizer: GestureRecognizer = new GestureRecognizer() + private lastOffset: number = 0 + @State flag1: boolean | null | undefined = undefined + @State flag2: boolean | null | undefined = false + @State currenttext:string = '' + @State fatherInfo:string = '' + build() { + Column() { + Scroll(this.scroller) { // 外部滚动容器 + Column() { + Text("Scroll Area") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%').height(100).fontSize(16) + .backgroundColor(Color.Blue) + .textAlign(TextAlign.Center).borderRadius(10) + } + }, (item: string) => item) + } + .listDirection(Axis.Vertical) // 排列方向 + .scrollBar(BarState.Off) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) // 每行之间的分界线 + .edgeEffect(EdgeEffect.None) // 边缘效果设置为Spring + // .height(1000) + .width('90%') + .id("inner") + + }.width('100%').id("column") + } + .id("outer") + .height(600) + .backgroundColor(Color.Pink) + .scrollable(ScrollDirection.Vertical) // 滚动方向纵向 + .edgeEffect(EdgeEffect.None) + .shouldBuiltInRecognizerParallelWith((current: GestureRecognizer, others: Array) => { + this.childRecognizer = current; + let pan = current as PanRecognizer; + this.fatherInfo = current.getTag() + "; type" + current.getType() + "; isBuiltIn: " + + current.isBuiltIn() + "; getState:" + current.getState() + "; isEnable: " + current.isEnabled() + + "; getEventTargetInfo:" + current.getEventTargetInfo().getId() + "; PanRecognizer:" + json.stringify(pan.getPanGestureOptions().getDirection()) + return undefined; + }) + + Text("fatherInfo:" + this.fatherInfo) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0090.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0090.ets new file mode 100644 index 0000000000000000000000000000000000000000..7219608738a5751785da6befc77c7f8893e392ec --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0090.ets @@ -0,0 +1,175 @@ +/* + * 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 ActionGestureEventRecognizer0090 { + scroller: Scroller = new Scroller(); + scroller2: Scroller = new Scroller(); + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + private childRecognizer: GestureRecognizer = new GestureRecognizer(); + private currentRecognizer: GestureRecognizer = new GestureRecognizer(); + private lastOffset: number = 0; + @State text: string = ''; + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { // 外部滚动容器 + Column() { + Text("Scroll Area") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Scroll(this.scroller2) { // 内部滚动容器 + Column() { + Text("Scroll Area2") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Column() { + ForEach(this.arr, (item: number) => { + Text(item.toString()) + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + }, (item: string) => item) + }.width('100%') + } + } + .id("inner") + .width('100%') + .height(800) + }.width('100%') + } + // .enabled(true) + .id("ActionGestureEventRecognizer0090") + .height(600) + .scrollable(ScrollDirection.Vertical) // 滚动方向纵向 + .scrollBar(BarState.On) // 滚动条常驻显示 + .scrollBarColor(Color.Gray) // 滚动条颜色 + .scrollBarWidth(10) // 滚动条宽度 + .edgeEffect(EdgeEffect.None) + .shouldBuiltInRecognizerParallelWith((current: GestureRecognizer, others: Array) => { + for (let i = 0; i < others.length; i++) { + let target = others[i].getEventTargetInfo(); + if (target) { + if (target.getId() == "inner" && others[i].isBuiltIn() && others[i].getType() == GestureControl.GestureType.PAN_GESTURE) { // 找到将要组成并行手势的识别器 + this.currentRecognizer = current; // 保存当前组件的识别器 + this.currentRecognizer.setEnabled(true) + this.childRecognizer.setEnabled(true) + this.childRecognizer = others[i]; // 保存将要组成并行手势的识别器 + return others[i]; // 返回将要组成并行手势的识别器 + } + } + } + return undefined; + }) + .onGestureRecognizerJudgeBegin((event: BaseGestureEvent, current: GestureRecognizer, others: Array) => { // 在识别器即将要成功时,根据当前组件状态,设置识别器使能状态 + if (current) { + this.text ='Tag:'+ current.getTag() +' Type:'+current.getType()+' isBuiltIn:'+current.isBuiltIn()+' isEnabled:'+current.isEnabled() + +'getEventTargetInfo:'+JSON.stringify(current.getEventTargetInfo()); + console.info('+++'+this.text) + let target = current.getEventTargetInfo(); + if (target) { + if (target.getId() == "outer" && current.isBuiltIn() && current.getType() == GestureControl.GestureType.PAN_GESTURE) { + if (others) { + for (let i = 0; i < others.length; i++) { + let target = others[i].getEventTargetInfo() as ScrollableTargetInfo; + if (target instanceof ScrollableTargetInfo && target.getId() == "inner") { // 找到响应链上对应并行的识别器 + let panEvent = event as PanGestureEvent; + if (target.isEnd()) { // 根据当前组件状态以及移动方向动态控制识别器使能状态 + if (panEvent && panEvent.offsetY < 0) { + this.childRecognizer.setEnabled(false) + this.currentRecognizer.setEnabled(true) + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } else if (target.isBegin()) { + if (panEvent.offsetY > 0) { + this.childRecognizer.setEnabled(false) + this.currentRecognizer.setEnabled(true) + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } + } + } + } + } + } + return GestureJudgeResult.CONTINUE; + }) + .gesture( // 绑定一个Pan手势作为动态控制器 + PanGesture() + .onActionUpdate((event: GestureEvent)=>{ + if (this.childRecognizer.getState() != GestureRecognizerState.SUCCESSFUL || this.currentRecognizer.getState() != GestureRecognizerState.SUCCESSFUL) { // 如果识别器状态不是SUCCESSFUL,则不做控制 + return; + } + let target = this.childRecognizer.getEventTargetInfo() as ScrollableTargetInfo; + let currentTarget = this.currentRecognizer.getEventTargetInfo() as ScrollableTargetInfo; + if (target instanceof ScrollableTargetInfo && currentTarget instanceof ScrollableTargetInfo) { + if (target.isEnd()) { // 在移动过程中实时根据当前组件状态,控制识别器的开闭状态 + if ((event.offsetY - this.lastOffset) < 0) { + this.childRecognizer.setEnabled(false) + if (currentTarget.isEnd()) { + this.currentRecognizer.setEnabled(false) + } else { + this.currentRecognizer.setEnabled(true) + } + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } else if (target.isBegin()) { + if ((event.offsetY - this.lastOffset) > 0) { + this.childRecognizer.setEnabled(false) + if (currentTarget.isBegin()) { + this.currentRecognizer.setEnabled(false) + } else { + this.currentRecognizer.setEnabled(true) + } + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } + this.lastOffset = event.offsetY + }) + ) + Text(this.text).width(400).margin(20) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0100.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0100.ets new file mode 100644 index 0000000000000000000000000000000000000000..bb0a967ee6e793553834fc88bdf899da27cc1fdd --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0100.ets @@ -0,0 +1,108 @@ +//judegeBugein +import json from '@ohos.util.json' + +@Entry +@Component +struct ActionGestureEventRecognizer0100 { + scroller: Scroller = new Scroller() + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + private childRecognizer: GestureRecognizer = new GestureRecognizer() + private currentRecognizer: GestureRecognizer = new GestureRecognizer() + private swiperController: SwiperController = new SwiperController() + private lastOffset: number = 0 + @State flag1: boolean | null | undefined = undefined + @State flag2: boolean | null | undefined = false + @State currenttext:string = '' + @State childInfo:string = '' + @State fatherInfo:string = '' + build() { + Column() { + Scroll(this.scroller) { // 外部滚动容器 + Column() { + Text("Scroll Area") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + + Swiper(this.swiperController) { + ForEach(this.arr, (item: number) => { + Text('' + item) + .width('100%').height(100).fontSize(16) + .backgroundColor(Color.Blue) + .textAlign(TextAlign.Center).borderRadius(10) + }, (item: string) => item) + } + // .height(1000) + .width('90%') + .autoPlay(false) + .id("inner") + .onGestureJudgeBegin((gestureInfo: GestureInfo, event: BaseGestureEvent) => { + // 若该手势类型为长按手势,转换为长按手势事件 + return GestureJudgeResult.CONTINUE; + }) + .shouldBuiltInRecognizerParallelWith((current: GestureRecognizer, others: Array) => { + this.childRecognizer = current; + // 打印current信息 + for (let i = 0; i < others.length; i++) { + // 循环打印other[i] + others[i].setEnabled(this.flag2) + let target = others[i].getEventTargetInfo(); + if (target) { + let id = target.getId(); + if (id == "outer" && others[i].isBuiltIn() && others[i].getType() == GestureControl.GestureType.PAN_GESTURE) { + // 是父组件的手势 && 系统内置手势 && others[i]手势为 PAN_GESTURE 拖动手势 + this.currentRecognizer = others[i]; + return others[i]; + } + } + } + return undefined; + }) + .onGestureRecognizerJudgeBegin((event: BaseGestureEvent, current: GestureRecognizer, others: Array) => { + for (let index = 0; index < others.length; index++) { + const element = others[index]; + if (element.getEventTargetInfo().getId() == "outer" && element.getTag() == "father_pan_gesture") { + element.setEnabled(true) + let pan = element as PanRecognizer; + this.fatherInfo = element.getTag() + "; type" + element.getType() + "; isBuiltIn: " + + element.isBuiltIn() + "; getEventTargetInfo: " + "; getState:" + element.getState() + "; isEnable: " + element.isEnabled() + + "; getEventTargetInfo:" + element.getEventTargetInfo().getId() + "; PanRecognizer:" + json.stringify(pan.getPanGestureOptions().getDirection()) + } + } + if (current) { + let pan = current as PanRecognizer; + this.childInfo = current.getTag() + "; type" + current.getType() + "; isBuiltIn: " + + current.isBuiltIn() + "; getState:" + current.getState() + "; isEnable: " + current.isEnabled() + + "; getEventTargetInfo:" + current.getEventTargetInfo().getId() + "; PanRecognizer:" + json.stringify(pan.getPanGestureOptions().getDirection()) + } + return GestureJudgeResult.CONTINUE; + }) + }.width('100%').id("column") + } + .id("outer") + .height(600) + .backgroundColor(Color.Pink) + .scrollable(ScrollDirection.Vertical) // 滚动方向纵向 + .edgeEffect(EdgeEffect.None) + .parallelGesture( + GestureGroup(GestureMode.Parallel, + PanGesture({ + // distance: 100, + // fingers:2 + }) + .onActionStart(()=>{ + console.log("触发scroll嵌套button *** 父组件 ***自定义手势") + }) + .tag("father_pan_gesture"), + ) + ) + + Text("childInfo:" + this.childInfo) + Text("fatherInfo:" + this.fatherInfo) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0110.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0110.ets new file mode 100644 index 0000000000000000000000000000000000000000..6903702d0d70ac4166cf580669a82e762cdfb735 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0110.ets @@ -0,0 +1,108 @@ +//judegeBugein +import json from '@ohos.util.json' + +@Entry +@Component +struct ActionGestureEventRecognizer0200 { + scroller: Scroller = new Scroller() + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + private childRecognizer: GestureRecognizer = new GestureRecognizer() + private currentRecognizer: GestureRecognizer = new GestureRecognizer() + private lastOffset: number = 0 + @State flag1: boolean | null | undefined = undefined + @State flag2: boolean | null | undefined = false + @State currenttext:string = '' + @State childInfo:string = '' + @State fatherInfo:string = '' + build() { + Column() { + Scroll(this.scroller) { // 外部滚动容器 + Column() { + Text("Scroll Area") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%').height(100).fontSize(16) + .backgroundColor(Color.Blue) + .textAlign(TextAlign.Center).borderRadius(10) + } + }, (item: string) => item) + } + .listDirection(Axis.Vertical) // 排列方向 + .scrollBar(BarState.Off) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) // 每行之间的分界线 + .edgeEffect(EdgeEffect.None) // 边缘效果设置为Spring + // .height(1000) + .width('90%') + .id("inner") + .shouldBuiltInRecognizerParallelWith((current: GestureRecognizer, others: Array) => { + this.childRecognizer = current; + // 打印current信息 + for (let i = 0; i < others.length; i++) { + // 循环打印other[i] + others[i].setEnabled(this.flag2) + let target = others[i].getEventTargetInfo(); + if (target) { + let id = target.getId(); + if (id == "outer" && others[i].isBuiltIn() && others[i].getType() == GestureControl.GestureType.PAN_GESTURE) { + // 是父组件的手势 && 系统内置手势 && others[i]手势为 PAN_GESTURE 拖动手势 + this.currentRecognizer = others[i]; + return others[i]; + } + } + } + return undefined; + }) + .onGestureRecognizerJudgeBegin((event: BaseGestureEvent, current: GestureRecognizer, others: Array) => { + for (let index = 0; index < others.length; index++) { + const element = others[index]; + if (element.getEventTargetInfo().getId() == "outer" && element.getTag() == "father_pan_gesture") { + element.setEnabled(false) + let pan = element as PanRecognizer; + this.fatherInfo = element.getTag() + "; type" + element.getType() + "; isBuiltIn: " + + element.isBuiltIn() + "; getEventTargetInfo: " + "; getState:" + element.getState() + "; isEnable: " + element.isEnabled() + + "; getEventTargetInfo:" + element.getEventTargetInfo().getId() + "; PanRecognizer:" + json.stringify(pan.getPanGestureOptions().getDirection()) + } + } + if (current) { + let pan = current as PanRecognizer; + this.childInfo = current.getTag() + "; type" + current.getType() + "; isBuiltIn: " + + current.isBuiltIn() + "; getState:" + current.getState() + "; isEnable: " + current.isEnabled() + + "; getEventTargetInfo:" + current.getEventTargetInfo().getId() + "; PanRecognizer:" + json.stringify(pan.getPanGestureOptions().getDirection()) + } + return GestureJudgeResult.CONTINUE; + }) + }.width('100%').id("column") + } + .id("outer") + .height(600) + .backgroundColor(Color.Pink) + .scrollable(ScrollDirection.Vertical) // 滚动方向纵向 + .edgeEffect(EdgeEffect.None) + .parallelGesture( + GestureGroup(GestureMode.Parallel, + PanGesture({ + // distance: 100, + // fingers:2 + }) + .onActionStart(()=>{ + console.log("触发scroll嵌套button *** 父组件 ***自定义手势") + }) + .tag("father_pan_gesture"), + ) + ) + + Text("childInfo:" + this.childInfo) + Text("fatherInfo:" + this.fatherInfo) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0150.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0150.ets new file mode 100644 index 0000000000000000000000000000000000000000..f8d635de11c7a40fda81f2ea6f7ce532142dd5ca --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0150.ets @@ -0,0 +1,79 @@ +//judegeBugein +import json from '@ohos.util.json' + +@Entry +@Component +struct ActionGestureEventRecognizer0200 { + scroller: Scroller = new Scroller() + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + private childRecognizer: GestureRecognizer = new GestureRecognizer() + private currentRecognizer: GestureRecognizer = new GestureRecognizer() + private lastOffset: number = 0 + @State flag1: boolean | null | undefined = undefined + @State flag2: boolean | null | undefined = false + @State currenttext:string = '' + @State childInfo:string = '' + @State fatherInfo:string = '' + build() { + Column() { + Scroll(this.scroller) { // 外部滚动容器 + Column() { + Text("Scroll Area") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%').height(100).fontSize(16) + .backgroundColor(Color.Blue) + .textAlign(TextAlign.Center).borderRadius(10) + } + }, (item: string) => item) + } + .listDirection(Axis.Vertical) // 排列方向 + .scrollBar(BarState.Off) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) // 每行之间的分界线 + .edgeEffect(EdgeEffect.None) // 边缘效果设置为Spring + // .height(1000) + .width('90%') + .id("inner") + }.width('100%').id("column") + } + .id("outer") + .height(600) + .backgroundColor(Color.Pink) + .scrollable(ScrollDirection.Vertical) // 滚动方向纵向 + .edgeEffect(EdgeEffect.None) + .shouldBuiltInRecognizerParallelWith((current: GestureRecognizer, others: Array) => { + this.childRecognizer = current; + let pan = current as PanRecognizer; + this.fatherInfo = current.getTag() + "; type" + current.getType() + "; isBuiltIn: " + + current.isBuiltIn() + "; getState:" + current.getState() + "; isEnable: " + current.isEnabled() + + "; getEventTargetInfo:" + current.getEventTargetInfo().getId() + "; PanRecognizer:" + json.stringify(pan.getPanGestureOptions().getDirection()) + return undefined; + }) + .parallelGesture( + GestureGroup(GestureMode.Parallel, + PanGesture({ + // distance: 100, + // fingers:2 + }) + .onActionStart(()=>{ + console.log("触发scroll嵌套button *** 父组件 ***自定义手势") + }) + .tag("father_pan_gesture"), + ) + ) + + Text("childInfo:" + this.childInfo) + Text("fatherInfo:" + this.fatherInfo) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0160.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0160.ets new file mode 100644 index 0000000000000000000000000000000000000000..7d7cc0acb5f29454df63220fe79909c6828ffcf0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0160.ets @@ -0,0 +1,72 @@ +//judegeBugein +import json from '@ohos.util.json' + +@Entry +@Component +struct ActionGestureEventRecognizer0200 { + scroller: Scroller = new Scroller() + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + private childRecognizer: GestureRecognizer = new GestureRecognizer() + private currentRecognizer: GestureRecognizer = new GestureRecognizer() + private lastOffset: number = 0 + private swiperController: SwiperController = new SwiperController() + @State flag1: boolean | null | undefined = undefined + @State flag2: boolean | null | undefined = false + @State currenttext:string = '' + @State fatherInfo:string = '' + build() { + Column() { + Scroll(this.scroller) { // 外部滚动容器 + Column() { + Text("Scroll Area") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Swiper(this.swiperController) { + ForEach(this.arr, (item: number) => { + Text('' + item) + .width('100%').height(100).fontSize(16) + .backgroundColor(Color.Blue) + .textAlign(TextAlign.Center).borderRadius(10) + }, (item: string) => item) + } + .autoPlay(false) + // .height(1000) + .width('90%') + .id("inner") + }.width('100%').id("column") + } + .id("outer") + .height(600) + .backgroundColor(Color.Pink) + .scrollable(ScrollDirection.Vertical) // 滚动方向纵向 + .edgeEffect(EdgeEffect.None) + .shouldBuiltInRecognizerParallelWith((current: GestureRecognizer, others: Array) => { + this.childRecognizer = current; + let pan = current as PanRecognizer; + this.fatherInfo = current.getTag() + "; type" + current.getType() + "; isBuiltIn: " + + current.isBuiltIn() + "; getState:" + current.getState() + "; isEnable: " + current.isEnabled() + + "; getEventTargetInfo:" + current.getEventTargetInfo().getId() + "; PanRecognizer:" + json.stringify(pan.getPanGestureOptions().getDirection()) + return undefined; + }) + .parallelGesture( + GestureGroup(GestureMode.Parallel, + PanGesture({ + // distance: 100, + // fingers:2 + }) + .onActionStart(()=>{ + console.log("触发scroll嵌套button *** 父组件 ***自定义手势") + }) + .tag("father_pan_gesture"), + ) + ) + + Text("fatherInfo:" + this.fatherInfo) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0190.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0190.ets new file mode 100644 index 0000000000000000000000000000000000000000..3b39abaf8a98189c80330a6438236208b712500a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0190.ets @@ -0,0 +1,88 @@ +/* + * 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 ActionGestureEventRecognizer0190 { + scroller: Scroller = new Scroller(); + scroller2: Scroller = new Scroller(); + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + private childRecognizer: GestureRecognizer = new GestureRecognizer(); + private currentRecognizer: GestureRecognizer = new GestureRecognizer(); + private lastOffset: number = 0; + @State text :string = ''; + @State onGestureJudgeBeginMessage:string = ""; + @State onGestureRecognizerJudgeBeginMessage:string = "" + + build() { + Column() { + Scroll(this.scroller) { + Column() { + Text("Scroll Area") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Scroll(this.scroller2) { + Column() { + Text("Scroll Area2") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Column() { + ForEach(this.arr, (item: number) => { + Button(item.toString()) + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .margin({ top: 10 }) + }, (item: string) => item) + }.width('100%') + } + } + .id("inner") + .width('100%') + .height(800) + }.width('100%') + } + .id("ActionGestureEventRecognizer130") + .friction(0) + .height(600) + .scrollable(ScrollDirection.Vertical) + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + .edgeEffect(EdgeEffect.None) + .onGestureRecognizerJudgeBegin((event: BaseGestureEvent, current: GestureRecognizer, others: Array) => { + this.onGestureRecognizerJudgeBeginMessage = "first" + return GestureJudgeResult.CONTINUE; + }) + .onGestureRecognizerJudgeBegin((event: BaseGestureEvent, current: GestureRecognizer, others: Array) => { + this.onGestureRecognizerJudgeBeginMessage = "last" + return GestureJudgeResult.CONTINUE; + }) + Text("first onGestureRecognizerJudgeBegin:" + this.onGestureJudgeBeginMessage) + Text("second onGestureRecognizerJudgeBegin:" + this.onGestureRecognizerJudgeBeginMessage) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0200.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0200.ets new file mode 100644 index 0000000000000000000000000000000000000000..6903702d0d70ac4166cf580669a82e762cdfb735 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0200.ets @@ -0,0 +1,108 @@ +//judegeBugein +import json from '@ohos.util.json' + +@Entry +@Component +struct ActionGestureEventRecognizer0200 { + scroller: Scroller = new Scroller() + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + private childRecognizer: GestureRecognizer = new GestureRecognizer() + private currentRecognizer: GestureRecognizer = new GestureRecognizer() + private lastOffset: number = 0 + @State flag1: boolean | null | undefined = undefined + @State flag2: boolean | null | undefined = false + @State currenttext:string = '' + @State childInfo:string = '' + @State fatherInfo:string = '' + build() { + Column() { + Scroll(this.scroller) { // 外部滚动容器 + Column() { + Text("Scroll Area") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%').height(100).fontSize(16) + .backgroundColor(Color.Blue) + .textAlign(TextAlign.Center).borderRadius(10) + } + }, (item: string) => item) + } + .listDirection(Axis.Vertical) // 排列方向 + .scrollBar(BarState.Off) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) // 每行之间的分界线 + .edgeEffect(EdgeEffect.None) // 边缘效果设置为Spring + // .height(1000) + .width('90%') + .id("inner") + .shouldBuiltInRecognizerParallelWith((current: GestureRecognizer, others: Array) => { + this.childRecognizer = current; + // 打印current信息 + for (let i = 0; i < others.length; i++) { + // 循环打印other[i] + others[i].setEnabled(this.flag2) + let target = others[i].getEventTargetInfo(); + if (target) { + let id = target.getId(); + if (id == "outer" && others[i].isBuiltIn() && others[i].getType() == GestureControl.GestureType.PAN_GESTURE) { + // 是父组件的手势 && 系统内置手势 && others[i]手势为 PAN_GESTURE 拖动手势 + this.currentRecognizer = others[i]; + return others[i]; + } + } + } + return undefined; + }) + .onGestureRecognizerJudgeBegin((event: BaseGestureEvent, current: GestureRecognizer, others: Array) => { + for (let index = 0; index < others.length; index++) { + const element = others[index]; + if (element.getEventTargetInfo().getId() == "outer" && element.getTag() == "father_pan_gesture") { + element.setEnabled(false) + let pan = element as PanRecognizer; + this.fatherInfo = element.getTag() + "; type" + element.getType() + "; isBuiltIn: " + + element.isBuiltIn() + "; getEventTargetInfo: " + "; getState:" + element.getState() + "; isEnable: " + element.isEnabled() + + "; getEventTargetInfo:" + element.getEventTargetInfo().getId() + "; PanRecognizer:" + json.stringify(pan.getPanGestureOptions().getDirection()) + } + } + if (current) { + let pan = current as PanRecognizer; + this.childInfo = current.getTag() + "; type" + current.getType() + "; isBuiltIn: " + + current.isBuiltIn() + "; getState:" + current.getState() + "; isEnable: " + current.isEnabled() + + "; getEventTargetInfo:" + current.getEventTargetInfo().getId() + "; PanRecognizer:" + json.stringify(pan.getPanGestureOptions().getDirection()) + } + return GestureJudgeResult.CONTINUE; + }) + }.width('100%').id("column") + } + .id("outer") + .height(600) + .backgroundColor(Color.Pink) + .scrollable(ScrollDirection.Vertical) // 滚动方向纵向 + .edgeEffect(EdgeEffect.None) + .parallelGesture( + GestureGroup(GestureMode.Parallel, + PanGesture({ + // distance: 100, + // fingers:2 + }) + .onActionStart(()=>{ + console.log("触发scroll嵌套button *** 父组件 ***自定义手势") + }) + .tag("father_pan_gesture"), + ) + ) + + Text("childInfo:" + this.childInfo) + Text("fatherInfo:" + this.fatherInfo) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0210.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0210.ets new file mode 100644 index 0000000000000000000000000000000000000000..e407142f2f4deccc7c6e25bdb726e005cc218a88 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0210.ets @@ -0,0 +1,104 @@ +//judegeBugein +import json from '@ohos.util.json' + +@Entry +@Component +struct ActionGestureEventRecognizer0210 { + scroller: Scroller = new Scroller() + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + private childRecognizer: GestureRecognizer = new GestureRecognizer() + private currentRecognizer: GestureRecognizer = new GestureRecognizer() + private swiperController: SwiperController = new SwiperController() + private lastOffset: number = 0 + @State flag1: boolean | null | undefined = undefined + @State flag2: boolean | null | undefined = false + @State currenttext:string = '' + @State childInfo:string = '' + @State fatherInfo:string = '' + build() { + Column() { + Scroll(this.scroller) { // 外部滚动容器 + Column() { + Text("Scroll Area") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + + Swiper(this.swiperController) { + ForEach(this.arr, (item: number) => { + Text('' + item) + .width('100%').height(100).fontSize(16) + .backgroundColor(Color.Blue) + .textAlign(TextAlign.Center).borderRadius(10) + }, (item: string) => item) + } + // .height(1000) + .width('90%') + .autoPlay(false) + .id("inner") + .shouldBuiltInRecognizerParallelWith((current: GestureRecognizer, others: Array) => { + this.childRecognizer = current; + // 打印current信息 + for (let i = 0; i < others.length; i++) { + // 循环打印other[i] + others[i].setEnabled(this.flag2) + let target = others[i].getEventTargetInfo(); + if (target) { + let id = target.getId(); + if (id == "outer" && others[i].isBuiltIn() && others[i].getType() == GestureControl.GestureType.PAN_GESTURE) { + // 是父组件的手势 && 系统内置手势 && others[i]手势为 PAN_GESTURE 拖动手势 + this.currentRecognizer = others[i]; + return others[i]; + } + } + } + return undefined; + }) + .onGestureRecognizerJudgeBegin((event: BaseGestureEvent, current: GestureRecognizer, others: Array) => { + for (let index = 0; index < others.length; index++) { + const element = others[index]; + if (element.getEventTargetInfo().getId() == "outer" && element.getTag() == "father_pan_gesture") { + element.setEnabled(true) + let pan = element as PanRecognizer; + this.fatherInfo = element.getTag() + "; type" + element.getType() + "; isBuiltIn: " + + element.isBuiltIn() + "; getEventTargetInfo: " + "; getState:" + element.getState() + "; isEnable: " + element.isEnabled() + + "; getEventTargetInfo:" + element.getEventTargetInfo().getId() + "; PanRecognizer:" + json.stringify(pan.getPanGestureOptions().getDirection()) + } + } + if (current) { + let pan = current as PanRecognizer; + this.childInfo = current.getTag() + "; type" + current.getType() + "; isBuiltIn: " + + current.isBuiltIn() + "; getState:" + current.getState() + "; isEnable: " + current.isEnabled() + + "; getEventTargetInfo:" + current.getEventTargetInfo().getId() + "; PanRecognizer:" + json.stringify(pan.getPanGestureOptions().getDirection()) + } + return GestureJudgeResult.CONTINUE; + }) + }.width('100%').id("column") + } + .id("outer") + .height(600) + .backgroundColor(Color.Pink) + .scrollable(ScrollDirection.Vertical) // 滚动方向纵向 + .edgeEffect(EdgeEffect.None) + .parallelGesture( + GestureGroup(GestureMode.Parallel, + PanGesture({ + // distance: 100, + // fingers:2 + }) + .onActionStart(()=>{ + console.log("触发scroll嵌套button *** 父组件 ***自定义手势") + }) + .tag("father_pan_gesture"), + ) + ) + + Text("childInfo:" + this.childInfo) + Text("fatherInfo:" + this.fatherInfo) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0220.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0220.ets new file mode 100644 index 0000000000000000000000000000000000000000..c34bc55484bdd4ed99562b282fb8431bbdb68300 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0220.ets @@ -0,0 +1,140 @@ +//judegeBugein +import json from '@ohos.util.json' + +@Entry +@Component +struct ActionGestureEventRecognizer0220 { + scroller: Scroller = new Scroller() + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + private childRecognizer: GestureRecognizer = new GestureRecognizer() + private currentRecognizer: GestureRecognizer = new GestureRecognizer() + private lastOffset: number = 0 + @State flag1: boolean | null | undefined = null + @State flag2: boolean | null | undefined = false + @State currenttext:string = '' + @State childInfo:string = '' + @State fatherInfo:string = '' + build() { + Column() { + Scroll(this.scroller) { // 外部滚动容器 + Column() { + Column() { + Row() { + Button("Father setEnable:" + this.flag1).width("45%") + .onClick(() => { + this.flag1 = !this.flag1 + }) + Button("Child:" + this.flag2).width("45%") + .onClick(() => { + this.flag2 = !this.flag2 + }) + } + + Row() { + Button("Father:null").width("45%") + .onClick(() => { + this.flag1 = null + }) + Button("Child:null").width("45%") + .onClick(() => { + this.flag2 = null + }) + } + + Row() { + Button("Father:undefined").width("45%") + .onClick(() => { + this.flag1 = undefined + }) + Button("Child:undefined").width("45%") + .onClick(() => { + this.flag2 = undefined + }) + } + } + Text("父Scroll Area") + .width('90%') + .height(150) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + .id("Text") + + Button('子button') + .width('80%') + .height(800) + .id("inner") + .parallelGesture( + GestureGroup(GestureMode.Parallel, + PanGesture({ + // distance: 100, + // fingers:2 + }) + .onActionStart(()=>{ + console.log(" 触发scroll嵌套button *** 子组件 ***自定义手势") + }) + .tag("child_pan_gesture"), + ) + ) + .shouldBuiltInRecognizerParallelWith((current: GestureRecognizer, others: Array) => { + this.childRecognizer = current; + // 打印current信息 + for (let i = 0; i < others.length; i++) { + // 循环打印other[i] + others[i].setEnabled(this.flag2) + let target = others[i].getEventTargetInfo(); + if (target) { + let id = target.getId(); + if (id == "outer" && others[i].isBuiltIn() && others[i].getType() == GestureControl.GestureType.PAN_GESTURE) { + // 是父组件的手势 && 系统内置手势 && others[i]手势为 PAN_GESTURE 拖动手势 + this.currentRecognizer = others[i]; + return others[i]; + } + } + } + return undefined; + }) + .onGestureRecognizerJudgeBegin((event: BaseGestureEvent, current: GestureRecognizer, others: Array) => { + for (let index = 0; index < others.length; index++) { + const element = others[index]; + if (element.getEventTargetInfo().getId() == "outer" && element.getTag() == "father_pan_gesture") { + element.setEnabled(false) + let pan = element as PanRecognizer; + this.fatherInfo = element.getTag() + "; type" + element.getType() + "; isBuiltIn: " + + element.isBuiltIn() + "; getEventTargetInfo: " + "; getState:" + element.getState() + "; isEnable: " + element.isEnabled() + + "; getEventTargetInfo:" + element.getEventTargetInfo().getId() + "; PanRecognizer:" + json.stringify(pan.getPanGestureOptions().getDirection()) + } + } + if (current) { + let pan = current as PanRecognizer; + this.childInfo = current.getTag() + "; type" + current.getType() + "; isBuiltIn: " + + current.isBuiltIn() + "; getState:" + current.getState() + "; isEnable: " + current.isEnabled() + + "; getEventTargetInfo:" + current.getEventTargetInfo().getId() + "; PanRecognizer:" + json.stringify(pan.getPanGestureOptions().getDirection()) + } + return GestureJudgeResult.CONTINUE; + }) + }.width('100%').id("column") + } + .id("outer") + .height(600) + .backgroundColor(Color.Pink) + .scrollable(ScrollDirection.Vertical) // 滚动方向纵向 + .edgeEffect(EdgeEffect.None) + .parallelGesture( + GestureGroup(GestureMode.Parallel, + PanGesture({ + // distance: 100, + // fingers:2 + }) + .onActionStart(()=>{ + console.log("触发scroll嵌套button *** 父组件 ***自定义手势") + }) + .tag("father_pan_gesture"), + ) + ) + + Text("childInfo:" + this.childInfo) + Text("fatherInfo:" + this.fatherInfo) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0240.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0240.ets new file mode 100644 index 0000000000000000000000000000000000000000..e85217358819cbedd7fb80ec6694047d0e27915e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0240.ets @@ -0,0 +1,140 @@ +//judegeBugein +import json from '@ohos.util.json' + +@Entry +@Component +struct ActionGestureEventRecognizer0240 { + scroller: Scroller = new Scroller() + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + private childRecognizer: GestureRecognizer = new GestureRecognizer() + private currentRecognizer: GestureRecognizer = new GestureRecognizer() + private lastOffset: number = 0 + @State flag1: boolean | null | undefined = undefined + @State flag2: boolean | null | undefined = false + @State currenttext:string = '' + @State childInfo:string = '' + @State fatherInfo:string = '' + build() { + Column() { + Scroll(this.scroller) { // 外部滚动容器 + Column() { + Column() { + Row() { + Button("Father setEnable:" + this.flag1).width("45%") + .onClick(() => { + this.flag1 = !this.flag1 + }) + Button("Child:" + this.flag2).width("45%") + .onClick(() => { + this.flag2 = !this.flag2 + }) + } + + Row() { + Button("Father:null").width("45%") + .onClick(() => { + this.flag1 = null + }) + Button("Child:null").width("45%") + .onClick(() => { + this.flag2 = null + }) + } + + Row() { + Button("Father:undefined").width("45%") + .onClick(() => { + this.flag1 = undefined + }) + Button("Child:undefined").width("45%") + .onClick(() => { + this.flag2 = undefined + }) + } + } + Text("父Scroll Area") + .width('90%') + .height(150) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + .id("Text") + + Button('子button') + .width('80%') + .height(800) + .id("inner") + .parallelGesture( + GestureGroup(GestureMode.Parallel, + PanGesture({ + // distance: 100, + // fingers:2 + }) + .onActionStart(()=>{ + console.log(" 触发scroll嵌套button *** 子组件 ***自定义手势") + }) + .tag("child_pan_gesture"), + ) + ) + .shouldBuiltInRecognizerParallelWith((current: GestureRecognizer, others: Array) => { + this.childRecognizer = current; + // 打印current信息 + for (let i = 0; i < others.length; i++) { + // 循环打印other[i] + others[i].setEnabled(this.flag2) + let target = others[i].getEventTargetInfo(); + if (target) { + let id = target.getId(); + if (id == "outer" && others[i].isBuiltIn() && others[i].getType() == GestureControl.GestureType.PAN_GESTURE) { + // 是父组件的手势 && 系统内置手势 && others[i]手势为 PAN_GESTURE 拖动手势 + this.currentRecognizer = others[i]; + return others[i]; + } + } + } + return undefined; + }) + .onGestureRecognizerJudgeBegin((event: BaseGestureEvent, current: GestureRecognizer, others: Array) => { + for (let index = 0; index < others.length; index++) { + const element = others[index]; + if (element.getEventTargetInfo().getId() == "outer" && element.getTag() == "father_pan_gesture") { + element.setEnabled(false) + let pan = element as PanRecognizer; + this.fatherInfo = element.getTag() + "; type" + element.getType() + "; isBuiltIn: " + + element.isBuiltIn() + "; getEventTargetInfo: " + "; getState:" + element.getState() + "; isEnable: " + element.isEnabled() + + "; getEventTargetInfo:" + element.getEventTargetInfo().getId() + "; PanRecognizer:" + json.stringify(pan.getPanGestureOptions().getDirection()) + } + } + if (current) { + let pan = current as PanRecognizer; + this.childInfo = current.getTag() + "; type" + current.getType() + "; isBuiltIn: " + + current.isBuiltIn() + "; getState:" + current.getState() + "; isEnable: " + current.isEnabled() + + "; getEventTargetInfo:" + current.getEventTargetInfo().getId() + "; PanRecognizer:" + json.stringify(pan.getPanGestureOptions().getDirection()) + } + return GestureJudgeResult.CONTINUE; + }) + }.width('100%').id("column") + } + .id("outer") + .height(600) + .backgroundColor(Color.Pink) + .scrollable(ScrollDirection.Vertical) // 滚动方向纵向 + .edgeEffect(EdgeEffect.None) + .parallelGesture( + GestureGroup(GestureMode.Parallel, + PanGesture({ + // distance: 100, + // fingers:2 + }) + .onActionStart(()=>{ + console.log("触发scroll嵌套button *** 父组件 ***自定义手势") + }) + .tag("father_pan_gesture"), + ) + ) + + Text("childInfo:" + this.childInfo) + Text("fatherInfo:" + this.fatherInfo) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0250.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0250.ets new file mode 100644 index 0000000000000000000000000000000000000000..904d5970c7ef9a3bbaa4ae4dd878337e0a2e8eb8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0250.ets @@ -0,0 +1,140 @@ +//judegeBugein +import json from '@ohos.util.json' + +@Entry +@Component +struct ActionGestureEventRecognizer0250 { + scroller: Scroller = new Scroller() + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + private childRecognizer: GestureRecognizer = new GestureRecognizer() + private currentRecognizer: GestureRecognizer = new GestureRecognizer() + private lastOffset: number = 0 + @State flag1: boolean | null | undefined = false + @State flag2: boolean | null | undefined = false + @State currenttext:string = '' + @State childInfo:string = '' + @State fatherInfo:string = '' + build() { + Column() { + Scroll(this.scroller) { // 外部滚动容器 + Column() { + Column() { + Row() { + Button("Father setEnable:" + this.flag1).width("45%") + .onClick(() => { + this.flag1 = !this.flag1 + }) + Button("Child setEnable:" + this.flag2).width("45%") + .onClick(() => { + this.flag2 = !this.flag2 + }) + } + + Row() { + Button("Father:null").width("45%") + .onClick(() => { + this.flag1 = null + }) + Button("Child:null").width("45%") + .onClick(() => { + this.flag2 = null + }) + } + + Row() { + Button("Father:undefined").width("45%") + .onClick(() => { + this.flag1 = undefined + }) + Button("Child:undefined").width("45%") + .onClick(() => { + this.flag2 = undefined + }) + } + } + Text("父Scroll Area") + .width('90%') + .height(150) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + .id("Text") + + Button('子button') + .width('80%') + .height(800) + .id("inner") + .parallelGesture( + GestureGroup(GestureMode.Parallel, + PanGesture({ + // distance: 100, + // fingers:2 + }) + .onActionStart(()=>{ + console.log(" 触发scroll嵌套button *** 子组件 ***自定义手势") + }) + .tag("child_pan_gesture"), + ) + ) + .shouldBuiltInRecognizerParallelWith((current: GestureRecognizer, others: Array) => { + this.childRecognizer = current; + // 打印current信息 + for (let i = 0; i < others.length; i++) { + // 循环打印other[i] + others[i].setEnabled(this.flag2) + let target = others[i].getEventTargetInfo(); + if (target) { + let id = target.getId(); + if (id == "outer" && others[i].isBuiltIn() && others[i].getType() == GestureControl.GestureType.PAN_GESTURE) { + // 是父组件的手势 && 系统内置手势 && others[i]手势为 PAN_GESTURE 拖动手势 + this.currentRecognizer = others[i]; + return others[i]; + } + } + } + return undefined; + }) + .onGestureRecognizerJudgeBegin((event: BaseGestureEvent, current: GestureRecognizer, others: Array) => { + for (let index = 0; index < others.length; index++) { + const element = others[index]; + if (element.getEventTargetInfo().getId() == "outer" && element.getTag() == "father_pan_gesture") { + element.setEnabled(false) + let pan = element as PanRecognizer; + this.fatherInfo = element.getTag() + "; type" + element.getType() + "; isBuiltIn: " + + element.isBuiltIn() + "; getEventTargetInfo: " + "; getState:" + element.getState() + "; isEnable: " + element.isEnabled() + + "; getEventTargetInfo:" + element.getEventTargetInfo().getId() + "; PanRecognizer:" + json.stringify(pan.getPanGestureOptions().getDirection()) + } + } + if (current) { + let pan = current as PanRecognizer; + this.childInfo = current.getTag() + "; type" + current.getType() + "; isBuiltIn: " + + current.isBuiltIn() + "; getState:" + current.getState() + "; isEnable: " + current.isEnabled() + + "; getEventTargetInfo:" + current.getEventTargetInfo().getId() + "; PanRecognizer:" + json.stringify(pan.getPanGestureOptions().getDirection()) + } + return GestureJudgeResult.CONTINUE; + }) + }.width('100%').id("column") + } + .id("outer") + .height(600) + .backgroundColor(Color.Pink) + .scrollable(ScrollDirection.Vertical) // 滚动方向纵向 + .edgeEffect(EdgeEffect.None) + .parallelGesture( + GestureGroup(GestureMode.Parallel, + PanGesture({ + // distance: 100, + // fingers:2 + }) + .onActionStart(()=>{ + console.log("触发scroll嵌套button *** 父组件 ***自定义手势") + }) + .tag("father_pan_gesture"), + ) + ) + + Text("childInfo:" + this.childInfo) + Text("fatherInfo:" + this.fatherInfo) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0260.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0260.ets new file mode 100644 index 0000000000000000000000000000000000000000..8e701b0ef3057fa5f4cdc0daff342fe6ce8eed87 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0260.ets @@ -0,0 +1,89 @@ +/* + * 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 ActionGestureEventRecognizer0260 { + scroller: Scroller = new Scroller(); + scroller2: Scroller = new Scroller(); + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + private childRecognizer: GestureRecognizer = new GestureRecognizer(); + private currentRecognizer: GestureRecognizer = new GestureRecognizer(); + private lastOffset: number = 0; + @State text :string = ''; + @State onGestureJudgeBeginMessage:string = ""; + @State onGestureRecognizerJudgeBeginMessage:string = "" + + build() { + Column() { + Scroll(this.scroller) { + Column() { + Text("Scroll Area") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Scroll(this.scroller2) { + Column() { + Text("Scroll Area2") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Column() { + ForEach(this.arr, (item: number) => { + Button(item.toString()) + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .margin({ top: 10 }) + }, (item: string) => item) + }.width('100%') + } + } + .id("inner") + .width('100%') + .height(800) + }.width('100%') + } + .id("ActionGestureEventRecognizer130") + .friction(0) + .height(600) + .scrollable(ScrollDirection.Vertical) + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + .edgeEffect(EdgeEffect.None) + .onGestureJudgeBegin((gestureInfo: GestureInfo, event: BaseGestureEvent) => { + // 若该手势类型为长按手势,转换为长按手势事件 + this.onGestureJudgeBeginMessage = "触发" + return GestureJudgeResult.CONTINUE; + }) + .onGestureRecognizerJudgeBegin((event: BaseGestureEvent, current: GestureRecognizer, others: Array) => { + this.onGestureRecognizerJudgeBeginMessage = "触发" + return GestureJudgeResult.CONTINUE; + }) + Text("GestureJudgeBegin:" + this.onGestureJudgeBeginMessage) + Text("GestureRecognizerJudgeBegin:" + this.onGestureRecognizerJudgeBeginMessage) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0270.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0270.ets new file mode 100644 index 0000000000000000000000000000000000000000..172d281afb4f3436353c4e30532e74f13c450729 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0270.ets @@ -0,0 +1,183 @@ +//father controller child +@Entry +@Component +struct FatherControlChild { + scroller: Scroller = new Scroller() + scroller2: Scroller = new Scroller() + scroller3: Scroller = new Scroller() + private arr: number[] = [0, 1, 2, 3, 4, 5, 6] + private childRecognizer: GestureRecognizer = new GestureRecognizer() + private currentRecognizer: GestureRecognizer = new GestureRecognizer() + private lastOffset: number = 0 + @State scrollEdgeMessage: boolean = false; + build() { + Column() { + Scroll(this.scroller) { + Column() { + Text("Scroll Area") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Scroll(this.scroller2) { + Column() { + Text("Scroll Area2") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Column() { + ForEach(this.arr, (item: number) => { + Text(item.toString()) + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + }, (item: string) => item) + }.width('100%') + } + } + .id("inner") + .width('100%') + .height(800) + }.width('100%') + } + .id("outer") + .height(600) + .scrollable(ScrollDirection.Vertical) // 滚动方向纵向 + .scrollBar(BarState.On) // 滚动条常驻显示 + .scrollBarColor(Color.Gray) // 滚动条颜色 + .scrollBarWidth(10) // 滚动条宽度 + .edgeEffect(EdgeEffect.None) + .onScroll((xOffset: number, yOffset: number) => { + console.info(xOffset + ' ' + yOffset) + }) + .onScrollEdge((side: Edge) => { + console.info('To the edge') + this.scrollEdgeMessage = true; + }) + .onScrollStop(() => { + console.info('Scroll Stop') + + }) + .shouldBuiltInRecognizerParallelWith((current: GestureRecognizer, others: Array) => { + for (let i = 0; i < others.length; i++) { + let pan = others[i] as PanRecognizer; + if (pan) { + console.log("zcb shouldBuiltInRecognizerParallelWith pan type ", pan.getType() + " distance " + pan.getPanGestureOptions().getDirection()); + } + let target = others[i].getEventTargetInfo(); + if (target) { + let id = target.getId(); + console.log("zcb parallelInnerGestureTo other id " + id + " isSystemGesture " + others[i].isBuiltIn() + " type " + others[i].getType()); + if (id == "inner" && others[i].isBuiltIn() && others[i].getType() == GestureControl.GestureType.PAN_GESTURE) { + this.currentRecognizer = current; + this.childRecognizer = others[i]; + return others[i]; + } + } + } + return undefined; + }) + .onGestureRecognizerJudgeBegin((event: BaseGestureEvent, current: GestureRecognizer, others: Array) => { + if (current) { + let target = current.getEventTargetInfo(); + if (target) { + let id = target.getId(); + console.log("zcb onGestureJudgeBegin current id " + id); + if (id == "outer" && current.isBuiltIn() && current.getType() == GestureControl.GestureType.PAN_GESTURE) { + if (others) { + for (let i = 0; i < others.length; i++) { + let target = others[i].getEventTargetInfo() as ScrollableTargetInfo; + if (target) { + let id = target.getId(); + console.log("zcb onGestureJudgeBegin other id " + id); + if (id == "inner") { + console.log("zcb onGestureJudgeBegin other isBegin " + target.isBegin() + " isEnd " + target.isEnd()); + let panEvent = event as PanGestureEvent; + if (target.isEnd()) { + if (panEvent && panEvent.offsetY < 0) { + this.childRecognizer.setEnabled(false) + this.currentRecognizer.setEnabled(true) + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } else if (target.isBegin()) { + if (panEvent.offsetY > 0) { + this.childRecognizer.setEnabled(false) + this.currentRecognizer.setEnabled(true) + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } + } + } + } + } + } + } + return GestureJudgeResult.CONTINUE; + }) + .parallelGesture( + PanGesture() + .onActionUpdate((event: GestureEvent)=>{ + console.log("zcb onActionUpdate event offsetY " + event.offsetY + " this.lastOffset " + this.lastOffset + " this.childRecognizer.getGestureState() " + this.childRecognizer.getState() + " currentRecognizer " + this.currentRecognizer.getState()) + if (this.childRecognizer.getState() != GestureRecognizerState.SUCCESSFUL || this.currentRecognizer.getState() != GestureRecognizerState.SUCCESSFUL) { + console.log("zcb return") + return; + } + let target = this.childRecognizer.getEventTargetInfo() as ScrollableTargetInfo; + let currentTarget = this.currentRecognizer.getEventTargetInfo() as ScrollableTargetInfo; + if (target && currentTarget) { + console.log("zcb onActionUpdate other isBegin " + target.isBegin() + " isEnd " + target.isEnd() + " current isBegin " + currentTarget.isBegin() + " current isEnd " + currentTarget.isEnd()); + if (target.isEnd()) { + if ((event.offsetY - this.lastOffset) < 0) { + this.childRecognizer.setEnabled(false) + if (currentTarget.isEnd()) { + this.currentRecognizer.setEnabled(false) + } else { + this.currentRecognizer.setEnabled(true) + } + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } else if (target.isBegin()) { + if ((event.offsetY - this.lastOffset) > 0) { + this.childRecognizer.setEnabled(false) + if (currentTarget.isBegin()) { + this.currentRecognizer.setEnabled(false) + } else { + this.currentRecognizer.setEnabled(true) + } + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } + this.lastOffset = event.offsetY + }) + ) + Text("father scrollEdge:" + this.scrollEdgeMessage) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0280.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0280.ets new file mode 100644 index 0000000000000000000000000000000000000000..8b0f20539e07fa8fe1a80b83d957efc5ddbe0679 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0280.ets @@ -0,0 +1,89 @@ +/* + * 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 ActionGestureEventRecognizer0280 { + scroller: Scroller = new Scroller(); + scroller2: Scroller = new Scroller(); + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + private childRecognizer: GestureRecognizer = new GestureRecognizer(); + private currentRecognizer: GestureRecognizer = new GestureRecognizer(); + private lastOffset: number = 0; + @State text :string = ''; + @State onGestureJudgeBeginMessage:string = ""; + @State onGestureRecognizerJudgeBeginMessage:string = "" + + build() { + Column() { + Scroll(this.scroller) { + Column() { + Text("Scroll Area") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Scroll(this.scroller2) { + Column() { + Text("Scroll Area2") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Column() { + ForEach(this.arr, (item: number) => { + Button(item.toString()) + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .margin({ top: 10 }) + }, (item: string) => item) + }.width('100%') + } + } + .id("inner") + .width('100%') + .height(800) + }.width('100%') + } + .id("ActionGestureEventRecognizer130") + .friction(0) + .height(600) + .scrollable(ScrollDirection.Vertical) + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + .edgeEffect(EdgeEffect.None) + .onGestureJudgeBegin((gestureInfo: GestureInfo, event: BaseGestureEvent) => { + // 若该手势类型为长按手势,转换为长按手势事件 + this.onGestureJudgeBeginMessage = "触发" + return GestureJudgeResult.CONTINUE; + }) + .onGestureRecognizerJudgeBegin((event: BaseGestureEvent, current: GestureRecognizer, others: Array) => { + this.onGestureRecognizerJudgeBeginMessage = "触发" + return GestureJudgeResult.CONTINUE; + }) + Text("GestureJudgeBegin:" + this.onGestureJudgeBeginMessage) + Text("GestureRecognizerJudgeBegin:" + this.onGestureRecognizerJudgeBeginMessage) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0290.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0290.ets new file mode 100644 index 0000000000000000000000000000000000000000..f7a526b5792c898b1c81e38f3bb1879ae2c7c0f8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0290.ets @@ -0,0 +1,89 @@ +/* + * 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 ActionGestureEventRecognizer0290 { + scroller: Scroller = new Scroller(); + scroller2: Scroller = new Scroller(); + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + private childRecognizer: GestureRecognizer = new GestureRecognizer(); + private currentRecognizer: GestureRecognizer = new GestureRecognizer(); + private lastOffset: number = 0; + @State text :string = ''; + @State onGestureJudgeBeginMessage:string = ""; + @State onGestureRecognizerJudgeBeginMessage:string = "" + + build() { + Column() { + Scroll(this.scroller) { + Column() { + Text("Scroll Area") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Scroll(this.scroller2) { + Column() { + Text("Scroll Area2") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Column() { + ForEach(this.arr, (item: number) => { + Button(item.toString()) + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .margin({ top: 10 }) + }, (item: string) => item) + }.width('100%') + } + } + .id("inner") + .width('100%') + .height(800) + }.width('100%') + } + .id("ActionGestureEventRecognizer130") + .friction(0) + .height(600) + .scrollable(ScrollDirection.Vertical) + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + .edgeEffect(EdgeEffect.None) + .onGestureJudgeBegin((gestureInfo: GestureInfo, event: BaseGestureEvent) => { + // 若该手势类型为长按手势,转换为长按手势事件 + this.onGestureJudgeBeginMessage = "触发" + return GestureJudgeResult.CONTINUE; + }) + .onGestureRecognizerJudgeBegin((event: BaseGestureEvent, current: GestureRecognizer, others: Array) => { + this.onGestureRecognizerJudgeBeginMessage = "触发" + return GestureJudgeResult.CONTINUE; + }) + Text("GestureJudgeBegin:" + this.onGestureJudgeBeginMessage) + Text("GestureRecognizerJudgeBegin:" + this.onGestureRecognizerJudgeBeginMessage) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0300.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0300.ets new file mode 100644 index 0000000000000000000000000000000000000000..61ddb1ed8e05285dd04c2bf387641c677972b846 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0300.ets @@ -0,0 +1,89 @@ +/* + * 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 ActionGestureEventRecognizer0300 { + scroller: Scroller = new Scroller(); + scroller2: Scroller = new Scroller(); + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + private childRecognizer: GestureRecognizer = new GestureRecognizer(); + private currentRecognizer: GestureRecognizer = new GestureRecognizer(); + private lastOffset: number = 0; + @State text :string = ''; + @State onGestureJudgeBeginMessage:string = ""; + @State onGestureRecognizerJudgeBeginMessage:string = "" + + build() { + Column() { + Scroll(this.scroller) { + Column() { + Text("Scroll Area") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Scroll(this.scroller2) { + Column() { + Text("Scroll Area2") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Column() { + ForEach(this.arr, (item: number) => { + Button(item.toString()) + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .margin({ top: 10 }) + }, (item: string) => item) + }.width('100%') + } + } + .id("inner") + .width('100%') + .height(800) + }.width('100%') + } + .id("ActionGestureEventRecognizer130") + .friction(0) + .height(600) + .scrollable(ScrollDirection.Vertical) + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + .edgeEffect(EdgeEffect.None) + .onGestureJudgeBegin((gestureInfo: GestureInfo, event: BaseGestureEvent) => { + // 若该手势类型为长按手势,转换为长按手势事件 + this.onGestureJudgeBeginMessage = "触发" + return GestureJudgeResult.CONTINUE; + }) + .onGestureRecognizerJudgeBegin((event: BaseGestureEvent, current: GestureRecognizer, others: Array) => { + this.onGestureRecognizerJudgeBeginMessage = "触发" + return GestureJudgeResult.CONTINUE; + }) + Text("GestureJudgeBegin:" + this.onGestureJudgeBeginMessage) + Text("GestureRecognizerJudgeBegin:" + this.onGestureRecognizerJudgeBeginMessage) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0310.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0310.ets new file mode 100644 index 0000000000000000000000000000000000000000..45db338821c959c12f94f38807d75d55381653ce --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0310.ets @@ -0,0 +1,89 @@ +/* + * 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 ActionGestureEventRecognizer0310 { + scroller: Scroller = new Scroller(); + scroller2: Scroller = new Scroller(); + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + private childRecognizer: GestureRecognizer = new GestureRecognizer(); + private currentRecognizer: GestureRecognizer = new GestureRecognizer(); + private lastOffset: number = 0; + @State text :string = ''; + @State onGestureJudgeBeginMessage:string = ""; + @State onGestureRecognizerJudgeBeginMessage:string = "" + + build() { + Column() { + Scroll(this.scroller) { + Column() { + Text("Scroll Area") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Scroll(this.scroller2) { + Column() { + Text("Scroll Area2") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Column() { + ForEach(this.arr, (item: number) => { + Button(item.toString()) + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .margin({ top: 10 }) + }, (item: string) => item) + }.width('100%') + } + } + .id("inner") + .width('100%') + .height(800) + }.width('100%') + } + .id("ActionGestureEventRecognizer130") + .friction(0) + .height(600) + .scrollable(ScrollDirection.Vertical) + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + .edgeEffect(EdgeEffect.None) + .onGestureJudgeBegin((gestureInfo: GestureInfo, event: BaseGestureEvent) => { + // 若该手势类型为长按手势,转换为长按手势事件 + this.onGestureJudgeBeginMessage = "触发" + return GestureJudgeResult.CONTINUE; + }) + .onGestureRecognizerJudgeBegin((event: BaseGestureEvent, current: GestureRecognizer, others: Array) => { + this.onGestureRecognizerJudgeBeginMessage = "触发" + return GestureJudgeResult.CONTINUE; + }) + Text("GestureJudgeBegin:" + this.onGestureJudgeBeginMessage) + Text("GestureRecognizerJudgeBegin:" + this.onGestureRecognizerJudgeBeginMessage) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0320.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0320.ets new file mode 100644 index 0000000000000000000000000000000000000000..39d24af66944954e6cb8d59b142aec738f4c7ff0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0320.ets @@ -0,0 +1,89 @@ +/* + * 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 ActionGestureEventRecognizer0320 { + scroller: Scroller = new Scroller(); + scroller2: Scroller = new Scroller(); + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + private childRecognizer: GestureRecognizer = new GestureRecognizer(); + private currentRecognizer: GestureRecognizer = new GestureRecognizer(); + private lastOffset: number = 0; + @State text :string = ''; + @State onGestureJudgeBeginMessage:string = ""; + @State onGestureRecognizerJudgeBeginMessage:string = "" + + build() { + Column() { + Scroll(this.scroller) { + Column() { + Text("Scroll Area") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Scroll(this.scroller2) { + Column() { + Text("Scroll Area2") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Column() { + ForEach(this.arr, (item: number) => { + Button(item.toString()) + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .margin({ top: 10 }) + }, (item: string) => item) + }.width('100%') + } + } + .id("inner") + .width('100%') + .height(800) + }.width('100%') + } + .id("ActionGestureEventRecognizer130") + .friction(0) + .height(600) + .scrollable(ScrollDirection.Vertical) + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + .edgeEffect(EdgeEffect.None) + .onGestureJudgeBegin((gestureInfo: GestureInfo, event: BaseGestureEvent) => { + // 若该手势类型为长按手势,转换为长按手势事件 + this.onGestureJudgeBeginMessage = "触发" + return GestureJudgeResult.CONTINUE; + }) + .onGestureRecognizerJudgeBegin((event: BaseGestureEvent, current: GestureRecognizer, others: Array) => { + this.onGestureRecognizerJudgeBeginMessage = "触发" + return GestureJudgeResult.CONTINUE; + }) + Text("GestureJudgeBegin:" + this.onGestureJudgeBeginMessage) + Text("GestureRecognizerJudgeBegin:" + this.onGestureRecognizerJudgeBeginMessage) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0330.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0330.ets new file mode 100644 index 0000000000000000000000000000000000000000..4b4893c0173259a68672ef026d2a3dff9c7c6006 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0330.ets @@ -0,0 +1,89 @@ +/* + * 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 ActionGestureEventRecognizer0330 { + scroller: Scroller = new Scroller(); + scroller2: Scroller = new Scroller(); + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + private childRecognizer: GestureRecognizer = new GestureRecognizer(); + private currentRecognizer: GestureRecognizer = new GestureRecognizer(); + private lastOffset: number = 0; + @State text :string = ''; + @State onGestureJudgeBeginMessage:string = ""; + @State onGestureRecognizerJudgeBeginMessage:string = "" + + build() { + Column() { + Scroll(this.scroller) { + Column() { + Text("Scroll Area") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Scroll(this.scroller2) { + Column() { + Text("Scroll Area2") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Column() { + ForEach(this.arr, (item: number) => { + Button(item.toString()) + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .margin({ top: 10 }) + }, (item: string) => item) + }.width('100%') + } + } + .id("inner") + .width('100%') + .height(800) + }.width('100%') + } + .id("ActionGestureEventRecognizer130") + .friction(0) + .height(600) + .scrollable(ScrollDirection.Vertical) + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + .edgeEffect(EdgeEffect.None) + .onGestureJudgeBegin((gestureInfo: GestureInfo, event: BaseGestureEvent) => { + // 若该手势类型为长按手势,转换为长按手势事件 + this.onGestureJudgeBeginMessage = "触发" + return GestureJudgeResult.CONTINUE; + }) + .onGestureRecognizerJudgeBegin((event: BaseGestureEvent, current: GestureRecognizer, others: Array) => { + this.onGestureRecognizerJudgeBeginMessage = "触发" + return GestureJudgeResult.CONTINUE; + }) + Text("GestureJudgeBegin:" + this.onGestureJudgeBeginMessage) + Text("GestureRecognizerJudgeBegin:" + this.onGestureRecognizerJudgeBeginMessage) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0360.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0360.ets new file mode 100644 index 0000000000000000000000000000000000000000..59ac5d31929bbf06c442e02b75b62c932e7caaca --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0360.ets @@ -0,0 +1,157 @@ +/* + * 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 ActionGestureEventRecognizer0360 { + scroller: Scroller = new Scroller() + scroller2: Scroller = new Scroller() + private childRecognizer: GestureRecognizer = new GestureRecognizer() + private currentRecognizer: GestureRecognizer = new GestureRecognizer() + private lastOffset: number =0 + @State numbers: String[]=['0', '1', '2', '3', '4'] + @State gridPosition: number =0//0代表滚动到grid顶部,1代表中间值,2代表滚动到grid底部。 + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + Column() { + Text("Scroll Area").width('90%').height(150).backgroundColor(0xFFFFFF).borderRadius(15).fontSize(16).textAlign(TextAlign.Center).margin({ top: 10 }) + Grid(this.scroller2) { + ForEach(this.numbers, (day: string) => { + ForEach(this.numbers, (day: string) =>{ + GridItem(){ + Text(day).fontSize(16).backgroundColor(0xF9CF93).width('100%').height(300).textAlign(TextAlign.Center) + } + }, (day: string) => day) + }, (day: string) => day) + } + .columnsTemplate('1fr 1fr 1fr 1fr 1fr').columnsGap(10).rowsGap(10).friction(0.6) + .enableScrollInteraction(true).supportAnimation(false).multiSelectable(false) + .edgeEffect(EdgeEffect.None).scrollBar(BarState.On).scrollBarColor(Color.Grey).scrollBarWidth(4).backgroundColor(0xFAEEE).height(300) + .onScrollBarUpdate((index: number, offset: number) => { + console.info("XXX" + 'Grid onScrollBarUpdate,index:'+ index.toString() +",offset" + offset.toString()) + return { totalOffset: (index / 5) * (80 +10) - offset, totalLength: 80*5+10*4} + })//只适用于当前示例代码数据源,如果数据源有变化,则需要修改该部分代码,或者删掉此属性 + .onReachStart(() =>{ this.gridPosition =0 + console.info("XXX" +"Grid onReachStart") + }) + .onReachEnd(() =>{ this.gridPosition = 2 + console.info("XXX" + "Grid onReachEnd") + }) + // .height(1000) + .width('90%').id("inner")}.width('100%')} + .id("outer").height(600) + .scrollable(ScrollDirection.Vertical) // 滚动方向纵向.scrollBar(BarState.On) //滚动条常驻显示.scrollBarColor(Color.Gray) // 滚动条颜色.scrollBarWidth(10) // 滚动条宽度.edgeEffect(EdgeEffect.Spring) + .onScroll((xOffset: number, yOffset: number) => { + console.info(xOffset +'' + yOffset) + }) + .onScrollEdge((side: Edge) => { + console.info('To the edge') + }) + .onScrollStop(() =>{ + console.info('Scroll Stop') + }) + .shouldBuiltInRecognizerParallelWith((current: GestureRecognizer, others:Array) =>{ + for (let i = 0; i < others.length; i++) { + let target = others[i].getEventTargetInfo(); + if (target) { + let id = target.getId(); + console.log("zcb parallellnnerGestureTo other id " + id + " isSystemGesture " + others[i].isBuiltIn() + " type " + others[i].getType()); + if (id == "inner" && others[i].isBuiltIn() && others[i].getType() == GestureControl.GestureType.PAN_GESTURE) { + this.currentRecognizer = current; this.childRecognizer = others[i]; return others[i]; + } + } + } + return undefined; + }) + // .onTouch((event: TouchEvent)=>{// if (event.type == TouchType.Up){ I/ console.log("zcb reset"); + //this.childRecognizer.setEnabled(true);// this.currentRecognizer.setEnabled(true);// }//}) + .onGestureRecognizerJudgeBegin((event: BaseGestureEvent, current?: GestureRecognizer, others?: Array) => { + if (current) { + let target = current.getEventTargetInfo() as ScrollableTargetInfo; if (target) { + if (target.getId() == "outer" && current.isBuiltIn()&& current.getType() == GestureControl.GestureType.PAN_GESTURE) { + if (others) { + for (let i= 0; i< others.length; i++) { + let otherTarget = others[i].getEventTargetInfo() as ScrollableTargetInfo; if (otherTarget) { + if (otherTarget.getId() == "inner") { + console.log("zcb onGestureJudgeBegin other isBegin " + otherTarget.isBegin() + " isEnd " + otherTarget.isEnd());let panEvent = event as PanGestureEvent; if (otherTarget.isEnd()){ + if (panEvent && panEvent.offsetY<0) { + this.childRecognizer.setEnabled(false) + this.currentRecognizer.setEnabled(true) + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + }else if (otherTarget.isBegin()){ + if (panEvent.offsetY > 0) { + this.childRecognizer.setEnabled(false) + this.currentRecognizer.setEnabled(true)}else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + }else{ + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } + } + } + } + } + } + } + return GestureJudgeResult.CONTINUE; + }) + .parallelGesture( + PanGesture() + .onActionUpdate((event: GestureEvent)=>{ + console.log("zcb onActionUpdate event offsetY " + event.offsetY +" this.lastOffset " + this.lastOffset + " this.childRecognizer.getGestureState()"+ this.childRecognizer.getState()) + if (this.childRecognizer.getState()!=GestureRecognizerState.SUCCESSFUL || this.currentRecognizer.getState()!= GestureRecognizerState.SUCCESSFUL){ + return; + } + let target = this.childRecognizer.getEventTargetInfo() as ScrollableTargetInfo; let currentTarget =this.currentRecognizer.getEventTargetInfo() as ScrollableTargetInfo; + if (target && currentTarget) { + console.log("zcb onActionUpdate other isBegin " + target.isBegin() + " isEnd " + target.isEnd() + " current isBegin " + currentTarget.isBegin() + " current isEnd " + currentTarget.isEnd()); + if (target.isEnd()) { + if ((event.offsetY - this.lastOffset) < 0) { + this.childRecognizer.setEnabled(false) + this.currentRecognizer.setEnabled(true) // if (currentTarget.isEnd()) { + // this.currentRecognizer.setEnabled(false)// } else{ + // this.currentRecognizer.setEnabled(true)//} + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } else if (target.isBegin()) { + if ((event.offsetY - this.lastOffset) > 0) { + this.childRecognizer.setEnabled(false) + this.currentRecognizer.setEnabled(true) // if (currentTarget.isBegin()) { + // this.currentRecognizer.setEnabled(false)// } else{ + // this.currentRecognizer.setEnabled(true)//} + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + }else{ + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } + this.lastOffset = event.offsetY + }) + ) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0370.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0370.ets new file mode 100644 index 0000000000000000000000000000000000000000..25482867d5349ef684ec533dac4f8cb44d274fe2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0370.ets @@ -0,0 +1,89 @@ +/* + * 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 ActionGestureEventRecognizer0370 { + scroller: Scroller = new Scroller(); + scroller2: Scroller = new Scroller(); + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + private childRecognizer: GestureRecognizer = new GestureRecognizer(); + private currentRecognizer: GestureRecognizer = new GestureRecognizer(); + private lastOffset: number = 0; + @State text :string = ''; + @State onGestureJudgeBeginMessage:string = ""; + @State onGestureRecognizerJudgeBeginMessage:string = "" + + build() { + Column() { + Scroll(this.scroller) { + Column() { + Text("Scroll Area") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Scroll(this.scroller2) { + Column() { + Text("Scroll Area2") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Column() { + ForEach(this.arr, (item: number) => { + Button(item.toString()) + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .margin({ top: 10 }) + }, (item: string) => item) + }.width('100%') + } + } + .id("inner") + .width('100%') + .height(800) + }.width('100%') + } + .id("ActionGestureEventRecognizer130") + .friction(0) + .height(600) + .scrollable(ScrollDirection.Vertical) + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + .edgeEffect(EdgeEffect.None) + .onGestureJudgeBegin((gestureInfo: GestureInfo, event: BaseGestureEvent) => { + // 若该手势类型为长按手势,转换为长按手势事件 + this.onGestureJudgeBeginMessage = "触发" + return GestureJudgeResult.CONTINUE; + }) + .onGestureRecognizerJudgeBegin((event: BaseGestureEvent, current: GestureRecognizer, others: Array) => { + this.onGestureRecognizerJudgeBeginMessage = "触发" + return GestureJudgeResult.CONTINUE; + }) + Text("GestureJudgeBegin:" + this.onGestureJudgeBeginMessage) + Text("GestureRecognizerJudgeBegin:" + this.onGestureRecognizerJudgeBeginMessage) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0380.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0380.ets new file mode 100644 index 0000000000000000000000000000000000000000..3c4528335fe56fa21a90072723cb3f6908155c38 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0380.ets @@ -0,0 +1,89 @@ +/* + * 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 ActionGestureEventRecognizer0380 { + scroller: Scroller = new Scroller(); + scroller2: Scroller = new Scroller(); + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + private childRecognizer: GestureRecognizer = new GestureRecognizer(); + private currentRecognizer: GestureRecognizer = new GestureRecognizer(); + private lastOffset: number = 0; + @State text :string = ''; + @State onGestureJudgeBeginMessage:string = ""; + @State onGestureRecognizerJudgeBeginMessage:string = "" + + build() { + Column() { + Scroll(this.scroller) { + Column() { + Text("Scroll Area") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Scroll(this.scroller2) { + Column() { + Text("Scroll Area2") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Column() { + ForEach(this.arr, (item: number) => { + Button(item.toString()) + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .margin({ top: 10 }) + }, (item: string) => item) + }.width('100%') + } + } + .id("inner") + .width('100%') + .height(800) + }.width('100%') + } + .id("ActionGestureEventRecognizer130") + .friction(0) + .height(600) + .scrollable(ScrollDirection.Vertical) + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + .edgeEffect(EdgeEffect.None) + .onGestureJudgeBegin((gestureInfo: GestureInfo, event: BaseGestureEvent) => { + // 若该手势类型为长按手势,转换为长按手势事件 + this.onGestureJudgeBeginMessage = "触发" + return GestureJudgeResult.CONTINUE; + }) + .onGestureRecognizerJudgeBegin((event: BaseGestureEvent, current: GestureRecognizer, others: Array) => { + this.onGestureRecognizerJudgeBeginMessage = "触发" + return GestureJudgeResult.CONTINUE; + }) + Text("GestureJudgeBegin:" + this.onGestureJudgeBeginMessage) + Text("GestureRecognizerJudgeBegin:" + this.onGestureRecognizerJudgeBeginMessage) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0390.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0390.ets new file mode 100644 index 0000000000000000000000000000000000000000..a85e23cf5f27df66a96dd7de7e3778331cbc84ae --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0390.ets @@ -0,0 +1,89 @@ +/* + * 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 ActionGestureEventRecognizer0390 { + scroller: Scroller = new Scroller(); + scroller2: Scroller = new Scroller(); + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + private childRecognizer: GestureRecognizer = new GestureRecognizer(); + private currentRecognizer: GestureRecognizer = new GestureRecognizer(); + private lastOffset: number = 0; + @State text :string = ''; + @State onGestureJudgeBeginMessage:string = ""; + @State onGestureRecognizerJudgeBeginMessage:string = "" + + build() { + Column() { + Scroll(this.scroller) { + Column() { + Text("Scroll Area") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Scroll(this.scroller2) { + Column() { + Text("Scroll Area2") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Column() { + ForEach(this.arr, (item: number) => { + Button(item.toString()) + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .margin({ top: 10 }) + }, (item: string) => item) + }.width('100%') + } + } + .id("inner") + .width('100%') + .height(800) + }.width('100%') + } + .id("ActionGestureEventRecognizer130") + .friction(0) + .height(600) + .scrollable(ScrollDirection.Vertical) + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + .edgeEffect(EdgeEffect.None) + .onGestureJudgeBegin((gestureInfo: GestureInfo, event: BaseGestureEvent) => { + // 若该手势类型为长按手势,转换为长按手势事件 + this.onGestureJudgeBeginMessage = "触发" + return GestureJudgeResult.CONTINUE; + }) + .onGestureRecognizerJudgeBegin((event: BaseGestureEvent, current: GestureRecognizer, others: Array) => { + this.onGestureRecognizerJudgeBeginMessage = "触发" + return GestureJudgeResult.CONTINUE; + }) + Text("GestureJudgeBegin:" + this.onGestureJudgeBeginMessage) + Text("GestureRecognizerJudgeBegin:" + this.onGestureRecognizerJudgeBeginMessage) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0400.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0400.ets new file mode 100644 index 0000000000000000000000000000000000000000..9c062e2f6e1a6c869e4a3b5df6629d69a0528fd4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0400.ets @@ -0,0 +1,89 @@ +/* + * 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 ActionGestureEventRecognizer0400 { + scroller: Scroller = new Scroller(); + scroller2: Scroller = new Scroller(); + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + private childRecognizer: GestureRecognizer = new GestureRecognizer(); + private currentRecognizer: GestureRecognizer = new GestureRecognizer(); + private lastOffset: number = 0; + @State text :string = ''; + @State onGestureJudgeBeginMessage:string = ""; + @State onGestureRecognizerJudgeBeginMessage:string = "" + + build() { + Column() { + Scroll(this.scroller) { + Column() { + Text("Scroll Area") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Scroll(this.scroller2) { + Column() { + Text("Scroll Area2") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Column() { + ForEach(this.arr, (item: number) => { + Button(item.toString()) + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .margin({ top: 10 }) + }, (item: string) => item) + }.width('100%') + } + } + .id("inner") + .width('100%') + .height(800) + }.width('100%') + } + .id("ActionGestureEventRecognizer130") + .friction(0) + .height(600) + .scrollable(ScrollDirection.Vertical) + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + .edgeEffect(EdgeEffect.None) + .onGestureJudgeBegin((gestureInfo: GestureInfo, event: BaseGestureEvent) => { + // 若该手势类型为长按手势,转换为长按手势事件 + this.onGestureJudgeBeginMessage = "触发" + return GestureJudgeResult.CONTINUE; + }) + .onGestureRecognizerJudgeBegin((event: BaseGestureEvent, current: GestureRecognizer, others: Array) => { + this.onGestureRecognizerJudgeBeginMessage = "触发" + return GestureJudgeResult.CONTINUE; + }) + Text("GestureJudgeBegin:" + this.onGestureJudgeBeginMessage) + Text("GestureRecognizerJudgeBegin:" + this.onGestureRecognizerJudgeBeginMessage) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer120.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer120.ets new file mode 100644 index 0000000000000000000000000000000000000000..3e7be83980aa3483a234adb645479f314bb627bd --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer120.ets @@ -0,0 +1,126 @@ +/* + * 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 ActionGestureEventRecognizer120 { + scroller: Scroller = new Scroller(); + scroller2: Scroller = new Scroller(); + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + private childRecognizer: GestureRecognizer = new GestureRecognizer(); + private currentRecognizer: GestureRecognizer = new GestureRecognizer(); + private lastOffset: number = 0; + @State text :string = ''; + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + Column() { + Text("Scroll Area") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Scroll(this.scroller2) { + Column() { + Text("Scroll Area2") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Column() { + ForEach(this.arr, (item: number) => { + Text(item.toString()) + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + }, (item: string) => item) + }.width('100%') + } + } + .id("inner") + .width('100%') + .height(800) + }.width('100%') + } + .id("ActionGestureEventRecognizer120") + .friction(0) + .height(600) + .scrollable(ScrollDirection.Vertical) + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + .edgeEffect(EdgeEffect.None) + .shouldBuiltInRecognizerParallelWith((current: GestureRecognizer, others: Array) => { + for (let i = 0; i < others.length; i++) { + let target = others[i].getEventTargetInfo(); + if (target) { + if (target.getId() == "inner" && others[i].isBuiltIn() && others[i].getType() == GestureControl.GestureType.PAN_GESTURE) { // 找到将要组成并行手势的识别器 + this.currentRecognizer = current; + this.childRecognizer = others[i]; + return others[i]; + } + } + } + return undefined; + }) + .onGestureRecognizerJudgeBegin((event: BaseGestureEvent, current: GestureRecognizer, others: Array) => { + if (current) { + let target = current.getEventTargetInfo(); + if (target) { + if (target.getId() == "outer" && current.isBuiltIn() && current.getType() == GestureControl.GestureType.PAN_GESTURE) { + if (others) { + for (let i = 0; i < others.length; i++) { + let target = others[i].getEventTargetInfo() as ScrollableTargetInfo; + if (target instanceof ScrollableTargetInfo && target.getId() == "inner") { + let panEvent = event as PanGestureEvent; + this.childRecognizer.setEnabled(true); + this.currentRecognizer.setEnabled(true); + } + } + } + } + } + } + return GestureJudgeResult.REJECT; + }) + .parallelGesture( + PanGesture() + .onActionUpdate((event: GestureEvent)=>{ + if (this.childRecognizer.getState() != GestureRecognizerState.SUCCESSFUL || this.currentRecognizer.getState() != GestureRecognizerState.SUCCESSFUL) { // 如果识别器状态不是SUCCESSFUL,则不做控制 + return; + } + let target = this.childRecognizer.getEventTargetInfo() as ScrollableTargetInfo; + let currentTarget = this.currentRecognizer.getEventTargetInfo() as ScrollableTargetInfo; + if (target instanceof ScrollableTargetInfo && currentTarget instanceof ScrollableTargetInfo) { + this.childRecognizer.setEnabled(true); + this.currentRecognizer.setEnabled(true); + } + this.lastOffset = event.offsetY + }) + ) + Text(this.text).margin({top:20}) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer130.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer130.ets new file mode 100644 index 0000000000000000000000000000000000000000..1ef58dbeca26f596108490d1e164685db7cbb780 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer130.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. + */ +@Entry +@Component +struct ActionGestureEventRecognizer130 { + scroller: Scroller = new Scroller(); + scroller2: Scroller = new Scroller(); + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + private childRecognizer: GestureRecognizer = new GestureRecognizer(); + private currentRecognizer: GestureRecognizer = new GestureRecognizer(); + private lastOffset: number = 0; + @State text :string = ''; + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + Column() { + Text("Scroll Area") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Scroll(this.scroller2) { + Column() { + Text("Scroll Area2") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Column() { + ForEach(this.arr, (item: number) => { + Text(item.toString()) + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + }, (item: string) => item) + }.width('100%') + } + } + .id("inner") + .width('100%') + .height(800) + }.width('100%') + } + .id("ActionGestureEventRecognizer130") + .friction(0) + .height(600) + .scrollable(ScrollDirection.Vertical) + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + .edgeEffect(EdgeEffect.None) + .shouldBuiltInRecognizerParallelWith((current: GestureRecognizer, others: Array) => { + for (let i = 0; i < others.length; i++) { + let target = others[i].getEventTargetInfo(); + if (target) { + if (target.getId() == "inner" && others[i].isBuiltIn() && others[i].getType() == GestureControl.GestureType.PAN_GESTURE) { // 找到将要组成并行手势的识别器 + this.currentRecognizer = current; + this.childRecognizer = others[i]; + return others[i]; + } + } + } + return undefined; + }) + .onGestureRecognizerJudgeBegin((event: BaseGestureEvent, current: GestureRecognizer, others: Array) => { + if (current) { + let target = current.getEventTargetInfo(); + if (target) { + if (target.getId() == "outer" && current.isBuiltIn() && current.getType() == GestureControl.GestureType.PAN_GESTURE) { + if (others) { + for (let i = 0; i < others.length; i++) { + let target = others[i].getEventTargetInfo() as ScrollableTargetInfo; + if (target instanceof ScrollableTargetInfo && target.getId() == "inner") { + let panEvent = event as PanGestureEvent; + if (target.isEnd()) { + if (panEvent && panEvent.offsetY < 0) { + this.childRecognizer.setEnabled(false); + this.currentRecognizer.setEnabled(true); + } else { + this.childRecognizer.setEnabled(true); + this.currentRecognizer.setEnabled(false); + } + } else if (target.isBegin()) { + if (panEvent.offsetY > 0) { + this.childRecognizer.setEnabled(false); + this.currentRecognizer.setEnabled(true); + } else { + this.childRecognizer.setEnabled(true); + this.currentRecognizer.setEnabled(false); + } + } else { + this.childRecognizer.setEnabled(true); + this.currentRecognizer.setEnabled(false); + } + } + } + } + } + } + } + return GestureJudgeResult.CONTINUE; + }) + .parallelGesture( + PanGesture() + .onActionUpdate((event: GestureEvent)=>{ + if (this.childRecognizer.getState() != GestureRecognizerState.SUCCESSFUL || this.currentRecognizer.getState() != GestureRecognizerState.SUCCESSFUL) { // 如果识别器状态不是SUCCESSFUL,则不做控制 + return; + } + let target = this.childRecognizer.getEventTargetInfo() as ScrollableTargetInfo; + let currentTarget = this.currentRecognizer.getEventTargetInfo() as ScrollableTargetInfo; + if (target instanceof ScrollableTargetInfo && currentTarget instanceof ScrollableTargetInfo) { + if (target.isEnd()) { // 在移动过程中实时根据当前组件状态,控制识别器的开闭状态 + if ((event.offsetY - this.lastOffset) < 0) { + this.childRecognizer.setEnabled(false) + if (currentTarget.isEnd()) { + this.currentRecognizer.setEnabled(false) + } else { + this.currentRecognizer.setEnabled(true) + } + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } else if (target.isBegin()) { + if ((event.offsetY - this.lastOffset) > 0) { + this.childRecognizer.setEnabled(false) + if (currentTarget.isBegin()) { + this.currentRecognizer.setEnabled(false) + } else { + this.currentRecognizer.setEnabled(true) + } + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } + this.lastOffset = event.offsetY + }) + ) + Text(this.text).margin({top:20}) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer140.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer140.ets new file mode 100644 index 0000000000000000000000000000000000000000..2b4acb2276aeeb79674851a230482cd8b62c804c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer140.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. + */ +@Entry +@Component +struct ActionGestureEventRecognizer140 { + scroller: Scroller = new Scroller(); + scroller2: Scroller = new Scroller(); + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + private childRecognizer: GestureRecognizer = new GestureRecognizer(); + private currentRecognizer: GestureRecognizer = new GestureRecognizer(); + private lastOffset: number = 0; + @State text :string = ''; + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + Column() { + Text("Scroll Area") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Scroll(this.scroller2) { + Column() { + Text("Scroll Area2") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Column() { + ForEach(this.arr, (item: number) => { + Text(item.toString()) + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + }, (item: string) => item) + }.width('100%') + } + } + .id("inner") + .width('100%') + .height(800) + }.width('100%') + } + .id("ActionGestureEventRecognizer140") + .friction(0) + .height(600) + .scrollable(ScrollDirection.Vertical) + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + .edgeEffect(EdgeEffect.None) + .shouldBuiltInRecognizerParallelWith((current: GestureRecognizer, others: Array) => { + for (let i = 0; i < others.length; i++) { + let target = others[i].getEventTargetInfo(); + if (target) { + if (target.getId() == "inner" && others[i].isBuiltIn() && others[i].getType() == GestureControl.GestureType.PAN_GESTURE) { // 找到将要组成并行手势的识别器 + this.currentRecognizer = current; + this.childRecognizer = others[i]; + return others[i]; + } + } + } + return undefined; + }) + .onGestureRecognizerJudgeBegin((event: BaseGestureEvent, current: GestureRecognizer, others: Array) => { + if (current) { + let target = current.getEventTargetInfo(); + if (target) { + if (target.getId() == "outer" && current.isBuiltIn() && current.getType() == GestureControl.GestureType.PAN_GESTURE) { + if (others) { + for (let i = 0; i < others.length; i++) { + let target = others[i].getEventTargetInfo() as ScrollableTargetInfo; + if (target instanceof ScrollableTargetInfo && target.getId() == "inner") { + let panEvent = event as PanGestureEvent; + if (target.isEnd()) { + if (panEvent && panEvent.offsetY < 0) { + this.childRecognizer.setEnabled(false); + this.currentRecognizer.setEnabled(true); + } else { + this.childRecognizer.setEnabled(true); + this.currentRecognizer.setEnabled(false); + } + } else if (target.isBegin()) { + if (panEvent.offsetY > 0) { + this.childRecognizer.setEnabled(false); + this.currentRecognizer.setEnabled(true); + } else { + this.childRecognizer.setEnabled(true); + this.currentRecognizer.setEnabled(false); + } + } else { + this.childRecognizer.setEnabled(true); + this.currentRecognizer.setEnabled(false); + } + } + } + } + } + } + } + return GestureJudgeResult.REJECT; + }) + .parallelGesture( + PanGesture() + .onActionUpdate((event: GestureEvent)=>{ + if (this.childRecognizer.getState() != GestureRecognizerState.SUCCESSFUL || this.currentRecognizer.getState() != GestureRecognizerState.SUCCESSFUL) { // 如果识别器状态不是SUCCESSFUL,则不做控制 + return; + } + let target = this.childRecognizer.getEventTargetInfo() as ScrollableTargetInfo; + let currentTarget = this.currentRecognizer.getEventTargetInfo() as ScrollableTargetInfo; + if (target instanceof ScrollableTargetInfo && currentTarget instanceof ScrollableTargetInfo) { + if (target.isEnd()) { // 在移动过程中实时根据当前组件状态,控制识别器的开闭状态 + if ((event.offsetY - this.lastOffset) < 0) { + this.childRecognizer.setEnabled(false) + if (currentTarget.isEnd()) { + this.currentRecognizer.setEnabled(false) + } else { + this.currentRecognizer.setEnabled(true) + } + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } else if (target.isBegin()) { + if ((event.offsetY - this.lastOffset) > 0) { + this.childRecognizer.setEnabled(false) + if (currentTarget.isBegin()) { + this.currentRecognizer.setEnabled(false) + } else { + this.currentRecognizer.setEnabled(true) + } + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } + this.lastOffset = event.offsetY + }) + ) + Text(this.text).margin({top:20}) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer150.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer150.ets new file mode 100644 index 0000000000000000000000000000000000000000..4d6f15cbc5dab365dd01caf52c7877a389e1123d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer150.ets @@ -0,0 +1,126 @@ +/* + * 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 ActionGestureEventRecognizer150 { + scroller: Scroller = new Scroller(); + scroller2: Scroller = new Scroller(); + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + private childRecognizer: GestureRecognizer = new GestureRecognizer(); + private currentRecognizer: GestureRecognizer = new GestureRecognizer(); + private lastOffset: number = 0; + @State text :string = ''; + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + Column() { + Text("Scroll Area") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Scroll(this.scroller2) { + Column() { + Text("Scroll Area2") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Column() { + ForEach(this.arr, (item: number) => { + Text(item.toString()) + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + }, (item: string) => item) + }.width('100%') + } + } + .id("inner") + .width('100%') + .height(800) + }.width('100%') + } + .id("ActionGestureEventRecognizer150") + .friction(0) + .height(600) + .scrollable(ScrollDirection.Vertical) + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + .edgeEffect(EdgeEffect.None) + .shouldBuiltInRecognizerParallelWith((current: GestureRecognizer, others: Array) => { + for (let i = 0; i < others.length; i++) { + let target = others[i].getEventTargetInfo(); + if (target) { + if (target.getId() == "inner" && others[i].isBuiltIn() && others[i].getType() == GestureControl.GestureType.PAN_GESTURE) { // 找到将要组成并行手势的识别器 + this.currentRecognizer = current; + this.childRecognizer = others[i]; + return others[i]; + } + } + } + return undefined; + }) + .onGestureRecognizerJudgeBegin((event: BaseGestureEvent, current: GestureRecognizer, others: Array) => { + if (current) { + let target = current.getEventTargetInfo(); + if (target) { + if (target.getId() == "outer" && current.isBuiltIn() && current.getType() == GestureControl.GestureType.PAN_GESTURE) { + if (others) { + for (let i = 0; i < others.length; i++) { + let target = others[i].getEventTargetInfo() as ScrollableTargetInfo; + if (target instanceof ScrollableTargetInfo && target.getId() == "inner") { + let panEvent = event as PanGestureEvent; + this.childRecognizer.setEnabled(true); + this.currentRecognizer.setEnabled(true); + } + } + } + } + } + } + return GestureJudgeResult.REJECT; + }) + .parallelGesture( + PanGesture() + .onActionUpdate((event: GestureEvent)=>{ + if (this.childRecognizer.getState() != GestureRecognizerState.SUCCESSFUL || this.currentRecognizer.getState() != GestureRecognizerState.SUCCESSFUL) { // 如果识别器状态不是SUCCESSFUL,则不做控制 + return; + } + let target = this.childRecognizer.getEventTargetInfo() as ScrollableTargetInfo; + let currentTarget = this.currentRecognizer.getEventTargetInfo() as ScrollableTargetInfo; + if (target instanceof ScrollableTargetInfo && currentTarget instanceof ScrollableTargetInfo) { + this.childRecognizer.setEnabled(true); + this.currentRecognizer.setEnabled(true); + } + this.lastOffset = event.offsetY + }) + ) + Text(this.text).margin({top:20}) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer160.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer160.ets new file mode 100644 index 0000000000000000000000000000000000000000..99765da6760b5633af84df68fbc6d9f57f77e411 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer160.ets @@ -0,0 +1,126 @@ +/* + * 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 ActionGestureEventRecognizer160 { + scroller: Scroller = new Scroller(); + scroller2: Scroller = new Scroller(); + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + private childRecognizer: GestureRecognizer = new GestureRecognizer(); + private currentRecognizer: GestureRecognizer = new GestureRecognizer(); + private lastOffset: number = 0; + @State text :string = ''; + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + Column() { + Text("Scroll Area") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Scroll(this.scroller2) { + Column() { + Text("Scroll Area2") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Column() { + ForEach(this.arr, (item: number) => { + Text(item.toString()) + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + }, (item: string) => item) + }.width('100%') + } + } + .id("inner") + .width('100%') + .height(800) + }.width('100%') + } + .id("ActionGestureEventRecognizer160") + .friction(0) + .height(600) + .scrollable(ScrollDirection.Vertical) + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + .edgeEffect(EdgeEffect.None) + .shouldBuiltInRecognizerParallelWith((current: GestureRecognizer, others: Array) => { + for (let i = 0; i < others.length; i++) { + let target = others[i].getEventTargetInfo(); + if (target) { + if (target.getId() == "inner" && others[i].isBuiltIn() && others[i].getType() == GestureControl.GestureType.PAN_GESTURE) { // 找到将要组成并行手势的识别器 + this.currentRecognizer = current; + this.childRecognizer = others[i]; + return others[i]; + } + } + } + return undefined; + }) + .onGestureRecognizerJudgeBegin((event: BaseGestureEvent, current: GestureRecognizer, others: Array) => { + if (current) { + let target = current.getEventTargetInfo(); + if (target) { + if (target.getId() == "outer" && current.isBuiltIn() && current.getType() == GestureControl.GestureType.PAN_GESTURE) { + if (others) { + for (let i = 0; i < others.length; i++) { + let target = others[i].getEventTargetInfo() as ScrollableTargetInfo; + if (target instanceof ScrollableTargetInfo && target.getId() == "inner") { + let panEvent = event as PanGestureEvent; + this.childRecognizer.setEnabled(false); + this.currentRecognizer.setEnabled(false); + } + } + } + } + } + } + return GestureJudgeResult.REJECT; + }) + .parallelGesture( + PanGesture() + .onActionUpdate((event: GestureEvent)=>{ + if (this.childRecognizer.getState() != GestureRecognizerState.SUCCESSFUL || this.currentRecognizer.getState() != GestureRecognizerState.SUCCESSFUL) { // 如果识别器状态不是SUCCESSFUL,则不做控制 + return; + } + let target = this.childRecognizer.getEventTargetInfo() as ScrollableTargetInfo; + let currentTarget = this.currentRecognizer.getEventTargetInfo() as ScrollableTargetInfo; + if (target instanceof ScrollableTargetInfo && currentTarget instanceof ScrollableTargetInfo) { + this.childRecognizer.setEnabled(false); + this.currentRecognizer.setEnabled(false); + } + this.lastOffset = event.offsetY + }) + ) + Text(this.text).margin({top:20}) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer170.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer170.ets new file mode 100644 index 0000000000000000000000000000000000000000..2418e72408a060b58e24b6ca002c6a1c525630df --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer170.ets @@ -0,0 +1,126 @@ +/* + * 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 ActionGestureEventRecognizer170 { + scroller: Scroller = new Scroller(); + scroller2: Scroller = new Scroller(); + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + private childRecognizer: GestureRecognizer = new GestureRecognizer(); + private currentRecognizer: GestureRecognizer = new GestureRecognizer(); + private lastOffset: number = 0; + @State text :string = ''; + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + Column() { + Text("Scroll Area") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Scroll(this.scroller2) { + Column() { + Text("Scroll Area2") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Column() { + ForEach(this.arr, (item: number) => { + Text(item.toString()) + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + }, (item: string) => item) + }.width('100%') + } + } + .edgeEffect(EdgeEffect.None) + .shouldBuiltInRecognizerParallelWith((current: GestureRecognizer, others: Array) => { + for (let i = 0; i < others.length; i++) { + let target = others[i].getEventTargetInfo(); + if (target) { + if (target.getId() == "inner" && others[i].isBuiltIn() && others[i].getType() == GestureControl.GestureType.PAN_GESTURE) { // 找到将要组成并行手势的识别器 + this.currentRecognizer = current; + this.childRecognizer = others[i]; + return others[i]; + } + } + } + return undefined; + }) + .onGestureRecognizerJudgeBegin((event: BaseGestureEvent, current: GestureRecognizer, others: Array) => { + if (current) { + let target = current.getEventTargetInfo(); + if (target) { + if (target.getId() == "outer" && current.isBuiltIn() && current.getType() == GestureControl.GestureType.PAN_GESTURE) { + if (others) { + for (let i = 0; i < others.length; i++) { + let target = others[i].getEventTargetInfo() as ScrollableTargetInfo; + if (target instanceof ScrollableTargetInfo && target.getId() == "inner") { + let panEvent = event as PanGestureEvent; + this.childRecognizer.setEnabled(false); + this.currentRecognizer.setEnabled(true); + } + } + } + } + } + } + return GestureJudgeResult.REJECT; + }) + .parallelGesture( + PanGesture() + .onActionUpdate((event: GestureEvent)=>{ + if (this.childRecognizer.getState() != GestureRecognizerState.SUCCESSFUL || this.currentRecognizer.getState() != GestureRecognizerState.SUCCESSFUL) { // 如果识别器状态不是SUCCESSFUL,则不做控制 + return; + } + let target = this.childRecognizer.getEventTargetInfo() as ScrollableTargetInfo; + let currentTarget = this.currentRecognizer.getEventTargetInfo() as ScrollableTargetInfo; + if (target instanceof ScrollableTargetInfo && currentTarget instanceof ScrollableTargetInfo) { + this.childRecognizer.setEnabled(false); + this.currentRecognizer.setEnabled(true); + } + this.lastOffset = event.offsetY + }) + ) + .id("inner") + .width('100%') + .height(800) + }.width('100%') + } + .id("ActionGestureEventRecognizer170") + .friction(0) + .height(600) + .scrollable(ScrollDirection.Vertical) + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + Text(this.text).margin({top:20}) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer180.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer180.ets new file mode 100644 index 0000000000000000000000000000000000000000..81aac8be4dce28473b6d1ee76fdb1231a01ec29a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer180.ets @@ -0,0 +1,126 @@ +/* + * 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 ActionGestureEventRecognizer180 { + scroller: Scroller = new Scroller(); + scroller2: Scroller = new Scroller(); + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + private childRecognizer: GestureRecognizer = new GestureRecognizer(); + private currentRecognizer: GestureRecognizer = new GestureRecognizer(); + private lastOffset: number = 0; + @State text :string = ''; + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + Column() { + Text("Scroll Area") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Scroll(this.scroller2) { + Column() { + Text("Scroll Area2") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Column() { + ForEach(this.arr, (item: number) => { + Text(item.toString()) + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + }, (item: string) => item) + }.width('100%') + } + } + .id("inner") + .width('100%') + .height(800) + .edgeEffect(EdgeEffect.None) + .shouldBuiltInRecognizerParallelWith((current: GestureRecognizer, others: Array) => { + for (let i = 0; i < others.length; i++) { + let target = others[i].getEventTargetInfo(); + if (target) { + if (target.getId() == "inner" && others[i].isBuiltIn() && others[i].getType() == GestureControl.GestureType.PAN_GESTURE) { // 找到将要组成并行手势的识别器 + this.currentRecognizer = current; + this.childRecognizer = others[i]; + return others[i]; + } + } + } + return undefined; + }) + .onGestureRecognizerJudgeBegin((event: BaseGestureEvent, current: GestureRecognizer, others: Array) => { + if (current) { + let target = current.getEventTargetInfo(); + if (target) { + if (target.getId() == "outer" && current.isBuiltIn() && current.getType() == GestureControl.GestureType.PAN_GESTURE) { + if (others) { + for (let i = 0; i < others.length; i++) { + let target = others[i].getEventTargetInfo() as ScrollableTargetInfo; + if (target instanceof ScrollableTargetInfo && target.getId() == "inner") { + let panEvent = event as PanGestureEvent; + this.childRecognizer.setEnabled(true); + this.currentRecognizer.setEnabled(false); + } + } + } + } + } + } + return GestureJudgeResult.REJECT; + }) + .parallelGesture( + PanGesture() + .onActionUpdate((event: GestureEvent)=>{ + if (this.childRecognizer.getState() != GestureRecognizerState.SUCCESSFUL || this.currentRecognizer.getState() != GestureRecognizerState.SUCCESSFUL) { // 如果识别器状态不是SUCCESSFUL,则不做控制 + return; + } + let target = this.childRecognizer.getEventTargetInfo() as ScrollableTargetInfo; + let currentTarget = this.currentRecognizer.getEventTargetInfo() as ScrollableTargetInfo; + if (target instanceof ScrollableTargetInfo && currentTarget instanceof ScrollableTargetInfo) { + this.childRecognizer.setEnabled(true); + this.currentRecognizer.setEnabled(false); + } + this.lastOffset = event.offsetY + }) + ) + }.width('100%') + } + .id("ActionGestureEventRecognizer180") + .friction(0) + .height(600) + .scrollable(ScrollDirection.Vertical) + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + Text(this.text).margin({top:20}) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer30.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer30.ets new file mode 100644 index 0000000000000000000000000000000000000000..5bbf7ba644ab6def94ab1b49b96098dd031fa5e6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer30.ets @@ -0,0 +1,171 @@ +/* + * 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 ActionGestureEventRecognizer30 { + scroller: Scroller = new Scroller(); + scroller2: Scroller = new Scroller(); + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + private childRecognizer: GestureRecognizer = new GestureRecognizer(); + private currentRecognizer: GestureRecognizer = new GestureRecognizer(); + private lastOffset: number = 0; + @State text :string = ''; + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + Column() { + Text("Scroll Area") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Scroll(this.scroller2) { + Column() { + Text("Scroll Area2") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Column() { + ForEach(this.arr, (item: number) => { + Text(item.toString()) + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + }, (item: string) => item) + }.width('100%') + } + } + .id("inner") + .width('100%') + .height(800) + }.width('100%') + } + .id("ActionGestureEventRecognizer30") + .friction(0) + .height(600) + .scrollable(ScrollDirection.Vertical) + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + .edgeEffect(EdgeEffect.None) + .shouldBuiltInRecognizerParallelWith((current: GestureRecognizer, others: Array) => { + for (let i = 0; i < others.length; i++) { + let target = others[i].getEventTargetInfo(); + if (target) { + if (target.getId() == "inner" && others[i].isBuiltIn() && others[i].getType() == GestureControl.GestureType.PAN_GESTURE) { // 找到将要组成并行手势的识别器 + this.currentRecognizer = current; + this.childRecognizer = others[i]; + return others[i]; + } + } + } + return undefined; + }) + .onGestureRecognizerJudgeBegin((event: BaseGestureEvent, current: GestureRecognizer, others: Array) => { + if (current) { + let target = current.getEventTargetInfo(); + if (target) { + if (target.getId() == "outer" && current.isBuiltIn() && current.getType() == GestureControl.GestureType.PAN_GESTURE) { + if (others) { + for (let i = 0; i < others.length; i++) { + let target = others[i].getEventTargetInfo() as ScrollableTargetInfo; + if (target instanceof ScrollableTargetInfo && target.getId() == "inner") { + let panEvent = event as PanGestureEvent; + if (target.isEnd()) { + if (panEvent && panEvent.offsetY < 0) { + this.childRecognizer.setEnabled(false); + this.currentRecognizer.setEnabled(true); + } else { + this.childRecognizer.setEnabled(true); + this.currentRecognizer.setEnabled(false); + } + } else if (target.isBegin()) { + if (panEvent.offsetY > 0) { + this.childRecognizer.setEnabled(false); + this.currentRecognizer.setEnabled(true); + } else { + this.childRecognizer.setEnabled(true); + this.currentRecognizer.setEnabled(false); + } + } else { + this.childRecognizer.setEnabled(true); + this.currentRecognizer.setEnabled(false); + } + } + } + } + } + } + } + this.text = 'Type: '+ current.getType(); + return GestureJudgeResult.CONTINUE; + }) + .parallelGesture( + PanGesture() + .onActionUpdate((event: GestureEvent)=>{ + if (this.childRecognizer.getState() != GestureRecognizerState.SUCCESSFUL || this.currentRecognizer.getState() != GestureRecognizerState.SUCCESSFUL) { // 如果识别器状态不是SUCCESSFUL,则不做控制 + return; + } + let target = this.childRecognizer.getEventTargetInfo() as ScrollableTargetInfo; + let currentTarget = this.currentRecognizer.getEventTargetInfo() as ScrollableTargetInfo; + if (target instanceof ScrollableTargetInfo && currentTarget instanceof ScrollableTargetInfo) { + if (target.isEnd()) { // 在移动过程中实时根据当前组件状态,控制识别器的开闭状态 + if ((event.offsetY - this.lastOffset) < 0) { + this.childRecognizer.setEnabled(false) + if (currentTarget.isEnd()) { + this.currentRecognizer.setEnabled(false) + } else { + this.currentRecognizer.setEnabled(true) + } + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } else if (target.isBegin()) { + if ((event.offsetY - this.lastOffset) > 0) { + this.childRecognizer.setEnabled(false) + if (currentTarget.isBegin()) { + this.currentRecognizer.setEnabled(false) + } else { + this.currentRecognizer.setEnabled(true) + } + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } + this.lastOffset = event.offsetY + }) + ) + Text(this.text).margin({top:20}) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer40.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer40.ets new file mode 100644 index 0000000000000000000000000000000000000000..80b6480fc4ca4ccb515a91e9f720cd5085752c50 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer40.ets @@ -0,0 +1,171 @@ +/* + * 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 ActionGestureEventRecognizer40 { + scroller: Scroller = new Scroller(); + scroller2: Scroller = new Scroller(); + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + private childRecognizer: GestureRecognizer = new GestureRecognizer(); + private currentRecognizer: GestureRecognizer = new GestureRecognizer(); + private lastOffset: number = 0; + @State text :string = ''; + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + Column() { + Text("Scroll Area") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Scroll(this.scroller2) { + Column() { + Text("Scroll Area2") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Column() { + ForEach(this.arr, (item: number) => { + Text(item.toString()) + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + }, (item: string) => item) + }.width('100%') + } + } + .id("inner") + .width('100%') + .height(800) + }.width('100%') + } + .id("ActionGestureEventRecognizer40") + .friction(0) + .height(600) + .scrollable(ScrollDirection.Vertical) + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + .edgeEffect(EdgeEffect.None) + .shouldBuiltInRecognizerParallelWith((current: GestureRecognizer, others: Array) => { + for (let i = 0; i < others.length; i++) { + let target = others[i].getEventTargetInfo(); + if (target) { + if (target.getId() == "inner" && others[i].isBuiltIn() && others[i].getType() == GestureControl.GestureType.PAN_GESTURE) { // 找到将要组成并行手势的识别器 + this.currentRecognizer = current; + this.childRecognizer = others[i]; + return others[i]; + } + } + } + return undefined; + }) + .onGestureRecognizerJudgeBegin((event: BaseGestureEvent, current: GestureRecognizer, others: Array) => { + if (current) { + let target = current.getEventTargetInfo(); + if (target) { + if (target.getId() == "outer" && current.isBuiltIn() && current.getType() == GestureControl.GestureType.PAN_GESTURE) { + if (others) { + for (let i = 0; i < others.length; i++) { + let target = others[i].getEventTargetInfo() as ScrollableTargetInfo; + if (target instanceof ScrollableTargetInfo && target.getId() == "inner") { + let panEvent = event as PanGestureEvent; + if (target.isEnd()) { + if (panEvent && panEvent.offsetY < 0) { + this.childRecognizer.setEnabled(false); + this.currentRecognizer.setEnabled(true); + } else { + this.childRecognizer.setEnabled(true); + this.currentRecognizer.setEnabled(false); + } + } else if (target.isBegin()) { + if (panEvent.offsetY > 0) { + this.childRecognizer.setEnabled(false); + this.currentRecognizer.setEnabled(true); + } else { + this.childRecognizer.setEnabled(true); + this.currentRecognizer.setEnabled(false); + } + } else { + this.childRecognizer.setEnabled(true); + this.currentRecognizer.setEnabled(false); + } + } + } + } + } + } + } + this.text = 'isBuiltIn: '+ current.isBuiltIn(); + return GestureJudgeResult.CONTINUE; + }) + .parallelGesture( + PanGesture() + .onActionUpdate((event: GestureEvent)=>{ + if (this.childRecognizer.getState() != GestureRecognizerState.SUCCESSFUL || this.currentRecognizer.getState() != GestureRecognizerState.SUCCESSFUL) { // 如果识别器状态不是SUCCESSFUL,则不做控制 + return; + } + let target = this.childRecognizer.getEventTargetInfo() as ScrollableTargetInfo; + let currentTarget = this.currentRecognizer.getEventTargetInfo() as ScrollableTargetInfo; + if (target instanceof ScrollableTargetInfo && currentTarget instanceof ScrollableTargetInfo) { + if (target.isEnd()) { // 在移动过程中实时根据当前组件状态,控制识别器的开闭状态 + if ((event.offsetY - this.lastOffset) < 0) { + this.childRecognizer.setEnabled(false) + if (currentTarget.isEnd()) { + this.currentRecognizer.setEnabled(false) + } else { + this.currentRecognizer.setEnabled(true) + } + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } else if (target.isBegin()) { + if ((event.offsetY - this.lastOffset) > 0) { + this.childRecognizer.setEnabled(false) + if (currentTarget.isBegin()) { + this.currentRecognizer.setEnabled(false) + } else { + this.currentRecognizer.setEnabled(true) + } + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } + this.lastOffset = event.offsetY + }) + ) + Text(this.text).margin({top:20}) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer50.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer50.ets new file mode 100644 index 0000000000000000000000000000000000000000..57e9876a98386c67990517513900029b783c871d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer50.ets @@ -0,0 +1,153 @@ +/* + * 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 ActionGestureEventRecognizer50 { + scroller: Scroller = new Scroller(); + scroller2: Scroller = new Scroller(); + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + private childRecognizer: GestureRecognizer = new GestureRecognizer(); + private currentRecognizer: GestureRecognizer = new GestureRecognizer(); + private lastOffset: number = 0; + @State text :string = ''; + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + Column() { + Text("Scroll Area") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Scroll(this.scroller2) { + Column() { + Text("Scroll Area2") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Column() { + ForEach(this.arr, (item: number) => { + Text(item.toString()) + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + }, (item: string) => item) + }.width('100%') + } + } + .id("inner") + .width('100%') + .height(800) + }.width('100%') + } + .id("ActionGestureEventRecognizer50") + .friction(0) + .height(600) + .scrollable(ScrollDirection.Vertical) + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + .edgeEffect(EdgeEffect.None) + .shouldBuiltInRecognizerParallelWith((current: GestureRecognizer, others: Array) => { + for (let i = 0; i < others.length; i++) { + let target = others[i].getEventTargetInfo(); + if (target) { + if (target.getId() == "inner" && others[i].isBuiltIn() && others[i].getType() == GestureControl.GestureType.PAN_GESTURE) { // 找到将要组成并行手势的识别器 + this.currentRecognizer = current; + this.childRecognizer = others[i]; + return others[i]; + } + } + } + return undefined; + }) + .onGestureRecognizerJudgeBegin((event: BaseGestureEvent, current: GestureRecognizer, others: Array) => { + if (current) { + let target = current.getEventTargetInfo(); + if (target) { + if (target.getId() == "outer" && current.isBuiltIn() && current.getType() == GestureControl.GestureType.PAN_GESTURE) { + if (others) { + for (let i = 0; i < others.length; i++) { + let target = others[i].getEventTargetInfo() as ScrollableTargetInfo; + if (target instanceof ScrollableTargetInfo && target.getId() == "inner") { + let panEvent = event as PanGestureEvent; + this.childRecognizer.setEnabled(null); + this.currentRecognizer.setEnabled(null); + } + } + } + } + } + } + this.text = 'isEnabled: '+ current.isEnabled(); + return GestureJudgeResult.CONTINUE; + }) + .parallelGesture( + PanGesture() + .onActionUpdate((event: GestureEvent)=>{ + if (this.childRecognizer.getState() != GestureRecognizerState.SUCCESSFUL || this.currentRecognizer.getState() != GestureRecognizerState.SUCCESSFUL) { // 如果识别器状态不是SUCCESSFUL,则不做控制 + return; + } + let target = this.childRecognizer.getEventTargetInfo() as ScrollableTargetInfo; + let currentTarget = this.currentRecognizer.getEventTargetInfo() as ScrollableTargetInfo; + if (target instanceof ScrollableTargetInfo && currentTarget instanceof ScrollableTargetInfo) { + if (target.isEnd()) { // 在移动过程中实时根据当前组件状态,控制识别器的开闭状态 + if ((event.offsetY - this.lastOffset) < 0) { + this.childRecognizer.setEnabled(false) + if (currentTarget.isEnd()) { + this.currentRecognizer.setEnabled(false) + } else { + this.currentRecognizer.setEnabled(true) + } + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } else if (target.isBegin()) { + if ((event.offsetY - this.lastOffset) > 0) { + this.childRecognizer.setEnabled(false) + if (currentTarget.isBegin()) { + this.currentRecognizer.setEnabled(false) + } else { + this.currentRecognizer.setEnabled(true) + } + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } else { + this.childRecognizer.setEnabled(true) + this.currentRecognizer.setEnabled(false) + } + } + this.lastOffset = event.offsetY + }) + ) + Text(this.text).margin({top:20}) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer60.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer60.ets new file mode 100644 index 0000000000000000000000000000000000000000..4dc176fb57cbe2f2b98d8f97dd4cfb8f0dd36abe --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer60.ets @@ -0,0 +1,128 @@ +/* + * 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 ActionGestureEventRecognizer60 { + scroller: Scroller = new Scroller(); + scroller2: Scroller = new Scroller(); + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + private childRecognizer: GestureRecognizer = new GestureRecognizer(); + private currentRecognizer: GestureRecognizer = new GestureRecognizer(); + private lastOffset: number = 0; + @State text :string = ''; + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + Column() { + Text("Scroll Area") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Scroll(this.scroller2) { + Column() { + Text("Scroll Area2") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Column() { + ForEach(this.arr, (item: number) => { + Text(item.toString()) + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + }, (item: string) => item) + }.width('100%') + } + } + .id("inner") + + .width('100%') + .height(800) + .edgeEffect(EdgeEffect.None) + .shouldBuiltInRecognizerParallelWith((current: GestureRecognizer, others: Array) => { + for (let i = 0; i < others.length; i++) { + let target = others[i].getEventTargetInfo(); + if (target) { + if (target.getId() == "inner" && others[i].isBuiltIn() && others[i].getType() == GestureControl.GestureType.PAN_GESTURE) { // 找到将要组成并行手势的识别器 + this.currentRecognizer = current; + this.childRecognizer = others[i]; + return others[i]; + } + } + } + return undefined; + }) + .onGestureRecognizerJudgeBegin((event: BaseGestureEvent, current: GestureRecognizer, others: Array) => { + if (current) { + let target = current.getEventTargetInfo(); + if (target) { + if (target.getId() == "outer" && current.isBuiltIn() && current.getType() == GestureControl.GestureType.PAN_GESTURE) { + if (others) { + for (let i = 0; i < others.length; i++) { + let target = others[i].getEventTargetInfo() as ScrollableTargetInfo; + if (target instanceof ScrollableTargetInfo && target.getId() == "inner") { + let panEvent = event as PanGestureEvent; + this.childRecognizer.setEnabled(undefined); + this.currentRecognizer.setEnabled(undefined); + } + } + } + } + } + } + this.text ='isEnabled:'+ current.isEnabled() ; + return GestureJudgeResult.REJECT; + }) + .parallelGesture( + PanGesture() + .onActionUpdate((event: GestureEvent)=>{ + if (this.childRecognizer.getState() != GestureRecognizerState.SUCCESSFUL || this.currentRecognizer.getState() != GestureRecognizerState.SUCCESSFUL) { // 如果识别器状态不是SUCCESSFUL,则不做控制 + return; + } + let target = this.childRecognizer.getEventTargetInfo() as ScrollableTargetInfo; + let currentTarget = this.currentRecognizer.getEventTargetInfo() as ScrollableTargetInfo; + if (target instanceof ScrollableTargetInfo && currentTarget instanceof ScrollableTargetInfo) { + this.childRecognizer.setEnabled(undefined); + this.currentRecognizer.setEnabled(undefined); + } + this.lastOffset = event.offsetY + }) + ) + }.width('100%') + } + .id("ActionGestureEventRecognizer60") + .friction(0) + .height(600) + .scrollable(ScrollDirection.Vertical) + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + Text(this.text).margin({top:20}) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer70.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer70.ets new file mode 100644 index 0000000000000000000000000000000000000000..53cfb920040d4ad8d2b01f5e843cc9d91deceb57 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer70.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. + */ +@Entry +@Component +struct ActionGestureEventRecognizer70 { + scroller: Scroller = new Scroller(); + scroller2: Scroller = new Scroller(); + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + private childRecognizer: GestureRecognizer = new GestureRecognizer(); + private currentRecognizer: GestureRecognizer = new GestureRecognizer(); + private lastOffset: number = 0; + @State text :string = ''; + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + Column() { + Text("Scroll Area") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Scroll(this.scroller2) { + Column() { + Text("Scroll Area2") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Column() { + ForEach(this.arr, (item: number) => { + Text(item.toString()) + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + }, (item: string) => item) + }.width('100%') + } + } + .id("inner") + .width('100%') + .height(800) + .edgeEffect(EdgeEffect.None) + .shouldBuiltInRecognizerParallelWith((current: GestureRecognizer, others: Array) => { + for (let i = 0; i < others.length; i++) { + let target = others[i].getEventTargetInfo(); + if (target) { + if (target.getId() == "inner" && others[i].isBuiltIn() && others[i].getType() == GestureControl.GestureType.PAN_GESTURE) { // 找到将要组成并行手势的识别器 + this.currentRecognizer = current; + this.childRecognizer = others[i]; + return others[i]; + } + } + } + return undefined; + }) + .onGestureRecognizerJudgeBegin((event: BaseGestureEvent, current: GestureRecognizer, others: Array) => { + if (current) { + let target = current.getEventTargetInfo(); + if (target) { + if (target.getId() == "outer" && current.isBuiltIn() && current.getType() == GestureControl.GestureType.PAN_GESTURE) { + if (others) { + for (let i = 0; i < others.length; i++) { + let target = others[i].getEventTargetInfo() as ScrollableTargetInfo; + if (target instanceof ScrollableTargetInfo && target.getId() == "inner") { + let panEvent = event as PanGestureEvent; + this.childRecognizer.setEnabled(true); + this.currentRecognizer.setEnabled(false); + } + } + } + let target = others[0].getEventTargetInfo() as ScrollableTargetInfo; + this.text ='Tag:'+ current.getTag() +' isEnd:'+target.isEnd()+' isBegin:'+target.isBegin(); + } + } + + } + return GestureJudgeResult.REJECT; + }) + .parallelGesture( + PanGesture() + .onActionUpdate((event: GestureEvent)=>{ + if (this.childRecognizer.getState() != GestureRecognizerState.SUCCESSFUL || this.currentRecognizer.getState() != GestureRecognizerState.SUCCESSFUL) { // 如果识别器状态不是SUCCESSFUL,则不做控制 + return; + } + let target = this.childRecognizer.getEventTargetInfo() as ScrollableTargetInfo; + let currentTarget = this.currentRecognizer.getEventTargetInfo() as ScrollableTargetInfo; + if (target instanceof ScrollableTargetInfo && currentTarget instanceof ScrollableTargetInfo) { + this.childRecognizer.setEnabled(true); + this.currentRecognizer.setEnabled(false); + } + this.lastOffset = event.offsetY + }) + ) + }.width('100%') + } + .id("ActionGestureEventRecognizer70") + .friction(0) + .height(600) + .scrollable(ScrollDirection.Vertical) + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + Text(this.text).margin({top:20}) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer80.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer80.ets new file mode 100644 index 0000000000000000000000000000000000000000..0942263de8bc80c655785e9fd05a4a2ab23c19cf --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer80.ets @@ -0,0 +1,128 @@ +/* + * 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 ActionGestureEventRecognizer80 { + scroller: Scroller = new Scroller(); + scroller2: Scroller = new Scroller(); + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + private childRecognizer: GestureRecognizer = new GestureRecognizer(); + private currentRecognizer: GestureRecognizer = new GestureRecognizer(); + private lastOffset: number = 0; + @State text :string = ''; + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + Column() { + Text("Scroll Area") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Scroll(this.scroller2) { + Column() { + Text("Scroll Area2") + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + Column() { + ForEach(this.arr, (item: number) => { + Text(item.toString()) + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + }, (item: string) => item) + }.width('100%') + } + } + .id("inner") + .width('100%') + .height(800) + .edgeEffect(EdgeEffect.None) + .shouldBuiltInRecognizerParallelWith((current: GestureRecognizer, others: Array) => { + for (let i = 0; i < others.length; i++) { + let target = others[i].getEventTargetInfo(); + if (target) { + if (target.getId() == "inner" && others[i].isBuiltIn() && others[i].getType() == GestureControl.GestureType.PAN_GESTURE) { // 找到将要组成并行手势的识别器 + this.currentRecognizer = current; + this.childRecognizer = others[i]; + return others[i]; + } + } + } + return undefined; + }) + .onGestureRecognizerJudgeBegin((event: BaseGestureEvent, current: GestureRecognizer, others: Array) => { + if (current) { + let target = current.getEventTargetInfo(); + if (target) { + if (target.getId() == "outer" && current.isBuiltIn() && current.getType() == GestureControl.GestureType.PAN_GESTURE) { + if (others) { + for (let i = 0; i < others.length; i++) { + let target = others[i].getEventTargetInfo() as ScrollableTargetInfo; + if (target instanceof ScrollableTargetInfo && target.getId() == "inner") { + let panEvent = event as PanGestureEvent; + this.childRecognizer.setEnabled(true); + this.currentRecognizer.setEnabled(false); + } + } + } + } + } + } + this.text ='Tag:'+ current.getTag() +' Type:'+current.getType()+' isBuiltIn:'+current.isBuiltIn()+' isEnabled:'+current.isEnabled() + +'getEventTargetInfo:'+current.getEventTargetInfo(); + return GestureJudgeResult.REJECT; + }) + .parallelGesture( + PanGesture() + .onActionUpdate((event: GestureEvent)=>{ + if (this.childRecognizer.getState() != GestureRecognizerState.SUCCESSFUL || this.currentRecognizer.getState() != GestureRecognizerState.SUCCESSFUL) { // 如果识别器状态不是SUCCESSFUL,则不做控制 + return; + } + let target = this.childRecognizer.getEventTargetInfo() as ScrollableTargetInfo; + let currentTarget = this.currentRecognizer.getEventTargetInfo() as ScrollableTargetInfo; + if (target instanceof ScrollableTargetInfo && currentTarget instanceof ScrollableTargetInfo) { + this.childRecognizer.setEnabled(true); + this.currentRecognizer.setEnabled(false); + } + this.lastOffset = event.offsetY + }) + ) + }.width('100%') + } + .id("ActionGestureEventRecognizer80") + .friction(0) + .height(600) + .scrollable(ScrollDirection.Vertical) + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + Text(this.text).margin({top:20}) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureExcepionHanding/ActionGestureExcepionHanding0010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureExcepionHanding/ActionGestureExcepionHanding0010.ets new file mode 100644 index 0000000000000000000000000000000000000000..9288dd7e09bb149383c6f8ad2e039b1dfba41ba5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureExcepionHanding/ActionGestureExcepionHanding0010.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 AceActionGestureExceptionHanding0010 { + @State count: number = 0 + @State offsetX: number = 0 + @State offsetY: number = 0 + @State positionX: number = 0 + @State positionY: number = 0 + @State borderStyles: BorderStyle = BorderStyle.Solid + + build() { + Column() { + Text('sequence gesture\n' + 'LongPress onAction:' + this.count + '\nPanGesture offset:\nX: ' + this.offsetX + '\n' + 'Y: ' + this.offsetY) + .fontSize(15) + } + .translate({ x: this.offsetX, y: this.offsetY, z: 0 }) + .height(150) + .width(200) + .padding(20) + .margin(20) + .border({ width: 3, style: this.borderStyles }) + .gesture( + // 以下组合手势为顺序识别,当长按手势事件未正常触发时则不会触发拖动手势事件 + GestureGroup(GestureMode.Sequence, + LongPressGesture({ repeat: true }) + .onAction((event?: GestureEvent) => { + if (event && event.repeat) { + this.count++ + } + console.info('LongPress onAction') + }), + PanGesture() + .onActionStart(() => { + this.borderStyles = BorderStyle.Dashed + console.info('pan start') + }) + .onActionUpdate((event?: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX + this.offsetY = this.positionY + event.offsetY + } + console.info('pan update') + }) + .onActionEnd(() => { + this.positionX = this.offsetX + this.positionY = this.offsetY + this.borderStyles = BorderStyle.Solid + console.info('pan end') + }) + ) + .onCancel(() => { + console.info('sequence gesture canceled') + }) + ) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureExcepionHanding/ActionGestureExcepionHanding0570.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureExcepionHanding/ActionGestureExcepionHanding0570.ets new file mode 100644 index 0000000000000000000000000000000000000000..066de4edbf56894fe84b20f202568128184098e1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureExcepionHanding/ActionGestureExcepionHanding0570.ets @@ -0,0 +1,74 @@ +/* + * 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 ActionGestureExcepionHanding0570 { + @State numbers: String[] = ['0', '1', '2', '3', '4'] + scroller: Scroller = new Scroller() + @State gridPosition: number = 0 + @State grid_width: number = 400 + @State grid_height:number = 200 + @State isFullScreen:boolean = false + @State start:string = '' + @State end:string = '' + + + build() { + Scroll() { + Column({ space: 5 }) { + Grid(this.scroller) { + ForEach(this.numbers, (day: string) => { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + .gesture(PanGesture({direction:PanDirection.All}) + .onActionStart(()=>{ + this.start = '先触发start' + }) + .onActionEnd(()=>{ + this.end = '结束后触发onActionEnd' + }) + ) + }, (day: string) => day) + }, (day: string) => day) + } + .id('grid') + .columnsTemplate('1fr 1fr 1fr 1fr 1fr') + .columnsGap(10) + .rowsGap(10) + .friction(0.6) + .enableScrollInteraction(true) + .supportAnimation(false) + .multiSelectable(false) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width(this.grid_width) + .backgroundColor(0xFAEEE0) + .height(this.grid_height) + Text(this.start).fontSize(20).margin({ top: 20 }) + Text(this.end).fontSize(20) + + }.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/ActionGestureGesturegroupInterface/ActionGestureGesturegroupInterface0020.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureGesturegroupInterface/ActionGestureGesturegroupInterface0020.ets new file mode 100644 index 0000000000000000000000000000000000000000..afa2900718f849834c6248930e647f63c77a0f9d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureGesturegroupInterface/ActionGestureGesturegroupInterface0020.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 ActionGestureGesturegroupInterface0020 { + @State count: number = 0; + @State value: string = ''; + @State rotateAngle: number = 0; + @State speed: number = 1; + @State onCancel: string = "" + @State onCancel2: string = "" + + build() { + Column() { + Button('repeat=true').fontSize(28) + .id('ActionGestureGesturegroupInterface0020') + .gesture( + GestureGroup(GestureMode.Sequence, + LongPressGesture({ repeat: true }) + .onAction((event?: GestureEvent) => { + if (event) { + this.count++; + } + console.info('LongPress onAction') + }), + ).onCancel(() => { + this.onCancel = "onCancel" + }) + + ) + + Text(this.count + '') + Text(this.onCancel) + } + .height(400) + .width(400) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureGesturegroupInterface/ActionGestureGesturegroupInterface0040.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureGesturegroupInterface/ActionGestureGesturegroupInterface0040.ets new file mode 100644 index 0000000000000000000000000000000000000000..3cb1a155a238cb9ef21ada34d49678852a2dd997 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureGesturegroupInterface/ActionGestureGesturegroupInterface0040.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 ActionGestureGesturegroupInterface0040 { + @State count: number = 0; + @State value: string = ''; + @State rotateAngle: number = 0; + @State speed: number = 1; + @State onCancel: string = "" + @State onCancel2: string = "" + + build() { + Column() { + Button('repeat=true').fontSize(28) + .id('ActionGestureGesturegroupInterface0040') + .gesture( + GestureGroup(GestureMode.Sequence, + LongPressGesture({ repeat: true }) + .onAction((event?: GestureEvent) => { + if (event) { + this.count++; + } + console.info('LongPress onAction') + }), + ).onCancel(() => { + this.onCancel = "onCancel" + }) + + ) + + Text(this.count + '') + Text(this.onCancel) + } + .height(400) + .width(400) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureDfx/ActionGestureLonggestureDfx0010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureDfx/ActionGestureLonggestureDfx0010.ets new file mode 100644 index 0000000000000000000000000000000000000000..6b8e5106e308fe0d279b77b0ef4e65b92e958e8c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureDfx/ActionGestureLonggestureDfx0010.ets @@ -0,0 +1,33 @@ +/* + * 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 ActionGestureLonggestureDfx0010 { + @State num: string = "" + + build() { + Column({ space: 10 }) { + Button("点击300").onClick((event: ClickEvent) => { + this.num = "点击" + }) + .margin(10).id("ActionGestureLonggestureDfx0010") + + Text(this.num) + + }.width('100%').height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureDfx/ActionGestureLonggestureDfx0020.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureDfx/ActionGestureLonggestureDfx0020.ets new file mode 100644 index 0000000000000000000000000000000000000000..5ce8f4e79c1d333628ea68cc82acb4d92bb743b7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureDfx/ActionGestureLonggestureDfx0020.ets @@ -0,0 +1,33 @@ +/* + * 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 ActionGestureLonggestureDfx0020 { + @State num: string = "" + + build() { + Column({ space: 10 }) { + Button("点击300").onClick((event: ClickEvent) => { + this.num = "点击" + }) + .margin(10).id("ActionGestureLonggestureDfx0020") + + Text(this.num) + + }.width('100%').height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0010.ets new file mode 100644 index 0000000000000000000000000000000000000000..042ee71958e24762dcc8aca963a3db144145da58 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0010.ets @@ -0,0 +1,41 @@ +/* + * 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 ActionGestureLonggestureInterface0010 { + @State count: number = 0; + + build() { + Column() { + Button('repeat=true').fontSize(28) + .id('ActionGestureLonggestureInterface0010_001') + .gesture( + LongPressGesture({ repeat: true }) + .onAction((event?: GestureEvent) => { + if (event) { + this.count++; + } + console.info('LongPress onAction') + }), + ) + Text(this.count + '') + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0020.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0020.ets new file mode 100644 index 0000000000000000000000000000000000000000..11eb08b81cd763786efed78a07888675d9836d77 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0020.ets @@ -0,0 +1,41 @@ +/* + * 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 ActionGestureLonggestureInterface0020 { + @State count: number = 0; + + build() { + Column() { + Button('repeat=false').fontSize(28) + .id('ActionGestureLonggestureInterface0020_001') + .gesture( + LongPressGesture({ repeat: false }) + .onAction((event?: GestureEvent) => { + if (event) { + this.count++; + } + console.info('LongPress onAction') + }), + ) + Text(this.count + '') + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0030.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0030.ets new file mode 100644 index 0000000000000000000000000000000000000000..4ec306c78ec02d561346c1b85cb64ac1b242bd34 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0030.ets @@ -0,0 +1,40 @@ +/* + * 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 ActionGestureLonggestureInterface0030 { + @State count: number = 0; + + build() { + Column() { + Button('finger=2').fontSize(28) + .id('ActionGestureLonggestureInterface0030_001') + .gesture( + LongPressGesture() + .onAction((event: GestureEvent) => { + if (event) { + this.count++; + } + }) + ) + Text(this.count + '') + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0040.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0040.ets new file mode 100644 index 0000000000000000000000000000000000000000..964c661e6763be3408bfc86080845802e400e3da --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0040.ets @@ -0,0 +1,40 @@ +/* + * 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 ActionGestureLonggestureInterface0040 { + @State count: number = 0; + + build() { + Column() { + Button('finger=2').fontSize(28) + .id('ActionGestureLonggestureInterface0040_001') + .gesture( + LongPressGesture({ duration: -200 }) + .onAction((event: GestureEvent) => { + if (event) { + this.count++; + } + }) + ) + Text(this.count + '') + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0050.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0050.ets new file mode 100644 index 0000000000000000000000000000000000000000..5916cada52099f58fc59d04cbc983744de3f358b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0050.ets @@ -0,0 +1,40 @@ +/* + * 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 ActionGestureLonggestureInterface0050 { + @State count: number = 0; + + build() { + Column() { + Button('finger=2').fontSize(28) + .id('ActionGestureLonggestureInterface0050_001') + .gesture( + LongPressGesture({ duration: -200 }) + .onAction((event: GestureEvent) => { + if (event) { + this.count++; + } + }) + ) + Text(this.count + '') + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0060.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0060.ets new file mode 100644 index 0000000000000000000000000000000000000000..dcefaea354176ed53d29e466a03d5a75c980ba13 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0060.ets @@ -0,0 +1,40 @@ +/* + * 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 ActionGestureLonggestureInterface0060 { + @State count: number = 0; + + build() { + Column() { + Button('finger=2').fontSize(28) + .id('ActionGestureLonggestureInterface0060_001') + .gesture( + LongPressGesture({ duration: 1000 }) + .onAction((event: GestureEvent) => { + if (event) { + this.count++; + } + }) + ) + Text(this.count + '') + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0070.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0070.ets new file mode 100644 index 0000000000000000000000000000000000000000..9790c90328d661976380a45bfd15701feaef2b95 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0070.ets @@ -0,0 +1,40 @@ +/* + * 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 ActionGestureLonggestureInterface0070 { + @State count: number = 0; + + build() { + Column() { + Button('finger=2').fontSize(28) + .id('ActionGestureLonggestureInterface0070_001') + .gesture( + LongPressGesture({ duration: 1000 }) + .onAction((event: GestureEvent) => { + if (event) { + this.count++; + } + }) + ) + Text(this.count + '') + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0080.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0080.ets new file mode 100644 index 0000000000000000000000000000000000000000..beea8dfb63a02c4121fe740ee88db736dbc497f8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0080.ets @@ -0,0 +1,40 @@ +/* + * 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 ActionGestureLonggestureInterface0080 { + @State value: string = ''; + + build() { + Column() { + Button('finger=2').fontSize(28) + .id('ActionGestureLonggestureInterface0080_001') + .gesture( + LongPressGesture({ fingers: 0 }) + .onAction((event: GestureEvent) => { + if (event) { + this.value += 'LongPressGesture success'; + } + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0090.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0090.ets new file mode 100644 index 0000000000000000000000000000000000000000..2eb77033e529225861b073e275a0a1c62b6a2048 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0090.ets @@ -0,0 +1,40 @@ +/* + * 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 ActionGestureLonggestureInterface0090 { + @State value: string = ''; + + build() { + Column() { + Button('finger=2').fontSize(28) + .id('ActionGestureLonggestureInterface0090_001') + .gesture( + LongPressGesture({ fingers: 10 }) + .onAction((event: GestureEvent) => { + if (event) { + this.value += 'LongPressGesture success'; + } + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0100.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0100.ets new file mode 100644 index 0000000000000000000000000000000000000000..3fe2a7332b7d286760a96cd37de35263f9459bfd --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0100.ets @@ -0,0 +1,40 @@ +/* + * 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 ActionGestureLonggestureInterface0100 { + @State value: string = ''; + + build() { + Column() { + Button('finger=1').fontSize(28) + .id('ActionGestureLonggestureInterface0100_001') + .gesture( + LongPressGesture({ fingers: 1 }) + .onAction((event: GestureEvent) => { + if (event) { + this.value += 'LongPressGesture success'; + } + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0110.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0110.ets new file mode 100644 index 0000000000000000000000000000000000000000..c34096bd7a6a14b1eba294dac633a001711eba73 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0110.ets @@ -0,0 +1,40 @@ +/* + * 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 ActionGestureLonggestureInterface0110 { + @State value: string = ''; + + build() { + Column() { + Button('finger=2').fontSize(28) + .id('ActionGestureLonggestureInterface0110_001') + .gesture( + LongPressGesture({ fingers: 1 }) + .onAction((event: GestureEvent) => { + if (event) { + this.value += 'LongPressGesture success'; + } + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0120.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0120.ets new file mode 100644 index 0000000000000000000000000000000000000000..8dd5ae3bdf37964fc48e0bdf02a8d059b64bf6e0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0120.ets @@ -0,0 +1,40 @@ +/* + * 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 ActionGestureLonggestureInterface0120 { + @State value: string = ''; + + build() { + Column() { + Button('finger=2').fontSize(28) + .id('ActionGestureLonggestureInterface0120_001') + .gesture( + LongPressGesture({ fingers: 2 }) + .onAction((event: GestureEvent) => { + if (event) { + this.value += 'LongPressGesture success'; + } + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0130.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0130.ets new file mode 100644 index 0000000000000000000000000000000000000000..166ac876ce8ae611702d7aca401779879d97e9d8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0130.ets @@ -0,0 +1,40 @@ +/* + * 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 ActionGestureLonggestureInterface0130 { + @State value: string = ''; + + build() { + Column() { + Button('finger=2').fontSize(28) + .id('ActionGestureLonggestureInterface0130_001') + .gesture( + LongPressGesture({ fingers: 2 }) + .onAction((event: GestureEvent) => { + if (event) { + this.value += 'LongPressGesture success'; + } + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0140.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0140.ets new file mode 100644 index 0000000000000000000000000000000000000000..15d41d61336b2c61ca6d544b8944b83983aa8d1a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0140.ets @@ -0,0 +1,40 @@ +/* + * 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 ActionGestureLonggestureInterface0140 { + @State value: string = ''; + + build() { + Column() { + Button('finger=2').fontSize(28) + .id('ActionGestureLonggestureInterface0140_001') + .gesture( + LongPressGesture({ fingers: 2 }) + .onAction((event: GestureEvent) => { + if (event) { + this.value += 'LongPressGesture success'; + } + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0150.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0150.ets new file mode 100644 index 0000000000000000000000000000000000000000..4b0610712ec6f0702ecd20f11b9e6a6eee2352eb --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0150.ets @@ -0,0 +1,40 @@ +/* + * 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 ActionGestureLonggestureInterface0150 { + @State value: string = ''; + + build() { + Column() { + Button('finger=2').fontSize(28) + .id('ActionGestureLonggestureInterface0150_001') + .gesture( + LongPressGesture({ repeat: false }) + .onAction((event: GestureEvent) => { + if (event) { + this.value += 'LongPressGesture success'; + } + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0160.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0160.ets new file mode 100644 index 0000000000000000000000000000000000000000..0409a84103cf6c55d815014478ba40dc1e93d712 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0160.ets @@ -0,0 +1,40 @@ +/* + * 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 ActionGestureLonggestureInterface0160 { + @State value: string = ''; + + build() { + Column() { + Button('finger=2').fontSize(28) + .id('ActionGestureLonggestureInterface0160_001') + .gesture( + LongPressGesture({ repeat: false }) + .onAction((event: GestureEvent) => { + if (event) { + this.value += 'LongPressGesture success'; + } + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0170.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0170.ets new file mode 100644 index 0000000000000000000000000000000000000000..912888af482e201ae8ba7331a4605db430efcafc --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0170.ets @@ -0,0 +1,42 @@ +/* + * 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 ActionGestureLonggestureInterface0170 { + @State value: string = ''; + @State count: number = 0; + + build() { + Column() { + Button('finger=1').fontSize(28) + .id('ActionGestureLonggestureInterface0170_001') + .gesture( + LongPressGesture({ repeat: true }) + .onAction((event: GestureEvent) => { + if (event) { + this.value += 'LongPressGesture success'; + this.count ++; + } + }) + ) + Text(this.count+ '') + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0180.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0180.ets new file mode 100644 index 0000000000000000000000000000000000000000..f54a58fefcb892158666480ea317f841f4bb723d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0180.ets @@ -0,0 +1,40 @@ +/* + * 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 ActionGestureLonggestureInterface0180 { + @State value: string = ''; + + build() { + Column() { + Button('finger=2').fontSize(28) + .id('ActionGestureLonggestureInterface0180_001') + .gesture( + LongPressGesture({ repeat: true }) + .onAction((event: GestureEvent) => { + if (event) { + this.value += 'LongPressGesture success'; + } + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0190.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0190.ets new file mode 100644 index 0000000000000000000000000000000000000000..6975fe31955860208a0d82b4a019311b40b977df --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0190.ets @@ -0,0 +1,40 @@ +/* + * 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 ActionGestureLonggestureInterface0190 { + @State value: string = ''; + + build() { + Column() { + Button('finger=2').fontSize(28) + .id('ActionGestureLonggestureInterface0190_001') + .gesture( + LongPressGesture({ fingers: 2, repeat: true, duration: 1000 }) + .onAction((event: GestureEvent) => { + if (event) { + this.value += 'LongPressGesture success'; + } + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0260.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0260.ets new file mode 100644 index 0000000000000000000000000000000000000000..3a5e826983f3916125546c2eedb892966c3cf74e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0260.ets @@ -0,0 +1,40 @@ +/* + * 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 ActionGestureLonggestureInterface0260 { + @State value: string = ''; + + build() { + Column() { + Button('finger=2').fontSize(28) + .id('ActionGestureLonggestureInterface0260_001') + .gesture( + LongPressGesture({ fingers: 1 }) + .onActionEnd((event: GestureEvent) => { + if (event) { + this.value += 'LongPressGesture onActionEnd success'; + } + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0270.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0270.ets new file mode 100644 index 0000000000000000000000000000000000000000..2147b51a02b077e75efece4a78e5525392188472 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0270.ets @@ -0,0 +1,45 @@ +/* + * 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 ActionGestureLonggestureInterface0270 { + @State value: string = ''; + + build() { + Column() { + Button('finger=1').fontSize(28) + .id('ActionGestureLonggestureInterface0270_001') + .gesture( + LongPressGesture({ fingers: 1 }) + .onAction((event: GestureEvent) => { + if (event) { + this.value += 'LongPressGesture success'; + } + }) + .onActionEnd((event: GestureEvent) => { + if (event) { + this.value += 'LongPressGesture onActionEnd success'; + } + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0280.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0280.ets new file mode 100644 index 0000000000000000000000000000000000000000..eeb9debb3d878605aee2ec98db606cde82b4bebd --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0280.ets @@ -0,0 +1,40 @@ +/* + * 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 ActionGestureLonggestureInterface0280 { + @State value: string = ''; + + build() { + Column() { + Button('finger=2').fontSize(28) + .id('ActionGestureLonggestureInterface0280_001') + .gesture( + LongPressGesture({ fingers: 1 }) + .onActionEnd((event: GestureEvent) => { + if (event) { + this.value += 'LongPressGesture onActionEnd success'; + } + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0320.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0320.ets new file mode 100644 index 0000000000000000000000000000000000000000..4a84b64a4b0aff4b2dfc856d156a351540e33839 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0320.ets @@ -0,0 +1,40 @@ +/* + * 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 ActionGestureLonggestureInterface0320 { + @State value: string = ''; + + build() { + Column() { + Button('finger=2').fontSize(28) + .id('ActionGestureLonggestureInterface0320_001') + .gesture( + LongPressGesture({ fingers: 1 }) + .onAction((event: GestureEvent) => { + if (event) { + this.value += 'LongPressGesture success'; + } + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0330.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0330.ets new file mode 100644 index 0000000000000000000000000000000000000000..0b59620f90e7f42bce58ab9d321d558cb49faeb6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0330.ets @@ -0,0 +1,40 @@ +/* + * 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 ActionGestureLonggestureInterface0330 { + @State value: string = ''; + + build() { + Column() { + Button('finger=2').fontSize(28) + .id('ActionGestureLonggestureInterface0330_001') + .gesture( + LongPressGesture({ fingers: 1 }) + .onAction((event: GestureEvent) => { + if (event) { + this.value += 'LongPressGesture success'; + } + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0340.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0340.ets new file mode 100644 index 0000000000000000000000000000000000000000..61578de8626bfa9e29b5e91e13436ba568c3853b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0340.ets @@ -0,0 +1,40 @@ +/* + * 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 ActionGestureLonggestureInterface0340 { + @State value: string = ''; + + build() { + Column() { + Button('finger=2').fontSize(28) + .id('ActionGestureLonggestureInterface0340_001') + .gesture( + LongPressGesture({ fingers: 1 }) + .onAction((event: GestureEvent) => { + if (event) { + this.value += 'LongPressGesture success'; + } + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0350.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0350.ets new file mode 100644 index 0000000000000000000000000000000000000000..db926a9b9f73dbc8ed9455f9b9562ea24d0d93aa --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0350.ets @@ -0,0 +1,40 @@ +/* + * 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 ActionGestureLonggestureInterface0350 { + @State value: string = ''; + + build() { + Column() { + Button('finger=2').fontSize(28) + .id('ActionGestureLonggestureInterface0350_001') + .gesture( + LongPressGesture({ fingers: 1 }) + .onAction((event: GestureEvent) => { + if (event) { + this.value += 'LongPressGesture success' + JSON.stringify(event.fingerList); + } + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0360.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0360.ets new file mode 100644 index 0000000000000000000000000000000000000000..51e927518e1de650238274d3b6e3d2779f5fbf69 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0360.ets @@ -0,0 +1,40 @@ +/* + * 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 ActionGestureLonggestureInterface0360 { + @State value: string = ''; + + build() { + Column() { + Button('finger=2').fontSize(28) + .id('ActionGestureLonggestureInterface0360_001') + .gesture( + LongPressGesture({ fingers: 1 }) + .onAction((event: GestureEvent) => { + if (event) { + this.value = 'LongPressGesture success' + event.timestamp; + } + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0400.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0400.ets new file mode 100644 index 0000000000000000000000000000000000000000..462cd4db2bec27d9dae337bc5819e5aea9edd483 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0400.ets @@ -0,0 +1,40 @@ +/* + * 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 ActionGestureLonggestureInterface0400 { + @State value: string = ''; + + build() { + Column() { + Button('finger=2').fontSize(28) + .id('ActionGestureLonggestureInterface0400_001') + .gesture( + LongPressGesture({ fingers: 1 }) + .onAction((event: GestureEvent) => { + if (event) { + this.value = 'LongPressGesture success' + event.pressure; + } + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0440.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0440.ets new file mode 100644 index 0000000000000000000000000000000000000000..f63c6e7b943e2fe2b5d34c62ff7aa825a71d1884 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0440.ets @@ -0,0 +1,40 @@ +/* + * 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 ActionGestureLonggestureInterface0440 { + @State value: string = ''; + + build() { + Column() { + Button('finger=2').fontSize(28) + .id('ActionGestureLonggestureInterface0440_001') + .gesture( + LongPressGesture({ fingers: 1 }) + .onAction((event: GestureEvent) => { + if (event) { + this.value = 'LongPressGesture success'+ event.timestamp; + } + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0490.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0490.ets new file mode 100644 index 0000000000000000000000000000000000000000..52db82d49e0d6a7507a003202dddbba1ef8c6924 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0490.ets @@ -0,0 +1,40 @@ +/* + * 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 ActionGestureLonggestureInterface0490 { + @State value: string = ''; + + build() { + Column() { + Button('finger=2').fontSize(28) + .id('ActionGestureLonggestureInterface0490_001') + .gesture( + LongPressGesture({ fingers: 1 }) + .onAction((event: GestureEvent) => { + if (event) { + this.value += 'LongPressGesture success'; + } + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface10.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface10.ets new file mode 100644 index 0000000000000000000000000000000000000000..0f3414ddf4bf8627213504fd04e9150ee53d69c7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface10.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 ActionGesturePangestureIntureface10 { + @State value: string = ''; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.offsetX = 0; + this.offsetY = 0; + }) + Button('distance:100').fontSize(28) + .id('ActionGesturePangestureIntureface10') + .translate({ x: this.offsetX, y: this.offsetY}) + .gesture( + PanGesture({distance:100}) + .onActionStart((event: GestureEvent) => { + this.value += 'PanGesture onActionStart' + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface100.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface100.ets new file mode 100644 index 0000000000000000000000000000000000000000..e02d96c3b176560dfefbb5343b7100c99eb63e9e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface100.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 ActionGesturePangestureIntureface100 { + @State value: string = ''; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.offsetX = 0; + this.offsetY = 0; + }) + Button('fingers:2').fontSize(28) + .id('ActionGesturePangestureIntureface100') + .translate({ x: this.offsetX, y: this.offsetY}) + .gesture( + PanGesture({fingers:2}) + .onActionStart((event: GestureEvent) => { + this.value += 'PanGesture onActionStart' + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface120.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface120.ets new file mode 100644 index 0000000000000000000000000000000000000000..8f7483ddd10dc3669c33011357a7ed21d0f37ce6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface120.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 ActionGesturePangestureIntureface120 { + @State value: string = ''; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.offsetX = 0; + this.offsetY = 0; + }) + Button('fingers:0').fontSize(28) + .id('ActionGesturePangestureIntureface120') + .translate({ x: this.offsetX, y: this.offsetY}) + .gesture( + PanGesture({fingers:0}) + .onActionStart((event: GestureEvent) => { + this.value += 'PanGesture onActionStart' + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface130.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface130.ets new file mode 100644 index 0000000000000000000000000000000000000000..9046dd21e5aa8dd63f10d4248463926b000830dd --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface130.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 ActionGesturePangestureIntureface130 { + @State value: string = ''; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.offsetX = 0; + this.offsetY = 0; + }) + Button('fingers:0').fontSize(28) + .id('ActionGesturePangestureIntureface130') + .translate({ x: this.offsetX, y: this.offsetY}) + .gesture( + PanGesture({fingers:0}) + .onActionStart((event: GestureEvent) => { + this.value += 'PanGesture onActionStart' + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface140.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface140.ets new file mode 100644 index 0000000000000000000000000000000000000000..434836c0cb4c398e852ce751ef8fc43707375493 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface140.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 ActionGesturePangestureIntureface140 { + @State value: string = ''; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.offsetX = 0; + this.offsetY = 0; + }) + Button('direction:PanDirection.Down').fontSize(28) + .id('ActionGesturePangestureIntureface140') + .translate({ x: this.offsetX, y: this.offsetY}) + .gesture( + PanGesture({direction:PanDirection.Down}) + .onActionStart((event: GestureEvent) => { + this.value += 'PanGesture onActionStart' + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface160.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface160.ets new file mode 100644 index 0000000000000000000000000000000000000000..df2e8f5567f539142b977607e00527d1d7a86a05 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface160.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 ActionGesturePangestureIntureface160 { + @State value: string = ''; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.offsetX = 0; + this.offsetY = 0; + }) + Button('direction:PanDirection.Horizontal').fontSize(28) + .id('ActionGesturePangestureIntureface160') + .translate({ x: this.offsetX, y: this.offsetY}) + .gesture( + PanGesture({direction:PanDirection.Horizontal}) + .onActionStart((event: GestureEvent) => { + this.value += 'PanGesture onActionStart' + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface190.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface190.ets new file mode 100644 index 0000000000000000000000000000000000000000..7d9f7c92de4295319b01e16bf8a29497e03ff51b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface190.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 ActionGesturePangestureIntureface190 { + @State value: string = ''; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.offsetX = 0; + this.offsetY = 0; + }) + Button('PanDirection.Left &PanDirection.Horizontal').fontSize(28) + .id('ActionGesturePangestureIntureface190') + .translate({ x: this.offsetX, y: this.offsetY}) + .gesture( + PanGesture({direction:PanDirection.Left &PanDirection.Horizontal}) + .onActionStart((event: GestureEvent) => { + this.value += 'PanGesture onActionStart' + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface20.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface20.ets new file mode 100644 index 0000000000000000000000000000000000000000..03f0b1ce0cc462967988a912ba871270a740673c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface20.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 ActionGesturePangestureIntureface20 { + @State value: string = ''; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.offsetX = 0; + this.offsetY = 0; + }) + Button('distance:400').fontSize(28) + .id('ActionGesturePangestureIntureface20') + .translate({ x: this.offsetX, y: this.offsetY}) + .gesture( + PanGesture({distance:400}) + .onActionStart((event: GestureEvent) => { + this.value += 'PanGesture onActionStart' + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface200.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface200.ets new file mode 100644 index 0000000000000000000000000000000000000000..18fcee331b22f50432415d7a74d0a3a1184e9cfb --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface200.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 ActionGesturePangestureIntureface200 { + @State value: string = ''; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.offsetX = 0; + this.offsetY = 0; + }) + Button('PanDirection.Left|PanDirection.Right').fontSize(28) + .id('ActionGesturePangestureIntureface200') + .translate({ x: this.offsetX, y: this.offsetY}) + .gesture( + PanGesture({direction:PanDirection.Left|PanDirection.Right}) + .onActionStart((event: GestureEvent) => { + this.value += 'PanGesture onActionStart' + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface220.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface220.ets new file mode 100644 index 0000000000000000000000000000000000000000..9c6ef35b7971c11949c6b36e09950e61f82e9eb1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface220.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 ActionGesturePangestureIntureface220 { + @State value: string = ''; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.offsetX = 0; + this.offsetY = 0; + }) + Button('PanDirection.Left').fontSize(28) + .id('ActionGesturePangestureIntureface220') + .translate({ x: this.offsetX, y: this.offsetY}) + .gesture( + PanGesture({direction:PanDirection.Left}) + .onActionStart((event: GestureEvent) => { + this.value += 'PanGesture onActionStart' + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface240.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface240.ets new file mode 100644 index 0000000000000000000000000000000000000000..7c8be0eeaa7fde31092578ce38c9560211d93018 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface240.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 ActionGesturePangestureIntureface240 { + @State value: string = ''; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.offsetX = 0; + this.offsetY = 0; + }) + Button('PanDirection.None').fontSize(28) + .id('ActionGesturePangestureIntureface240') + .translate({ x: this.offsetX, y: this.offsetY}) + .gesture( + PanGesture({direction:PanDirection.None}) + .onActionStart((event: GestureEvent) => { + this.value += 'PanGesture onActionStart' + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface250.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface250.ets new file mode 100644 index 0000000000000000000000000000000000000000..b03d5875d1d06d97049357a09616990508f0a701 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface250.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 ActionGesturePangestureIntureface250 { + @State value: string = ''; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.offsetX = 0; + this.offsetY = 0; + }) + Button('PanDirection.Right').fontSize(28) + .id('ActionGesturePangestureIntureface250') + .translate({ x: this.offsetX, y: this.offsetY}) + .gesture( + PanGesture({direction:PanDirection.Right}) + .onActionStart((event: GestureEvent) => { + this.value += 'PanGesture onActionStart' + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface270.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface270.ets new file mode 100644 index 0000000000000000000000000000000000000000..c6551e46fda0b718da24a9ca897103e371894ade --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface270.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 ActionGesturePangestureIntureface270 { + @State value: string = ''; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.offsetX = 0; + this.offsetY = 0; + }) + Button('PanDirection.Up').fontSize(28) + .id('ActionGesturePangestureIntureface270') + .translate({ x: this.offsetX, y: this.offsetY}) + .gesture( + PanGesture({direction:PanDirection.Up}) + .onActionStart((event: GestureEvent) => { + this.value += 'PanGesture onActionStart' + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface290.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface290.ets new file mode 100644 index 0000000000000000000000000000000000000000..5710b6c3c616700196ee6282bca3190f4515ab7f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface290.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 ActionGesturePangestureIntureface290 { + @State value: string = ''; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.offsetX = 0; + this.offsetY = 0; + }) + Button('PanDirection.Vertical & PanDirection.Down').fontSize(28) + .id('ActionGesturePangestureIntureface290') + .translate({ x: this.offsetX, y: this.offsetY}) + .gesture( + PanGesture({direction:PanDirection.Vertical & PanDirection.Down}) + .onActionStart((event: GestureEvent) => { + this.value += 'PanGesture onActionStart' + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface30.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface30.ets new file mode 100644 index 0000000000000000000000000000000000000000..b6843df0703933cb32c2160c4ec27ec88c55aa1e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface30.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 ActionGesturePangestureIntureface30 { + @State value: string = ''; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.offsetX = 0; + this.offsetY = 0; + }) + Button('fingers:3,direction:PanDirection.Vertical,distance:20 ').fontSize(28) + .id('ActionGesturePangestureIntureface30') + .translate({ x: this.offsetX, y: this.offsetY}) + .gesture( + PanGesture({fingers:3,direction:PanDirection.Vertical,distance:20}) + .onActionStart((event: GestureEvent) => { + this.value += 'PanGesture onActionStart' + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface310.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface310.ets new file mode 100644 index 0000000000000000000000000000000000000000..d02388d40ce5e85d338ccc418d44b936b7908b09 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface310.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 ActionGesturePangestureIntureface310 { + @State value: string = ''; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.offsetX = 0; + this.offsetY = 0; + }) + Button('PanDirection.Vertical').fontSize(28) + .id('ActionGesturePangestureIntureface310') + .translate({ x: this.offsetX, y: this.offsetY}) + .gesture( + PanGesture({direction:PanDirection.Vertical}) + .onActionStart((event: GestureEvent) => { + this.value += 'PanGesture onActionStart' + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface330.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface330.ets new file mode 100644 index 0000000000000000000000000000000000000000..26699f7abed11122984e5ebb27a971ecc5160f91 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface330.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 ActionGesturePangestureIntureface330 { + @State value: string = ''; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.offsetX = 0; + this.offsetY = 0; + }) + Button('PanGesture()').fontSize(28) + .id('ActionGesturePangestureIntureface330') + .translate({ x: this.offsetX, y: this.offsetY}) + .gesture( + PanGesture() + .onActionStart((event: GestureEvent) => { + this.value += 'PanGesture onActionStart' + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface340.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface340.ets new file mode 100644 index 0000000000000000000000000000000000000000..59d75c1ced9e5891ae34df9ee60e5d6613f857c1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface340.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 ActionGesturePangestureIntureface340 { + @State value: string = ''; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.offsetX = 0; + this.offsetY = 0; + }) + Button('PanGesture()').fontSize(28) + .id('ActionGesturePangestureIntureface340') + .translate({ x: this.offsetX, y: this.offsetY}) + .gesture( + PanGesture({}) + .onActionStart((event: GestureEvent) => { + this.value += 'PanGesture onActionStart' + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface350.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface350.ets new file mode 100644 index 0000000000000000000000000000000000000000..9655929a880beb2359b3d2ba16d9a4ef26fd6e83 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface350.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. + */ +@Entry +@Component +struct ActionGesturePangestureIntureface350 { + @State value: string = ''; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + private panOption: PanGestureOptions = new PanGestureOptions({ direction: PanDirection.Left }); + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.offsetX = 0; + this.offsetY = 0; + }) + Button('构造器:PanDirection.Left').fontSize(28) + .id('ActionGesturePangestureIntureface350') + .translate({ x: this.offsetX, y: this.offsetY}) + .gesture( + PanGesture(this.panOption) + .onActionStart((event: GestureEvent) => { + this.value += 'PanGesture onActionStart' + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface370.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface370.ets new file mode 100644 index 0000000000000000000000000000000000000000..7e2dd386068ce5b2bb0e4c018ef9927619b3d900 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface370.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. + */ +@Entry +@Component +struct ActionGesturePangestureIntureface370 { + @State value: string = ''; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + private panOption: PanGestureOptions = new PanGestureOptions({ distance:10 }); + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.offsetX = 0; + this.offsetY = 0; + }) + Button('构造器:distance=10').fontSize(28) + .id('ActionGesturePangestureIntureface370') + .translate({ x: this.offsetX, y: this.offsetY}) + .gesture( + PanGesture(this.panOption) + .onActionStart((event: GestureEvent) => { + this.value += 'PanGesture onActionStart' + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface390.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface390.ets new file mode 100644 index 0000000000000000000000000000000000000000..79a33866920c1c4bd3adb4ed92a9d0a651258989 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface390.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. + */ +@Entry +@Component +struct ActionGesturePangestureIntureface390 { + @State value: string = ''; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + private panOption: PanGestureOptions = new PanGestureOptions({ fingers:2 }); + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.offsetX = 0; + this.offsetY = 0; + }) + Button('构造器:fingers:2').fontSize(28) + .id('ActionGesturePangestureIntureface390') + .translate({ x: this.offsetX, y: this.offsetY}) + .gesture( + PanGesture(this.panOption) + .onActionStart((event: GestureEvent) => { + this.value += 'PanGesture onActionStart' + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface420.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface420.ets new file mode 100644 index 0000000000000000000000000000000000000000..441cf775643be1631e6ded485b5c03f0fb898676 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface420.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 ActionGesturePangestureIntureface420 { + @State value: string = ''; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.offsetX = 0; + this.offsetY = 0; + }) + Button('onActionStart').fontSize(28) + .id('ActionGesturePangestureIntureface420') + .translate({ x: this.offsetX, y: this.offsetY}) + .gesture( + PanGesture({fingers:1}) + .onActionStart((event: GestureEvent) => { + this.value += 'PanGesture onActionStart' + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface440.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface440.ets new file mode 100644 index 0000000000000000000000000000000000000000..db967175df4a9fe552d0c35c88163d5dcf509761 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface440.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 ActionGesturePangestureIntureface440 { + @State value: string = ''; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.offsetX = 0; + this.offsetY = 0; + }) + Button('onActionUpdate').fontSize(28) + .id('ActionGesturePangestureIntureface440') + .translate({ x: this.offsetX, y: this.offsetY}) + .gesture( + PanGesture({fingers:2}) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + this.value = 'Pan End' ; + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface450.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface450.ets new file mode 100644 index 0000000000000000000000000000000000000000..da8acf4c903563ca7472c0fd33cd5faaf172a2fa --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface450.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 ActionGesturePangestureIntureface450 { + @State value: string = ''; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.offsetX = 0; + this.offsetY = 0; + }) + Button('onActionUpdate').fontSize(28) + .id('ActionGesturePangestureIntureface450') + .translate({ x: this.offsetX, y: this.offsetY}) + .gesture( + PanGesture({fingers:2}) + .onActionStart((event: GestureEvent) => { + this.value = 'Pan start' ; + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface460.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface460.ets new file mode 100644 index 0000000000000000000000000000000000000000..9c45b0452a3d1b0e49ccff3211eae7b842ce4285 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface460.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 ActionGesturePangestureIntureface460 { + @State value: string = ''; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.offsetX = 0; + this.offsetY = 0; + }) + Button('onActionUpdate').fontSize(28) + .id('ActionGesturePangestureIntureface460') + .translate({ x: this.offsetX, y: this.offsetY}) + .gesture( + PanGesture({fingers:2}) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + this.value = 'Pan Update' ; + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface470.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface470.ets new file mode 100644 index 0000000000000000000000000000000000000000..4390590b6de302ec2d5bf1d0cd79d58564400abb --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface470.ets @@ -0,0 +1,63 @@ +/* + * 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 ActionGesturePangestureIntureface470 { + @State value: string = ''; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + private panOption: PanGestureOptions = new PanGestureOptions({ fingers:2}); + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.offsetX = 0; + this.offsetY = 0; + }) + Button('onActionUpdate').fontSize(28) + .onClick(() => { + this.panOption.setDirection(PanDirection.Right); + }) + .id('ActionGesturePangestureIntureface470') + .translate({ x: this.offsetX, y: this.offsetY}) + .gesture( + PanGesture(this.panOption) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + this.value = 'Pan start' ; + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface490.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface490.ets new file mode 100644 index 0000000000000000000000000000000000000000..565fff6515dc2624db35d19a9c7451435cd3c871 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface490.ets @@ -0,0 +1,63 @@ +/* + * 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 ActionGesturePangestureIntureface490 { + @State value: string = ''; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + private panOption: PanGestureOptions = new PanGestureOptions({ fingers:2}); + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.offsetX = 0; + this.offsetY = 0; + }) + Button('onActionUpdate').fontSize(28) + .onClick(() => { + this.panOption.setDistance(30); + }) + .id('ActionGesturePangestureIntureface490') + .translate({ x: this.offsetX, y: this.offsetY}) + .gesture( + PanGesture(this.panOption) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + this.value = 'Pan start' ; + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface510.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface510.ets new file mode 100644 index 0000000000000000000000000000000000000000..d3da531560ca3dc1db42a0815673c622e9164fe2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface510.ets @@ -0,0 +1,63 @@ +/* + * 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 ActionGesturePangestureIntureface510 { + @State value: string = ''; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + private panOption: PanGestureOptions = new PanGestureOptions({ fingers:2}); + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.offsetX = 0; + this.offsetY = 0; + }) + Button('onActionUpdate').fontSize(28) + .onClick(() => { + this.panOption.setFingers(3); + }) + .id('ActionGesturePangestureIntureface510') + .translate({ x: this.offsetX, y: this.offsetY}) + .gesture( + PanGesture(this.panOption) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + this.value = 'Pan start' ; + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface530.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface530.ets new file mode 100644 index 0000000000000000000000000000000000000000..c73a4601c68fc01afb024d582b2ac6a5312a2504 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface530.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 ActionGesturePangestureIntureface530 { + @State value: string = ''; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.offsetX = 0; + this.offsetY = 0; + }) + Button('onActionStart').fontSize(28) + .id('ActionGesturePangestureIntureface530') + .translate({ x: this.offsetX, y: this.offsetY}) + .gesture( + PanGesture({fingers:1}) + .onActionStart((event: GestureEvent) => { + this.value +='offsetX = '+ event.offsetX; + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface540.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface540.ets new file mode 100644 index 0000000000000000000000000000000000000000..c2aa006fb4ba18ec687dfa078e1ff9200e67e5c8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface540.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 ActionGesturePangestureIntureface540 { + @State value: string = ''; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.offsetX = 0; + this.offsetY = 0; + }) + Button('onActionStart').fontSize(28) + .id('ActionGesturePangestureIntureface540') + .translate({ x: this.offsetX, y: this.offsetY}) + .gesture( + PanGesture({fingers:1}) + .onActionStart((event: GestureEvent) => { + this.value +='offsetY = '+ event.offsetY; + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface550.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface550.ets new file mode 100644 index 0000000000000000000000000000000000000000..fcb6d2967e70290c76315778caa21e8bd7bfc6f9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface550.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 ActionGesturePangestureIntureface550 { + @State value: string = ''; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.offsetX = 0; + this.offsetY = 0; + }) + Button('onActionStart').fontSize(28) + .id('ActionGesturePangestureIntureface550') + .translate({ x: this.offsetX, y: this.offsetY}) + .gesture( + PanGesture({fingers:1}) + .onActionStart((event: GestureEvent) => { + this.value += JSON.stringify(event.fingerList[0]); + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface560.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface560.ets new file mode 100644 index 0000000000000000000000000000000000000000..3731733a32346a715a3331c831c85b44e7916265 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface560.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 ActionGesturePangestureIntureface560 { + @State value: string = ''; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.offsetX = 0; + this.offsetY = 0; + }) + Button('onActionStart').fontSize(28) + .id('ActionGesturePangestureIntureface560') + .translate({ x: this.offsetX, y: this.offsetY}) + .gesture( + PanGesture({fingers:1}) + .onActionStart((event: GestureEvent) => { + this.value +='timestamp = '+ event.timestamp; + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface610.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface610.ets new file mode 100644 index 0000000000000000000000000000000000000000..323cc62b6a4a3710bb1d0782272cc1b240605690 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface610.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 ActionGesturePangestureIntureface610 { + @State value: string = ''; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.offsetX = 0; + this.offsetY = 0; + }) + Button('onActionStart').fontSize(28) + .id('ActionGesturePangestureIntureface610') + .translate({ x: this.offsetX, y: this.offsetY}) + .gesture( + PanGesture({fingers:1}) + .onActionStart((event: GestureEvent) => { + this.value +='pressure = '+ event.pressure; + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface660.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface660.ets new file mode 100644 index 0000000000000000000000000000000000000000..1e8652c70a5bd0efb146d1b1135543be76e0dd46 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface660.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 ActionGesturePangestureIntureface660 { + @State value: string = ''; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.offsetX = 0; + this.offsetY = 0; + }) + Button('onActionStart').fontSize(28) + .id('ActionGesturePangestureIntureface660') + .translate({ x: this.offsetX, y: this.offsetY}) + .gesture( + PanGesture({fingers:1}) + .onActionStart((event: GestureEvent) => { + this.value +='velocity = '+ event.velocity; + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface670.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface670.ets new file mode 100644 index 0000000000000000000000000000000000000000..95bb0116988ba93c5e91c8e5da852b013275f4d7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface670.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 ActionGesturePangestureIntureface670 { + @State value: string = ''; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.offsetX = 0; + this.offsetY = 0; + }) + Button('onActionUpdate').fontSize(28) + .id('ActionGesturePangestureIntureface670') + .translate({ x: this.offsetX, y: this.offsetY}) + .gesture( + PanGesture({fingers:1}) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + this.value ='offsetX = '+ event.offsetX; + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface680.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface680.ets new file mode 100644 index 0000000000000000000000000000000000000000..213438fdbdce04badefc36398b2c231b2a2c6dad --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface680.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 ActionGesturePangestureIntureface680 { + @State value: string = ''; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.offsetX = 0; + this.offsetY = 0; + }) + Button('onActionUpdate').fontSize(28) + .id('ActionGesturePangestureIntureface680') + .translate({ x: this.offsetX, y: this.offsetY}) + .gesture( + PanGesture({fingers:1}) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + this.value ='offsetY = '+ event.offsetY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface690.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface690.ets new file mode 100644 index 0000000000000000000000000000000000000000..000e6b767c6cd4805e7e8b44c6463f625a8fd4ce --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface690.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 ActionGesturePangestureIntureface690 { + @State value: string = ''; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.offsetX = 0; + this.offsetY = 0; + }) + Button('onActionUpdate').fontSize(28) + .id('ActionGesturePangestureIntureface690') + .translate({ x: this.offsetX, y: this.offsetY}) + .gesture( + PanGesture({fingers:1}) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + this.value = JSON.stringify(event.fingerList[0]); + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface70.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface70.ets new file mode 100644 index 0000000000000000000000000000000000000000..b16db7895835649611c34bbb8ffaa0c71640d74d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface70.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 ActionGesturePangestureIntureface70 { + @State value: string = ''; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.offsetX = 0; + this.offsetY = 0; + }) + Button('fingers:10').fontSize(28) + .id('ActionGesturePangestureIntureface70') + .translate({ x: this.offsetX, y: this.offsetY}) + .gesture( + PanGesture({fingers:10}) + .onActionStart((event: GestureEvent) => { + this.value += 'PanGesture onActionStart' + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface700.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface700.ets new file mode 100644 index 0000000000000000000000000000000000000000..ff6aa29532b10bdddb7393950117b58ac71b97e1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface700.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 ActionGesturePangestureIntureface700 { + @State value: string = ''; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.offsetX = 0; + this.offsetY = 0; + }) + Button('onActionUpdate').fontSize(28) + .id('ActionGesturePangestureIntureface700') + .translate({ x: this.offsetX, y: this.offsetY}) + .gesture( + PanGesture({fingers:1}) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + this.value ='timestamp = '+ event.timestamp; + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface750.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface750.ets new file mode 100644 index 0000000000000000000000000000000000000000..e4e7f7e646213bc92e322a2839d6188eb362bf72 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface750.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 ActionGesturePangestureIntureface750 { + @State value: string = ''; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.offsetX = 0; + this.offsetY = 0; + }) + Button('onActionUpdate').fontSize(28) + .id('ActionGesturePangestureIntureface750') + .translate({ x: this.offsetX, y: this.offsetY}) + .gesture( + PanGesture({fingers:1}) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + this.value ='pressure = '+ event.pressure; + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface780.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface780.ets new file mode 100644 index 0000000000000000000000000000000000000000..102354910b9498ff1224e72eeb8991dcf20e1110 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface780.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 ActionGesturePangestureIntureface780 { + @State value: string = ''; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.offsetX = 0; + this.offsetY = 0; + }) + Button('onActionStart').fontSize(28) + .id('ActionGesturePangestureIntureface780') + .translate({ x: this.offsetX, y: this.offsetY}) + .gesture( + PanGesture({fingers:1}) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + this.value ='velocityX = '+ event.velocityX; + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface790.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface790.ets new file mode 100644 index 0000000000000000000000000000000000000000..867e58305bbc257aa83fa0f5d14aec8aeb66065b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface790.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 ActionGesturePangestureIntureface790 { + @State value: string = ''; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.offsetX = 0; + this.offsetY = 0; + }) + Button('onActionStart').fontSize(28) + .id('ActionGesturePangestureIntureface790') + .translate({ x: this.offsetX, y: this.offsetY}) + .gesture( + PanGesture({fingers:1}) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + this.value ='velocityY = '+ event.velocityY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface80.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface80.ets new file mode 100644 index 0000000000000000000000000000000000000000..5d774ec7930d90de274e5d0e33e09e0172a22993 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface80.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 ActionGesturePangestureIntureface80 { + @State value: string = ''; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.offsetX = 0; + this.offsetY = 0; + }) + Button('fingers:11').fontSize(28) + .id('ActionGesturePangestureIntureface80') + .translate({ x: this.offsetX, y: this.offsetY}) + .gesture( + PanGesture({fingers:11}) + .onActionStart((event: GestureEvent) => { + this.value += 'PanGesture onActionStart' + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface800.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface800.ets new file mode 100644 index 0000000000000000000000000000000000000000..6c75b4ab5ea2cd1f17dd9a8e3747121ce6049476 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface800.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 ActionGesturePangestureIntureface800 { + @State value: string = ''; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.offsetX = 0; + this.offsetY = 0; + }) + Button('onActionUpdate').fontSize(28) + .id('ActionGesturePangestureIntureface800') + .translate({ x: this.offsetX, y: this.offsetY}) + .gesture( + PanGesture({fingers:1}) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + this.value ='velocity = '+ event.velocity; + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface810.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface810.ets new file mode 100644 index 0000000000000000000000000000000000000000..ca6a35dac86bfac2134ddfa094dc041fda59578d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface810.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 ActionGesturePangestureIntureface810 { + @State value: string = ''; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.offsetX = 0; + this.offsetY = 0; + }) + Button('onActionEnd').fontSize(28) + .id('ActionGesturePangestureIntureface810') + .translate({ x: this.offsetX, y: this.offsetY}) + .gesture( + PanGesture({fingers:1}) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + this.value ='offsetX = '+ event.offsetX; + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface820.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface820.ets new file mode 100644 index 0000000000000000000000000000000000000000..bef43905adad4c1c0a01f3cc2f7e0a335dbf38b8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface820.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 ActionGesturePangestureIntureface820 { + @State value: string = ''; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.offsetX = 0; + this.offsetY = 0; + }) + Button('onActionEnd').fontSize(28) + .id('ActionGesturePangestureIntureface820') + .translate({ x: this.offsetX, y: this.offsetY}) + .gesture( + PanGesture({fingers:1}) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + this.value ='offsetY = '+ event.offsetY; + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface830.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface830.ets new file mode 100644 index 0000000000000000000000000000000000000000..9f42ef60b8cb309d119933fc96413a5af1497d04 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface830.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 ActionGesturePangestureIntureface830 { + @State value: string = ''; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.offsetX = 0; + this.offsetY = 0; + }) + Button('onActionEnd').fontSize(28) + .id('ActionGesturePangestureIntureface830') + .translate({ x: this.offsetX, y: this.offsetY}) + .gesture( + PanGesture({fingers:1}) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + this.value = JSON.stringify(event.fingerList[0]); + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface840.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface840.ets new file mode 100644 index 0000000000000000000000000000000000000000..a68cd83572a99f447a37c10bb134cc8398cf12f4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface840.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 ActionGesturePangestureIntureface840 { + @State value: string = ''; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.offsetX = 0; + this.offsetY = 0; + }) + Button('onActionEnd').fontSize(28) + .id('ActionGesturePangestureIntureface840') + .translate({ x: this.offsetX, y: this.offsetY}) + .gesture( + PanGesture({fingers:1}) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + this.value ='timestamp = '+ event.timestamp; + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface860.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface860.ets new file mode 100644 index 0000000000000000000000000000000000000000..74496df9a4a9e0fd554b9dfffd075bc2a7d32868 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface860.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 ActionGesturePangestureIntureface860 { + @State value: string = ''; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.offsetX = 0; + this.offsetY = 0; + }) + Button('onActionUpdate').fontSize(28) + .id('ActionGesturePangestureIntureface860') + .translate({ x: this.offsetX, y: this.offsetY}) + .gesture( + PanGesture({fingers:1}) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + this.value = 'source =' +event.source; + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface890.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface890.ets new file mode 100644 index 0000000000000000000000000000000000000000..645691705019f6dd23668b92a14f7f68b8cf2716 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface890.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 ActionGesturePangestureIntureface890 { + @State value: string = ''; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.offsetX = 0; + this.offsetY = 0; + }) + Button('onActionEnd').fontSize(28) + .id('ActionGesturePangestureIntureface890') + .translate({ x: this.offsetX, y: this.offsetY}) + .gesture( + PanGesture({fingers:1}) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + this.value ='pressure = '+ event.pressure; + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface90.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface90.ets new file mode 100644 index 0000000000000000000000000000000000000000..716b520b5188765ee1edd22c82ad90c99209e13c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface90.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 ActionGesturePangestureIntureface90 { + @State value: string = ''; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.offsetX = 0; + this.offsetY = 0; + }) + Button('fingers:1').fontSize(28) + .id('ActionGesturePangestureIntureface90') + .translate({ x: this.offsetX, y: this.offsetY}) + .gesture( + PanGesture({fingers:1}) + .onActionStart((event: GestureEvent) => { + this.value += 'PanGesture onActionStart' + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface940.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface940.ets new file mode 100644 index 0000000000000000000000000000000000000000..d2fd69156cca013b0c768795c8d4d47a8dcf2455 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface940.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 ActionGesturePangestureIntureface940 { + @State value: string = ''; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.offsetX = 0; + this.offsetY = 0; + }) + Button('onActionEnd').fontSize(28) + .id('ActionGesturePangestureIntureface940') + .translate({ x: this.offsetX, y: this.offsetY}) + .gesture( + PanGesture({fingers:1}) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + this.value ='velocity = '+ event.velocity; + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0010.ets new file mode 100644 index 0000000000000000000000000000000000000000..004f28335f6d5419694d52e5ada5369196c7e7da --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0010.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 ActionGesturePinchgesrureInterface0010 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State value: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.scaleValue = 1; + }) + Column() { + Text('PinchGesture event:\n(' + this.value + ')') + } + .id('ActionGesturePinchgesrureInterface0010_001') + .height(200) + .width(200) + .padding(20) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({ fingers: 2 ,distance: 100}) + .onActionStart((event: GestureEvent) => { + if (event) { + this.value = 'PinchGesture onActionStart'; + } + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale * 0.05; + this.value = 'PinchGesture onActionUpdate'; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + if (event) { + this.pinchValue = this.scaleValue; + this.value = 'PinchGesture onActionEnd'; + } + }) + ) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0030.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0030.ets new file mode 100644 index 0000000000000000000000000000000000000000..51b8a6c9d58789a9ea887ccc60a52589061bb1f6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0030.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 ActionGesturePinchgesrureInterface0030 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State value: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.scaleValue = 1; + }) + Column() { + Text('PinchGesture event:\n(' + this.value + ')') + } + .id('ActionGesturePinchgesrureInterface0030_001') + .height(200) + .width(200) + .padding(20) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({ fingers: 2 ,distance: 100}) + .onActionStart((event: GestureEvent) => { + if (event) { + this.value = 'PinchGesture onActionStart'; + } + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale * 0.05; + this.value = 'PinchGesture onActionUpdate'; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + if (event) { + this.pinchValue = this.scaleValue; + this.value = 'PinchGesture onActionEnd'; + } + }) + ) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0040.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0040.ets new file mode 100644 index 0000000000000000000000000000000000000000..cd0c073ad50b7b9ae5e8c7d75848adf6d1212c63 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0040.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 ActionGesturePinchgesrureInterface0040 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State value: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.scaleValue = 1; + }) + Column() { + Text('PinchGesture event:\n(' + this.value + ')') + } + .id('ActionGesturePinchgesrureInterface0040_001') + .height(200) + .width(200) + .padding(20) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({ fingers: 2, distance: 100 }) + .onActionStart((event: GestureEvent) => { + if (event) { + this.value = 'PinchGesture onActionStart'; + } + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale * 0.05; + this.value = 'PinchGesture onActionUpdate'; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + ) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0050.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0050.ets new file mode 100644 index 0000000000000000000000000000000000000000..76215e0eee6280f5e2806c68283e3fb59fe578b8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0050.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 ActionGesturePinchgesrureInterface0050 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State value: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.scaleValue = 1; + }) + Column() { + Text('PinchGesture event:\n(' + this.value + ')') + } + .id('ActionGesturePinchgesrureInterface0050_001') + .height(200) + .width(200) + .padding(20) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({ fingers: 2 ,distance: 400}) + .onActionStart((event: GestureEvent) => { + if (event) { + this.value = 'PinchGesture onActionStart'; + } + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale * 0.05; + this.value = 'PinchGesture onActionUpdate'; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + if (event) { + this.pinchValue = this.scaleValue; + this.value = 'PinchGesture onActionEnd'; + } + }) + ) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0060.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0060.ets new file mode 100644 index 0000000000000000000000000000000000000000..8f75158173c9d876d8677624347aa9c50a5ea51f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0060.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 ActionGesturePinchgesrureInterface0060 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State update: string = ''; + @State end: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.scaleValue = 1; + }) + Column() { + Text('PinchGesture eventUpdate:\n(' + this.update + ')') + Text('PinchGesture eventEnd:\n(' + this.end + ')') + } + .id('ActionGesturePinchgesrureInterface0060_001') + .height(200) + .width(200) + .padding(20) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({ fingers: 2 }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale * 0.05; + this.update = 'PinchGesture onActionUpdate'; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + if (event) { + this.pinchValue = this.scaleValue; + this.end = 'PinchGesture onActionEnd'; + } + }) + ) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0070.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0070.ets new file mode 100644 index 0000000000000000000000000000000000000000..450e6cdb80b8f35fa4c283f21cea0d2fcbb21702 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0070.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 ActionGesturePinchgesrureInterface0070 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State update: string = ''; + @State end: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.scaleValue = 1; + }) + Column() { + Text('PinchGesture eventUpdate:\n(' + this.update + ')') + Text('PinchGesture eventEnd:\n(' + this.end + ')') + } + .id('ActionGesturePinchgesrureInterface0070_001') + .height(200) + .width(200) + .padding(20) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({ fingers: 2 }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale * 0.05; + this.update = 'PinchGesture onActionUpdate'; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + if (event) { + this.pinchValue = this.scaleValue; + this.end = 'PinchGesture onActionEnd'; + } + }) + ) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0080.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0080.ets new file mode 100644 index 0000000000000000000000000000000000000000..23e07e97b4bcad1014a377da34dd1c734a454148 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0080.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 ActionGesturePinchgesrureInterface0080 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State update: string = ''; + @State end: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.scaleValue = 1; + }) + Column() { + Text('PinchGesture eventUpdate:\n(' + this.update + ')') + Text('PinchGesture eventEnd:\n(' + this.end + ')') + } + .id('ActionGesturePinchgesrureInterface0080_001') + .height(200) + .width(200) + .padding(20) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({ fingers: 2 }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale * 0.05; + this.update = 'PinchGesture onActionUpdate'; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + if (event) { + this.pinchValue = this.scaleValue; + this.end = 'PinchGesture onActionEnd'; + } + }) + ) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0090.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0090.ets new file mode 100644 index 0000000000000000000000000000000000000000..b80d07986a9dd22f43b30934feb7ed7054fc487c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0090.ets @@ -0,0 +1,63 @@ +/* + * 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 ActionGesturePinchgesrureInterface0090 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State value: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.scaleValue = 1; + }) + Column() { + Text('PinchGesture event:\n(' + this.value + ')') + } + .id('ActionGesturePinchgesrureInterface0090_001') + .height(200) + .width(200) + .padding(20) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({ fingers: 2 }) + .onActionStart((event: GestureEvent) => { + if (event) { + this.value = 'PinchGesture onActionStart'; + } + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale * 0.05; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + if (event) { + this.pinchValue = this.scaleValue; + } + }) + ) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0100.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0100.ets new file mode 100644 index 0000000000000000000000000000000000000000..8fe45dc7493e26dccf1203c97872c6d88361d78d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0100.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 ActionGesturePinchgesrureInterface0100 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State value: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.scaleValue = 1; + }) + Column() { + Text('PinchGesture event:\n(' + this.value + ')') + } + .id('ActionGesturePinchgesrureInterface0100_001') + .height(200) + .width(200) + .padding(20) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({ fingers: 2 }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale * 0.05; + this.value = 'PinchGesture onActionUpdate'; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + if (event) { + this.pinchValue = this.scaleValue; + } + }) + ) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0110.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0110.ets new file mode 100644 index 0000000000000000000000000000000000000000..1276c5d53969c1382017707c55d7e669dfc829dd --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0110.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 ActionGesturePinchgesrureInterface0110 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State value: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.scaleValue = 1; + }) + Column() { + Text('PinchGesture event:\n(' + this.value + ')') + } + .id('ActionGesturePinchgesrureInterface0110_001') + .height(200) + .width(200) + .padding(20) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({ fingers: 2 }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale * 0.05; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + if (event) { + this.pinchValue = this.scaleValue; + this.value = 'PinchGesture onActionEnd'; + } + }) + ) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0120.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0120.ets new file mode 100644 index 0000000000000000000000000000000000000000..fec8b0c1abbb1d9171bb5859116a17f04541820d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0120.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. + */ +@Entry +@Component +struct ActionGesturePinchgesrureInterface0120 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State value: string = ''; + @State update: string = ''; + @State end: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.scaleValue = 1; + }) + Column() { + Text('PinchGesture event:\n(' + this.value + ')') + Text('PinchGesture update:\n(' + this.update + ')') + Text('PinchGesture end:\n(' + this.end + ')') + } + .id('ActionGesturePinchgesrureInterface0120_001') + .height(200) + .width(200) + .padding(20) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture() + .onActionStart((event: GestureEvent) => { + if (event) { + this.value = 'PinchGesture onActionStart'; + } + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale * 0.05; + this.update = 'PinchGesture onActionUpdate'; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + if (event) { + this.pinchValue = this.scaleValue; + this.end = 'PinchGesture onActionEnd'; + } + }) + ) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0130.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0130.ets new file mode 100644 index 0000000000000000000000000000000000000000..acced7521ea8e137c41c99f15b502ba3c6052a6b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0130.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. + */ +@Entry +@Component +struct ActionGesturePinchgesrureInterface0130 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State value: string = ''; + @State update: string = ''; + @State end: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.scaleValue = 1; + }) + Column() { + Text('PinchGesture event:\n(' + this.value + ')') + Text('PinchGesture update:\n(' + this.update + ')') + Text('PinchGesture end:\n(' + this.end + ')') + } + .id('ActionGesturePinchgesrureInterface0130_001') + .height(200) + .width(200) + .padding(20) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture() + .onActionStart((event: GestureEvent) => { + if (event) { + this.value = 'PinchGesture onActionStart'; + } + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale * 0.05; + this.update = 'PinchGesture onActionUpdate'; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + if (event) { + this.pinchValue = this.scaleValue; + this.end = 'PinchGesture onActionEnd'; + } + }) + ) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0140.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0140.ets new file mode 100644 index 0000000000000000000000000000000000000000..05e49a66bfd0327e9b09d6b20f1c2834bacc4262 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0140.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. + */ +@Entry +@Component +struct ActionGesturePinchgesrureInterface0140 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State value: string = ''; + @State update: string = ''; + @State end: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.scaleValue = 1; + }) + Column() { + Text('PinchGesture event:\n(' + this.value + ')') + Text('PinchGesture update:\n(' + this.update + ')') + Text('PinchGesture end:\n(' + this.end + ')') + } + .id('ActionGesturePinchgesrureInterface0140_001') + .height(200) + .width(200) + .padding(20) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({ distance: 10}) + .onActionStart((event: GestureEvent) => { + if (event) { + this.value = 'PinchGesture onActionStart'; + } + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale * 0.05; + this.update = 'PinchGesture onActionUpdate'; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + if (event) { + this.pinchValue = this.scaleValue; + this.end = 'PinchGesture onActionEnd'; + } + }) + ) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0150.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0150.ets new file mode 100644 index 0000000000000000000000000000000000000000..ce122a481e4f243ef4a0c7edc2e9681a416e319d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0150.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. + */ +@Entry +@Component +struct ActionGesturePinchgesrureInterface0150 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State value: string = ''; + @State update: string = ''; + @State end: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.scaleValue = 1; + }) + Column() { + Text('PinchGesture event:\n(' + this.value + ')') + Text('PinchGesture update:\n(' + this.update + ')') + Text('PinchGesture end:\n(' + this.end + ')') + } + .id('ActionGesturePinchgesrureInterface0150_001') + .height(200) + .width(200) + .padding(20) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({ fingers: 2 ,distance: 10}) + .onActionStart((event: GestureEvent) => { + if (event) { + this.value = 'PinchGesture onActionStart'; + } + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale * 0.05; + this.update = 'PinchGesture onActionUpdate'; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + if (event) { + this.pinchValue = this.scaleValue; + this.end = 'PinchGesture onActionEnd'; + } + }) + ) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0160.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0160.ets new file mode 100644 index 0000000000000000000000000000000000000000..f170c14507e892e7e7309e2d544cb84e4a9864d5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0160.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. + */ +@Entry +@Component +struct ActionGesturePinchgesrureInterface0160 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State value: string = ''; + @State update: string = ''; + @State end: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.scaleValue = 1; + }) + Column() { + Text('PinchGesture event:\n(' + this.value + ')') + Text('PinchGesture update:\n(' + this.update + ')') + Text('PinchGesture end:\n(' + this.end + ')') + } + .id('ActionGesturePinchgesrureInterface0160_001') + .height(200) + .width(200) + .padding(20) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({ fingers: 0}) + .onActionStart((event: GestureEvent) => { + if (event) { + this.value = 'PinchGesture onActionStart'; + } + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale * 0.05; + this.update = 'PinchGesture onActionUpdate'; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + if (event) { + this.pinchValue = this.scaleValue; + this.end = 'PinchGesture onActionEnd'; + } + }) + ) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0170.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0170.ets new file mode 100644 index 0000000000000000000000000000000000000000..5a3dad102f26b335011f9481ae88221fbf7f0e59 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0170.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. + */ +@Entry +@Component +struct ActionGesturePinchgesrureInterface0170 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State value: string = ''; + @State update: string = ''; + @State end: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.scaleValue = 1; + }) + Column() { + Text('PinchGesture event:\n(' + this.value + ')') + Text('PinchGesture update:\n(' + this.update + ')') + Text('PinchGesture end:\n(' + this.end + ')') + } + .id('ActionGesturePinchgesrureInterface0170_001') + .height(200) + .width(200) + .padding(20) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({ fingers: 3}) + .onActionStart((event: GestureEvent) => { + if (event) { + this.value = 'PinchGesture onActionStart'; + } + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale * 0.05; + this.update = 'PinchGesture onActionUpdate'; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + if (event) { + this.pinchValue = this.scaleValue; + this.end = 'PinchGesture onActionEnd'; + } + }) + ) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0180.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0180.ets new file mode 100644 index 0000000000000000000000000000000000000000..26a9883f2111a04a89d917cd592cf82a96b4ee52 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0180.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. + */ +@Entry +@Component +struct ActionGesturePinchgesrureInterface0180 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State value: string = ''; + @State update: string = ''; + @State end: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.scaleValue = 1; + }) + Column() { + Text('PinchGesture event:\n(' + this.value + ')') + Text('PinchGesture update:\n(' + this.update + ')') + Text('PinchGesture end:\n(' + this.end + ')') + } + .id('ActionGesturePinchgesrureInterface0180_001') + .height(200) + .width(200) + .padding(20) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({ fingers: 3}) + .onActionStart((event: GestureEvent) => { + if (event) { + this.value = 'PinchGesture onActionStart'; + } + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale * 0.05; + this.update = 'PinchGesture onActionUpdate'; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + if (event) { + this.pinchValue = this.scaleValue; + this.end = 'PinchGesture onActionEnd'; + } + }) + ) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0190.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0190.ets new file mode 100644 index 0000000000000000000000000000000000000000..46eddd86951964cdb32ad6acd540db89f03cd578 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0190.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. + */ +@Entry +@Component +struct ActionGesturePinchgesrureInterface0190 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State value: string = ''; + @State update: string = ''; + @State end: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.scaleValue = 1; + }) + Column() { + Text('PinchGesture event:\n(' + this.value + ')') + Text('PinchGesture update:\n(' + this.update + ')') + Text('PinchGesture end:\n(' + this.end + ')') + } + .id('ActionGesturePinchgesrureInterface0190_001') + .height(200) + .width(200) + .padding(20) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({ fingers: 3}) + .onActionStart((event: GestureEvent) => { + if (event) { + this.value = 'PinchGesture onActionStart'; + } + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale * 0.05; + this.update = 'PinchGesture onActionUpdate'; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + if (event) { + this.pinchValue = this.scaleValue; + this.end = 'PinchGesture onActionEnd'; + } + }) + ) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0200.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0200.ets new file mode 100644 index 0000000000000000000000000000000000000000..c7c4b3080451903dad07abab52fb613589f2d1ef --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0200.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. + */ +@Entry +@Component +struct ActionGesturePinchgesrureInterface0200 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State value: string = ''; + @State update: string = ''; + @State end: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.scaleValue = 1; + }) + Column() { + Text('PinchGesture event:\n(' + this.value + ')') + Text('PinchGesture update:\n(' + this.update + ')') + Text('PinchGesture end:\n(' + this.end + ')') + } + .id('ActionGesturePinchgesrureInterface0200_001') + .height(200) + .width(200) + .padding(20) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({ fingers: 5}) + .onActionStart((event: GestureEvent) => { + if (event) { + this.value = 'PinchGesture onActionStart'; + } + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale * 0.05; + this.update = 'PinchGesture onActionUpdate'; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + if (event) { + this.pinchValue = this.scaleValue; + this.end = 'PinchGesture onActionEnd'; + } + }) + ) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0210.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0210.ets new file mode 100644 index 0000000000000000000000000000000000000000..7605065e3e998f8045085d382e1f825ae7c23bbe --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0210.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. + */ +@Entry +@Component +struct ActionGesturePinchgesrureInterface0210 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State value: string = ''; + @State update: string = ''; + @State end: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.scaleValue = 1; + }) + Column() { + Text('PinchGesture event:\n(' + this.value + ')') + Text('PinchGesture update:\n(' + this.update + ')') + Text('PinchGesture end:\n(' + this.end + ')') + } + .id('ActionGesturePinchgesrureInterface0210_001') + .height(200) + .width(200) + .padding(20) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({ fingers: 6}) + .onActionStart((event: GestureEvent) => { + if (event) { + this.value = 'PinchGesture onActionStart'; + } + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale * 0.05; + this.update = 'PinchGesture onActionUpdate'; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + if (event) { + this.pinchValue = this.scaleValue; + this.end = 'PinchGesture onActionEnd'; + } + }) + ) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0220.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0220.ets new file mode 100644 index 0000000000000000000000000000000000000000..5fc29808100f9bdd9151679d820d4d6fc8c39c35 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0220.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. + */ +@Entry +@Component +struct ActionGesturePinchgesrureInterface0220 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State value: string = ''; + @State update: string = ''; + @State end: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.scaleValue = 1; + }) + Column() { + Text('PinchGesture event:\n(' + this.value + ')') + Text('PinchGesture update:\n(' + this.update + ')') + Text('PinchGesture end:\n(' + this.end + ')') + } + .id('ActionGesturePinchgesrureInterface0220_001') + .height(200) + .width(200) + .padding(20) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({ fingers: 3, distance: 20}) + .onActionStart((event: GestureEvent) => { + if (event) { + this.value = 'PinchGesture onActionStart'; + } + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale * 0.05; + this.update = 'PinchGesture onActionUpdate'; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + if (event) { + this.pinchValue = this.scaleValue; + this.end = 'PinchGesture onActionEnd'; + } + }) + ) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0230.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0230.ets new file mode 100644 index 0000000000000000000000000000000000000000..326844cf98fae438503bacf27cbd92c3706bea54 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0230.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. + */ +@Entry +@Component +struct ActionGesturePinchgesrureInterface0230 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State value: string = ''; + @State update: string = ''; + @State end: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.scaleValue = 1; + }) + Column() { + Text('PinchGesture event:\n(' + this.value + ')') + Text('PinchGesture update:\n(' + this.update + ')') + Text('PinchGesture end:\n(' + this.end + ')') + } + .id('ActionGesturePinchgesrureInterface0230_001') + .height(200) + .width(200) + .padding(20) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({ fingers: 3, distance: 20}) + .onActionStart((event: GestureEvent) => { + if (event) { + this.value = 'PinchGesture onActionStart'; + } + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale * 0.05; + this.update = 'PinchGesture onActionUpdate'; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + if (event) { + this.pinchValue = this.scaleValue; + this.end = 'PinchGesture onActionEnd'; + } + }) + ) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0240.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0240.ets new file mode 100644 index 0000000000000000000000000000000000000000..b383e5042559675e3ed4b817689f2807ae7f58b6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0240.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. + */ +@Entry +@Component +struct ActionGesturePinchgesrureInterface0240 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State value: string = ''; + @State update: string = ''; + @State end: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.scaleValue = 1; + }) + Column() { + Text('PinchGesture event:\n(' + this.value + ')') + Text('PinchGesture update:\n(' + this.update + ')') + Text('PinchGesture end:\n(' + this.end + ')') + } + .id('ActionGesturePinchgesrureInterface0240_001') + .height(200) + .width(200) + .padding(20) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({ fingers: 3, distance: 20}) + .onActionStart((event: GestureEvent) => { + if (event) { + this.value = 'PinchGesture onActionStart'; + } + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale * 0.05; + this.update = 'PinchGesture onActionUpdate'; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + if (event) { + this.pinchValue = this.scaleValue; + this.end = 'PinchGesture onActionEnd'; + } + }) + ) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0250.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0250.ets new file mode 100644 index 0000000000000000000000000000000000000000..bcee477152ad17ce1c590388cb085e62bf97995b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0250.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. + */ +@Entry +@Component +struct ActionGesturePinchgesrureInterface0250 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State value: string = ''; + @State update: string = ''; + @State end: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.scaleValue = 1; + }) + Column() { + Text('PinchGesture event:\n(' + this.value + ')') + Text('PinchGesture update:\n(' + this.update + ')') + Text('PinchGesture end:\n(' + this.end + ')') + } + .id('ActionGesturePinchgesrureInterface0250_001') + .height(200) + .width(200) + .padding(20) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({ fingers: 2}) + .onActionStart((event: GestureEvent) => { + if (event) { + this.value = 'PinchGesture onActionStart'; + } + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale * 0.05; + this.update = 'PinchGesture onActionUpdate'; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + if (event) { + this.pinchValue = this.scaleValue; + this.end = 'PinchGesture onActionEnd'; + } + }) + ) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0260.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0260.ets new file mode 100644 index 0000000000000000000000000000000000000000..fa62780a152bfe9ec8506070f35e533d21a55ac2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0260.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 ActionGesturePinchgesrureInterface0260 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State value: string = ''; + @State update: string = ''; + @State end: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.scaleValue = 1; + }) + Column() { + Text('PinchGesture event:\n(' + this.value + ')') + } + .id('ActionGesturePinchgesrureInterface0260_001') + .height(200) + .width(200) + .padding(20) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({ fingers: 2}) + .onActionStart((event: GestureEvent) => { + if (event) { + this.value = 'PinchGesture onActionStart'; + } + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale * 0.05; + this.update = 'PinchGesture onActionUpdate'; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + if (event) { + this.pinchValue = this.scaleValue; + this.end = 'PinchGesture onActionEnd'; + } + }) + ) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0270.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0270.ets new file mode 100644 index 0000000000000000000000000000000000000000..951074a4ec58ad03dbce7aa97891088299947032 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0270.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 ActionGesturePinchgesrureInterface0270 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State value: string = ''; + @State update: string = ''; + @State end: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.scaleValue = 1; + }) + Column() { + Text('PinchGesture update:\n(' + this.update + ')') + } + .id('ActionGesturePinchgesrureInterface0270_001') + .height(200) + .width(200) + .padding(20) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({ fingers: 2}) + .onActionStart((event: GestureEvent) => { + if (event) { + this.value = 'PinchGesture onActionStart'; + } + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale * 0.05; + this.update = 'PinchGesture onActionUpdate'; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + if (event) { + this.pinchValue = this.scaleValue; + this.end = 'PinchGesture onActionEnd'; + } + }) + ) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0280.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0280.ets new file mode 100644 index 0000000000000000000000000000000000000000..6470fd12d3025e2f5947f23e8a8305abc4dcb979 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0280.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 ActionGesturePinchgesrureInterface0280 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State value: string = ''; + @State update: string = ''; + @State end: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.scaleValue = 1; + }) + Column() { + Text('PinchGesture end:\n(' + this.end + ')') + } + .id('ActionGesturePinchgesrureInterface0280_001') + .height(200) + .width(200) + .padding(20) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({ fingers: 2}) + .onActionStart((event: GestureEvent) => { + if (event) { + this.value = 'PinchGesture onActionStart'; + } + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale * 0.05; + this.update = 'PinchGesture onActionUpdate'; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + if (event) { + this.pinchValue = this.scaleValue; + this.end = 'PinchGesture onActionEnd'; + } + }) + ) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0290.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0290.ets new file mode 100644 index 0000000000000000000000000000000000000000..a74ed3fcd7ff9b5cdda478ef95507bea494c759f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0290.ets @@ -0,0 +1,73 @@ +/* + * 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 ActionGesturePinchgesrureInterface0290 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State value: string = ''; + @State update: string = ''; + @State end: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.scaleValue = 1; + this.pinchValue = 1; + }) + Column() { + Image($r('app.media.icon')) + .id('ActionGesturePinchgesrureInterface0290_001') + .height(200) + .width(200) + .padding(20) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({ fingers: 2 }) + .onActionStart((event: GestureEvent) => { + if (event) { + this.value = 'PinchGesture onActionStart'; + } + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale * 0.05; + this.update = 'PinchGesture onActionUpdate'; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + if (event) { + this.pinchValue = this.scaleValue; + this.end = 'PinchGesture onActionEnd'; + } + }) + ) + } + Column(){ + Text('PinchGesture event:\n(' + this.value + ')') + Text('PinchGesture update:\n(' + this.update + ')') + Text('PinchGesture end:\n(' + this.end + ')') + } + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0300.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0300.ets new file mode 100644 index 0000000000000000000000000000000000000000..21d7313958c9ba6ccddc8a8c673979f509a105b2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0300.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 ActionGesturePinchgesrureInterface0300 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State value: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.scaleValue = 1; + this.pinchValue = 1; + }) + Column() { + Image($r('app.media.icon')) + .id('ActionGesturePinchgesrureInterface0300_001') + .height(200) + .width(200) + .padding(20) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({ fingers: 2 }) + .onActionStart((event: GestureEvent) => { + if (event) { + this.value = 'PinchGesture onActionStart'; + } + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale * 0.05; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + if (event) { + this.pinchValue = this.scaleValue; + } + }) + ) + } + Column(){ + Text('PinchGesture event:\n(' + this.value + ')') + } + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0310.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0310.ets new file mode 100644 index 0000000000000000000000000000000000000000..cf6f103d4e1ae7b00db34187b0081d6a14dd80f9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0310.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 ActionGesturePinchgesrureInterface0310 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State value: string = ''; + @State update: string = ''; + @State end: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.scaleValue = 1; + this.pinchValue = 1; + }) + Column() { + Image($r('app.media.icon')) + .id('ActionGesturePinchgesrureInterface0310_001') + .height(200) + .width(200) + .padding(20) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({ fingers: 2 }) + .onActionStart((event: GestureEvent) => { + if (event) { + this.value = 'PinchGesture onActionStart'; + } + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale * 0.05; + this.update = 'PinchGesture onActionUpdate'; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + if (event) { + this.pinchValue = this.scaleValue; + } + }) + ) + } + Column(){ + Text('PinchGesture update:\n(' + this.update + ')') + } + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0320.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0320.ets new file mode 100644 index 0000000000000000000000000000000000000000..01885072a873acf86879c81a17c530d13df26160 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0320.ets @@ -0,0 +1,72 @@ +/* + * 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 ActionGesturePinchgesrureInterface0320 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State value: string = ''; + @State update: string = ''; + @State end: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.scaleValue = 1; + this.pinchValue = 1; + }) + Column() { + Image($r('app.media.icon')) + .id('ActionGesturePinchgesrureInterface0320_001') + .height(200) + .width(200) + .padding(20) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({ fingers: 2 }) + .onActionStart((event: GestureEvent) => { + if (event) { + this.value = 'PinchGesture onActionStart'; + } + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale * 0.05; + this.update = 'PinchGesture onActionUpdate'; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + if (event) { + this.pinchValue = this.scaleValue; + this.end = 'PinchGesture onActionEnd'; + } + }) + ) + } + + Column() { + Text('PinchGesture end:\n(' + this.end + ')') + } + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0330.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0330.ets new file mode 100644 index 0000000000000000000000000000000000000000..320719cd113e8c8f566a49892171214aa7f14b9f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0330.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 json from '@ohos.util.json'; + +@Entry +@Component +struct ActionGesturePinchgesrureInterface0330 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State value: string = ''; + @State update: string = ''; + @State end: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.scaleValue = 1; + }) + Column() { + Text('PinchGesture scale:\n(' + this.value + ')') + } + .id('ActionGesturePinchgesrureInterface0330_001') + .height(200) + .width(200) + .padding(20) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({ fingers: 2}) + .onActionStart((event: GestureEvent) => { + if (event) { + this.value = 'onActionStart succ'; + } + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale * 0.05; + this.update = 'PinchGesture onActionUpdate'; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + if (event) { + this.pinchValue = this.scaleValue; + this.end = 'PinchGesture onActionEnd'; + } + }) + ) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0340.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0340.ets new file mode 100644 index 0000000000000000000000000000000000000000..63bdb9989c81ebf3d4688d7e8649c315635827a1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0340.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 ActionGesturePinchgesrureInterface0340 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State value: string = ''; + @State update: string = ''; + @State end: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.scaleValue = 1; + }) + Column() { + Text('PinchGesture pinchCenterX:\n(' + this.value + ')') + } + .id('ActionGesturePinchgesrureInterface0340_001') + .height(200) + .width(200) + .padding(20) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({ fingers: 2 }) + .onActionStart((event: GestureEvent) => { + if (event) { + this.value = JSON.stringify(Math.round(event.pinchCenterX)); + } + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale * 0.05; + this.update = 'PinchGesture onActionUpdate'; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + if (event) { + this.pinchValue = this.scaleValue; + this.end = 'PinchGesture onActionEnd'; + } + }) + ) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0350.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0350.ets new file mode 100644 index 0000000000000000000000000000000000000000..5df5f34d863a36922d9aa476b084404a71163f35 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0350.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 ActionGesturePinchgesrureInterface0350 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State value: string = ''; + @State update: string = ''; + @State end: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.scaleValue = 1; + }) + Column() { + Text('PinchGesture pinchCenterY:\n(' + this.value + ')') + } + .id('ActionGesturePinchgesrureInterface0350_001') + .height(200) + .width(200) + .padding(20) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({ fingers: 2 }) + .onActionStart((event: GestureEvent) => { + if (event) { + this.value = JSON.stringify(event.pinchCenterY); + } + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale * 0.05; + this.update = 'PinchGesture onActionUpdate'; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + if (event) { + this.pinchValue = this.scaleValue; + this.end = 'PinchGesture onActionEnd'; + } + }) + ) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0360.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0360.ets new file mode 100644 index 0000000000000000000000000000000000000000..4abe0171eb87aed4234c27b16e9dd5570b00a39f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0360.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 ActionGesturePinchgesrureInterface0360 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State value: string = ''; + @State update: string = ''; + @State end: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.scaleValue = 1; + }) + Column() { + Text('PinchGesture fingerList:\n(' + this.value + ')') + } + .id('ActionGesturePinchgesrureInterface0360_001') + .height(200) + .width(200) + .padding(20) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({ fingers: 2 }) + .onActionStart((event: GestureEvent) => { + if (event) { + this.value = JSON.stringify(event.fingerList); + } + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale * 0.05; + this.update = 'PinchGesture onActionUpdate'; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + if (event) { + this.pinchValue = this.scaleValue; + this.end = 'PinchGesture onActionEnd'; + } + }) + ) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0370.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0370.ets new file mode 100644 index 0000000000000000000000000000000000000000..e020d02f442294bcd569f8d64b991299613851d0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0370.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 ActionGesturePinchgesrureInterface0370 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State value: string = ''; + @State update: string = ''; + @State end: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(() => { + this.scaleValue = 1; + }) + Column() { + Text('PinchGesture timestamp:\n(' + this.value + ')') + } + .id('ActionGesturePinchgesrureInterface0370_001') + .height(200) + .width(200) + .padding(20) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({ fingers: 2 }) + .onActionStart((event: GestureEvent) => { + if (event) { + let date = new Date(event.timestamp * 1000); + this.value = date.getFullYear() + ''; + } + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale * 0.05; + this.update = 'PinchGesture onActionUpdate'; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + if (event) { + this.pinchValue = this.scaleValue; + this.end = 'PinchGesture onActionEnd'; + } + }) + ) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0410.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0410.ets new file mode 100644 index 0000000000000000000000000000000000000000..5a4280bf1dd7bea63d550ca8a81c79de0ace461f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0410.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 ActionGesturePinchgesrureInterface0410 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State value: string = ''; + @State update: string = ''; + @State end: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.scaleValue = 1; + }) + Column() { + Text('PinchGesture pressure:\n(' + this.value + ')') + } + .id('ActionGesturePinchgesrureInterface0410_001') + .height(200) + .width(200) + .padding(20) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({ fingers: 2 }) + .onActionStart((event: GestureEvent) => { + if (event) { + this.value = JSON.stringify(Math.round(event.pressure)); + } + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale * 0.05; + this.update = 'PinchGesture onActionUpdate'; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + if (event) { + this.pinchValue = this.scaleValue; + this.end = 'PinchGesture onActionEnd'; + } + }) + ) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0420.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0420.ets new file mode 100644 index 0000000000000000000000000000000000000000..1c057c7a18cb24ed617377ff739a8dc3cbcf18b0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0420.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 ActionGesturePinchgesrureInterface0420 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State value: string = ''; + @State update: string = ''; + @State end: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.scaleValue = 1; + }) + Column() { + Text('PinchGesture scale:\n(' + this.value + ')') + } + .id('ActionGesturePinchgesrureInterface0420_001') + .height(200) + .width(200) + .padding(20) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({ fingers: 2 }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale * 0.05; + this.value = JSON.stringify(Math.round(event.scale)); + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + if (event) { + this.pinchValue = this.scaleValue; + this.end = 'PinchGesture onActionEnd'; + } + }) + ) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0430.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0430.ets new file mode 100644 index 0000000000000000000000000000000000000000..e5c892ee9b9a10d982e6cdd1272aa0dc0cec3a6e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0430.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 ActionGesturePinchgesrureInterface0430 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State value: string = ''; + @State update: string = ''; + @State end: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.scaleValue = 1; + }) + Column() { + Text('PinchGesture pinchCenterX:\n(' + this.value + ')') + } + .id('ActionGesturePinchgesrureInterface0430_001') + .height(200) + .width(200) + .padding(20) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({ fingers: 2 }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale * 0.05; + this.value = JSON.stringify(Math.round(event.pinchCenterX)); + } + }) + .onActionEnd((event: GestureEvent) => { + if (event) { + this.pinchValue = this.scaleValue; + this.end = 'PinchGesture onActionEnd'; + } + }) + ) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0440.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0440.ets new file mode 100644 index 0000000000000000000000000000000000000000..203972fe9ff9effd4a3501f39dfd4ab3295d51b6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0440.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. + */ +@Entry +@Component +struct ActionGesturePinchgesrureInterface0440 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State value: string = ''; + @State update: string = ''; + @State end: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.scaleValue = 1; + }) + Column() { + Text('PinchGesture pinchCenterY:\n(' + this.value + ')') + } + .id('ActionGesturePinchgesrureInterface0440_001') + .height(200) + .width(200) + .padding(20) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({ fingers: 2 }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale * 0.05; + this.value = JSON.stringify(Math.round(event.pinchCenterY)); + } + }) + .onActionEnd((event: GestureEvent) => { + if (event) { + this.pinchValue = this.scaleValue; + this.end = 'PinchGesture onActionEnd'; + } + }) + ) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0450.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0450.ets new file mode 100644 index 0000000000000000000000000000000000000000..a1e53a1a35100ca7c620c781196a8a201ea61786 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0450.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 ActionGesturePinchgesrureInterface0450 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State value: string = ''; + @State update: string = ''; + @State end: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.scaleValue = 1; + this.pinchValue = 1; + }) + Column() { + Text('PinchGesture fingerList:\n(' + this.value + ')') + } + .id('ActionGesturePinchgesrureInterface0450_001') + .height(200) + .width(200) + .padding(20) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({ fingers: 2 }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale * 0.05; + this.value = 'onActionUpdate'; + } + }) + .onActionEnd((event: GestureEvent) => { + if (event) { + this.pinchValue = this.scaleValue; + this.value += 'onActionUpdate'; + } + }) + ) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0460.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0460.ets new file mode 100644 index 0000000000000000000000000000000000000000..7eb24bc51a2b74e5b0ebe779951dbb9bdeae03e0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0460.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. + */ +@Entry +@Component +struct ActionGesturePinchgesrureInterface0460 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State value: string = ''; + @State update: string = ''; + @State end: string = ''; + + build() { + Column() { + Column() { + Text('PinchGesture timestamp:\n(' + this.value + ')') + } + .id('ActionGesturePinchgesrureInterface0460_001') + .height(200) + .width(200) + .padding(20) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({ fingers: 2 }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale * 0.05; + let date = new Date(event.timestamp * 1000); + this.value = date.getFullYear() + ''; + } + }) + .onActionEnd((event: GestureEvent) => { + if (event) { + this.pinchValue = this.scaleValue; + this.end = 'PinchGesture onActionEnd'; + } + }) + ) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0500.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0500.ets new file mode 100644 index 0000000000000000000000000000000000000000..a3aca51df878eca52621d1025f351e533fbaf3b5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0500.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. + */ +@Entry +@Component +struct ActionGesturePinchgesrureInterface0500 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State value: string = ''; + @State update: string = ''; + @State end: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.scaleValue = 1; + }) + Column() { + Text('PinchGesture pressure:\n(' + this.value + ')') + } + .id('ActionGesturePinchgesrureInterface0500_001') + .height(200) + .width(200) + .padding(20) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({ fingers: 2 }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale * 0.05; + this.value = JSON.stringify(Math.round(event.pressure)); + } + }) + .onActionEnd((event: GestureEvent) => { + if (event) { + this.pinchValue = this.scaleValue; + this.end = 'PinchGesture onActionEnd'; + } + }) + ) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0510.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0510.ets new file mode 100644 index 0000000000000000000000000000000000000000..cdaa4fc5200b5894e54e136dc05f314a21e49711 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0510.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 ActionGesturePinchgesrureInterface0510 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State value: string = ''; + @State update: string = ''; + @State end: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.scaleValue = 1; + }) + Column() { + Text('PinchGesture scale:\n(' + this.value + ')') + } + .id('ActionGesturePinchgesrureInterface0510_001') + .height(200) + .width(200) + .padding(20) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({ fingers: 2 }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale * 0.05; + } + }) + .onActionEnd((event: GestureEvent) => { + if (event) { + this.pinchValue = this.scaleValue; + this.value = JSON.stringify(Math.round(event.scale)); + } + }) + ) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0520.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0520.ets new file mode 100644 index 0000000000000000000000000000000000000000..a4f12d8ee3e44b795fea282fe8397c8f0905980d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0520.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 ActionGesturePinchgesrureInterface0520 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State value: string = ''; + @State update: string = ''; + @State end: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.scaleValue = 1; + }) + Column() { + Text('PinchGesture pinchCenterX:\n(' + this.value + ')') + } + .id('ActionGesturePinchgesrureInterface0520_001') + .height(200) + .width(200) + .padding(20) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({ fingers: 2 }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale * 0.05; + } + }) + .onActionEnd((event: GestureEvent) => { + if (event) { + this.pinchValue = this.scaleValue; + this.value = JSON.stringify(Math.round(event.pinchCenterX)); + } + }) + ) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0530.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0530.ets new file mode 100644 index 0000000000000000000000000000000000000000..50285b4bafa8bde6538bc617dab9a728ff904867 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0530.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 ActionGesturePinchgesrureInterface0530 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State value: string = ''; + @State update: string = ''; + @State end: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.scaleValue = 1; + }) + Column() { + Text('PinchGesture pinchCenterY:\n(' + this.value + ')') + } + .id('ActionGesturePinchgesrureInterface0530_001') + .height(200) + .width(200) + .padding(20) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({ fingers: 2 }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale * 0.05; + } + }) + .onActionEnd((event: GestureEvent) => { + if (event) { + this.pinchValue = this.scaleValue; + this.value = JSON.stringify(Math.round(event.pinchCenterY)); + } + }) + ) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0540.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0540.ets new file mode 100644 index 0000000000000000000000000000000000000000..fc19acdba06f2350ef4d2905b35969ccf5205e7d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0540.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. + */ +@Entry +@Component +struct ActionGesturePinchgesrureInterface0540 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State value: string = ''; + @State update: string = ''; + @State end: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.scaleValue = 1; + this.pinchValue = 1; + }) + Column() { + Text('PinchGesture fingerList:\n(' + this.value + ')') + } + .id('ActionGesturePinchgesrureInterface0540_001') + .height(200) + .width(200) + .padding(20) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({ fingers: 2 }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale * 0.05; + } + }) + .onActionEnd((event: GestureEvent) => { + if (event) { + this.pinchValue = this.scaleValue; + this.value = 'onActionEnd'; + } + }) + ) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0550.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0550.ets new file mode 100644 index 0000000000000000000000000000000000000000..8f983bc8900bd21141134eff1bbc0ceec15191d5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0550.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. + */ +@Entry +@Component +struct ActionGesturePinchgesrureInterface0550 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State value: string = ''; + @State update: string = ''; + @State end: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.scaleValue = 1; + }) + Column() { + Text('PinchGesture timestamp:\n(' + this.value + ')') + } + .id('ActionGesturePinchgesrureInterface0550_001') + .height(200) + .width(200) + .padding(20) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({ fingers: 2 }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale * 0.05; + } + }) + .onActionEnd((event: GestureEvent) => { + if (event) { + this.pinchValue = this.scaleValue; + let date = new Date(event.timestamp * 1000); + this.value = date.getFullYear() + ''; + } + }) + ) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0590.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0590.ets new file mode 100644 index 0000000000000000000000000000000000000000..32d9d1ef828f6f620758e1e0161ae79526d12414 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0590.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 ActionGesturePinchgesrureInterface0590 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State value: string = ''; + @State update: string = ''; + @State end: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.scaleValue = 1; + }) + Column() { + Text('PinchGesture pressure:\n(' + this.value + ')') + } + .id('ActionGesturePinchgesrureInterface0590_001') + .height(200) + .width(200) + .padding(20) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({ fingers: 2 }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale * 0.05; + } + }) + .onActionEnd((event: GestureEvent) => { + if (event) { + this.pinchValue = this.scaleValue; + this.value = JSON.stringify(Math.round(event.pressure)); + } + }) + ) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureJump/ActionGesturePinchgesrureJump0040.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureJump/ActionGesturePinchgesrureJump0040.ets new file mode 100644 index 0000000000000000000000000000000000000000..debfa4d3f81fac8937810f1329daaf46cee9194c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureJump/ActionGesturePinchgesrureJump0040.ets @@ -0,0 +1,66 @@ +/* + * 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 ActionGesturePinchgesrureJump0040 { + @State scaleValue: number = 1; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + @State count: number = 0; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.offsetX = 0; + this.offsetY = 0; + }) + Column() { + Text('PanGesture + LongPressGesture : offsetX' + this.offsetX + '\n') + Text('PanGesture + LongPressGesture : offsetY' + this.offsetY + '\n') + Text('PanGesture + LongPressGesture : count' + this.count + '\n') + } + + Button('PanGesture + LongPressGesture') + .id('ActionGesturePinchgesrureJump0040_001') + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(50) + .translate({ x: this.offsetX, y: this.offsetY, z: 0 }) + .gesture( + GestureGroup(GestureMode.Parallel, + PanGesture() + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX + this.offsetY = this.positionY + event.offsetY + } + }), + LongPressGesture() + .onAction((event) => { + if (event) { + this.count++; + } + }) + ) + ) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureJump/ActionGesturePinchgesrureJump0050.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureJump/ActionGesturePinchgesrureJump0050.ets new file mode 100644 index 0000000000000000000000000000000000000000..64ac01c1602f3ee85eb141415cb9f49ead3a2cf2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGesturePinchgesrureJump/ActionGesturePinchgesrureJump0050.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 ActionGesturePinchgesrureJump0050 { + @State scaleValue: number = 1; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + @State count: number = 0; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.offsetX = 0; + this.offsetY = 0; + }) + Column() { + Text('PanGesture + LongPressGesture : count' + this.count + '\n') + } + + Button('PanGesture + LongPressGesture') + .id('ActionGesturePinchgesrureJump0050_001') + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(50) + .translate({ x: this.offsetX, y: this.offsetY, z: 0 }) + .gesture( + GestureGroup(GestureMode.Parallel, + PanGesture() + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX + this.offsetY = this.positionY + event.offsetY + } + }), + LongPressGesture() + .onAction((event) => { + if (event) { + this.count++; + } + }) + ) + ) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0110.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0110.ets new file mode 100644 index 0000000000000000000000000000000000000000..333bb88e9e1a1bd11867e39e74148024791568fc --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0110.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 ActionGestureReplenishmentgertureInterface0110 { + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.offsetX = 0; + this.offsetY = 0; + }) + Column() { + Text('PanGesture offset:\nX: ' + this.offsetX + '\n' + 'Y: ' + this.offsetY) + } + .id('ActionGestureReplenishmentgertureInterface0110_001') + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(50) + .translate({ x: this.offsetX, y: this.offsetY, z: 0 }) + .gesture( + PanGesture({fingers: 1}) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX + this.offsetY = this.positionY + event.offsetY + } + }) + .onActionEnd(() => { + this.positionX = this.offsetX + this.positionY = this.offsetY + console.info('Pan end') + }) + ) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0120.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0120.ets new file mode 100644 index 0000000000000000000000000000000000000000..66cff2caf9bb9efe1a77e3094f0f0f623e43d2b4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0120.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 ActionGestureReplenishmentgertureInterface0120 { + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.offsetX = 0; + this.offsetY = 0; + }) + Column() { + Text('PanGesture offset:\nX: ' + this.offsetX + '\n' + 'Y: ' + this.offsetY) + } + .id('ActionGestureReplenishmentgertureInterface0120_001') + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(50) + .translate({ x: this.offsetX, y: this.offsetY, z: 0 }) + .gesture( + PanGesture({fingers: 1}) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX + this.offsetY = this.positionY + event.offsetY + } + }) + .onActionEnd(() => { + this.positionX = this.offsetX + this.positionY = this.offsetY + console.info('Pan end') + }) + ) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0140.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0140.ets new file mode 100644 index 0000000000000000000000000000000000000000..7f9105c03ae1ad4b0ddbb8c85a65badaefd7d39d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0140.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 ActionGestureReplenishmentgertureInterface0140 { + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + @State value: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.offsetX = 0; + this.offsetY = 0; + }) + Column() { + Text('PanGesture status: ' + this.value) + Text('PanGesture offset:\nX: ' + this.offsetX + '\n' + 'Y: ' + this.offsetY) + } + .id('ActionGestureReplenishmentgertureInterface0140_001') + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(50) + .translate({ x: this.offsetX, y: this.offsetY, z: 0 }) + .gesture( + PanGesture({fingers: 1}) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = Math.round(this.positionX + event.offsetX); + this.offsetY = Math.round(this.positionY + event.offsetY); + this.value = 'onActionUpdate succ'; + } + }) + .onActionEnd(() => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + }) + ) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0150.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0150.ets new file mode 100644 index 0000000000000000000000000000000000000000..ebb0fe85a5d5984029534d717fcf2ced0665207f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0150.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 ActionGestureReplenishmentgertureInterface0150 { + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + @State value: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.offsetX = 0; + this.offsetY = 0; + }) + Column() { + Text('PanGesture status: ' + this.value) + Text('PanGesture offset:\nX: ' + this.offsetX + '\n' + 'Y: ' + this.offsetY) + } + .id('ActionGestureReplenishmentgertureInterface0150_001') + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(50) + .translate({ x: this.offsetX, y: this.offsetY, z: 0 }) + .gesture( + PanGesture({fingers: 1}) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX + this.offsetY = this.positionY + event.offsetY + this.value = 'onActionUpdate succ'; + } + }) + .onActionEnd(() => { + this.positionX = this.offsetX + this.positionY = this.offsetY + }) + ) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0160.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0160.ets new file mode 100644 index 0000000000000000000000000000000000000000..2d4fe6cac99e3dd705b3d7172fe85880a31def77 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0160.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 ActionGestureReplenishmentgertureInterface0160 { + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + @State value: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.offsetX = 0; + this.offsetY = 0; + }) + Column() { + Text('PanGesture offset:\nX: ' + this.offsetX + '\n' + 'Y: ' + this.offsetY) + } + .id('ActionGestureReplenishmentgertureInterface0160_001') + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(50) + .translate({ x: this.offsetX, y: this.offsetY, z: 0 }) + .gesture( + PanGesture({fingers: 2}) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX + this.offsetY = this.positionY + event.offsetY + this.value = 'onActionUpdate succ'; + } + }) + .onActionEnd(() => { + this.positionX = this.offsetX + this.positionY = this.offsetY + console.info('Pan end') + }) + ) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0180.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0180.ets new file mode 100644 index 0000000000000000000000000000000000000000..7d6a5fea4f5a530467bf7652567330413a8c4834 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0180.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 ActionGestureReplenishmentgertureInterface0180 { + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + @State value: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.offsetX = 0; + this.offsetY = 0; + }) + Column() { + Text('PanGesture offset:\nX: ' + this.offsetX + '\n' + 'Y: ' + this.offsetY) + } + .id('ActionGestureReplenishmentgertureInterface0180_001') + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(50) + .translate({ x: this.offsetX, y: this.offsetY, z: 0 }) + .gesture( + PanGesture({fingers: 1}) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX + this.offsetY = this.positionY + event.offsetY + this.value = 'onActionUpdate succ'; + } + }) + .onActionEnd(() => { + this.positionX = this.offsetX + this.positionY = this.offsetY + console.info('Pan end') + }) + ) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0190.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0190.ets new file mode 100644 index 0000000000000000000000000000000000000000..a7cc8cd6768734bb6b3cd5d05dab60988624e308 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0190.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 ActionGestureReplenishmentgertureInterface0190 { + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + @State value: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.offsetX = 0; + this.offsetY = 0; + }) + Column() { + Text('PanGesture offset:\nX: ' + this.offsetX + '\n' + 'Y: ' + this.offsetY) + } + .id('ActionGestureReplenishmentgertureInterface0190_001') + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(50) + .translate({ x: this.offsetX, y: this.offsetY, z: 0 }) + .gesture( + PanGesture({fingers: 1}) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX + this.offsetY = this.positionY + event.offsetY + this.value = 'onActionUpdate succ'; + } + }) + .onActionEnd(() => { + this.positionX = this.offsetX + this.positionY = this.offsetY + console.info('Pan end') + }) + ) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0200.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0200.ets new file mode 100644 index 0000000000000000000000000000000000000000..c3173c96873f51f0f1369a27e24d7c9f8bef8afa --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0200.ets @@ -0,0 +1,40 @@ +/* + * 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 ActionGestureReplenishmentgertureInterface0200 { + @State value: string = ''; + + build() { + Column() { + Button('finger=2').fontSize(28) + .id('ActionGestureReplenishmentgertureInterface0200_001') + .gesture( + TapGesture({ fingers: 1 }) + .onAction((event: GestureEvent) => { + if (event) { + this.value += 'LongPressGesture success'; + } + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0210.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0210.ets new file mode 100644 index 0000000000000000000000000000000000000000..750835ae4b451c5894ac19260be8e25e917f69ee --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0210.ets @@ -0,0 +1,40 @@ +/* + * 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 ActionGestureReplenishmentgertureInterface0210 { + @State value: string = ''; + + build() { + Column() { + Button('finger=2').fontSize(28) + .id('ActionGestureReplenishmentgertureInterface0210_001') + .gesture( + TapGesture({ fingers: 1 }) + .onAction((event: GestureEvent) => { + if (event) { + this.value += 'LongPressGesture success'; + } + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0220.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0220.ets new file mode 100644 index 0000000000000000000000000000000000000000..0d5631a4c7278644de85991c585122f97dee55c3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0220.ets @@ -0,0 +1,40 @@ +/* + * 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 ActionGestureReplenishmentgertureInterface0220 { + @State value: string = ''; + + build() { + Column() { + Button('finger=2').fontSize(28) + .id('ActionGestureReplenishmentgertureInterface0220_001') + .gesture( + TapGesture({ fingers: 1 }) + .onAction((event: GestureEvent) => { + if (event) { + this.value += 'LongPressGesture success'; + } + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0230.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0230.ets new file mode 100644 index 0000000000000000000000000000000000000000..8240260ff44f82c25d698d05513de087f61db6ee --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0230.ets @@ -0,0 +1,40 @@ +/* + * 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 ActionGestureReplenishmentgertureInterface0230 { + @State value: string = ''; + + build() { + Column() { + Button('finger=2').fontSize(28) + .id('ActionGestureReplenishmentgertureInterface0230_001') + .gesture( + TapGesture({ fingers: 1 }) + .onAction((event: GestureEvent) => { + if (event) { + this.value += 'LongPressGesture success'; + } + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0250.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0250.ets new file mode 100644 index 0000000000000000000000000000000000000000..64fc62e489afcd72e45ccc08c2440367922b0b46 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0250.ets @@ -0,0 +1,40 @@ +/* + * 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 ActionGestureReplenishmentgertureInterface0250 { + @State value: string = ''; + + build() { + Column() { + Button('finger=2').fontSize(28) + .id('ActionGestureReplenishmentgertureInterface0250_001') + .gesture( + TapGesture({ fingers: 1 }) + .onAction((event: GestureEvent) => { + if (event) { + this.value += 'LongPressGesture success'; + } + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0260.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0260.ets new file mode 100644 index 0000000000000000000000000000000000000000..1ef6d21626990f29f18dda8404bacbb2d48700c6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0260.ets @@ -0,0 +1,41 @@ +/* + * 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 ActionGestureReplenishmentgertureInterface0260 { + @State count: number = 0 + + build() { + Column() { + Column() { + Text('LongPressGesture count: ' + this.count + '\n') + } + .id('ActionGestureReplenishmentgertureInterface0260_001') + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(50) + .gesture( + LongPressGesture({ fingers: 2 ,duration: 1}) + .onAction((event) => { + if (event) { + this.count++; + } + }) + ) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0270.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0270.ets new file mode 100644 index 0000000000000000000000000000000000000000..7e0cf8faecc5f6012cc6ac1fd9ec94a9bdf43439 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0270.ets @@ -0,0 +1,41 @@ +/* + * 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 ActionGestureReplenishmentgertureInterface0270 { + @State count: number = 0 + + build() { + Column() { + Column() { + Text('LongPressGesture count:\nX: ' + this.count + '\n') + } + .id('ActionGestureReplenishmentgertureInterface0270_001') + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(50) + .gesture( + LongPressGesture({ fingers: 2 ,duration: 1}) + .onAction((event) => { + if (event) { + this.count++; + } + }) + ) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0290.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0290.ets new file mode 100644 index 0000000000000000000000000000000000000000..17a601cd058ddd6aa271e76d4b43a88738943803 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0290.ets @@ -0,0 +1,41 @@ +/* + * 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 ActionGestureReplenishmentgertureInterface0290 { + @State count: number = 0 + + build() { + Column() { + Column() { + Text('LongPressGesture count:\nX: ' + this.count + '\n') + } + .id('ActionGestureReplenishmentgertureInterface0290_001') + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(50) + .gesture( + LongPressGesture({ fingers: 1 ,duration: 1}) + .onAction((event) => { + if (event) { + this.count++; + } + }) + ) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0310.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0310.ets new file mode 100644 index 0000000000000000000000000000000000000000..0600133d5445d04149e945303df883e5b7d2922f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0310.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 ActionGestureReplenishmentgertureInterface0310 { + @State arr: number[] = []; + @State speed: number = 0; + scrollerForList: Scroller = new Scroller(); + + aboutToAppear() { + for (let i = 0; i < 20; i++) { + this.arr.push(i) + } + } + + build() { + Column() { + Column() { + Text("SwipeGesture speed\n" + this.speed) + } + + Row() { + List({ space: 20, initialIndex: 3, scroller: this.scrollerForList }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%').height(100).fontSize(16) + .textAlign(TextAlign.Center) + } + .borderRadius(10).backgroundColor(0xFFFFFF) + .width('60%') + .height('80%') + }, (item: number) => JSON.stringify(item)) + } + .id('ActionGestureReplenishmentgertureInterface0310_001') + .chainAnimation(true) + .edgeEffect(EdgeEffect.Spring) + .listDirection(Axis.Horizontal) + .height('100%') + .width('100%') + .scrollSnapAlign(ScrollSnapAlign.CENTER) + .borderRadius(10) + .backgroundColor(0xDCDCDC) + .gesture( + SwipeGesture({ direction: SwipeDirection.Vertical }) + .onAction((event: GestureEvent) => { + if (event) { + this.speed = Math.round(event.speed); + } + }) + ) + } + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0320.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0320.ets new file mode 100644 index 0000000000000000000000000000000000000000..1e4c1c0c02f3a4f6087ea979253427827dac77b3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0320.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 ActionGestureReplenishmentgertureInterface0320 { + @State arr: number[] = []; + @State speed: number = 0; + scrollerForList: Scroller = new Scroller(); + + aboutToAppear() { + for (let i = 0; i < 20; i++) { + this.arr.push(i) + } + } + + build() { + Column() { + Column() { + Text("SwipeGesture speed\n" + this.speed) + } + + Row() { + List({ space: 20, initialIndex: 3, scroller: this.scrollerForList }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%').height(100).fontSize(16) + .textAlign(TextAlign.Center) + } + .borderRadius(10).backgroundColor(0xFFFFFF) + .width('60%') + .height('80%') + }, (item: number) => JSON.stringify(item)) + } + .id('ActionGestureReplenishmentgertureInterface0320_001') + .chainAnimation(true) + .edgeEffect(EdgeEffect.Spring) + .listDirection(Axis.Horizontal) + .height('100%') + .width('100%') + .scrollSnapAlign(ScrollSnapAlign.CENTER) + .borderRadius(10) + .backgroundColor(0xDCDCDC) + .gesture( + SwipeGesture({ direction: SwipeDirection.Vertical }) + .onAction((event: GestureEvent) => { + if (event) { + this.speed = Math.round(event.speed); + } + }) + ) + } + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0330.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0330.ets new file mode 100644 index 0000000000000000000000000000000000000000..9b9a6e36351ae823382929c6359c918a138a1ce4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0330.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 ActionGestureReplenishmentgertureInterface0330 { + @State Number: String[] = ['1','2', '3', '4'] + @State txt:string = '未触发回调' + + build() { + Column({ space: 5 }) { + Text("点击网格").margin(20) + Grid(){ + ForEach(this.Number,(day:string)=>{ + GridItem(){ + Text(day).fontSize(16).backgroundColor(0xF9CF93).width('100%').height('100%').textAlign(TextAlign.Center) + } + + },(day:string)=>day) + } + .gesture(TapGesture({count:1}) + .onAction((event?:GestureEvent)=>{ + this.txt = '已触发回调' + }) + ) + .id('grid') + .padding(20).margin('5%').border({width:3}) + .columnsTemplate('1fr 1fr') + .rowsTemplate('1fr 1fr') + .columnsGap(10) + .rowsGap(10) + .width('90%') + .backgroundColor(0xFAEE0) + .height(300) + + Text(this.txt).fontSize(30).margin({top: 20}) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0340.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0340.ets new file mode 100644 index 0000000000000000000000000000000000000000..d7cf7cdfd48746d5a035082cc050af01aecb7476 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0340.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 ActionGestureReplenishmentgertureInterface0340 { + @State Number: String[] = ['1','2', '3', '4'] + @State txt:string = '' + build() { + Column({ space: 5 }) { + Text("长按表格").margin(20) + Grid(){ + ForEach(this.Number,(day:string)=>{ + GridItem(){ + Text(day).fontSize(16).backgroundColor(0xF9CF93).width('100%').height('100%').textAlign(TextAlign.Center) + } + .id('grid'+day) + .gesture(LongPressGesture({repeat:false}) + .onAction((event?:GestureEvent)=>{ + this.txt = '触发长按' + }) + ) + },(day:string)=>day) + } + .padding(20).margin('5%').border({width:3}) + .columnsTemplate('1fr 1fr') + .rowsTemplate('1fr 1fr') + .columnsGap(10) + .rowsGap(10) + .width('90%') + .backgroundColor(0xFAEE0) + .height(300) + + Text(this.txt).fontSize(20).margin({top:20}) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0350.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0350.ets new file mode 100644 index 0000000000000000000000000000000000000000..3370259aa17cf65a4c4e712385b24d5b45353aa4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0350.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 { promptAction } from '@kit.ArkUI'; + +@Entry +@Component +struct ActionGestureReplenishmentgertureInterface0350 { + @State Number: String[] = ['1','2', '3', '4'] + @State offsetX:number=0 + @State offsetY:number=0 + @State positionX:number=0 + @State positionY:number=0 + @State txt:string = '' + + build() { + Column({ space: 5 }) { + Text("拖拽网格").margin(20) + Grid(){ + ForEach(this.Number,(day:string)=>{ + GridItem(){ + Text(day).fontSize(16).backgroundColor(0xF9CF93).width('100%').height('100%').textAlign(TextAlign.Center) + } + .id('grid'+day) + .translate({x:this.offsetX,y:this.offsetY,z:0}) + .gesture(PanGesture({direction:PanDirection.All}) + .onActionStart((event?:GestureEvent)=>{ + this.txt = '触发平移' + }) + .onActionUpdate((event?:GestureEvent)=>{ + if (event) { + this.offsetX=this.positionX+event.offsetX + this.offsetY=this.positionY+event.offsetY + + } + }) + .onActionEnd(()=>{ + this.positionX=this.offsetX + this.positionY=this.offsetY + console.info('PanEnd') + + }) + ) + + },(day:string)=>day) + } + .padding(20).margin('5%').border({width:3}) + .columnsTemplate('1fr 1fr') + .rowsTemplate('1fr 1fr') + .columnsGap(10) + .rowsGap(10) + .width('90%') + .backgroundColor(0xFAEE0) + .height(300) + + Text(this.txt).fontSize(20).margin({top:20}) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0360.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0360.ets new file mode 100644 index 0000000000000000000000000000000000000000..dd62c6efc0e126dbaa2000ab924bbad97ad56594 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0360.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. + */ + +import { promptAction } from '@kit.ArkUI'; + +@Entry +@Component +struct ActionGestureReplenishmentgertureInterface0360 { + @State Number: String[] = ['1','2', '3', '4'] + @State txt:string = '' + @State offsetX:number=0 + @State offsetY:number=0 + @State positionX:number=0 + @State positionY:number=0 + + build() { + Column({ space: 5 }) { + Text("滑动网格").margin(20) + Grid(){ + ForEach(this.Number,(day:string)=>{ + GridItem(){ + Text(day).fontSize(16).backgroundColor(0xF9CF93).width('100%').height('100%').textAlign(TextAlign.Center) + } + .id('grid'+day) + .gesture(SwipeGesture({direction:SwipeDirection.All}) + .onAction((event?:GestureEvent)=>{ + this.txt = '触发滑动' + }) + ) + + },(day:string)=>day) + } + .padding(20).margin('5%').border({width:3}) + .columnsTemplate('1fr 1fr') + .rowsTemplate('1fr 1fr') + .columnsGap(10) + .rowsGap(10) + .width('90%') + .backgroundColor(0xFAEE0) + .height(300) + + Text(this.txt).fontSize(20).margin({top: 20}) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0370.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0370.ets new file mode 100644 index 0000000000000000000000000000000000000000..5ab388950264a7aeb7452d67bf583e4eecb41275 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0370.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 ActionGestureReplenishmentgertureInterface0370 { + @State speed: number = 1; + @State speedSecond: number = 1; + + build() { + Column() { + Stack({ alignContent: Alignment.Bottom }) { + Text(this.speed + '').width('90%').height('100%').backgroundColor(0xd2cab3).align(Alignment.Top) + Text('Second child, show in top').width('70%').height('60%').backgroundColor(0xc1cbac).align(Alignment.Top) + } + .id('ActionGestureReplenishmentgertureInterface0370_001') + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(50) + .gesture( + SwipeGesture() + .onAction((event: GestureEvent) => { + if (event) { + this.speed = Math.round(event.speed); + } + }) + ) + + Stack({ alignContent: Alignment.Top }) { + Text('First Child').width('90%').height('100%').backgroundColor(0xd2cab3).align(Alignment.Top) + Text(this.speedSecond + '').width('70%').height('60%').backgroundColor(0xc1cbac).align(Alignment.Top) + } + .id('ActionGestureReplenishmentgertureInterface0370_002') + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(50) + .gesture( + SwipeGesture() + .onAction((event: GestureEvent) => { + if (event) { + this.speedSecond = Math.round(event.speed); + } + }) + ) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0380.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0380.ets new file mode 100644 index 0000000000000000000000000000000000000000..5d6cfc1f520fbb53ae3603d39c164b6e79d6c2e3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0380.ets @@ -0,0 +1,73 @@ +/* + * 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 ActionGestureReplenishmentgertureInterface0380 { + @State arr: number[] = [] + + @Styles + listCard() { + .backgroundColor(Color.White) + .height(72) + .width("100%") + .borderRadius(12) + } + + build() { + Scroll() { + Column() { + Text("Scroll Area") + .width("100%") + .height("40%") + .backgroundColor('#0080DC') + .textAlign(TextAlign.Center) + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + List({ space: 10 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text("item" + item) + .fontSize(16) + }.listCard() + }, (item: string) => item) + }.width("100%") + .edgeEffect(EdgeEffect.Spring) + .nestedScroll({ + scrollForward: NestedScrollMode.PARENT_FIRST, + scrollBackward: NestedScrollMode.SELF_FIRST + }) + }.tabBar("Tab1") + + TabContent() { + }.tabBar("Tab2") + } + .vertical(false) + .height("100%") + }.width("100%") + } + .edgeEffect(EdgeEffect.Spring) + .friction(0.6) + .backgroundColor('#DCDCDC') + .scrollBar(BarState.Off) + .width('100%') + .height('100%') + } + + aboutToAppear() { + for (let i = 0; i < 30; i++) { + this.arr.push(i) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0400.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0400.ets new file mode 100644 index 0000000000000000000000000000000000000000..d41d5f9909bc6feb2efc86fb180bcc6b375d78cf --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0400.ets @@ -0,0 +1,78 @@ +/* + * 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 ActionGestureReplenishmentgertureInterface0400 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State tap: string = ''; + @State value: string = ''; + @State value2: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.pinchX = 0; + this.pinchY = 0; + this.scaleValue = 1; + }) + Column() { + Text('PinchGesture + TapGesture scaleValue:\n: scaleValue' + this.scaleValue + '\n') + Text('PinchGesture + TapGesture offset:\nX: ' + this.pinchX + '\n' + 'Y: ' + this.pinchX) + Text('PinchGesture + TapGesture pinchCenterX:\ntap: ' + this.tap + '\n') + Text('PinchGesture: ' + this.value + '\n') + Text('TapGesture: ' + this.value2 + '\n') + } + + Button('PinchGesture + TapGesture') + .id('ActionGestureReplenishmentgertureInterface0400_001') + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(50) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + GestureGroup(GestureMode.Parallel, + TapGesture() + .onAction((event?: GestureEvent) => { + if (event) { + this.tap = event.pinchCenterX + ''; + this.value2 = 'TapGesture succ'; + } + }), + PinchGesture({ fingers: 2 }) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale * 0.1; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + this.value = 'PinchGesture succ'; + } + }) + .onActionEnd((event: GestureEvent) => { + this.pinchValue = this.scaleValue; + }) + ) + ) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0420.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0420.ets new file mode 100644 index 0000000000000000000000000000000000000000..43cef183d94974db65f917d067afca79b82eb418 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0420.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 ActionGestureReplenishmentgertureInterface0420 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State tap: string = ''; + + build() { + Column() { + Column() { + Text('PinchGesture + TapGesture scaleValue:\n: scaleValue' + this.scaleValue + '\n') + Text('PinchGesture + TapGesture offset:\nX: ' + this.pinchX + '\n' + 'Y: ' + this.pinchX) + Text('PinchGesture + TapGesture pinchCenterX:\ntap: ' + this.tap + '\n') + } + + Button('PinchGesture + TapGesture') + .id('ActionGestureReplenishmentgertureInterface0420_001') + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(50) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + GestureGroup(GestureMode.Parallel, + TapGesture() + .onAction((event?: GestureEvent) => { + if (event) { + this.tap = event.pinchCenterX + ''; + } + }), + PinchGesture({ fingers: 2 }) + .onActionStart((event: GestureEvent) => { + console.info('Pinch start') + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.pinchValue = this.scaleValue + console.info('Pinch end') + }) + ) + ) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0450.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0450.ets new file mode 100644 index 0000000000000000000000000000000000000000..79825fab08e4d6872363b173dd823908ab3bf64e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0450.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 ActionGestureReplenishmentgertureInterface0450 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State tap: string = ''; + + build() { + Column() { + Column() { + Text('PinchGesture + TapGesture scaleValue:\n: scaleValue' + this.scaleValue + '\n') + Text('PinchGesture + TapGesture offset:\nX: ' + this.pinchX + '\n' + 'Y: ' + this.pinchX) + Text('PinchGesture + TapGesture pinchCenterX:\ntap: ' + this.tap + '\n') + } + + Button('PinchGesture + TapGesture') + .id('ActionGestureReplenishmentgertureInterface0450_001') + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(50) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + GestureGroup(GestureMode.Sequence, + TapGesture() + .onAction((event?: GestureEvent) => { + if (event) { + this.tap = event.pinchCenterX + ''; + } + }), + PinchGesture({ fingers: 2 }) + .onActionStart((event: GestureEvent) => { + console.info('Pinch start') + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale + this.pinchX = event.pinchCenterX + this.pinchY = event.pinchCenterY + } + }) + .onActionEnd((event: GestureEvent) => { + this.pinchValue = this.scaleValue + console.info('Pinch end') + }) + ) + ) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0470.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0470.ets new file mode 100644 index 0000000000000000000000000000000000000000..e1d53306d869b96ce83ac120f9579d45374db7c7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0470.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 ActionGestureReplenishmentgertureInterface0470 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State tap: string = ''; + + build() { + Column() { + Column() { + Text('PinchGesture + TapGesture scaleValue:\n: scaleValue' + this.scaleValue + '\n') + Text('PinchGesture + TapGesture offset:\nX: ' + this.pinchX + '\n' + 'Y: ' + this.pinchX) + Text('PinchGesture + TapGesture pinchCenterX:\ntap: ' + this.tap + '\n') + } + + Button('PinchGesture + TapGesture') + .id('ActionGestureReplenishmentgertureInterface0470_001') + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(50) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + GestureGroup(GestureMode.Sequence, + TapGesture() + .onAction((event?: GestureEvent) => { + if (event) { + this.tap = event.pinchCenterX + ''; + } + }), + PinchGesture({ fingers: 2 }) + .onActionStart((event: GestureEvent) => { + console.info('Pinch start') + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale + this.pinchX = event.pinchCenterX + this.pinchY = event.pinchCenterY + } + }) + .onActionEnd((event: GestureEvent) => { + this.pinchValue = this.scaleValue + console.info('Pinch end') + }) + ) + ) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0520.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0520.ets new file mode 100644 index 0000000000000000000000000000000000000000..7939f4d6cea79020782d1564865d0df7e9188a48 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0520.ets @@ -0,0 +1,41 @@ +/* + * 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 ActionGestureReplenishmentgertureInterface0520 { + @State count: number = 0 + + build() { + Column() { + Column() { + Text('LongPressGesture count:\nX: ' + this.count + '\n') + } + .id('ActionGestureReplenishmentgertureInterface0260_001') + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(50) + .gesture( + LongPressGesture({ fingers: 2 ,duration: 1}) + .onAction((event) => { + if (event) { + this.count++; + } + }) + ) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0550.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0550.ets new file mode 100644 index 0000000000000000000000000000000000000000..0aae649d66b2924669544e95e6674a6e20f417d9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0550.ets @@ -0,0 +1,79 @@ +/* + * 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 ActionGestureReplenishmentgertureInterface0550 { + @State select: boolean = true + private iconStr: ResourceStr = $r("app.media.icon") + private iconStr2: ResourceStr = $r("app.media.app_icon") + + @Builder + SubMenu() { + Menu() { + MenuItem({ content: "复制", labelInfo: "Ctrl+C" }) + MenuItem({ content: "粘贴", labelInfo: "Ctrl+V" }) + } + } + + @Builder + MyMenu(){ + Menu() { + MenuItem({ startIcon: $r("app.media.icon"), content: "菜单选项" }) + MenuItem({ startIcon: $r("app.media.icon"), content: "菜单选项" }) + .enabled(false) + MenuItem({ + startIcon: this.iconStr, + content: "菜单选项", + endIcon: this.iconStr2, + builder: ():void=>this.SubMenu() + }) + MenuItemGroup({ header: '小标题' }) { + MenuItem({ + startIcon: this.iconStr, + content: "菜单选项", + endIcon: this.iconStr2, + builder: ():void=>this.SubMenu() + }) + MenuItem({ + startIcon: $r("app.media.app_icon"), + content: "菜单选项", + endIcon: this.iconStr2, + builder: ():void=>this.SubMenu() + }) + } + MenuItem({ + startIcon: this.iconStr, + content: "菜单选项", + }) + } + } + + build() { + Row() { + Column() { + Text('click to show menu') + .fontSize(18) + .fontWeight(FontWeight.Bold) + .id("ActionGestureReplenishmentgertureInterface0550") + } + .width('100%') + .height(300) + .margin({top:50}) + .bindMenu(this.MyMenu) + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0580.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0580.ets new file mode 100644 index 0000000000000000000000000000000000000000..b8ac7dfeaa6149d1238f4bb504cba1883b1a8be4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0580.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 ActionGestureReplenishmentgertureInterface0580 { + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + + build() { + Column() { + Column() { + Text('PanGesture offset:\nX: ' + this.offsetX + '\n' + 'Y: ' + this.offsetY) + } + .id('ActionGestureReplenishmentgertureInterface0580_001') + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(50) + .translate({ x: this.offsetX, y: this.offsetY, z: 0 }) + .gesture( + PanGesture({fingers: 2}) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX + this.offsetY = this.positionY + event.offsetY + } + }) + .onActionEnd(() => { + this.positionX = this.offsetX + this.positionY = this.offsetY + console.info('Pan end') + }) + ) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0010.ets new file mode 100644 index 0000000000000000000000000000000000000000..2e33e2b502c9666847c23f323cf913b6f50b1ab4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0010.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 ActionGestureRotationgestureInterface0010 { + @State angle: number = 0; + @State rotateValue: number = 0; + @State value: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.angle = 0; + }) + Button('RotationGesture') + .id('ActionGestureRotationgestureInterface0010_001') + .rotate({ angle: this.angle }) + .gesture( + RotationGesture() + .onActionStart((event: GestureEvent) => { + console.info('Rotation start') + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle; + this.value = 'RotationGesture succ'; + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle + }) + ) + Column() { + Text('RotationGesture angle:' + this.angle) + Text('RotationGesture status:' + this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(80) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0020.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0020.ets new file mode 100644 index 0000000000000000000000000000000000000000..a85b001f80fbdba732bf44d1457174caa29086cb --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0020.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 ActionGestureRotationgestureInterface0020 { + @State angle: number = 0; + @State rotateValue: number = 0; + @State value: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.angle = 0; + }) + Button('RotationGesture') + .id('ActionGestureRotationgestureInterface0020_001') + .rotate({ angle: this.angle }) + .gesture( + RotationGesture({}) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle; + this.value = 'RotationGesture succ'; + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle + console.info('Rotation end') + }) + ) + Column() { + Text('RotationGesture angle:' + this.angle) + Text('RotationGesture status:' + this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(80) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0030.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0030.ets new file mode 100644 index 0000000000000000000000000000000000000000..d288f3328d5e9382c7aed808c357f45988c972f6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0030.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 ActionGestureRotationgestureInterface0030 { + @State angle: number = 0; + @State rotateValue: number = 0; + @State value: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.angle = 0; + }) + Button('RotationGesture') + .id('ActionGestureRotationgestureInterface0030_001') + .rotate({ angle: this.angle }) + .gesture( + RotationGesture({angle: 10}) + .onActionStart((event: GestureEvent) => { + console.info('Rotation start') + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle + this.value = 'RotationGesture succ'; + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle + console.info('Rotation end') + }) + ) + Column() { + Text('RotationGesture angle:' + this.angle) + Text('RotationGesture status:' + this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(80) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0040.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0040.ets new file mode 100644 index 0000000000000000000000000000000000000000..8aa91b86686119c979f2959f05a4b5ce51009943 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0040.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 ActionGestureRotationgestureInterface0040 { + @State angle: number = 0; + @State rotateValue: number = 0; + @State text :string = ''; + + build() { + Column() { + Button('RotationGesture') + .id('ActionGestureRotationgestureInterface0040_001') + .rotate({ angle: this.angle }) + .gesture( + RotationGesture({angle: 10}) + .onActionStart((event: GestureEvent) => { + console.info('Rotation start') + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle; + this.text = 'success' + }) + ) + Column() { + Text('RotationGesture:' + this.text) + Button('restore') + .id('ActionGestureRotationgestureInterface0040_002') + .onClick(() =>{ + this.angle = 0; + this.rotateValue = 0; + }) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(80) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0050.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0050.ets new file mode 100644 index 0000000000000000000000000000000000000000..81a017f2fc81ab82a2d78470f7d46d46b6beaf06 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0050.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 ActionGestureRotationgestureInterface0050 { + @State angle: number = 0; + @State rotateValue: number = 0; + @State value: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.angle = 0; + }) + Button('RotationGesture') + .id('ActionGestureRotationgestureInterface0050_001') + .rotate({ angle: this.angle }) + .gesture( + RotationGesture({fingers: 0}) + .onActionStart((event: GestureEvent) => { + console.info('Rotation start') + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle + this.value = 'RotationGesture succ'; + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle + console.info('Rotation end') + }) + ) + Column() { + Text('RotationGesture angle:' + this.angle) + Text('RotationGesture status:' + this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(80) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0060.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0060.ets new file mode 100644 index 0000000000000000000000000000000000000000..37f13b39cf032e9370322f7f4531244ec0fdf8d1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0060.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. + */ +@Entry +@Component +struct ActionGestureRotationgestureInterface0060 { + @State angle: number = 0; + @State rotateValue: number = 0; + @State text :string = ''; + + build() { + Column() { + Button('RotationGesture') + .id('ActionGestureRotationgestureInterface0060_001') + .rotate({ angle: this.angle }) + .gesture( + RotationGesture({fingers: 3}) + .onActionStart((event: GestureEvent) => { + console.info('Rotation start') + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle; + this.text = 'success'; + }) + ) + Column() { + Text('RotationGesture angle:' + this.text) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(80) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0070.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0070.ets new file mode 100644 index 0000000000000000000000000000000000000000..25634a899883f350f9307ce59c38413814f98366 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0070.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 ActionGestureRotationgestureInterface0070 { + @State angle: number = 0; + @State rotateValue: number = 0; + @State value: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.angle = 0; + }) + Button('RotationGesture') + .id('ActionGestureRotationgestureInterface0070_001') + .rotate({ angle: this.angle }) + .gesture( + RotationGesture({fingers: 3}) + .onActionStart((event: GestureEvent) => { + console.info('Rotation start') + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle + this.value = 'RotationGesture succ'; + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle + console.info('Rotation end') + }) + ) + Column() { + Text('RotationGesture angle:' + this.angle) + Text('RotationGesture status:' + this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(80) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0080.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0080.ets new file mode 100644 index 0000000000000000000000000000000000000000..8e8b30b160a02038b8f43280655ee37c684e0454 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0080.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. + */ +@Entry +@Component +struct ActionGestureRotationgestureInterface0080 { + @State angle: number = 0; + @State rotateValue: number = 0; + @State text :string = ''; + + build() { + Column() { + Button('RotationGesture') + .id('ActionGestureRotationgestureInterface0080_001') + .rotate({ angle: this.angle }) + .gesture( + RotationGesture({fingers: 3}) + .onActionStart((event: GestureEvent) => { + console.info('Rotation start') + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle; + this.text = 'success' + }) + ) + Column() { + Text('RotationGesture angle:' + this.text) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(80) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0090.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0090.ets new file mode 100644 index 0000000000000000000000000000000000000000..b6c641891b91d599a4b0ed58f8765d8f667b944f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0090.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 ActionGestureRotationgestureInterface0090 { + @State angle: number = 0; + @State rotateValue: number = 0; + @State value: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.angle = 0; + }) + Button('RotationGesture') + .id('ActionGestureRotationgestureInterface0090_001') + .rotate({ angle: this.angle }) + .gesture( + RotationGesture({fingers: 5}) + .onActionStart((event: GestureEvent) => { + console.info('Rotation start') + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle + this.value = 'RotationGesture succ'; + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle + console.info('Rotation end') + }) + ) + Column() { + Text('RotationGesture angle:' + this.angle) + Text('RotationGesture status:' + this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(80) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0100.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0100.ets new file mode 100644 index 0000000000000000000000000000000000000000..b0ee4dbad31ae5fe93caba31cfd431d04db2fc66 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0100.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 ActionGestureRotationgestureInterface0100 { + @State angle: number = 0; + @State rotateValue: number = 0; + @State value: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.angle = 0; + }) + Button('RotationGesture') + .id('ActionGestureRotationgestureInterface0100_001') + .rotate({ angle: this.angle }) + .gesture( + RotationGesture({fingers: 6}) + .onActionStart((event: GestureEvent) => { + console.info('Rotation start') + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle + this.value = 'RotationGesture succ'; + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle + console.info('Rotation end') + }) + ) + Column() { + Text('RotationGesture angle:' + this.angle) + Text('RotationGesture status:' + this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(80) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0110.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0110.ets new file mode 100644 index 0000000000000000000000000000000000000000..ac46c4efa1b408822783c9ca0e782a6156b3fc3d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0110.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 ActionGestureRotationgestureInterface0110 { + @State angle: number = 0; + @State rotateValue: number = 0; + @State value: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.angle = 0; + }) + Button('RotationGesture') + .id('ActionGestureRotationgestureInterface0110_001') + .rotate({ angle: this.angle }) + .gesture( + RotationGesture({fingers: 3, angle: 20}) + .onActionStart((event: GestureEvent) => { + console.info('Rotation start') + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle + this.value = 'RotationGesture succ'; + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle + console.info('Rotation end') + }) + ) + Column() { + Text('RotationGesture angle:' + this.angle) + Text('RotationGesture status:' + this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(80) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0120.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0120.ets new file mode 100644 index 0000000000000000000000000000000000000000..b7754e095807880a7e63a7a80deab17dd1e35072 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0120.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 ActionGestureRotationgestureInterface0120 { + @State angle: number = 0; + @State rotateValue: number = 0; + @State value: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.angle = 0; + }) + Column() { + Text('RotationGesture angle:' + this.angle) + Text('RotationGesture status:' + this.value) + } + .id('ActionGestureRotationgestureInterface0120_001') + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(80) + .rotate({ angle: this.angle }) + .gesture( + RotationGesture() + .onActionStart((event: GestureEvent) => { + console.info('Rotation start') + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle + this.value = 'RotationGesture succ'; + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle + console.info('Rotation end') + }) + ) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0130.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0130.ets new file mode 100644 index 0000000000000000000000000000000000000000..2ef08b0d1f00d13ae459820d49eaf37207fbb0f9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0130.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 ActionGestureRotationgestureInterface0130 { + @State angle: number = 0; + @State rotateValue: number = 0; + @State value: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.angle = 0; + }) + Column() { + Text('RotationGesture angle:' + this.angle) + Text('RotationGesture status:' + this.value) + } + .id('ActionGestureRotationgestureInterface0130_001') + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(80) + .rotate({ angle: this.angle }) + .gesture( + RotationGesture() + .onActionStart((event: GestureEvent) => { + console.info('Rotation start') + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle + this.value = 'RotationGesture succ'; + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle + console.info('Rotation end') + }) + ) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0140.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0140.ets new file mode 100644 index 0000000000000000000000000000000000000000..d36a6df03a9931d3bb830b65c3b8fd83bb16c60e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0140.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 ActionGestureRotationgestureInterface0140 { + @State angle: number = 0; + @State rotateValue: number = 0; + @State logInfo: string = '' + + build() { + Column() { + Button('RotationGesture') + .id('ActionGestureRotationgestureInterface0140_001') + .rotate({ angle: this.angle }) + .gesture( + RotationGesture({angle: 10}) + .onActionStart((event: GestureEvent) => { + console.log('Rotation start') + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle + console.log('Rotation end'); + this.logInfo = 'Rotation end'; + }) + ) + Column() { + Text('RotationGesture onActionEndLog:' + this.logInfo) + } + .height(200) + .width('100%') + .padding(20) + .border({ width: 3 }) + .margin(80) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0150.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0150.ets new file mode 100644 index 0000000000000000000000000000000000000000..7bdf8a1c8ae94c5bac1ecd70eabdff01092802b2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0150.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 ActionGestureRotationgestureInterface0150 { + @State angle: number = 0; + @State rotateValue: number = 0; + @State logInfo: string = ''; + + build() { + Column() { + Button('RotationGesture') + .id('ActionGestureRotationgestureInterface0150_001') + .rotate({ angle: this.angle }) + .gesture( + RotationGesture({angle: 10}) + .onActionStart((event: GestureEvent) => { + console.log('Rotation start'); + this.logInfo = 'Rotation start'; + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle; + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle + console.info('Rotation end') + }) + ) + Column() { + Text('RotationGesture onActionStartLog:' + this.logInfo) + } + .height(200) + .width('100%') + .padding(20) + .border({ width: 3 }) + .margin(80) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0160.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0160.ets new file mode 100644 index 0000000000000000000000000000000000000000..125614a54309f5f915914699ac3ed37aef8ec241 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0160.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 ActionGestureRotationgestureInterface0160 { + @State angle: number = 0; + @State rotateValue: number = 0; + @State logInfo: string = ''; + + build() { + Column() { + Button('RotationGesture') + .id('ActionGestureRotationgestureInterface0160_001') + .rotate({ angle: this.angle }) + .gesture( + RotationGesture({angle: 10}) + .onActionStart((event: GestureEvent) => { + console.info('Rotation start'); + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle; + this.logInfo = 'Rotation onActionUpdate'; + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle; + console.info('Rotation end'); + }) + ) + Column() { + Text('RotationGesture onActionUpdateInfo:' + this.logInfo) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(80) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0170.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0170.ets new file mode 100644 index 0000000000000000000000000000000000000000..6bf6ccf533ec72452f5f6b6613ab97c882515b79 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0170.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 ActionGestureRotationgestureInterface0170 { + @State angle: number = 0; + @State rotateValue: number = 0; + @State value: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.angle = 0; + }) + Button('RotationGesture') + .id('ActionGestureRotationgestureInterface0170_001') + .rotate({ angle: this.angle }) + .gesture( + RotationGesture({angle: 10}) + .onActionStart((event: GestureEvent) => { + console.info('Rotation start') + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle + this.value = 'RotationGesture succ'; + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle + console.info('Rotation end') + }) + ) + Column() { + Text('RotationGesture angle:' + this.angle) + Text('RotationGesture status:' + this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(80) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0180.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0180.ets new file mode 100644 index 0000000000000000000000000000000000000000..dac3c19bc549b9c50b05b54691bada9251fc3986 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0180.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 ActionGestureRotationgestureInterface0180 { + @State angle: number = 0; + @State rotateValue: number = 0; + @State value: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.angle = 0; + }) + Button('RotationGesture') + .id('ActionGestureRotationgestureInterface0180_001') + .rotate({ angle: this.angle }) + .gesture( + RotationGesture({angle: 10}) + .onActionStart((event: GestureEvent) => { + console.info('Rotation start') + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle + this.value = 'RotationGesture succ'; + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle + console.info('Rotation end') + }) + ) + Column() { + Text('RotationGesture angle:' + this.angle) + Text('RotationGesture status:' + this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(80) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0190.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0190.ets new file mode 100644 index 0000000000000000000000000000000000000000..fec5dfc997df3661aa228879824b0f24e0e28f49 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0190.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 ActionGestureRotationgestureInterface0190 { + @State angle: number = 0; + @State rotateValue: number = 0; + @State logInfo: string = ''; + + build() { + Column() { + Button('RotationGesture') + .id('ActionGestureRotationgestureInterface0190_001') + .rotate({ angle: this.angle }) + .gesture( + RotationGesture({angle: 10}) + .onActionStart((event: GestureEvent) => { + console.log('Rotation start'); + this.logInfo = 'Rotation start'; + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle; + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle + console.info('Rotation end') + }) + ) + Column() { + Text('RotationGesture onActionStartLog:' + this.logInfo) + } + .height(200) + .width('100%') + .padding(20) + .border({ width: 3 }) + .margin(80) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0230.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0230.ets new file mode 100644 index 0000000000000000000000000000000000000000..f6e5a28fd0d2cca96181a13781679d80e11a8207 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0230.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 ActionGestureRotationgestureInterface0230 { + @State angle: number = 0; + @State rotateValue: number = 0; + @State logInfo: string = ''; + + build() { + Column() { + Button('RotationGesture') + .id('ActionGestureRotationgestureInterface0230_001') + .rotate({ angle: this.angle }) + .gesture( + RotationGesture({angle: 10}) + .onActionStart((event: GestureEvent) => { + console.log('Rotation start'); + this.logInfo = 'Rotation start'; + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle; + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle + console.info('Rotation end') + }) + ) + Column() { + Text('RotationGesture onActionStartLog:' + this.logInfo) + } + .height(200) + .width('100%') + .padding(20) + .border({ width: 3 }) + .margin(80) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0260.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0260.ets new file mode 100644 index 0000000000000000000000000000000000000000..b076550a7de5fb5ef9346d4469a3ad512dcc8653 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0260.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 ActionGestureRotationgestureInterface0260 { + @State angle: number = 0; + @State rotateValue: number = 0; + @State value: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.angle = 0; + }) + Button('RotationGesture') + .id('ActionGestureRotationgestureInterface0260_001') + .rotate({ angle: this.angle }) + .gesture( + RotationGesture({angle: 10}) + .onActionStart((event: GestureEvent) => { + console.info('Rotation start') + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle + this.value = 'RotationGesture succ'; + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle + console.info('Rotation end') + }) + ) + Column() { + Text('RotationGesture angle:' + this.angle) + Text('RotationGesture status:' + this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(80) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0270.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0270.ets new file mode 100644 index 0000000000000000000000000000000000000000..b762cc3602e41fd41a7ceb118074aee6e3acd726 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0270.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 ActionGestureRotationgestureInterface0270 { + @State angle: number = 0; + @State rotateValue: number = 0; + @State logInfo: string = ''; + + build() { + Column() { + Button('RotationGesture') + .id('ActionGestureRotationgestureInterface0270_001') + .rotate({ angle: this.angle }) + .gesture( + RotationGesture({angle: 10}) + .onActionStart((event: GestureEvent) => { + console.log('Rotation start'); + this.logInfo = 'Rotation start'; + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle; + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle + console.info('Rotation end') + }) + ) + Column() { + Text('RotationGesture onActionStartLog:' + this.logInfo) + } + .height(200) + .width('100%') + .padding(20) + .border({ width: 3 }) + .margin(80) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0310.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0310.ets new file mode 100644 index 0000000000000000000000000000000000000000..db8b9325d9776c3eecdc23fd1be492a3d3ef9a21 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0310.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 ActionGestureRotationgestureInterface0310 { + @State angle: number = 0; + @State rotateValue: number = 0; + @State value: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.angle = 0; + }) + Button('RotationGesture') + .id('ActionGestureRotationgestureInterface0310_001') + .rotate({ angle: this.angle }) + .gesture( + RotationGesture({angle: 10}) + .onActionStart((event: GestureEvent) => { + console.info('Rotation start') + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle + this.value = 'RotationGesture succ'; + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle + console.info('Rotation end') + }) + ) + Column() { + Text('RotationGesture angle:' + this.angle) + Text('RotationGesture status:' + this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(80) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0340.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0340.ets new file mode 100644 index 0000000000000000000000000000000000000000..82e39a57bc0c79e5ab19889e68a715092d43f4b5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0340.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 ActionGestureRotationgestureInterface0340 { + @State angle: number = 0; + @State rotateValue: number = 0; + @State value: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.angle = 0; + }) + Button('RotationGesture') + .id('ActionGestureRotationgestureInterface0340_001') + .rotate({ angle: this.angle }) + .gesture( + RotationGesture({angle: 10}) + .onActionStart((event: GestureEvent) => { + console.info('Rotation start') + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle + this.value = 'RotationGesture succ'; + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle + console.info('Rotation end') + }) + ) + Column() { + Text('RotationGesture angle:' + this.angle) + Text('RotationGesture status:' + this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(80) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0350.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0350.ets new file mode 100644 index 0000000000000000000000000000000000000000..066ba097dae00b42518e4cedc8938fca4dc9928e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0350.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 ActionGestureRotationgestureInterface0350 { + @State angle: number = 0; + @State rotateValue: number = 0; + @State value: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.angle = 0; + }) + Button('RotationGesture') + .id('ActionGestureRotationgestureInterface0350_001') + .rotate({ angle: this.angle }) + .gesture( + RotationGesture({angle: 10}) + .onActionStart((event: GestureEvent) => { + console.info('Rotation start') + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle + this.value = 'RotationGesture succ'; + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle + console.info('Rotation end') + }) + ) + Column() { + Text('RotationGesture angle:' + this.angle) + Text('RotationGesture status:' + this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(80) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0360.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0360.ets new file mode 100644 index 0000000000000000000000000000000000000000..1906817f086e463db79f50c5ac0b51d617c2bd73 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0360.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 ActionGestureRotationgestureInterface0360 { + @State angle: number = 0; + @State rotateValue: number = 0; + @State logInfo: string = ''; + + build() { + Column() { + Button('RotationGesture') + .id('ActionGestureRotationgestureInterface0360_001') + .rotate({ angle: this.angle }) + .gesture( + RotationGesture({angle: 10}) + .onActionStart((event: GestureEvent) => { + console.log('Rotation start'); + this.logInfo = 'Rotation start'; + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle; + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle + console.info('Rotation end') + }) + ) + Column() { + Text('RotationGesture onActionStartLog:' + this.logInfo) + } + .height(200) + .width('100%') + .padding(20) + .border({ width: 3 }) + .margin(80) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0400.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0400.ets new file mode 100644 index 0000000000000000000000000000000000000000..eb439eddd41759c78796c4cc57bf789e96772cdd --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0400.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 ActionGestureRotationgestureInterface0400 { + @State angle: number = 0; + @State rotateValue: number = 0; + @State value: string = ''; + + build() { + Column() { + Button('reset') + .id('reset') + .onClick(()=>{ + this.angle = 0; + }) + Button('RotationGesture') + .id('ActionGestureRotationgestureInterface0400_001') + .rotate({ angle: this.angle }) + .gesture( + RotationGesture({angle: 10}) + .onActionStart((event: GestureEvent) => { + console.info('Rotation start') + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle + this.value = 'RotationGesture succ'; + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle + console.info('Rotation end') + }) + ) + Column() { + Text('RotationGesture angle:' + this.angle) + Text('RotationGesture status:' + this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(80) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSpeedInterface/ActionGestureSpeedInterface0070.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSpeedInterface/ActionGestureSpeedInterface0070.ets new file mode 100644 index 0000000000000000000000000000000000000000..e07104470e18aecebab529f193bac63ac500c3fb --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSpeedInterface/ActionGestureSpeedInterface0070.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 UDC from '@ohos.data.unifiedDataChannel'; +import UTD from '@ohos.data.uniformTypeDescriptor'; + +@Entry +@Component +struct ActionGestureSpeedInterface0070 { + @State uri: string = "" + @State AblockArr: string[] = [] + @State BblockArr: string[] = [] + @State AVisible: Visibility = Visibility.Visible + @State dragSuccess :Boolean = false + + build() { + Column() { + Button('reset') + .id('reset') + Text('Image拖拽') + .width(100) + .height(100) + .border({ width: 1 }) + .visibility(this.AVisible) + .draggable(true) + .hitTestBehavior(HitTestMode.None) + .id('ActionGestureSpeedInterface0070') + .onDragLeave(() =>{ + + this.uri = 'onDragLeave'; + }) + .onDragStart(() => { + }) + .onDragEnd((event: DragEvent) => { + let ret = event.getResult(); + if(ret == 0) { + console.log("enter ret == 0") + this.AVisible = Visibility.Hidden; + } else { + console.log("enter ret != 0") + this.AVisible = Visibility.Visible; + } + }) + + Row() { + Column(){ + Text('不允许释放区域(显示不允许角标但可以释放)') + .fontSize('15dp') + .height('10%') + List(){ + ForEach(this.AblockArr, (item:string, index) => { + ListItem() { + Image(item) + .width(100) + .height(100) + .border({width: 1}) + } + .margin({ left: 30 , top : 30}) + }, (item:string) => item) + } + .height('90%') + .width('100%') + .allowDrop([UTD.UniformDataType.TEXT]) + .onDrop((event?: DragEvent, extraParams?: string) => { + this.uri = JSON.parse(extraParams as string).extraInfo; + this.AblockArr.splice(JSON.parse(extraParams as string).insertIndex, 0, this.uri); + }) + .border({width: 1}) + } + .height("50%") + .width("45%") + .border({ width: 1 }) + .margin({ left: 12 }) + Column(){ + Text('可释放区域') + .fontSize('15dp') + .height('10%') + List(){ + ForEach(this.BblockArr, (item:string, index) => { + ListItem() { + Image(item) + .width(100) + .height(100) + .border({width: 1}) + } + .margin({ left: 30 , top : 30}) + }, (item:string) => item) + } + .id('ActionGestureSpeedInterface0070_1') + .border({width: 1}) + .height('90%') + .width('100%') + .allowDrop([UTD.UniformDataType.IMAGE]) + .onDrop((event?: DragEvent, extraParams?: string) => { + console.log("enter onDrop") + let dragData:UnifiedData = (event as DragEvent).getData() as UnifiedData; + if(dragData != undefined) { + let arr:Array = dragData.getRecords(); + if(arr.length > 0) { + let image = arr[0] as UDC.Image; + this.uri = image.imageUri; + this.BblockArr.splice(JSON.parse(extraParams as string).insertIndex, 0, this.uri); + } else { + } + } else { + } + this.dragSuccess = true + }) + } + .height("50%") + .width("45%") + .border({ width: 1 }) + .margin({ left: 12 }) + } + }.width('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSpeedInterface/ActionGestureSpeedInterface0080.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSpeedInterface/ActionGestureSpeedInterface0080.ets new file mode 100644 index 0000000000000000000000000000000000000000..93ae79abffa59f0dc73b14333d8f57c7d2136fec --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSpeedInterface/ActionGestureSpeedInterface0080.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 UDC from '@ohos.data.unifiedDataChannel'; +import UTD from '@ohos.data.uniformTypeDescriptor'; + +@Entry +@Component +struct ActionGestureSpeedInterface0080 { + @State uri: string = "" + @State AblockArr: string[] = [] + @State BblockArr: string[] = [] + @State AVisible: Visibility = Visibility.Visible + @State dragSuccess :Boolean = false + + build() { + Column() { + Button('reset') + .id('reset') + Text('Image拖拽') + .width(100) + .height(100) + .border({ width: 1 }) + .visibility(this.AVisible) + .draggable(true) + .hitTestBehavior(HitTestMode.None) + .id('ActionGestureSpeedInterface0080') + .onDragLeave(() =>{ + + this.uri = 'onDragLeave'; + }) + .onDragStart(() => { + }) + .onDragEnd((event: DragEvent) => { + let ret = event.getResult(); + if(ret == 0) { + console.log("enter ret == 0") + this.AVisible = Visibility.Hidden; + } else { + console.log("enter ret != 0") + this.AVisible = Visibility.Visible; + } + }) + + Row() { + Column(){ + Text('不允许释放区域(显示不允许角标但可以释放)') + .fontSize('15dp') + .height('10%') + List(){ + ForEach(this.AblockArr, (item:string, index) => { + ListItem() { + Image(item) + .width(100) + .height(100) + .border({width: 1}) + } + .margin({ left: 30 , top : 30}) + }, (item:string) => item) + } + .height('90%') + .width('100%') + .allowDrop([UTD.UniformDataType.TEXT]) + .onDrop((event?: DragEvent, extraParams?: string) => { + this.uri = JSON.parse(extraParams as string).extraInfo; + this.AblockArr.splice(JSON.parse(extraParams as string).insertIndex, 0, this.uri); + }) + .border({width: 1}) + } + .height("50%") + .width("45%") + .border({ width: 1 }) + .margin({ left: 12 }) + Column(){ + Text('可释放区域') + .fontSize('15dp') + .height('10%') + List(){ + ForEach(this.BblockArr, (item:string, index) => { + ListItem() { + Image(item) + .width(100) + .height(100) + .border({width: 1}) + } + .margin({ left: 30 , top : 30}) + }, (item:string) => item) + } + .id('ActionGestureSpeedInterface0080_1') + .border({width: 1}) + .height('90%') + .width('100%') + .allowDrop([UTD.UniformDataType.IMAGE]) + .onDrop((event?: DragEvent, extraParams?: string) => { + console.log("enter onDrop") + let dragData:UnifiedData = (event as DragEvent).getData() as UnifiedData; + if(dragData != undefined) { + let arr:Array = dragData.getRecords(); + if(arr.length > 0) { + let image = arr[0] as UDC.Image; + this.uri = image.imageUri; + this.BblockArr.splice(JSON.parse(extraParams as string).insertIndex, 0, this.uri); + } else { + } + } else { + } + this.dragSuccess = true + }) + } + .height("50%") + .width("45%") + .border({ width: 1 }) + .margin({ left: 12 }) + } + }.width('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface0030.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface0030.ets new file mode 100644 index 0000000000000000000000000000000000000000..da991432895afa8fd153f48283b6bc490741d256 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface0030.ets @@ -0,0 +1,52 @@ +@Entry +@Component +struct ActionGestureSwipegestureInterface0030 { + @State fontColor: string = "#182431" + @State selectedFontColor: string = "#007DFF" + @State currentIndex: number[] = [0, 0, 0, 0, 0, 0, 0, 0, 0] + + @Builder + TabBuilder2(index: number, name: string, color: number) { + Column() { + Text(name).fontSize(16).lineHeight(22).margin({ top: 17 }).backgroundColor(Color.Pink) + } + .borderWidth(1) + .margin(2) + .width(90) + .height(400) + .backgroundColor(color) + + } + + build() { + Scroll() { + Column({ space: 10 }) { + + Tabs() { + TabContent() { + Column().width('100%').height('100%').backgroundColor('#00CB87') + }.tabBar(this.TabBuilder2(0, 'green', Color.Green)) + + TabContent() { + Column().width('100%').height('100%').backgroundColor('#007DFF') + }.tabBar(this.TabBuilder2(1, 'blue', Color.Blue)) + + TabContent() { + Column().width('100%').height('100%').backgroundColor('#007DFF') + }.tabBar(this.TabBuilder2(2, 'yellow', Color.Yellow)) + + TabContent() { + Column().width('100%').height('100%').backgroundColor('#007DFF') + }.tabBar(this.TabBuilder2(3, 'pink', Color.Pink)) + + } + .height(100) + .vertical(true) + } + .width('100%') + } + .width('100%') + .height('100%') + .align(Alignment.Top) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface10.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface10.ets new file mode 100644 index 0000000000000000000000000000000000000000..5e06710a683e41c0b65413e952e2a4790e14f4f2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface10.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 ActionGestureSwipegestureInterface10 { + @State value: string = ''; + @State rotateAngle: number = 0; + @State speed: number = 1; + + + build() { + Column() { + Button('onActionUpdate').height(100) + .id('ActionGestureSwipegestureInterface10') + .rotate({ angle: this.rotateAngle }) + .gesture( + SwipeGesture({ direction: SwipeDirection.All }) + .onAction((event: GestureEvent) => { + if (event) { + this.speed = event.speed; + this.rotateAngle = event.angle; + this.value += 'Swipe end'; + } + }) + ) + Text(this.value).margin({top:20}) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface100.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface100.ets new file mode 100644 index 0000000000000000000000000000000000000000..38e4a1888c69ecea74ff339d1818032803790eb9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface100.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 ActionGestureSwipegestureInterface100 { + @State value: string = ''; + @State rotateAngle: number = 0; + @State speed: number = 1; + + + build() { + Column() { + Button('SwipeDire0ction.All').height(100) + .id('ActionGestureSwipegestureInterface100') + .rotate({ angle: this.rotateAngle }) + .gesture( + SwipeGesture({ direction: SwipeDirection.All }) + .onAction((event: GestureEvent) => { + if (event) { + this.speed = event.speed; + this.rotateAngle = event.angle; + this.value += 'SwipeDire0ction.All'; + } + }) + ) + Text(this.value).margin({top:20}) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface110.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface110.ets new file mode 100644 index 0000000000000000000000000000000000000000..0ad1cceba1aed67510e2a4b71a7f1f6e5f700085 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface110.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 ActionGestureSwipegestureInterface110 { + @State value: string = ''; + @State rotateAngle: number = 0; + @State speed: number = 1; + + + build() { + Column() { + Button('SwipeDire0ction.Horizontal').height(100) + .id('ActionGestureSwipegestureInterface110') + .rotate({ angle: this.rotateAngle }) + .gesture( + SwipeGesture({ direction: SwipeDirection.Horizontal }) + .onAction((event: GestureEvent) => { + if (event) { + this.speed = event.speed; + this.rotateAngle = event.angle; + this.value += 'SwipeDire0ction.Horizontal'; + } + }) + ) + Text(this.value).margin({top:20}) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface140.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface140.ets new file mode 100644 index 0000000000000000000000000000000000000000..79e3337d625a1d0f4ba4284de86304878af1f6ab --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface140.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 ActionGestureSwipegestureInterface140 { + @State value: string = ''; + @State rotateAngle: number = 0; + @State speed: number = 1; + + + build() { + Column() { + Button('fingers: 0 ').height(100) + .id('ActionGestureSwipegestureInterface140') + .rotate({ angle: this.rotateAngle }) + .gesture( + SwipeGesture({ fingers: 0 }) + .onAction((event: GestureEvent) => { + if (event) { + this.speed = event.speed; + this.rotateAngle = event.angle; + this.value += 'fingers: 0 '; + } + }) + ) + Text(this.value).margin({top:20}) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface150.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface150.ets new file mode 100644 index 0000000000000000000000000000000000000000..9121e95852c26ca925d2b24ac13083624d997257 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface150.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 ActionGestureSwipegestureInterface150 { + @State value: string = ''; + @State rotateAngle: number = 0; + @State speed: number = 1; + + + build() { + Column() { + Button('fingers: 10 ').height(100) + .id('ActionGestureSwipegestureInterface150') + .rotate({ angle: this.rotateAngle }) + .gesture( + SwipeGesture({ fingers: 10 }) + .onAction((event: GestureEvent) => { + if (event) { + this.speed = event.speed; + this.rotateAngle = event.angle; + this.value += 'fingers: 10 '; + } + }) + ) + Text(this.value).margin({top:20}) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface160.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface160.ets new file mode 100644 index 0000000000000000000000000000000000000000..cdb78e86604497b5decdcd5114409b643646998a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface160.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 ActionGestureSwipegestureInterface160 { + @State value: string = ''; + @State rotateAngle: number = 0; + @State speed: number = 1; + + + build() { + Column() { + Button('fingers: 11 ').height(100) + .id('ActionGestureSwipegestureInterface160') + .rotate({ angle: this.rotateAngle }) + .gesture( + SwipeGesture({ fingers: 11 }) + .onAction((event: GestureEvent) => { + if (event) { + this.speed = event.speed; + this.rotateAngle = event.angle; + this.value += 'fingers: 1 '; + } + }) + ) + Text(this.value).margin({top:20}) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface170.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface170.ets new file mode 100644 index 0000000000000000000000000000000000000000..85e3799264c34696801ab5ae3e60dbe42d643778 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface170.ets @@ -0,0 +1,45 @@ +/* + * 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 ActionGestureSwipegestureInterface170 { + @State value: string = ''; + @State rotateAngle: number = 0; + @State speed: number = 1; + + build() { + Column() { + Button('fingers: 1 ').height(100) + .id('ActionGestureSwipegestureInterface170') + .rotate({ angle: this.rotateAngle }) + .gesture( + SwipeGesture({ fingers: 1 }) + .onAction((event: GestureEvent) => { + if (event) { + this.speed = event.speed; + this.rotateAngle = event.angle; + this.value += 'fingers: 1 '; + } + }) + ) + Text(this.value).margin({top:20}) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface180.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface180.ets new file mode 100644 index 0000000000000000000000000000000000000000..a2e727c22455d9009c3ffa6616d19780f413829d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface180.ets @@ -0,0 +1,45 @@ +/* + * 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 ActionGestureSwipegestureInterface180 { + @State value: string = ''; + @State rotateAngle: number = 0; + @State speed: number = 1; + + build() { + Column() { + Button('fingers: 2 ').height(100).fontSize(30) + .id('ActionGestureSwipegestureInterface180') + .rotate({ angle: this.rotateAngle }) + .gesture( + SwipeGesture({ fingers: 2 }) + .onAction((event: GestureEvent) => { + if (event) { + this.speed = event.speed; + this.rotateAngle = event.angle; + this.value += 'fingers: 2 '; + } + }) + ) + Text(this.value).margin({top:20}) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface20.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface20.ets new file mode 100644 index 0000000000000000000000000000000000000000..166afdf1a498cf167a87109ab3fca2be95bf466b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface20.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. + */ +@Entry +@Component +struct ActionGestureSwipegestureInterface0020 { + @State scaleValue: number = 1; + scroller: Scroller = new Scroller(); + @State vOutSetValueOne: number = 50; + + build() { + Column() { + Scroll(this.scroller) { + Slider({ + value: this.vOutSetValueOne, + style: SliderStyle.OutSet, + direction: Axis.Vertical + }) + .id('ActionGestureSwipegestureInterface0020_001') + } + .scrollable(ScrollDirection.Vertical) + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface210.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface210.ets new file mode 100644 index 0000000000000000000000000000000000000000..0458cb425cd3dc3b862d0c3dc78a73d8613d204c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface210.ets @@ -0,0 +1,45 @@ +/* + * 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 ActionGestureSwipegestureInterface210 { + @State value: string = ''; + @State rotateAngle: number = 0; + @State speed: number = 1; + + build() { + Column() { + Button('speed: 200').height(100).fontSize(30) + .id('ActionGestureSwipegestureInterface210') + .rotate({ angle: this.rotateAngle }) + .gesture( + SwipeGesture({ speed: 200 }) + .onAction((event: GestureEvent) => { + if (event) { + this.speed = event.speed; + this.rotateAngle = event.angle; + this.value += 'speed: 200 '; + } + }) + ) + Text(this.value).margin({top:20}) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface230.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface230.ets new file mode 100644 index 0000000000000000000000000000000000000000..960d54c653228c6e4734f0ac634094420c869a1c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface230.ets @@ -0,0 +1,45 @@ +/* + * 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 ActionGestureSwipegestureInterface230 { + @State value: string = ''; + @State rotateAngle: number = 0; + @State speed: number = 1; + + build() { + Column() { + Button('speed: 200').height(100).fontSize(30) + .id('ActionGestureSwipegestureInterface230') + .rotate({ angle: this.rotateAngle }) + .gesture( + SwipeGesture({ fingers:3,direction:SwipeDirection.Vertical,speed:200 }) + .onAction((event: GestureEvent) => { + if (event) { + this.speed = event.speed; + this.rotateAngle = event.angle; + this.value += 'speed: 200 '; + } + }) + ) + Text(this.value).margin({top:20}) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface270.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface270.ets new file mode 100644 index 0000000000000000000000000000000000000000..1aaaaadcbe2ae94dded034131ff110324c614cdc --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface270.ets @@ -0,0 +1,45 @@ +/* + * 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 ActionGestureSwipegestureInterface270 { + @State value: string = ''; + @State rotateAngle: number = 0; + @State speed: number = 1; + + build() { + Column() { + Button('SwipeDirection.Vertical').height(100).fontSize(30) + .id('ActionGestureSwipegestureInterface270') + .rotate({ angle: this.rotateAngle }) + .gesture( + SwipeGesture({ direction:SwipeDirection.Vertical }) + .onAction((event: GestureEvent) => { + if (event) { + this.speed = event.speed; + this.rotateAngle = event.angle; + this.value += 'SwipeDirection.Vertical '; + } + }) + ) + Text(this.value).margin({top:20}) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface290.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface290.ets new file mode 100644 index 0000000000000000000000000000000000000000..4405c3906050b7f1715bbfbbecda16fda0edfedc --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface290.ets @@ -0,0 +1,45 @@ +/* + * 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 ActionGestureSwipegestureInterface290 { + @State value: string = ''; + @State rotateAngle: number = 0; + @State speed: number = 1; + + build() { + Column() { + Button('speed: 100').height(100).fontSize(30) + .id('ActionGestureSwipegestureInterface290') + .rotate({ angle: this.rotateAngle }) + .gesture( + SwipeGesture({ speed:100 }) + .onAction((event: GestureEvent) => { + if (event) { + this.speed = event.speed; + this.rotateAngle = event.angle; + this.value += 'speed: 100 '; + } + }) + ) + Text(this.value).margin({top:20}) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface310.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface310.ets new file mode 100644 index 0000000000000000000000000000000000000000..ed30683084a64dcd76f2ab317b106a7a1442325d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface310.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 ActionGestureSwipegestureInterface310 { + @State value: string = ''; + @State rotateAngle: number = 0; + @State speed: number = 1; + + + build() { + Column() { + Button('onActionUpdate').height(100) + .id('ActionGestureSwipegestureInterface310') + .rotate({ angle: this.rotateAngle }) + .gesture( + SwipeGesture({ direction: SwipeDirection.All }) + .onAction((event: GestureEvent) => { + if (event) { + this.speed = event.speed; + this.rotateAngle = event.angle; + this.value += 'angle' + event.angle; + } + }) + ) + Text(this.value).margin({top:20}) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface340.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface340.ets new file mode 100644 index 0000000000000000000000000000000000000000..ca13d49b5740238815a4797a94695efab5bfc16d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface340.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 ActionGestureSwipegestureInterface340 { + @State value: string = ''; + @State rotateAngle: number = 0; + @State speed: number = 1; + + + build() { + Column() { + Button('onActionUpdate').height(100) + .id('ActionGestureSwipegestureInterface340') + .rotate({ angle: this.rotateAngle }) + .gesture( + SwipeGesture({ direction: SwipeDirection.All }) + .onAction((event: GestureEvent) => { + if (event) { + this.speed = event.speed; + this.rotateAngle = event.angle; + this.value += 'timestamp =' + event.timestamp; + } + }) + ) + Text(this.value).margin({top:20}) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface40.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface40.ets new file mode 100644 index 0000000000000000000000000000000000000000..ca9b2fc249ae761e50f8ca62144b3e24f4d57b79 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface40.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 ActionGestureSwipegestureInterface40 { + @State value: string = ''; + @State rotateAngle: number = 0; + @State speed: number = 1; + + + build() { + Column() { + Button('onActionUpdate').height(100) + .id('ActionGestureSwipegestureInterface40') + .rotate({ angle: this.rotateAngle }) + .gesture( + SwipeGesture() + .onAction((event: GestureEvent) => { + if (event) { + this.speed = event.speed; + this.rotateAngle = event.angle; + this.value += 'Swipe end'; + } + }) + ) + Text(this.value).margin({top:20}) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface50.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface50.ets new file mode 100644 index 0000000000000000000000000000000000000000..a99e28f9b56792acb5f3a171346f74c4747606aa --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface50.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 ActionGestureSwipegestureInterface50 { + @State value: string = ''; + @State rotateAngle: number = 0; + @State speed: number = 1; + + + build() { + Column() { + Button('onActionUpdate').height(100) + .id('ActionGestureSwipegestureInterface50') + .rotate({ angle: this.rotateAngle }) + .gesture( + SwipeGesture({}) + .onAction((event: GestureEvent) => { + if (event) { + this.speed = event.speed; + this.rotateAngle = event.angle; + this.value += 'Swipe end'; + } + }) + ) + Text(this.value).margin({top:20}) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface60.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface60.ets new file mode 100644 index 0000000000000000000000000000000000000000..a5a41c47e6a64ee5d4cd6bafde1d6686252fb4ca --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface60.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 ActionGestureSwipegestureInterface60 { + @State value: string = ''; + @State rotateAngle: number = 0; + @State speed: number = 1; + + + build() { + Column() { + Button('onActionUpdate').height(100) + .id('ActionGestureSwipegestureInterface60') + .rotate({ angle: this.rotateAngle }) + .gesture( + SwipeGesture({ direction: SwipeDirection.All }) + .onAction((event: GestureEvent) => { + if (event) { + this.speed = event.speed; + this.rotateAngle = event.angle; + this.value += 'onAction'; + } + }) + ) + Text(this.value).margin({top:20}) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface70.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface70.ets new file mode 100644 index 0000000000000000000000000000000000000000..e46c002112ca95d00593cdafd92ba5ff4d1cb362 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface70.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 ActionGestureSwipegestureInterface70 { + @State value: string = ''; + @State rotateAngle: number = 0; + @State speed: number = 1; + + + build() { + Column() { + Button('SwipeDire0ction.Vertical').height(100) + .id('ActionGestureSwipegestureInterface70') + .rotate({ angle: this.rotateAngle }) + .gesture( + SwipeGesture({ direction: SwipeDirection.Vertical }) + .onAction((event: GestureEvent) => { + if (event) { + this.speed = event.speed; + this.rotateAngle = event.angle; + this.value += 'SwipeDire0ction.Vertical'; + } + }) + ) + Text(this.value).margin({top:20}) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface0210.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface0210.ets new file mode 100644 index 0000000000000000000000000000000000000000..6b82e1a553a5db7edb9babd6dd8c9c7cbd1d52a1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface0210.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 ActionGestureTapgeatureIntureface0210 { + @State value: string = ''; + build() { + Column() { + Button('count=2').fontSize(28) + .id('ActionGestureTapgeatureIntureface0210_001') + .gesture( + TapGesture({fingers:1}) + .onAction((event: GestureEvent) => { + if (event) { + this.value += 'TapGesture success'; + } + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface0220.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface0220.ets new file mode 100644 index 0000000000000000000000000000000000000000..8d3f769710a830731b8c253e1e575769f9dce80e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface0220.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 ActionGestureTapgeatureIntureface0220 { + @State value: string = ''; + build() { + Column() { + Button('count=2').fontSize(28) + .id('ActionGestureTapgeatureIntureface0220_001') + .gesture( + TapGesture({fingers:1}) + .onAction((event: GestureEvent) => { + if (event) { + this.value += 'TapGesture success'; + } + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface0230.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface0230.ets new file mode 100644 index 0000000000000000000000000000000000000000..b0b213733b85e4d97c3654e0ce7fbbd95e92086c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface0230.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 ActionGestureTapgeatureIntureface0230 { + @State value: string = ''; + build() { + Column() { + Button('count=2').fontSize(28) + .id('ActionGestureTapgeatureIntureface0230_001') + .gesture( + TapGesture({fingers:1}) + .onAction((event: GestureEvent) => { + if (event) { + this.value += 'TapGesture success'; + } + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface0240.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface0240.ets new file mode 100644 index 0000000000000000000000000000000000000000..5ef36c58a77d2c2406c8c7a9f435f87cd07a08f1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface0240.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 ActionGestureTapgeatureIntureface0240 { + @State value: string = ''; + build() { + Column() { + Button('count=2').fontSize(28) + .id('ActionGestureTapgeatureIntureface0240_001') + .gesture( + TapGesture({fingers:1}) + .onAction((event: GestureEvent) => { + if (event) { + this.value += 'TapGesture success'; + } + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface0250.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface0250.ets new file mode 100644 index 0000000000000000000000000000000000000000..2aa0f2f6815c1e791b735650e2d9a9c849c2f771 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface0250.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 ActionGestureTapgeatureIntureface0250 { + @State value: string = ''; + build() { + Column() { + Button('count=2').fontSize(28) + .id('ActionGestureTapgeatureIntureface0250_001') + .gesture( + TapGesture({fingers:1}) + .onAction((event: GestureEvent) => { + if (event) { + this.value += 'TapGesture success'; + } + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface0260.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface0260.ets new file mode 100644 index 0000000000000000000000000000000000000000..aba9a244ed0a2c50b95c74822ca0f18b9f5e2649 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface0260.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 ActionGestureTapgeatureIntureface0260 { + @State value: string = ''; + build() { + Column() { + Button('count=2 ').fontSize(28) + .id('ActionGestureTapgeatureIntureface0260_001') + .gesture( + TapGesture({fingers:1}) + .onAction((event: GestureEvent) => { + if (event) { + this.value += 'TapGesture success'; + } + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface0290.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface0290.ets new file mode 100644 index 0000000000000000000000000000000000000000..5c9ac9497b0a24ab669ef77c51c8dc1c4a29d101 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface0290.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 ActionGestureTapgeatureIntureface0290 { + @State txt:string = '上方组件未响应' + @State txt1:string = '下方组件未响应' + build() { + Column() { + Row() { + Text(this.txt).fontSize(20) + } + .id('up') + .height(100) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + .gesture( + TapGesture({ count: 2 }) + .onAction((event?: GestureEvent) => { + this.txt = '上方组件已响应双击' + + }) + ) + + Row() { + Text(this.txt1).fontSize(20) + } + .id('next') + .height(100) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + .onClick(() => { + this.txt1 = '下方组件已响应点击事件' + }) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface0300.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface0300.ets new file mode 100644 index 0000000000000000000000000000000000000000..e6c9dce300c62a4e219ae1be75b74571f8deba82 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface0300.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. + */ +@Entry +@Component +struct ActionGestureTapgeatureIntureface0300 { + @State txt:string = '多次双击上方组件' + @State txt1:string = '单指移动下方组件' + build() { + Column() { + Row() { + Text(this.txt).fontSize(20) + } + .id('up') + .height(100) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + .gesture( + TapGesture({ count: 2 }) + .onAction((event?: GestureEvent) => { + this.txt = '上方组件已响应双击' + }) + ) + + Row() { + Text(this.txt1).fontSize(20) + } + .id('next') + .height(100) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + .draggable(true) + .onDrop(()=>{}) + .onDragStart(() => {}) + .onDragMove(() => { + this.txt1 = '下方组件已移动' + }) + + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface0310.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface0310.ets new file mode 100644 index 0000000000000000000000000000000000000000..f4e0a8af63cf702815d597e57dda6e33933957d5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface0310.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 ActionGestureTapgeatureIntureface0310 { + @State txt:string = '上方组件未响应' + @State txt1:string = '下方组件未响应' + build() { + Column() { + Row() { + Text(this.txt).fontSize(20) + } + .id('up') + .height(100) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + .gesture( + TapGesture({ count: 2 }) + .onAction((event?: GestureEvent) => { + this.txt = '上方组件已响应双击' + }) + ) + + Row() { + Text(this.txt1).fontSize(20) + } + .id('next') + .height(100) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + .gesture( + TapGesture({ count: 1 }) + .onAction((event?: GestureEvent) => { + this.txt1 = '下方组件已响应点击事件' + }) + ) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface0320.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface0320.ets new file mode 100644 index 0000000000000000000000000000000000000000..f750bdd87b013a3bb03fa689bd05710cee209a52 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface0320.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. + */ +@Entry +@Component +struct ActionGestureTapgeatureIntureface0320 { + @State txt:string = '点击上方组件' + @State txt1:string = '多次点击下方组件' + build() { + Column() { + Row() { + Text(this.txt).fontSize(20) + } + .id('up') + .height(100) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + .gesture( + TapGesture({ count: 1 }) + .onAction((event?: GestureEvent) => { + this.txt = '上方组件已响应点击' + }) + ) + + Row() { + Text(this.txt1).fontSize(20) + } + .id('next') + .height(100) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + .onClick(() => { + this.txt1 = '下方组件已响应点击事件' + }) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface10.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface10.ets new file mode 100644 index 0000000000000000000000000000000000000000..f73ae2a3509fa55b042fe1ed24d79dd6c05df946 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface10.ets @@ -0,0 +1,40 @@ +/* + * 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 ActionGestureTapgeatureIntureface10 { + @State value: string = ''; + + build() { + Column() { + Button('Click ').fontSize(28) + .id('ActionGestureTapgeatureIntureface10') + .gesture( + TapGesture({ count: 1 }) + .onAction((event: GestureEvent) => { + if (event) { + this.value = 'Action'; + } + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface100.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface100.ets new file mode 100644 index 0000000000000000000000000000000000000000..c4b2b57f5be1c07c2d2ee063d330eadd835e38db --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface100.ets @@ -0,0 +1,40 @@ +/* + * 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 ActionGestureTapgeatureIntureface100 { + @State value: string = ''; + + build() { + Column() { + Button('Click ').fontSize(28) + .id('ActionGestureTapgeatureIntureface100') + .gesture( + TapGesture({count:3}) + .onAction((event: GestureEvent) => { + if (event) { + this.value += 'TapGesture success'; + } + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface140.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface140.ets new file mode 100644 index 0000000000000000000000000000000000000000..612cbd49a2e598e1f8e82dfac2ee48689a697d0a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface140.ets @@ -0,0 +1,40 @@ +/* + * 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 ActionGestureTapgeatureIntureface140 { + @State value: string = ''; + + build() { + Column() { + Button('fingers:10 ').fontSize(28) + .id('ActionGestureTapgeatureIntureface140') + .gesture( + TapGesture({fingers:10,count:1}) + .onAction((event: GestureEvent) => { + if (event) { + this.value += 'TapGesture success'; + } + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface150.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface150.ets new file mode 100644 index 0000000000000000000000000000000000000000..84c5208e3b1120fae55c3611f9aeb118b4046339 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface150.ets @@ -0,0 +1,40 @@ +/* + * 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 ActionGestureTapgeatureIntureface150 { + @State value: string = ''; + + build() { + Column() { + Button('fingers:1 ').fontSize(28) + .id('ActionGestureTapgeatureIntureface150') + .gesture( + TapGesture({fingers:1}) + .onAction((event: GestureEvent) => { + if (event) { + this.value += 'TapGesture success'; + } + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface160.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface160.ets new file mode 100644 index 0000000000000000000000000000000000000000..1645c5dd77e8a103150d43442d9bec33378d4f19 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface160.ets @@ -0,0 +1,40 @@ +/* + * 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 ActionGestureTapgeatureIntureface160 { + @State value: string = ''; + + build() { + Column() { + Button('fingers:0 ').fontSize(28) + .id('ActionGestureTapgeatureIntureface160') + .gesture( + TapGesture({fingers:0}) + .onAction((event: GestureEvent) => { + if (event) { + this.value += 'TapGesture success'; + } + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface170.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface170.ets new file mode 100644 index 0000000000000000000000000000000000000000..f3105a1e7517361bf781e2eddfd62c76bb04df31 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface170.ets @@ -0,0 +1,40 @@ +/* + * 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 ActionGestureTapgeatureIntureface170 { + @State value: string = ''; + + build() { + Column() { + Button('fingers:11 ').fontSize(28) + .id('ActionGestureTapgeatureIntureface170') + .gesture( + TapGesture({fingers:11}) + .onAction((event: GestureEvent) => { + if (event) { + this.value += 'TapGesture success'; + } + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface180.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface180.ets new file mode 100644 index 0000000000000000000000000000000000000000..2b3409936594965739cc0c7fafcda7043a60f4ac --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface180.ets @@ -0,0 +1,40 @@ +/* + * 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 ActionGestureTapgeatureIntureface180 { + @State value: string = ''; + + build() { + Column() { + Button('fingers:2 ').fontSize(28) + .id('ActionGestureTapgeatureIntureface180') + .gesture( + TapGesture({fingers:2}) + .onAction((event: GestureEvent) => { + if (event) { + this.value += 'TapGesture success'; + } + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface20.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface20.ets new file mode 100644 index 0000000000000000000000000000000000000000..8712df973a212eeb4d15c9be9eb485bb00a1a26c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface20.ets @@ -0,0 +1,40 @@ +/* + * 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 ActionGestureTapgeatureIntureface20 { + @State value: string = ''; + + build() { + Column() { + Button('Click ').fontSize(28) + .id('ActionGestureTapgeatureIntureface20') + .gesture( + TapGesture({ fingers: 4 ,count:3}) + .onAction((event: GestureEvent) => { + if (event) { + this.value = 'TapGesture success'; + } + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface330.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface330.ets new file mode 100644 index 0000000000000000000000000000000000000000..236ef49c108df7624ff1bee7b432d1f3edf86397 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface330.ets @@ -0,0 +1,40 @@ +/* + * 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 ActionGestureTapgeatureIntureface330 { + @State value: string = ''; + + build() { + Column() { + Text('Click ').fontSize(28) + .id('ActionGestureTapgeatureIntureface330') + .gesture( + TapGesture({ count: 1 }) + .onAction((event: GestureEvent) => { + if (event) { + this.value = JSON.stringify(event.fingerList[0]); + } + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface340.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface340.ets new file mode 100644 index 0000000000000000000000000000000000000000..1fd69d78ba64e983be391583898cfe565d98ab36 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface340.ets @@ -0,0 +1,40 @@ +/* + * 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 ActionGestureTapgeatureIntureface340 { + @State value: string = ''; + + build() { + Column() { + Text('Click ').fontSize(28) + .id('ActionGestureTapgeatureIntureface340') + .gesture( + TapGesture({ count: 1 }) + .onAction((event: GestureEvent) => { + if (event) { + this.value = 'TapGesture timestamp:'+event.timestamp; + } + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface380.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface380.ets new file mode 100644 index 0000000000000000000000000000000000000000..207e0caac9e0e696efb1c4fb1eead6c7cdbae407 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface380.ets @@ -0,0 +1,40 @@ +/* + * 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 ActionGestureTapgeatureIntureface380 { + @State value: string = ''; + + build() { + Column() { + Text('Click ').fontSize(28) + .id('ActionGestureTapgeatureIntureface380') + .gesture( + TapGesture({ count: 1 }) + .onAction((event: GestureEvent) => { + if (event) { + this.value = 'onAction success'; + } + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface390.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface390.ets new file mode 100644 index 0000000000000000000000000000000000000000..29cde6f8ea1f5af5dd6beada7ec068c12e10ca0e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface390.ets @@ -0,0 +1,40 @@ +/* + * 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 ActionGestureTapgeatureIntureface390 { + @State value: string = ''; + + build() { + Column() { + Text('Click ').fontSize(28) + .id('ActionGestureTapgeatureIntureface390') + .gesture( + TapGesture({ count: 1 }) + .onAction((event: GestureEvent) => { + if (event) { + this.value = 'TapGesture{pressure:'+event.pressure; + } + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface60.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface60.ets new file mode 100644 index 0000000000000000000000000000000000000000..4d540e18b795c52f1ef823b18d25cd609f5b515e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface60.ets @@ -0,0 +1,40 @@ +/* + * 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 ActionGestureTapgeatureIntureface60 { + @State value: string = ''; + + build() { + Column() { + Button('Click ').fontSize(28) + .id('ActionGestureTapgeatureIntureface60') + .gesture( + TapGesture() + .onAction((event: GestureEvent) => { + if (event) { + this.value = 'TapGesture success'; + } + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface70.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface70.ets new file mode 100644 index 0000000000000000000000000000000000000000..41d6d2c1852247fb75d550bb67df1eda224fbeb9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface70.ets @@ -0,0 +1,40 @@ +/* + * 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 ActionGestureTapgeatureIntureface70 { + @State value: string = ''; + + build() { + Column() { + Button('Click ').fontSize(28) + .id('ActionGestureTapgeatureIntureface70') + .gesture( + TapGesture({}) + .onAction((event: GestureEvent) => { + if (event) { + this.value = 'TapGesture success'; + } + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface80.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface80.ets new file mode 100644 index 0000000000000000000000000000000000000000..9aba0a25c1c7e11c8fec0e059b08aa383255180d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface80.ets @@ -0,0 +1,40 @@ +/* + * 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 ActionGestureTapgeatureIntureface80 { + @State value: string = ''; + + build() { + Column() { + Button('Click ').fontSize(28) + .id('ActionGestureTapgeatureIntureface80') + .gesture( + TapGesture({count:0}) + .onAction((event: GestureEvent) => { + if (event) { + this.value = 'TapGesture success'; + } + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface90.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface90.ets new file mode 100644 index 0000000000000000000000000000000000000000..41d4d85dabdddae370783e921f5b2fde05fcd1be --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface90.ets @@ -0,0 +1,40 @@ +/* + * 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 ActionGestureTapgeatureIntureface90 { + @State value: string = ''; + + build() { + Column() { + Button('Click ').fontSize(28) + .id('ActionGestureTapgeatureIntureface90') + .gesture( + TapGesture({count:1}) + .onAction((event: GestureEvent) => { + if (event) { + this.value = 'TapGesture success'; + } + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgestureDfx/ActionGestureTapgestureDfx0010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgestureDfx/ActionGestureTapgestureDfx0010.ets new file mode 100644 index 0000000000000000000000000000000000000000..37466328e8b732de27c13aa9ae27cdef2c8634c1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgestureDfx/ActionGestureTapgestureDfx0010.ets @@ -0,0 +1,33 @@ +/* + * 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 ActionGestureTapgestureDfx0010 { + @State num: string = "" + + build() { + Column({ space: 10 }) { + Button("点击300").onClick((event: ClickEvent) => { + this.num = "点击" + }) + .margin(10).id("ActionGestureTapgestureDfx0010") + + Text(this.num) + + }.width('100%').height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgestureDfx/ActionGestureTapgestureDfx0020.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgestureDfx/ActionGestureTapgestureDfx0020.ets new file mode 100644 index 0000000000000000000000000000000000000000..f5c54d994ecff7586d657526ff4f7c03b6f386df --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTapgestureDfx/ActionGestureTapgestureDfx0020.ets @@ -0,0 +1,33 @@ +/* + * 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 ActionGestureTapgestureDfx0020 { + @State num: string = "" + + build() { + Column({ space: 10 }) { + Button("点击300").onClick((event: ClickEvent) => { + this.num = "点击" + }) + .margin(10).id("ActionGestureTapgestureDfx0020") + + Text(this.num) + + }.width('100%').height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface10.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface10.ets new file mode 100644 index 0000000000000000000000000000000000000000..065a21d6609b6c9d4f9ad5cd996dd6f475aebcd0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface10.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 ActionGestureTouchpadInterface10 { + @State angle: number = 0; + @State rotateValue: number = 0; + + build() { + Column() { + Button('RotationGesture angle:') + .id('ActionGestureTouchpadInterface10') + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(80) + .rotate({ angle: this.angle }) + .gesture( + RotationGesture() + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle; + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle; + }) + ) + + Button('restore') + .id('ActionGestureTouchpadInterface10_1') + .onClick(() =>{ + this.angle = 0; + this.rotateValue = 0; + }) + }.width('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface100.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface100.ets new file mode 100644 index 0000000000000000000000000000000000000000..2a95a02889e551d89593132dc66da37f6bac8ffb --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface100.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 ActionGestureTouchpadInterface100 { + @State angle: number = 0; + @State rotateValue: number = 0; + + build() { + Column() { + Button('RotationGesture angle') + .id('ActionGestureTouchpadInterface100') + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(80) + .rotate({ angle: this.angle }) + .gesture( + RotationGesture({fingers:2}) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle; + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle; + }) + ) + + Button('restore') + .id('ActionGestureTouchpadInterface100_1') + .onClick(() =>{ + this.angle = 0; + this.rotateValue = 0; + }) + }.width('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface140.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface140.ets new file mode 100644 index 0000000000000000000000000000000000000000..d197040c193b6ef0d0aaabb04df7f86de64de200 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface140.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 ActionGestureTouchpadInterface140 { + @State angle: number = 0; + @State rotateValue: number = 0; + + build() { + Column() { + Button('RotationGesture angle') + .id('ActionGestureTouchpadInterface140') + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(80) + .rotate({ angle: this.angle }) + .gesture( + RotationGesture({fingers:2,angle:20}) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle; + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle; + }) + ) + Button('restore') + .id('ActionGestureTouchpadInterface140_1') + .onClick(() =>{ + this.angle = 0; + this.rotateValue = 0; + }) + }.width('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface150.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface150.ets new file mode 100644 index 0000000000000000000000000000000000000000..3f5da7d012cf27f67b5c8456a3c4f30ee8e45f4f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface150.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 ActionGestureTouchpadInterface150 { + @State angle: number = 0; + @State rotateValue: number = 0; + + build() { + Column() { + Button('RotationGesture angle') + .id('ActionGestureTouchpadInterface150') + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(80) + .rotate({ angle: this.angle }) + .gesture( + RotationGesture({fingers:2,angle:20}) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle; + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle; + }) + ) + Button('restore') + .id('ActionGestureTouchpadInterface150_1') + .onClick(() =>{ + this.angle = 0; + this.rotateValue = 0; + }) + }.width('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface170.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface170.ets new file mode 100644 index 0000000000000000000000000000000000000000..42ccf3baefb785f0fea90c882268f14dd69beecd --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface170.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 ActionGestureTouchpadInterface170 { + @State angle: number = 0; + @State rotateValue: number = 0; + @State text: string = 'RotationGesture angle'; + + build() { + Column() { + Button(this.text) + .id('ActionGestureTouchpadInterface170') + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(80) + .rotate({ angle: this.angle }) + .gesture( + RotationGesture({fingers:2}) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle; + this.text = 'local:'+Math.round(event.fingerList[0].localX); + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle; + }) + ) + Button('restore') + .id('ActionGestureTouchpadInterface170_1') + .onClick(() =>{ + this.angle = 0; + this.rotateValue = 0; + }) + }.width('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface180.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface180.ets new file mode 100644 index 0000000000000000000000000000000000000000..0173a05ea63e2203bc47f1c95d334956438b404a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface180.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 ActionGestureTouchpadInterface180 { + @State angle: number = 0; + @State rotateValue: number = 0; + @State text: string = 'RotationGesture angle'; + + build() { + Column() { + Button(this.text) + .id('ActionGestureTouchpadInterface180') + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(80) + .rotate({ angle: this.angle }) + .gesture( + RotationGesture({fingers:2}) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle; + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle; + this.text = 'local:'+Math.round(event.fingerList[0].localX); + }) + ) + Button('restore') + .id('ActionGestureTouchpadInterface180_1') + .onClick(() =>{ + this.angle = 0; + this.rotateValue = 0; + }) + }.width('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface190.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface190.ets new file mode 100644 index 0000000000000000000000000000000000000000..d8a7251ea57986e737cec192f58fe0f52ce307a0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface190.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 ActionGestureTouchpadInterface190 { + @State angle: number = 0; + @State rotateValue: number = 0; + @State text: string = 'RotationGesture angle'; + + build() { + Column() { + Button(this.text) + .id('ActionGestureTouchpadInterface190') + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(80) + .rotate({ angle: this.angle }) + .gesture( + RotationGesture({fingers:2}) + .onActionStart((event: GestureEvent) => { + this.text = 'local:'+Math.round(event.fingerList[0].localX); + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle; + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle; + }) + ) + Button('restore') + .id('ActionGestureTouchpadInterface190_1') + .onClick(() =>{ + this.angle = 0; + this.rotateValue = 0; + }) + }.width('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface20.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface20.ets new file mode 100644 index 0000000000000000000000000000000000000000..634e8ea6f8190a9f7caf48b64e1594f6356ca4a7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface20.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 ActionGestureTouchpadInterface20 { + @State angle: number = 0; + @State rotateValue: number = 0; + + build() { + Column() { + Button('RotationGesture angle:') + .id('ActionGestureTouchpadInterface20') + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(80) + .rotate({ angle: this.angle }) + .gesture( + RotationGesture({}) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle; + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle; + }) + ) + Button('restore') + .id('ActionGestureTouchpadInterface20_1') + .onClick(() =>{ + this.angle = 0; + this.rotateValue = 0; + }) + }.width('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface200.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface200.ets new file mode 100644 index 0000000000000000000000000000000000000000..39f5dd9b4ce386f0bd78540b97f6d2ea443de19a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface200.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 ActionGestureTouchpadInterface200 { + @State angle: number = 0; + @State rotateValue: number = 0; + @State text: string = 'RotationGesture angle'; + + build() { + Column() { + Button(this.text) + .id('ActionGestureTouchpadInterface200') + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(80) + .rotate({ angle: this.angle }) + .gesture( + RotationGesture({fingers:2}) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle; + this.text = 'RotationGesture{sourceTool::'+event.sourceTool; + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle; + }) + ) + Button('restore') + .id('ActionGestureTouchpadInterface200_1') + .onClick(() =>{ + this.angle = 0; + this.rotateValue = 0; + }) + }.width('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface210.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface210.ets new file mode 100644 index 0000000000000000000000000000000000000000..8d073f5f5b7144ffc6b8129546fb2f6a06c18543 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface210.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 ActionGestureTouchpadInterface210 { + @State angle: number = 0; + @State rotateValue: number = 0; + @State text: string = 'RotationGesture angle'; + + build() { + Column() { + Button(this.text) + .id('ActionGestureTouchpadInterface210') + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(80) + .rotate({ angle: this.angle }) + .gesture( + RotationGesture({fingers:2}) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle; + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle; + this.text = 'RotationGesture{sourceTool::'+event.sourceTool; + }) + ) + Button('restore') + .id('ActionGestureTouchpadInterface210_1') + .onClick(() =>{ + this.angle = 0; + this.rotateValue = 0; + }) + }.width('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface220.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface220.ets new file mode 100644 index 0000000000000000000000000000000000000000..7d3569bc85b74d72a907af4de9db0574bf84510d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface220.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 ActionGestureTouchpadInterface220 { + @State angle: number = 0; + @State rotateValue: number = 0; + @State text: string = 'RotationGesture angle'; + + build() { + Column() { + Button(this.text) + .id('ActionGestureTouchpadInterface220') + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(80) + .rotate({ angle: this.angle }) + .gesture( + RotationGesture({fingers:2}) + .onActionStart((event: GestureEvent) => { + this.text = 'RotationGesture{sourceTool::'+event.sourceTool; + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle; + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle; + }) + ) + Button('restore') + .id('ActionGestureTouchpadInterface220_1') + .onClick(() =>{ + this.angle = 0; + this.rotateValue = 0; + }) + }.width('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface230.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface230.ets new file mode 100644 index 0000000000000000000000000000000000000000..d6603dca269b666044cef0cf39540e88c8234985 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface230.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 ActionGestureTouchpadInterface230 { + @State angle: number = 0; + @State rotateValue: number = 0; + @State text: string = 'RotationGesture angle'; + + build() { + Column() { + Button(this.text) + .id('ActionGestureTouchpadInterface230') + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(80) + .rotate({ angle: this.angle }) + .gesture( + RotationGesture({fingers:2}) + .onActionStart((event: GestureEvent) => { + this.text = 'pressure:'+event.pressure; + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle; + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle; + }) + ) + Button('restore') + .id('ActionGestureTouchpadInterface230_1') + .onClick(() =>{ + this.angle = 0; + this.rotateValue = 0; + }) + }.width('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface240.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface240.ets new file mode 100644 index 0000000000000000000000000000000000000000..c6cc71e84dfeb4ac3bd6479580aa6ae25453c5fb --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface240.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 ActionGestureTouchpadInterface240 { + @State angle: number = 0; + @State rotateValue: number = 0; + @State text: string = 'RotationGesture angle'; + + build() { + Column() { + Button(this.text) + .id('ActionGestureTouchpadInterface240') + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(80) + .rotate({ angle: this.angle }) + .gesture( + RotationGesture({fingers:2}) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle; + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle; + this.text = 'pressure:'+event.pressure; + }) + ) + Button('restore') + .id('ActionGestureTouchpadInterface240_1') + .onClick(() =>{ + this.angle = 0; + this.rotateValue = 0; + }) + }.width('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface250.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface250.ets new file mode 100644 index 0000000000000000000000000000000000000000..53a3506c03b85d176b19530826c4e42cf0bddb58 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface250.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 ActionGestureTouchpadInterface250 { + @State angle: number = 0; + @State rotateValue: number = 0; + @State text: string = 'RotationGesture angle'; + + build() { + Column() { + Button(this.text) + .id('ActionGestureTouchpadInterface250') + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(80) + .rotate({ angle: this.angle }) + .gesture( + RotationGesture({fingers:2}) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle; + this.text = 'pressure:'+event.pressure; + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle; + }) + ) + Button('restore') + .id('ActionGestureTouchpadInterface250_1') + .onClick(() =>{ + this.angle = 0; + this.rotateValue = 0; + }) + }.width('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface260.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface260.ets new file mode 100644 index 0000000000000000000000000000000000000000..5df9a38b9c4ce0fc8c4f3356608651c26c401ed6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface260.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 ActionGestureTouchpadInterface260 { + @State angle: number = 0; + @State rotateValue: number = 0; + @State text: string = 'RotationGesture angle'; + + build() { + Column() { + Button(this.text) + .id('ActionGestureTouchpadInterface260') + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(80) + .rotate({ angle: this.angle }) + .gesture( + RotationGesture({fingers:2}) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle; + this.text = 'RotationGesture{timestamp::'+ Math.round(event.timestamp); + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle; + }) + ) + Button('restore') + .id('ActionGestureTouchpadInterface260_1') + .onClick(() =>{ + this.angle = 0; + this.rotateValue = 0; + }) + }.width('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface270.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface270.ets new file mode 100644 index 0000000000000000000000000000000000000000..d3e49bcfbb5a27d843c48dde5b8be0f5ff11c063 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface270.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 ActionGestureTouchpadInterface270 { + @State angle: number = 0; + @State rotateValue: number = 0; + @State text: string = 'RotationGesture angle'; + + build() { + Column() { + Button(this.text) + .id('ActionGestureTouchpadInterface270') + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(80) + .rotate({ angle: this.angle }) + .gesture( + RotationGesture({fingers:2}) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle; + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle; + this.text = 'RotationGesture{sourceTool::'+ Math.round(event.timestamp ); + }) + ) + Button('restore') + .id('ActionGestureTouchpadInterface270_1') + .onClick(() =>{ + this.angle = 0; + this.rotateValue = 0; + }) + }.width('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface280.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface280.ets new file mode 100644 index 0000000000000000000000000000000000000000..366b61118596ef6fc5d04af6059ed0572ee944b0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface280.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 ActionGestureTouchpadInterface280 { + @State angle: number = 0; + @State rotateValue: number = 0; + @State text: string = 'RotationGesture angle'; + + build() { + Column() { + Button(this.text) + .id('ActionGestureTouchpadInterface280') + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(80) + .rotate({ angle: this.angle }) + .gesture( + RotationGesture({fingers:2}) + .onActionStart((event: GestureEvent) => { + this.text = 'RotationGesture{sourceTool::'+ Math.round(event.timestamp ); + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle; + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle; + }) + ) + Button('restore') + .id('ActionGestureTouchpadInterface280_1') + .onClick(() =>{ + this.angle = 0; + this.rotateValue = 0; + }) + }.width('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface290.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface290.ets new file mode 100644 index 0000000000000000000000000000000000000000..38b446091f7c3cdb9ceae0fab132d898cd45435c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface290.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 ActionGestureTouchpadInterface290 { + @State angle: number = 0; + @State rotateValue: number = 0; + @State text: string = 'RotationGesture angle'; + + build() { + Column() { + Button(this.text) + .id('ActionGestureTouchpadInterface290') + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(80) + .rotate({ angle: this.angle }) + .gesture( + RotationGesture({fingers:2}) + .onActionStart((event: GestureEvent) => { + this.text = 'RotationGesture Start'; + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle; + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle; + }) + ) + Button('restore') + .id('ActionGestureTouchpadInterface290_1') + .onClick(() =>{ + this.angle = 0; + this.rotateValue = 0; + }) + }.width('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface30.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface30.ets new file mode 100644 index 0000000000000000000000000000000000000000..4f81ac2afc822f4d4d8cfb48cf99d8c8c8645dd5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface30.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 ActionGestureTouchpadInterface30 { + @State angle: number = 0; + @State rotateValue: number = 0; + + build() { + Column() { + Button('RotationGesture angle:') + .id('ActionGestureTouchpadInterface30') + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(80) + .rotate({ angle: this.angle }) + .gesture( + RotationGesture({angle:5}) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle; + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle; + }) + ) + + Button('restore') + .id('ActionGestureTouchpadInterface30_1') + .onClick(() =>{ + this.angle = 0; + this.rotateValue = 0; + }) + }.width('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface300.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface300.ets new file mode 100644 index 0000000000000000000000000000000000000000..c4fa6bd3413cda12dc1dfbd7adc3f85d49a8f146 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface300.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 ActionGestureTouchpadInterface300 { + @State angle: number = 0; + @State rotateValue: number = 0; + @State text: string = 'RotationGesture angle'; + + build() { + Column() { + Button(this.text) + .id('ActionGestureTouchpadInterface300') + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(80) + .rotate({ angle: this.angle }) + .gesture( + RotationGesture({fingers:2}) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle; + this.text = 'RotationGesture Update'; + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle; + }) + ) + Button('restore') + .id('ActionGestureTouchpadInterface300_1') + .onClick(() =>{ + this.angle = 0; + this.rotateValue = 0; + }) + }.width('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface310.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface310.ets new file mode 100644 index 0000000000000000000000000000000000000000..5a80e5bcae5c19f5bd844d3509db3c08dc4da843 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface310.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 ActionGestureTouchpadInterface310 { + @State angle: number = 0; + @State rotateValue: number = 0; + @State text: string = 'RotationGesture angle'; + + build() { + Column() { + Button(this.text) + .id('ActionGestureTouchpadInterface310') + .fontSize(30) + .border({ width: 3 }) + .margin(80) + .rotate({ angle: this.angle }) + .gesture( + RotationGesture({fingers:2}) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle; + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle; + this.text = 'RotationGesture End'; + }) + ) + Button('restore') + .id('ActionGestureTouchpadInterface310_1') + .onClick(() =>{ + this.angle = 0; + this.rotateValue = 0; + }) + }.width('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface330.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface330.ets new file mode 100644 index 0000000000000000000000000000000000000000..14ac9f11ebfe1ad8f1f08e821e806f297fdf7aa0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface330.ets @@ -0,0 +1,66 @@ +/* + * 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. + */ +// xxx.ets +import UDC from '@ohos.data.unifiedDataChannel'; +import UTD from '@ohos.data.uniformTypeDescriptor'; + +@Entry +@Component +struct ActionGestureTouchpadInterface330 { + @State AVisible: Visibility = Visibility.Visible; + @State angle: number = 0; + @State rotateValue: number = 0; + @State text: string = 'PinchGesture'; + + build() { + Column() { + Text('Image拖拽') + .fontSize('30dp') + Column({ }) { + Image($r('app.media.icon')) + .id('ActionGestureTouchpadInterface330') + .width(300) + .height(300) + .focusable(true) + .border({ width: 1 }) + .visibility(this.AVisible) + .rotate({ angle: this.angle }) + .gesture( + RotationGesture({fingers:6}) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle; + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle; + }) + ) + Text(this.text).margin({top:50}) + } + Button('restore') + .id('ActionGestureTouchpadInterface330_1') + .onClick(() =>{ + this.angle = 0; + this.rotateValue = 0; + }) + .margin({ bottom: 20 }) + }.width('100%') + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface360.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface360.ets new file mode 100644 index 0000000000000000000000000000000000000000..1c8489b0dcf06f779f74512ed2d695a0d27a0b5b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface360.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 ActionGestureTouchpadInterface360 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State text: string = 'PinchGesture'; + + build() { + Column() { + Button('button') + .id('ActionGestureTouchpadInterface360') + .fontSize(30) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture() + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.pinchValue = this.scaleValue; + this.text = 'onActionEnd success'; + }) + ) + Button('restore') + .id('ActionGestureTouchpadInterface360_1') + .onClick(() =>{ + this.scaleValue = 1; + this.pinchValue = 1; + }) + Text(this.text).margin({top:50}) + }.width('100%') + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface370.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface370.ets new file mode 100644 index 0000000000000000000000000000000000000000..3917b7bef97ed40e9d2e8bc88aa04833a238b77f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface370.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 ActionGestureTouchpadInterface370 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State text: string = 'PinchGesture'; + + build() { + Column() { + Button('button') + .id('ActionGestureTouchpadInterface370') + .fontSize(30) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({}) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.pinchValue = this.scaleValue; + this.text = 'onActionEnd success'; + }) + ) + Button('restore') + .id('ActionGestureTouchpadInterface370_1') + .onClick(() =>{ + this.scaleValue = 1; + this.pinchValue = 1; + }) + Text(this.text).margin({top:50}) + }.width('100%') + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface380.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface380.ets new file mode 100644 index 0000000000000000000000000000000000000000..73067f2480598e33a5c059bd2b5b25c059c04a88 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface380.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. + */ +@Entry +@Component +struct ActionGestureTouchpadInterface380 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State text: string = 'PinchGesture'; + + build() { + Column() { + Button('button') + .id('ActionGestureTouchpadInterface380') + .fontSize(30) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({fingers:10}) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.pinchValue = this.scaleValue; + this.text = 'onActionEnd success'; + }) + ) + + Button('restore') + .id('ActionGestureTouchpadInterface380_1') + .onClick(()=>{ + this.scaleValue = 1; + this.pinchValue = 1; + }) + Text(this.text).margin({top:50}) + }.width('100%') + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface390.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface390.ets new file mode 100644 index 0000000000000000000000000000000000000000..d426f55b9edc3b6fc5b18023439cc42cbc73bdf0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface390.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. + */ +@Entry +@Component +struct ActionGestureTouchpadInterface390 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State text: string = 'PinchGesture'; + + build() { + Column() { + Button('button') + .id('ActionGestureTouchpadInterface390') + .fontSize(30) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({fingers:0}) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.pinchValue = this.scaleValue; + this.text = 'onActionEnd success'; + }) + ) + + Button('restore') + .id('ActionGestureTouchpadInterface390_1') + .onClick(()=>{ + this.scaleValue = 1; + this.pinchValue = 1; + }) + Text(this.text).margin({top:50}) + }.width('100%') + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface40.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface40.ets new file mode 100644 index 0000000000000000000000000000000000000000..825a972179a62a765a1771e89ecbefd4bb353a1a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface40.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 ActionGestureTouchpadInterface40 { + @State angle: number = 0; + @State rotateValue: number = 0; + @State text : string = ''; + + build() { + Column() { + Button('RotationGesture angle:'+ this.text) + .id('ActionGestureTouchpadInterface40') + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(80) + .rotate({ angle: this.angle }) + .gesture( + RotationGesture({angle:2}) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle; + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle; + this.text = '2' + }) + ) + + Button('restore') + .id('ActionGestureTouchpadInterface40_1') + .onClick(()=>{ + this.angle = 0; + }) + }.width('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface400.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface400.ets new file mode 100644 index 0000000000000000000000000000000000000000..fcf65e9eca70f49f881842c4ddbb0e656769442a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface400.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 ActionGestureTouchpadInterface400 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State text: string = 'PinchGesture'; + + build() { + Column() { + Button('button') + .id('ActionGestureTouchpadInterface400') + .fontSize(30) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({fingers:3}) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.pinchValue = this.scaleValue; + this.text = 'onActionEnd success'; + }) + ) + Button('restore') + .id('ActionGestureTouchpadInterface400_1') + .onClick(() =>{ + this.scaleValue = 1; + this.pinchValue = 1; + }) + Text(this.text).margin({top:50}) + }.width('100%') + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface410.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface410.ets new file mode 100644 index 0000000000000000000000000000000000000000..499cc88c3bc19f3ed0d1eccbd80b3c1d837617ed --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface410.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 ActionGestureTouchpadInterface410 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State text: string = 'PinchGesture'; + + build() { + Column() { + Button('button') + .id('ActionGestureTouchpadInterface410') + .fontSize(30) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({fingers:2}) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.pinchValue = this.scaleValue; + this.text = 'onActionEnd success'; + }) + ) + + + Button('restore') + .id('ActionGestureTouchpadInterface410_1') + .onClick(()=>{ + this.scaleValue = 1; + this.pinchValue = 1; + }) + Text(this.text).margin({top:50}) + }.width('100%') + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface470.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface470.ets new file mode 100644 index 0000000000000000000000000000000000000000..2249eeadf15fb5c7b5f2e66b02d31eb5e2ecab97 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface470.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 ActionGestureTouchpadInterface470 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State text: string = 'PinchGesture'; + + build() { + Column() { + Button('button') + .id('ActionGestureTouchpadInterface470') + .fontSize(30) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({fingers:2,distance:20}) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.pinchValue = this.scaleValue; + this.text = 'onActionEnd success'; + }) + ) + Button('restore') + .id('ActionGestureTouchpadInterface470_1') + .onClick(() =>{ + this.scaleValue = 1; + this.pinchValue = 1; + }) + Text(this.text).margin({top:50}) + }.width('100%') + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface480.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface480.ets new file mode 100644 index 0000000000000000000000000000000000000000..59960b457e161404271496833f1dd29cc82fb3a0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface480.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 ActionGestureTouchpadInterface480 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State text: string = 'PinchGesture'; + + build() { + Column() { + Button('button') + .id('ActionGestureTouchpadInterface480') + .fontSize(30) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({fingers:3,distance:20}) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.pinchValue = this.scaleValue; + this.text = 'onActionEnd success'; + }) + ) + Button('restore') + .id('ActionGestureTouchpadInterface480_1') + .onClick(() =>{ + this.scaleValue = 1; + this.pinchValue = 1; + }) + Text(this.text).margin({top:50}) + }.width('100%') + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface490.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface490.ets new file mode 100644 index 0000000000000000000000000000000000000000..b7fc6ac359d0c627f609b4ac2dcb70f0f9e4373b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface490.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 ActionGestureTouchpadInterface490 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State text: string = 'PinchGesture'; + + build() { + Column() { + Button('button') + .id('ActionGestureTouchpadInterface490') + .fontSize(30) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({fingers:2}) + .onActionStart((event: GestureEvent) => { + this.text = 'PinchGesture'; + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.pinchValue = this.scaleValue; + }) + ) + Button('restore') + .id('ActionGestureTouchpadInterface490_1') + .onClick(()=>{ + this.scaleValue = 1; + this.pinchValue = 1; + }) + Text(this.text).margin({top:50}) + }.width('100%') + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface50.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface50.ets new file mode 100644 index 0000000000000000000000000000000000000000..85731c26c62e224513dd10a5660149abf2a634c4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface50.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 ActionGestureTouchpadInterface50 { + @State angle: number = 0; + @State rotateValue: number = 0; + + build() { + Column() { + Button('RotationGesture angle:') + .id('ActionGestureTouchpadInterface50') + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(80) + .rotate({ angle: this.angle }) + .gesture( + RotationGesture({angle:10}) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle; + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle; + }) + ) + + Button('restore') + .id('ActionGestureTouchpadInterface50_1') + .onClick(() =>{ + this.angle = 0; + this.rotateValue = 0; + }) + }.width('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface500.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface500.ets new file mode 100644 index 0000000000000000000000000000000000000000..597d2ac4556f055c9106e57f6ebab32362eecce8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface500.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 ActionGestureTouchpadInterface500 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State text: string = 'PinchGesture'; + + build() { + Column() { + Button('button') + .id('ActionGestureTouchpadInterface500') + .fontSize(30) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({fingers:2}) + .onActionStart((event: GestureEvent) => { + this.text = 'pinchCenterX:'+ Math.round(event.pinchCenterX); + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.pinchValue = this.scaleValue; + }) + ) + Button('restore') + .id('ActionGestureTouchpadInterface500_1') + .onClick(()=>{ + this.scaleValue = 1; + this.pinchValue = 1; + }) + Text(this.text).margin({top:50}) + }.width('100%') + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface510.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface510.ets new file mode 100644 index 0000000000000000000000000000000000000000..3a5ab899f53145c20a053c570ec7efab6b2878f3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface510.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 ActionGestureTouchpadInterface510 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State text: string = 'PinchGesture'; + + build() { + Column() { + Button('button') + .id('ActionGestureTouchpadInterface510') + .fontSize(30) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({fingers:2}) + .onActionStart((event: GestureEvent) => { + this.text = 'pinchCenterY:'+ Math.round(event.pinchCenterY); + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.pinchValue = this.scaleValue; + }) + ) + Button('restore') + .id('ActionGestureTouchpadInterface510_1') + .onClick(()=>{ + this.scaleValue = 1; + this.pinchValue = 1; + }) + Text(this.text).margin({top:50}) + }.width('100%') + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface520.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface520.ets new file mode 100644 index 0000000000000000000000000000000000000000..f8723420f61678a1a27b543252df1a2d77172d5b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface520.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 ActionGestureTouchpadInterface520 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State text: string = 'PinchGesture'; + + build() { + Column() { + Button('button') + .id('ActionGestureTouchpadInterface520') + .fontSize(30) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({fingers:2}) + .onActionStart((event: GestureEvent) => { + this.text = 'pressure:'+ event.pressure; + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.pinchValue = this.scaleValue; + }) + ) + Button('restore') + .id('ActionGestureTouchpadInterface520_1') + .onClick(()=>{ + this.scaleValue = 1; + this.pinchValue = 1; + }) + Text(this.text).margin({top:50}) + }.width('100%') + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface530.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface530.ets new file mode 100644 index 0000000000000000000000000000000000000000..616e557a80341e842c855791ef8a8ee534c8e255 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface530.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 ActionGestureTouchpadInterface530 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State text: string = 'PinchGesture'; + + build() { + Column() { + Button('button') + .id('ActionGestureTouchpadInterface530') + .fontSize(30) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({fingers:2}) + .onActionStart((event: GestureEvent) => { + this.text = 'timestamp:'+ event.timestamp; + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.pinchValue = this.scaleValue; + }) + ) + Button('restore') + .id('ActionGestureTouchpadInterface530_1') + .onClick(() =>{ + this.scaleValue = 1; + this.pinchValue = 1; + }) + Text(this.text).margin({top:50}) + }.width('100%') + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface540.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface540.ets new file mode 100644 index 0000000000000000000000000000000000000000..e66ec0b936034296d841db3ca4153bafe23a9930 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface540.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 ActionGestureTouchpadInterface540 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State text: string = 'PinchGesture'; + + build() { + Column() { + Button('button') + .id('ActionGestureTouchpadInterface540') + .fontSize(30) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({fingers:2}) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + this.text = 'PinchGesture'; + } + }) + .onActionEnd((event: GestureEvent) => { + this.pinchValue = this.scaleValue; + }) + ) + Button('restore') + .id('ActionGestureTouchpadInterface540_1') + .onClick(() =>{ + this.scaleValue = 1; + this.pinchValue = 1; + }) + Text(this.text).margin({top:50}) + }.width('100%') + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface550.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface550.ets new file mode 100644 index 0000000000000000000000000000000000000000..36a5fadc6f7c415c9ba8edc7e8b716bba2df7db2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface550.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 ActionGestureTouchpadInterface550 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State text: string = 'PinchGesture'; + + build() { + Column() { + Button('button') + .id('ActionGestureTouchpadInterface550') + .fontSize(30) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({fingers:2}) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + this.text = 'pinchCenterX:'+ Math.round(event.pinchCenterX); + } + }) + .onActionEnd((event: GestureEvent) => { + this.pinchValue = this.scaleValue; + }) + ) + Button('restore') + .id('ActionGestureTouchpadInterface550_1') + .onClick(() =>{ + this.scaleValue = 1; + this.pinchValue = 1; + }) + Text(this.text).margin({top:50}) + }.width('100%') + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface560.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface560.ets new file mode 100644 index 0000000000000000000000000000000000000000..a12e554b3c41a26368b7071673a5b5abc099db65 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface560.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 ActionGestureTouchpadInterface560 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State text: string = 'PinchGesture'; + + build() { + Column() { + Button('button') + .id('ActionGestureTouchpadInterface560') + .fontSize(30) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({fingers:2}) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + this.text = 'pinchCenterY:'+ Math.round(event.pinchCenterY); + } + }) + .onActionEnd((event: GestureEvent) => { + this.pinchValue = this.scaleValue; + }) + ) + Button('restore') + .id('ActionGestureTouchpadInterface560_1') + .onClick(() =>{ + this.scaleValue = 1; + this.pinchValue = 1; + }) + Text(this.text).margin({top:50}) + }.width('100%') + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface570.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface570.ets new file mode 100644 index 0000000000000000000000000000000000000000..9255b871d94ed0a2bae8226283e1db40d04a1c7e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface570.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 ActionGestureTouchpadInterface570 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State text: string = 'PinchGesture'; + + build() { + Column() { + Button('button') + .id('ActionGestureTouchpadInterface570') + .fontSize(30) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({fingers:2}) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + this.text = 'timestamp:'+ event.timestamp; + } + }) + .onActionEnd((event: GestureEvent) => { + this.pinchValue = this.scaleValue; + }) + ) + Button('restore') + .id('ActionGestureTouchpadInterface570_1') + .onClick(() =>{ + this.scaleValue = 1; + this.pinchValue = 1; + }) + Text(this.text).margin({top:50}) + }.width('100%') + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface580.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface580.ets new file mode 100644 index 0000000000000000000000000000000000000000..153c07df43b3c23dbd038d125e6e02a9086e48b7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface580.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 ActionGestureTouchpadInterface580 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State text: string = 'PinchGesture'; + + build() { + Column() { + Button('button') + .id('ActionGestureTouchpadInterface580') + .fontSize(30) + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({fingers:2}) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.pinchValue = this.scaleValue; + this.text = 'timestamp:'+ event.timestamp; + }) + ) + Button('restore') + .id('ActionGestureTouchpadInterface580_1') + .onClick(() =>{ + this.scaleValue = 1; + this.pinchValue = 1; + }) + Text(this.text).margin({top:50}) + }.width('100%') + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface590.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface590.ets new file mode 100644 index 0000000000000000000000000000000000000000..9f49d6dd87bf64881be626081bd7871351ddf82a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface590.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 ActionGestureTouchpadInterface590 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State text:string = ''; + + build() { + Column() { + Button('button') + .fontSize(30) + .id('ActionGestureTouchpadInterface590') + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({ fingers: 2 }) + .onActionStart((event: GestureEvent) => { + this.text = 'onActionStart success'; + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.pinchValue = this.scaleValue; + }) + ) + Button('restore') + .id('ActionGestureTouchpadInterface590_1') + .onClick(() =>{ + this.scaleValue = 1; + this.pinchValue = 1; + }) + Text(this.text).margin({top:50}) + }.width('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface60.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface60.ets new file mode 100644 index 0000000000000000000000000000000000000000..8dfc0f32927feb902e8f1c5ebe05b2f8c3ec3af9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface60.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 ActionGestureTouchpadInterface60 { + @State angle: number = 0; + @State rotateValue: number = 0; + + build() { + Column() { + Button('RotationGesture angle') + .id('ActionGestureTouchpadInterface60') + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(80) + .rotate({ angle: this.angle }) + .gesture( + RotationGesture({fingers:0}) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle; + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle; + }) + ) + + Button('restore') + .id('ActionGestureTouchpadInterface60_1') + .onClick(() =>{ + this.angle = 0; + this.rotateValue = 0; + }) + }.width('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface600.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface600.ets new file mode 100644 index 0000000000000000000000000000000000000000..8ce3bfbdbb4cd70e622b6fd24b83b83e868c7324 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface600.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 ActionGestureTouchpadInterface600 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State text:string = ''; + + build() { + Column() { + Button('button') + .fontSize(30) + .id('ActionGestureTouchpadInterface600') + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({ fingers: 2 }) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + this.text = 'onActionUpdate success'; + } + }) + .onActionEnd((event: GestureEvent) => { + this.pinchValue = this.scaleValue; + }) + ) + Button('restore') + .id('ActionGestureTouchpadInterface600_1') + .onClick(()=>{ + this.scaleValue = 1; + this.pinchValue = 1; + }) + Text(this.text).margin({top:50}) + }.width('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface610.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface610.ets new file mode 100644 index 0000000000000000000000000000000000000000..97f4b5421983a4600c269ed5973299d89e07351f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface610.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 ActionGestureTouchpadInterface610 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State text:string = ''; + + build() { + Column() { + Button('button') + .fontSize(30) + .id('ActionGestureTouchpadInterface610') + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({ fingers: 2 }) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.pinchValue = this.scaleValue; + this.text = 'onActionEnd success'; + }) + ) + Button('restore') + .id('ActionGestureTouchpadInterface610_1') + .onClick(() =>{ + this.scaleValue = 1; + this.pinchValue = 1; + }) + Text(this.text).margin({top:50}) + }.width('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface620.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface620.ets new file mode 100644 index 0000000000000000000000000000000000000000..e74f4f45d256d57f7f884a12fe1b0e98522f5e7a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface620.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. + */ +// xxx.ets +import UDC from '@ohos.data.unifiedDataChannel'; +import UTD from '@ohos.data.uniformTypeDescriptor'; + +@Entry +@Component +struct ActionGestureTouchpadInterface620 { + @State AVisible: Visibility = Visibility.Visible; + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State text: string = 'PinchGesture'; + + build() { + Column() { + Text('Image拖拽') + .fontSize('30dp') + Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceAround }) { + Image($r('app.media.icon')) + .id('ActionGestureTouchpadInterface620') + .width(300) + .focusable(true) + .height(300) + .border({ width: 1 }) + .visibility(this.AVisible) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({fingers:2}) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + this.text = 'pinchCenterY:'+ Math.round(event.pinchCenterY); + } + }) + .onActionEnd((event: GestureEvent) => { + this.pinchValue = this.scaleValue; + }) + ) + Button('restore') + .id('ActionGestureTouchpadInterface620_1') + .onClick(() =>{ + this.scaleValue = 1; + this.pinchValue = 1; + }) + Text(this.text).margin({top:50}) + } + .margin({ bottom: 20 }) + }.width('100%') + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface640.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface640.ets new file mode 100644 index 0000000000000000000000000000000000000000..698fcf6e455aa1800ca3d059a2f0bdd04cfe4563 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface640.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 ActionGestureTouchpadInterface640 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State text:string = ''; + + build() { + Column() { + Button('button') + .fontSize(30) + .id('ActionGestureTouchpadInterface640') + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({ fingers: 2 }) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + this.text = 'PinchGesture(sourceTool:' + event.sourceTool; + } + }) + .onActionEnd((event: GestureEvent) => { + this.pinchValue = this.scaleValue; + }) + ) + Button('restore') + .id('ActionGestureTouchpadInterface640_1') + .onClick(() =>{ + this.scaleValue = 1; + this.pinchValue = 1; + }) + Text(this.text).margin({top:50}) + }.width('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface650.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface650.ets new file mode 100644 index 0000000000000000000000000000000000000000..db4ac7fa0c23216f212ccbe843907225259631a6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface650.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 ActionGestureTouchpadInterface650 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State text:string = ''; + + build() { + Column() { + Button('button') + .fontSize(30) + .id('ActionGestureTouchpadInterface650') + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({ fingers: 2 }) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.pinchValue = this.scaleValue; + this.text = 'PinchGesture(sourceTool:' + event.sourceTool; + }) + ) + Button('restore') + .id('ActionGestureTouchpadInterface650_1') + .onClick(()=>{ + this.scaleValue = 1; + this.pinchValue = 1; + }) + Text(this.text).margin({top:50}) + }.width('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface660.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface660.ets new file mode 100644 index 0000000000000000000000000000000000000000..df8ea825edb0efbf3fc7b8cc587e57d79726e4e8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface660.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 ActionGestureTouchpadInterface660 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State text:string = ''; + + build() { + Column() { + Button('button') + .fontSize(30) + .id('ActionGestureTouchpadInterface660') + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({ fingers: 2 }) + .onActionStart((event: GestureEvent) => { + this.text = 'PinchGesture(sourceTool:' + event.sourceTool; + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.pinchValue = this.scaleValue; + }) + ) + Button('restore') + .id('ActionGestureTouchpadInterface660_1') + .onClick(()=>{ + this.scaleValue = 1; + this.pinchValue = 1; + }) + Text(this.text).margin({top:50}) + }.width('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface680.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface680.ets new file mode 100644 index 0000000000000000000000000000000000000000..4abfe71ee70f2326ffba5032318f6a24019f82b5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface680.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 ActionGestureTouchpadInterface680 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State text:string = ''; + + build() { + Column() { + Button('button') + .fontSize(40) + .id('ActionGestureTouchpadInterface680') + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({ fingers: 2 }) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + this.text = 'PinchGesture scale:' ; + } + }) + .onActionEnd((event: GestureEvent) => { + this.pinchValue = this.scaleValue; + }) + ) + Button('restore') + .id('ActionGestureTouchpadInterface680_1') + .onClick(()=>{ + this.scaleValue = 1; + this.pinchValue = 1; + }) + Text(this.text+ Math.round(this.scaleValue)).margin({top:50}) + }.width('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface690.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface690.ets new file mode 100644 index 0000000000000000000000000000000000000000..40f5f06a0115b56231593dcedd79edfacac77933 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface690.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 ActionGestureTouchpadInterface690 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State text:string = ''; + + build() { + Column() { + Button('button') + .fontSize(40) + .id('ActionGestureTouchpadInterface690') + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({ fingers: 2 }) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.pinchValue = this.scaleValue; + this.text = 'PinchGesture scale:' ; + }) + ) + Button('restore') + .id('ActionGestureTouchpadInterface690_1') + .onClick(()=>{ + this.scaleValue = 1; + this.pinchValue = 1; + }) + Text(this.text+ Math.round(this.scaleValue)).margin({top:50}) + }.width('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface70.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface70.ets new file mode 100644 index 0000000000000000000000000000000000000000..63d2bb57f88424791eb47f31c213702d18a21fb0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface70.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 ActionGestureTouchpadInterface70 { + @State angle: number = 0; + @State rotateValue: number = 0; + + build() { + Column() { + Button('RotationGesture angle') + .id('ActionGestureTouchpadInterface70') + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(80) + .rotate({ angle: this.angle }) + .gesture( + RotationGesture({fingers:3}) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle; + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle; + }) + ) + Button('restore') + .id('ActionGestureTouchpadInterface70_1') + .onClick(() =>{ + this.angle = 0; + this.rotateValue = 0; + }) + }.width('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface700.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface700.ets new file mode 100644 index 0000000000000000000000000000000000000000..d9c36cf278eba8eaa00889e354ccba312ad28b0e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface700.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 ActionGestureTouchpadInterface700 { + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + @State text:string = ''; + + build() { + Column() { + Button('button') + .fontSize(30) + .id('ActionGestureTouchpadInterface700') + .border({ width: 3 }) + .margin({ top: 100 }) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({ fingers: 2 }) + .onActionStart((event: GestureEvent) => { + this.text = 'PinchGesture scale:' ; + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.pinchValue = this.scaleValue; + }) + ) + Button('restore') + .id('ActionGestureTouchpadInterface700_1') + .onClick(() =>{ + this.scaleValue = 1; + this.pinchValue = 1; + }) + Text(this.text+ this.scaleValue).margin({top:50}) + }.width('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface90.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface90.ets new file mode 100644 index 0000000000000000000000000000000000000000..44d017fc9c12a3382b9f19112da822ead1b45cc3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface90.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 ActionGestureTouchpadInterface90 { + @State angle: number = 0; + @State rotateValue: number = 0; + + build() { + Column() { + Button('RotationGesture angle') + .id('ActionGestureTouchpadInterface90') + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(80) + .rotate({ angle: this.angle }) + .gesture( + RotationGesture({fingers:6}) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle; + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle; + }) + ) + + Button('restore') + .id('ActionGestureTouchpadInterface90_1') + .onClick(() =>{ + this.angle = 0; + this.rotateValue = 0; + }) + }.width('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AnalyseActionEventCommoneventDrag/AnalyseActionEventCommoneventDrag0200.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AnalyseActionEventCommoneventDrag/AnalyseActionEventCommoneventDrag0200.ets new file mode 100644 index 0000000000000000000000000000000000000000..356c266ee17fa665aef0a97a61947256ebdfb3d4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AnalyseActionEventCommoneventDrag/AnalyseActionEventCommoneventDrag0200.ets @@ -0,0 +1,29 @@ +/* + * 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 { webview } from '@kit.ArkWeb'; +import { KeyCode } from '@kit.InputKit'; + +@Entry +@Component +struct AnalyseActionEventCommoneventDrag0200 { + build() { + Column() { + Image($r('app.media.icon')).width(150).height(150) + .draggable(true).onDragStart(() => {}).border({width:1}).id('img') + Text('这是一个text').fontSize(30).width(100).height(80).margin({top: 30}) + .draggable(true).onDragStart(() => {}).id('txt') + }.margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AnalyseActionEventCommoneventDrag/AnalyseActionEventCommoneventDrag0210.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AnalyseActionEventCommoneventDrag/AnalyseActionEventCommoneventDrag0210.ets new file mode 100644 index 0000000000000000000000000000000000000000..e278159845481a3edad54164b9cd135456743b2e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AnalyseActionEventCommoneventDrag/AnalyseActionEventCommoneventDrag0210.ets @@ -0,0 +1,105 @@ +/* + * 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 uniformTypeDescriptor from '@ohos.data.uniformTypeDescriptor' +import unifiedDataChannel from '@ohos.data.unifiedDataChannel' +@Entry +@Component +struct AnalyseActionEventCommoneventDrag0210 { + controller: RichEditorController = new RichEditorController() + options: RichEditorOptions = { controller: this.controller }; + controller1: RichEditorController = new RichEditorController() + options1: RichEditorOptions = { controller: this.controller1 }; + @State textFlag: string = "TextFlag"; + @State uri: string = '' + @State AblockArr: string[] = [] + @State BblockArr: string[] = [] + @State AVisible: Visibility = Visibility.Visible + @State dragSuccess: Boolean = false + private iconStr: ResourceStr = $r('app.media.icon') + build() { + Column() { + Column() { + Image(this.iconStr) + .height(100) + .width(100) + .draggable(true) + .onDragStart(()=>{}) + }.id("AnalyseActionEventCommoneventDrag0210_001") + + Column() { + RichEditor(this.options) + .id("AnalyseActionEventCommoneventDrag0210_002") + .borderWidth(1) + .borderColor(Color.Red) + .height(300) + .width('90%') + .draggable(true) + .onDragStart(()=>{}) + .allowDrop([uniformTypeDescriptor.UniformDataType.IMAGE]) + .onDrop((event?: DragEvent, extraParams?: string) => { + console.log('enter onDrop') + let dragData: UnifiedData = (event as DragEvent).getData() as UnifiedData; + if (dragData != undefined) { + let arr: Array = dragData.getRecords(); + if (arr.length > 0) { + let image = arr[0] as unifiedDataChannel.Image; + this.uri = image.imageUri; + this.controller.addImageSpan(this.uri, { + imageStyle: + { + size: ["57px", "57px"] + } + }) + } else { + console.log('dragData arr is null') + } + } else { + console.log('dragData is undefined') + } + console.log('ondrop udmf data'); + this.dragSuccess = true + }) + .onReady(() => { + this.controller.addImageSpan($r("app.media.icon"), + { + imageStyle: + { + size: ["50px", "50px"], + layoutStyle: { + margin: 5, + borderRadius: 15 + } + }, + gesture: + { + onClick: () => { + this.textFlag = "ImageSpan is onClick." + }, + onLongPress: () => { + this.textFlag = "ImageSpan is onLongPress." + } + } + }) + }) + } + .width('100%') + .borderWidth(1) + .borderColor(Color.Red) + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AnalyseActionEventCommoneventDrag/AnalyseActionEventCommoneventDrag0220.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AnalyseActionEventCommoneventDrag/AnalyseActionEventCommoneventDrag0220.ets new file mode 100644 index 0000000000000000000000000000000000000000..8a34747b0c8833574dc9fb1a171aff133a051089 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AnalyseActionEventCommoneventDrag/AnalyseActionEventCommoneventDrag0220.ets @@ -0,0 +1,105 @@ +/* + * 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 uniformTypeDescriptor from '@ohos.data.uniformTypeDescriptor' +import unifiedDataChannel from '@ohos.data.unifiedDataChannel' +@Entry +@Component +struct AnalyseActionEventCommoneventDrag0220 { + controller: RichEditorController = new RichEditorController() + options: RichEditorOptions = { controller: this.controller }; + controller1: RichEditorController = new RichEditorController() + options1: RichEditorOptions = { controller: this.controller1 }; + @State textFlag: string = "TextFlag"; + @State uri: string = '' + @State AblockArr: string[] = [] + @State BblockArr: string[] = [] + @State AVisible: Visibility = Visibility.Visible + @State dragSuccess: Boolean = false + private iconStr: ResourceStr = $r('app.media.icon') + build() { + Column() { + Column() { + Image(this.iconStr) + .height(100) + .width(100) + .draggable(true) + .onDragStart(()=>{}) + }.id("AnalyseActionEventCommoneventDrag0220_001") + + Column() { + RichEditor(this.options) + .id("AnalyseActionEventCommoneventDrag0220_002") + .borderWidth(1) + .borderColor(Color.Red) + .height(300) + .width('90%') + .draggable(true) + .onDragStart(()=>{}) + .allowDrop([uniformTypeDescriptor.UniformDataType.IMAGE]) + .onDrop((event?: DragEvent, extraParams?: string) => { + console.log('enter onDrop') + let dragData: UnifiedData = (event as DragEvent).getData() as UnifiedData; + if (dragData != undefined) { + let arr: Array = dragData.getRecords(); + if (arr.length > 0) { + let image = arr[0] as unifiedDataChannel.Image; + this.uri = image.imageUri; + this.controller.addImageSpan(this.uri, { + imageStyle: + { + size: ["57px", "57px"] + } + }) + } else { + console.log('dragData arr is null') + } + } else { + console.log('dragData is undefined') + } + console.log('ondrop udmf data'); + this.dragSuccess = true + }) + .onReady(() => { + this.controller.addImageSpan($r("app.media.icon"), + { + imageStyle: + { + size: ["50px", "50px"], + layoutStyle: { + margin: 5, + borderRadius: 15 + } + }, + gesture: + { + onClick: () => { + this.textFlag = "ImageSpan is onClick." + }, + onLongPress: () => { + this.textFlag = "ImageSpan is onLongPress." + } + } + }) + }) + } + .width('100%') + .borderWidth(1) + .borderColor(Color.Red) + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AnalyseActionEventCommoneventDrag/AnalyseActionEventCommoneventDrag0230.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AnalyseActionEventCommoneventDrag/AnalyseActionEventCommoneventDrag0230.ets new file mode 100644 index 0000000000000000000000000000000000000000..4ad32fb5d5e0833031c6e309857bbbdfd6023cb8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/AnalyseActionEventCommoneventDrag/AnalyseActionEventCommoneventDrag0230.ets @@ -0,0 +1,105 @@ +/* + * 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 uniformTypeDescriptor from '@ohos.data.uniformTypeDescriptor' +import unifiedDataChannel from '@ohos.data.unifiedDataChannel' +@Entry +@Component +struct AnalyseActionEventCommoneventDrag0230 { + controller: RichEditorController = new RichEditorController() + options: RichEditorOptions = { controller: this.controller }; + controller1: RichEditorController = new RichEditorController() + options1: RichEditorOptions = { controller: this.controller1 }; + @State textFlag: string = "TextFlag"; + @State uri: string = '' + @State AblockArr: string[] = [] + @State BblockArr: string[] = [] + @State AVisible: Visibility = Visibility.Visible + @State dragSuccess: Boolean = false + private iconStr: ResourceStr = $r('app.media.icon') + build() { + Column() { + Column() { + Image(this.iconStr) + .height(100) + .width(100) + .draggable(true) + .onDragStart(()=>{}) + }.id("AnalyseActionEventCommoneventDrag0230_001") + + Column() { + RichEditor(this.options) + .id("AnalyseActionEventCommoneventDrag0230_002") + .borderWidth(1) + .borderColor(Color.Red) + .height(300) + .width('90%') + .draggable(true) + .onDragStart(()=>{}) + .allowDrop([uniformTypeDescriptor.UniformDataType.IMAGE]) + .onDrop((event?: DragEvent, extraParams?: string) => { + console.log('enter onDrop') + let dragData: UnifiedData = (event as DragEvent).getData() as UnifiedData; + if (dragData != undefined) { + let arr: Array = dragData.getRecords(); + if (arr.length > 0) { + let image = arr[0] as unifiedDataChannel.Image; + this.uri = image.imageUri; + this.controller.addImageSpan(this.uri, { + imageStyle: + { + size: ["57px", "57px"] + } + }) + } else { + console.log('dragData arr is null') + } + } else { + console.log('dragData is undefined') + } + console.log('ondrop udmf data'); + this.dragSuccess = true + }) + .onReady(() => { + this.controller.addImageSpan($r("app.media.icon"), + { + imageStyle: + { + size: ["50px", "50px"], + layoutStyle: { + margin: 5, + borderRadius: 15 + } + }, + gesture: + { + onClick: () => { + this.textFlag = "ImageSpan is onClick." + }, + onLongPress: () => { + this.textFlag = "ImageSpan is onLongPress." + } + } + }) + }) + } + .width('100%') + .borderWidth(1) + .borderColor(Color.Red) + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/SUB_ACE_ActionEventRegisterRouterChangeEventCallback/SUB_ACE_ActionEventRegisterRouterChangeEventCallback010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/SUB_ACE_ActionEventRegisterRouterChangeEventCallback/SUB_ACE_ActionEventRegisterRouterChangeEventCallback010.ets new file mode 100644 index 0000000000000000000000000000000000000000..9016da6d919fbf8a5d4b08f017eb2069c45f583b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/SUB_ACE_ActionEventRegisterRouterChangeEventCallback/SUB_ACE_ActionEventRegisterRouterChangeEventCallback010.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. + */ +import router from '@system.router'; + +@Entry +@Component +struct SUB_ACE_ActionEventRegisterRouterChangeEventCallback010 { + @State strName: string = "" + + build() { + Row() { + Column() { + Button("点击事件").onClick((event: ClickEvent) => { + let page = router.getState(); + this.strName = page.index + '' + page.name + '' + page.path + }) + .id("SUB_ACE_ActionEventRegisterRouterChangeEventCallback010") + Text(this.strName) + + } + .width('100%') + } + .height('100%') + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/SubAceActionEventIntercept/SubAceActionEventIntercept0100.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/SubAceActionEventIntercept/SubAceActionEventIntercept0100.ets new file mode 100644 index 0000000000000000000000000000000000000000..abed159784f8a3f4e6a14e46ad7182d3236bb2fe --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/SubAceActionEventIntercept/SubAceActionEventIntercept0100.ets @@ -0,0 +1,42 @@ +/* + * 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 SubAceActionEventIntercept0100 { + private flag: boolean = true; + + build() { + Column({space: 10}) { + TextInput() + .key('SubAceActionEventIntercept0100_key1') + .onAppear(() => { + focusControl.requestFocus('SubAceActionEventIntercept0100_key1'); + }) + .defaultFocus(true) + + Button() + .width(0) + .height(0) + .key('SubAceActionEventIntercept0100_key3') + } + .padding({ top: 20 }) + .width('100%') + .height('100%') + .onClick(() => { + focusControl.requestFocus('SubAceActionEventIntercept0100_key3'); + }) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/SubAceActionGestureOnChildTouch/SubAceActionGestureOnChildTouch0010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/SubAceActionGestureOnChildTouch/SubAceActionGestureOnChildTouch0010.ets new file mode 100644 index 0000000000000000000000000000000000000000..1f64f0a2b4a581d3ed86403fcdde32ca6e7da4e2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/SubAceActionGestureOnChildTouch/SubAceActionGestureOnChildTouch0010.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. + */ + +@Entry +@Component +struct SubAceActionGestureOnChildTouch0010 { + private arr: Array[] = + [ + [{ name: 'name', age: 18 }, { name: 'name', age: 18 }], + [{ name: 'name', age: 19 }, { name: 'name', age: 19 }], + [{ name: 'name', age: 20 }, { name: 'name', age: 20 }], + [{ name: 'name', age: 21 }, { name: 'name', age: 21 }], + [{ name: 'name', age: 22 }, { name: 'name', age: 22 }], + [{ name: 'name', age: 23 }, { name: 'name', age: 23 }] + ]; + @State text: string = 'Button'; + + build() { + Column() { + List({ space: 12, initialIndex: 0 }) { + ForEach(this.arr, (item: Array, index: number) => { + ListItem() { + List({ space: 12, initialIndex: 0 }) { + ForEach(item, (it: It, i: number) => { + ListItem() { + Text('Item ' + it.name + index + i) + .width('100%') + .height(56) + .fontSize(16) + .textAlign(TextAlign.Start) + } + .borderRadius(24) + .backgroundColor(Color.White) + .padding({ left: 12, right: 12 }) + }, (item: string) => item) + } + .id('MyList02') + } + }, (item: string) => item) + } + .listDirection(Axis.Vertical) + .scrollBar(BarState.Off) + .edgeEffect(EdgeEffect.Spring) + .onScrollIndex((start: number, end: number) => { + console.info('first' + start) + console.info('last' + end) + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + console.info(`onScroll scrollState = ScrollState` + scrollState + `, scrollOffset = ` + scrollOffset) + }) + .width('100%') + .height('65%') + + } + .width('100%') + .height('100%') + .backgroundColor(0xF1F3F5) + .justifyContent(FlexAlign.Start) + .padding({ left: 12, right: 12, bottom: 24 }) + .onChildTouchTest((touchinfo) => { + for (let info of touchinfo) { + if (info.id == 'MyList02') { + return { id: info.id, strategy: TouchTestStrategy.FORWARD_COMPETITION } + } + } + return { strategy: TouchTestStrategy.DEFAULT } + }) + } +} + +interface It { + name: string; + age: number; +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/SubAceActionGestureSpeedInterface/SubAceActionGestureSpeedInterface0010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/SubAceActionGestureSpeedInterface/SubAceActionGestureSpeedInterface0010.ets new file mode 100644 index 0000000000000000000000000000000000000000..e0d07d248477cbb2128f7f3cb881667190259ab2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/SubAceActionGestureSpeedInterface/SubAceActionGestureSpeedInterface0010.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 SubAceActionGestureSpeedInterface0010 { + @State offsetX: number = 0 + @State offsetY: number = 0 + @State positionX: number = 0 + @State positionY: number = 0 + private panOption: PanGestureOptions = new PanGestureOptions({ direction: PanDirection.Down }) + + build() { + Column({ space: 20 }) { + Button('Touch Down') + .id('SubAceActionGestureSpeedInterface0010_btn') + .width(300) + .height(80) + .backgroundColor(Color.Pink)// 左右滑动触发该手势事件 + // 左右滑动触发该手势事件 + .gesture( + PanGesture(this.panOption) + .onActionStart((event: GestureEvent) => { + console.info('Pan start') + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX + this.offsetY = this.positionY + event.offsetY + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX + this.positionY = this.offsetY + console.info('Pan end') + }) + ) + Text('当前点: \nX: ' + Math.round(this.offsetX) + '\n' + 'Y: ' + Math.round(this.offsetY)) + .fontSize(20) + .fontWeight(700) + } + .width('100%') + .height('100%') + .justifyContent(FlexAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/SubAceActionGestureSpeedInterface/SubAceActionGestureSpeedInterface0020.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/SubAceActionGestureSpeedInterface/SubAceActionGestureSpeedInterface0020.ets new file mode 100644 index 0000000000000000000000000000000000000000..57c97fb5e91a9757245086dff777de787c1df90c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/SubAceActionGestureSpeedInterface/SubAceActionGestureSpeedInterface0020.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 SubAceActionGestureSpeedInterface0020 { + @State offsetX: number = 0 + @State offsetY: number = 0 + @State positionX: number = 0 + @State positionY: number = 0 + private panOption: PanGestureOptions = new PanGestureOptions({ direction: PanDirection.Vertical }) + + build() { + Column({ space: 20 }) { + Button('Touch Down') + .id('SubAceActionGestureSpeedInterface0020_btn') + .width(300) + .height(80) + .backgroundColor(Color.Pink)// 左右滑动触发该手势事件 + // 左右滑动触发该手势事件 + .gesture( + PanGesture(this.panOption) + .onActionStart((event: GestureEvent) => { + console.info('Pan start') + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX + this.offsetY = this.positionY + event.offsetY + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX + this.positionY = this.offsetY + console.info('Pan end') + }) + ) + Text('当前点: \nX: ' + Math.round(this.offsetX) + '\n' + 'Y: ' + Math.round(this.offsetY)) + .fontSize(20) + .fontWeight(700) + } + .width('100%') + .height('100%') + .justifyContent(FlexAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/SubAceActionGestureSpeedInterface/SubAceActionGestureSpeedInterface0030.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/SubAceActionGestureSpeedInterface/SubAceActionGestureSpeedInterface0030.ets new file mode 100644 index 0000000000000000000000000000000000000000..65ca8cd05775dcec555e65eb1a3a5091f957c89c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/SubAceActionGestureSpeedInterface/SubAceActionGestureSpeedInterface0030.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 SubAceActionGestureSpeedInterface0030 { + @State offsetX: number = 0 + @State offsetY: number = 0 + @State positionX: number = 0 + @State positionY: number = 0 + private panOption: PanGestureOptions = new PanGestureOptions({ direction: PanDirection.Vertical }) + + build() { + Column({ space: 20 }) { + Button('Touch Up') + .id('SubAceActionGestureSpeedInterface0030_btn') + .width(300) + .height(80) + .backgroundColor(Color.Pink)// 左右滑动触发该手势事件 + // 左右滑动触发该手势事件 + .gesture( + PanGesture(this.panOption) + .onActionStart((event: GestureEvent) => { + console.info('Pan start') + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX + this.offsetY = this.positionY + event.offsetY + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX + this.positionY = this.offsetY + console.info('Pan end') + }) + ) + Text('当前点: \nX: ' + Math.round(this.offsetX) + '\n' + 'Y: ' + Math.round(this.offsetY)) + .fontSize(20) + .fontWeight(700) + } + .width('100%') + .height('100%') + .justifyContent(FlexAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/SubAceActionGestureSpeedInterface/SubAceActionGestureSpeedInterface0040.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/SubAceActionGestureSpeedInterface/SubAceActionGestureSpeedInterface0040.ets new file mode 100644 index 0000000000000000000000000000000000000000..eda21839526a3d99f799c87e526a1814b21f4494 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/SubAceActionGestureSpeedInterface/SubAceActionGestureSpeedInterface0040.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. + */ + +@Entry +@Component +struct SubAceActionGestureSpeedInterface0040 { + @State offsetX: number = 0 + @State offsetY: number = 0 + @State positionX: number = 0 + @State positionY: number = 0 + @State speed: number = 0 + private panOption: PanGestureOptions = new PanGestureOptions({ direction: PanDirection.Vertical }) + + build() { + Column({ space: 20 }) { + Button('Touch Down') + .id('SubAceActionGestureSpeedInterface0040_btn') + .width(300) + .height(80) + .backgroundColor(Color.Pink)// 左右滑动触发该手势事件 + // 左右滑动触发该手势事件 + .gesture( + PanGesture(this.panOption) + .onActionStart((event: GestureEvent) => { + this.speed = 0; + console.info('Pan start') + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX + this.offsetY = this.positionY + event.offsetY + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX + this.positionY = this.offsetY + console.info('Pan end') + }) + ) + Text('回调速度: \nspeed: ' + Math.round(this.speed)) + .fontSize(20) + .fontWeight(700) + } + .width('100%') + .height('100%') + .justifyContent(FlexAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/SubAceActionGestureSpeedInterface/SubAceActionGestureSpeedInterface0050.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/SubAceActionGestureSpeedInterface/SubAceActionGestureSpeedInterface0050.ets new file mode 100644 index 0000000000000000000000000000000000000000..b9c4ad5377dfe430d79f18c585e53eaf1c632c2b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/SubAceActionGestureSpeedInterface/SubAceActionGestureSpeedInterface0050.ets @@ -0,0 +1,48 @@ +/* + * 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 SubAceActionGestureSpeedInterface0050 { + @State speed: number = 0 + + build() { + Column({ space: 20 }) { + Button('Touch Move') + .id('SubAceActionGestureSpeedInterface0050_btn') + .width(300) + .height(80) + .backgroundColor(Color.Pink)// 左右滑动触发该手势事件 + .onDragStart(() => { + this.speed = 0; + console.log("Drag start.") + }) + .gesture( + SwipeGesture({ direction: SwipeDirection.Vertical }) + .onAction((event: GestureEvent) => { + if (event) { + this.speed = event.speed + } + }) + ) + Text('PanGesture: \n Speed: ' + Math.round(this.speed)) + .fontSize(20) + .fontWeight(700) + } + .width('100%') + .height('100%') + .justifyContent(FlexAlign.Center) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/SubAceActionGestureSpeedInterface/SubAceActionGestureSpeedInterface0060.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/SubAceActionGestureSpeedInterface/SubAceActionGestureSpeedInterface0060.ets new file mode 100644 index 0000000000000000000000000000000000000000..3fb206b4deae0c8f21c11c355666ef0b7cc9f549 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/SubAceActionGestureSpeedInterface/SubAceActionGestureSpeedInterface0060.ets @@ -0,0 +1,42 @@ +/* + * 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 SubAceActionGestureSpeedInterface0060 { + private flag: boolean = true; + + build() { + Column({space: 10}) { + TextInput() + .key('key1') + .onAppear(() => { + focusControl.requestFocus('key1'); + }) + .defaultFocus(true) + + Button() + .width(0) + .height(0) + .key('key3') + } + .padding({ top: 20 }) + .width('100%') + .height('100%') + .onClick(() => { + focusControl.requestFocus('key3'); + }) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/SubAceUIComponentCommonattrFocusoptimization/SubAceUIComponentCommonattrFocusoptimization125.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/SubAceUIComponentCommonattrFocusoptimization/SubAceUIComponentCommonattrFocusoptimization125.ets new file mode 100644 index 0000000000000000000000000000000000000000..ddcbd421913e88c9f95da506fcf82ce410b7a3f7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/SubAceUIComponentCommonattrFocusoptimization/SubAceUIComponentCommonattrFocusoptimization125.ets @@ -0,0 +1,136 @@ +/* + * 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 SubaceUlComponentCommonAttRlfocusOptimization125 { + @State pageInfos: NavPathStack = new NavPathStack(); + + @Builder + pageOneTmp() { + NavDestination() { + Column({ space: 10 }) { + } + } + .title('pageOne') + .backgroundColor(Color.Pink) + } + + @Builder + pageTwoTmp() { + NavDestination() { + Column({ space: 10 }) { + } + } + .title('pageTwo') + .backgroundColor(Color.Yellow) + } + + @Builder + pageThreeTmp() { + NavDestination() { + Column({ space: 10 }) { + } + } + .title('pageThree') + .backgroundColor(Color.Orange) + } + + @Builder + pageFourTmp() { + NavDestination() { + Column({ space: 10 }) { + Button('Button') + .width(100) + .height(40) + .defaultFocus(true) + } + } + .title('pageFour') + .backgroundColor(Color.Pink) + } + + @Builder + PageMap(name: string, param: object) { + if (name === 'pageOne') { + this.pageOneTmp() + } else if (name === 'pageTwo') { + this.pageTwoTmp() + } else if (name === 'pageThree') { + this.pageThreeTmp() + } else if (name === 'pageFour') { + this.pageFourTmp() + } + } + + build() { + Column({ space: 10 }) { + Row({ space: 20 }) { + Button('pageOne') + .id('SubaceUlComponentCommonAttRlfocusOptimization125_one_btn') + .backgroundColor(Color.Pink) + .onClick(() => { + this.pageInfos.pushPath({ name: 'pageOne' }) + }) + Button('pageTwo') + .id('SubaceUlComponentCommonAttRlfocusOptimization125_two_btn') + .backgroundColor(Color.Pink) + .onClick(() => { + this.pageInfos.pushPath({ name: 'pageTwo' }) + }) + Button('pageThree') + .id('SubaceUlComponentCommonAttRlfocusOptimization125_three_btn') + .backgroundColor(Color.Pink) + .onClick(() => { + this.pageInfos.pushPath({ name: 'pageThree' }) + }) + + Button('pageFour') + .id('SubaceUlComponentCommonAttRlfocusOptimization125_four_btn') + .backgroundColor(Color.Pink) + .onClick(() => { + this.pageInfos.pushPath({ name: 'pageFour' }) + }) + } + .width('100%') + .height('20%') + .justifyContent(FlexAlign.Center) + + Row() { + Button('首页') + .id('SubaceUlComponentCommonAttRlfocusOptimization125_back_btn') + .backgroundColor(Color.Pink) + .onClick(() => { + this.pageInfos.pop() + }) + } + .width('100%') + .height('20%') + .justifyContent(FlexAlign.Center) + + Navigation(this.pageInfos) { + Column({ space: 10 }) { + } + } + .mode(NavigationMode.Auto) + .borderWidth(1) + .width('90%') + .height('40%') + .clip(true) + .title('Navigation') + .navDestination(this.PageMap) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/SubAceUIComponentCommonattrFocusoptimization/SubAceUIComponentCommonattrFocusoptimization128.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/SubAceUIComponentCommonattrFocusoptimization/SubAceUIComponentCommonattrFocusoptimization128.ets new file mode 100644 index 0000000000000000000000000000000000000000..9af6d0252c2d7871bffa9c291df709ae75b0481d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/SubAceUIComponentCommonattrFocusoptimization/SubAceUIComponentCommonattrFocusoptimization128.ets @@ -0,0 +1,136 @@ +/* + * 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 SubaceUlComponentCommonAttRlfocusOptimization128 { + @State pageInfos: NavPathStack = new NavPathStack(); + + @Builder + pageOneTmp() { + NavDestination() { + Column({ space: 10 }) { + } + } + .title('pageOne') + .backgroundColor(Color.Pink) + } + + @Builder + pageTwoTmp() { + NavDestination() { + Column({ space: 10 }) { + } + } + .title('pageTwo') + .backgroundColor(Color.Yellow) + } + + @Builder + pageThreeTmp() { + NavDestination() { + Column({ space: 10 }) { + } + } + .title('pageThree') + .backgroundColor(Color.Orange) + } + + @Builder + pageFourTmp() { + NavDestination() { + Column({ space: 10 }) { + Button('Button') + .width(100) + .height(40) + .defaultFocus(true) + } + } + .title('pageFour') + .backgroundColor(Color.Pink) + } + + @Builder + PageMap(name: string, param: object) { + if (name === 'pageOne') { + this.pageOneTmp() + } else if (name === 'pageTwo') { + this.pageTwoTmp() + } else if (name === 'pageThree') { + this.pageThreeTmp() + } else if (name === 'pageFour') { + this.pageFourTmp() + } + } + + build() { + Column({ space: 10 }) { + Row({ space: 20 }) { + Button('pageOne') + .id('SubaceUlComponentCommonAttRlfocusOptimization128_one_btn') + .backgroundColor(Color.Pink) + .onClick(() => { + this.pageInfos.pushPath({ name: 'pageOne' }) + }) + Button('pageTwo') + .id('SubaceUlComponentCommonAttRlfocusOptimization128_two_btn') + .backgroundColor(Color.Pink) + .onClick(() => { + this.pageInfos.pushPath({ name: 'pageTwo' }) + }) + Button('pageThree') + .id('SubaceUlComponentCommonAttRlfocusOptimization128_three_btn') + .backgroundColor(Color.Pink) + .onClick(() => { + this.pageInfos.pushPath({ name: 'pageThree' }) + }) + + Button('pageFour') + .id('SubaceUlComponentCommonAttRlfocusOptimization128_four_btn') + .backgroundColor(Color.Pink) + .onClick(() => { + this.pageInfos.pushPath({ name: 'pageFour' }) + }) + } + .width('100%') + .height('20%') + .justifyContent(FlexAlign.Center) + + Row() { + Button('首页') + .id('SubaceUlComponentCommonAttRlfocusOptimization128_back_btn') + .backgroundColor(Color.Pink) + .onClick(() => { + this.pageInfos.pop() + }) + } + .width('100%') + .height('20%') + .justifyContent(FlexAlign.Center) + + Navigation(this.pageInfos) { + Column({ space: 10 }) { + } + } + .mode(NavigationMode.Auto) + .borderWidth(1) + .width('90%') + .height('40%') + .clip(true) + .title('Navigation') + .navDestination(this.PageMap) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/SubAceUIComponentCommonattrFocusoptimization/SubAceUIComponentCommonattrFocusoptimization142.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/SubAceUIComponentCommonattrFocusoptimization/SubAceUIComponentCommonattrFocusoptimization142.ets new file mode 100644 index 0000000000000000000000000000000000000000..ead9fa000d39edeb29e89f47ca4b2ebfa9bd20f3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/SubAceUIComponentCommonattrFocusoptimization/SubAceUIComponentCommonattrFocusoptimization142.ets @@ -0,0 +1,48 @@ +/* + * 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 SubAceUIComponentCommonattrFocusoptimization142 { + @State isFocus: boolean = false; + + build() { + Column({ space: 50 }) { + TextInput() + .key('SubAceUIComponentCommonattrFocusoptimization142_key1') + .defaultFocus(true) + .onAppear(() => { + focusControl.requestFocus('SubAceUIComponentCommonattrFocusoptimization142_key1'); + }) + + Button(`Button2 isFocus: 【 ${this.isFocus} 】`) + .key('SubAceUIComponentCommonattrFocusoptimization142_btn_key') + .width(300) + .height(60) + .fontSize(20) + .fontWeight(700) + .backgroundColor(Color.Pink) + .onFocus(() => { + this.isFocus = true; + }) + } + .id('SubAceUIComponentCommonattrFocusoptimization142_column') + .width('100%') + .height('100%') + .onClick(() => { + focusControl.requestFocus('SubAceUIComponentCommonattrFocusoptimization142_btn_key'); + }) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/SubAceUIComponentCommonattrFocusoptimization/SubAceUIComponentCommonattrFocusoptimization143.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/SubAceUIComponentCommonattrFocusoptimization/SubAceUIComponentCommonattrFocusoptimization143.ets new file mode 100644 index 0000000000000000000000000000000000000000..3bda7aca93bf4435f3da4e01fa23a25cc1970d4a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/SubAceUIComponentCommonattrFocusoptimization/SubAceUIComponentCommonattrFocusoptimization143.ets @@ -0,0 +1,113 @@ +/* + * 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 SubaceUlComponentCommonAttRlfocusOptimization143 { + @State pageInfos: NavPathStack = new NavPathStack(); + + @Builder + pageOneTmp() { + NavDestination() { + Column({ space: 10 }) { + } + } + .title('pageOne') + .backgroundColor(Color.Pink) + } + + @Builder + pageTwoTmp() { + NavDestination() { + Column({ space: 10 }) { + } + } + .title('pageTwo') + .backgroundColor(Color.Yellow) + } + + @Builder + pageThreeTmp() { + NavDestination() { + Column({ space: 10 }) { + } + } + .title('pageThree') + .backgroundColor(Color.Orange) + } + + @Builder + PageMap(name: string, param: object) { + if (name === 'pageOne') { + this.pageOneTmp() + } else if (name === 'pageTwo') { + this.pageTwoTmp() + } else if (name === 'pageThree') { + this.pageThreeTmp() + } + } + + build() { + Column({ space: 10 }) { + Row({ space: 20 }) { + Button('pageOne') + .id('SubaceUlComponentCommonAttRlfocusOptimization143_one_btn') + .backgroundColor(Color.Pink) + .onClick(() => { + this.pageInfos.pushPath({ name: 'pageOne' }) + }) + Button('pageTwo') + .id('SubaceUlComponentCommonAttRlfocusOptimization143_two_btn') + .backgroundColor(Color.Pink) + .onClick(() => { + this.pageInfos.pushPath({ name: 'pageTwo' }) + }) + Button('pageThree') + .id('SubaceUlComponentCommonAttRlfocusOptimization143_three_btn') + .backgroundColor(Color.Pink) + .onClick(() => { + this.pageInfos.pushPath({ name: 'pageThree' }) + }) + } + .width('100%') + .height('20%') + .justifyContent(FlexAlign.Center) + + Row() { + Button('Back') + .id('SubaceUlComponentCommonAttRlfocusOptimization143_back_btn') + .backgroundColor(Color.Pink) + .onClick(() => { + this.pageInfos.pop() + }) + } + .width('100%') + .height('20%') + .justifyContent(FlexAlign.Center) + + Navigation(this.pageInfos) { + Column({ space: 10 }) { + } + } + .mode(NavigationMode.Auto) + .borderWidth(1) + .width('90%') + .height('40%') + .clip(true) + .title('Navigation') + .navDestination(this.PageMap) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/SubAceUIComponentCommonattrFocusoptimization/SubAceUIComponentCommonattrFocusoptimization146.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/SubAceUIComponentCommonattrFocusoptimization/SubAceUIComponentCommonattrFocusoptimization146.ets new file mode 100644 index 0000000000000000000000000000000000000000..bad314dde4ef5540ccd591eb3a7b7d7d0cbca59d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/SubAceUIComponentCommonattrFocusoptimization/SubAceUIComponentCommonattrFocusoptimization146.ets @@ -0,0 +1,116 @@ +/* + * 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 SubaceUlComponentCommonAttRlfocusOptimization146 { + @State pageInfos: NavPathStack = new NavPathStack(); + + @Builder + pageOneTmp() { + NavDestination() { + Column({ space: 10 }) { + } + } + .title('pageOne') + .backgroundColor(Color.Pink) + .defaultFocus(true) + } + + @Builder + pageTwoTmp() { + NavDestination() { + Column({ space: 10 }) { + } + } + .title('pageTwo') + .backgroundColor(Color.Yellow) + .defaultFocus(true) + } + + @Builder + pageThreeTmp() { + NavDestination() { + Column({ space: 10 }) { + } + } + .title('pageThree') + .backgroundColor(Color.Orange) + .defaultFocus(true) + } + + @Builder + PageMap(name: string, param: object) { + if (name === 'pageOne') { + this.pageOneTmp() + } else if (name === 'pageTwo') { + this.pageTwoTmp() + } else if (name === 'pageThree') { + this.pageThreeTmp() + } + } + + build() { + Column({ space: 10 }) { + Row({ space: 20 }) { + Button('pageOne') + .id('SubaceUlComponentCommonAttRlfocusOptimization146_one_btn') + .backgroundColor(Color.Pink) + .onClick(() => { + this.pageInfos.pushPath({ name: 'pageOne' }) + }) + Button('pageTwo') + .id('SubaceUlComponentCommonAttRlfocusOptimization146_two_btn') + .backgroundColor(Color.Pink) + .onClick(() => { + this.pageInfos.pushPath({ name: 'pageTwo' }) + }) + Button('pageThree') + .id('SubaceUlComponentCommonAttRlfocusOptimization146_three_btn') + .backgroundColor(Color.Pink) + .onClick(() => { + this.pageInfos.pushPath({ name: 'pageThree' }) + }) + } + .width('100%') + .height('20%') + .justifyContent(FlexAlign.Center) + + Row() { + Button('Back') + .id('SubaceUlComponentCommonAttRlfocusOptimization146_back_btn') + .backgroundColor(Color.Pink) + .onClick(() => { + this.pageInfos.pop() + }) + } + .width('100%') + .height('20%') + .justifyContent(FlexAlign.Center) + + Navigation(this.pageInfos) { + Column({ space: 10 }) { + } + } + .mode(NavigationMode.Auto) + .borderWidth(1) + .width('90%') + .height('40%') + .clip(true) + .title('Navigation') + .navDestination(this.PageMap) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIActionEventIntercept/UIActionEventIntercept0010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIActionEventIntercept/UIActionEventIntercept0010.ets new file mode 100644 index 0000000000000000000000000000000000000000..d4053e436fa638b67b1660c4aef681fa23dd3151 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIActionEventIntercept/UIActionEventIntercept0010.ets @@ -0,0 +1,45 @@ +/* + * 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 { webview } from '@kit.ArkWeb'; +import { KeyCode } from '@kit.InputKit'; + +@Entry +@Component +struct UIActionEventIntercept0010 { + @State eventListening: string = "事件监听状态:" + controller: webview.WebviewController = new webview.WebviewController(); + + build() { + Column() { + Web({ src: 'https://www.baidu.com/', controller: this.controller }) + .onKeyPreIme((event: KeyEvent) => { + if (event.keyCode == KeyCode.KEYCODE_A) { + this.eventListening += "\nA 被onKeyPreIme消费" + return true; + } + return false + }) + .keyboardShortcut('C', [ModifierKey.CTRL], () => { + this.eventListening += "\nCTRL+C 被keyboardShortcut消费" + }) + .onKeyEvent((event: KeyEvent) => { + if (event.keyCode == KeyCode.KEYCODE_ALT_LEFT) { + this.eventListening += "\nAIt 被onKeyEvent消费" + } + }).height("80%") + Text(this.eventListening) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIActionEventIntercept/UIActionEventIntercept0030.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIActionEventIntercept/UIActionEventIntercept0030.ets new file mode 100644 index 0000000000000000000000000000000000000000..0488c12eccc2d678cd6bacef638fe0036f1f941d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIActionEventIntercept/UIActionEventIntercept0030.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. + */ +import { KeyCode } from '@kit.InputKit'; + +@Entry +@Component +struct UIActionEventIntercept0030 { + @State eventListening: string = "事件监听状态:" + + build() { + Column() { + Search() + .keyboardShortcut('C', [ModifierKey.CTRL], () => { + console.log("keyboardShortcut ") + this.eventListening += "\nCTRL+C 被keyboardShortcut消费" + return true; + }) + .onKeyPreIme((event: KeyEvent) => { + console.log("onKeyPreIme event.keyCode=="+event.keyCode) + if (event.keyCode == KeyCode.KEYCODE_A) { + this.eventListening += "\n被onKeyPreIme消费" + return true; + } + return false; + }) + .onKeyEvent((event: KeyEvent)=>{ + console.log("onKeyEvent event.keyCode=="+event.keyCode) + if (event.keyCode == KeyCode.KEYCODE_C) { + this.eventListening += "\n被onKeyEvent消费" + return true; + } + return false; + }) + Text(this.eventListening) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIActionEventIntercept/UIActionEventIntercept0040.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIActionEventIntercept/UIActionEventIntercept0040.ets new file mode 100644 index 0000000000000000000000000000000000000000..b9c6907ae9df68dbabcf9116cc8054e67eff35ab --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIActionEventIntercept/UIActionEventIntercept0040.ets @@ -0,0 +1,34 @@ +/* + * 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 { KeyCode } from '@kit.InputKit'; + +@Entry +@Component +struct UIActionEventIntercept0040 { + @State eventListening: string = "事件监听状态:" + + build() { + Column() { + Search() + .onKeyEvent((event: KeyEvent)=>{ + console.log("onKeyEvent event.keyCode=="+event.keyCode) + if (event.keyCode == KeyCode.KEYCODE_C) { + this.eventListening += "\nC 被onKeyEvent消费" + } + }) + Text(this.eventListening) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIActionEventIntercept/UIActionEventIntercept0050.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIActionEventIntercept/UIActionEventIntercept0050.ets new file mode 100644 index 0000000000000000000000000000000000000000..8d493fab851aff8471fbc82603b5acb5b525eb61 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIActionEventIntercept/UIActionEventIntercept0050.ets @@ -0,0 +1,45 @@ +/* + * 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 { KeyCode } from '@kit.InputKit'; + +@Entry +@Component +struct UIActionEventIntercept0050 { + @State eventListening : string ="事件监听状态" + build() { + Column() { + Search({ + placeholder: "Search..." + }) + .id("mSearch") + .width("80%") + .height("40vp") + .border({ radius:"20vp" }) + .onKeyPreIme((event:KeyEvent) => { + if (event){ + if (event.keyCode == KeyCode.KEYCODE_A) { + this.eventListening +="\n event.keyCode"+event.keyCode+"已被消费拦截" + return true; + } + this.eventListening +="\n event.keyCode"+event.keyCode+"未被消费拦截" + return false; + } + + return false; + }) + Text(this.eventListening) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIActionEventIntercept/UIActionEventIntercept0060.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIActionEventIntercept/UIActionEventIntercept0060.ets new file mode 100644 index 0000000000000000000000000000000000000000..2acfa2939bb671657b5608ae5b1fc9197a29a1f4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIActionEventIntercept/UIActionEventIntercept0060.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. + */ +import { KeyCode } from '@kit.InputKit'; + +@Entry +@Component +struct UIActionEventIntercept0060 { + @State eventListening: string = "事件监听状态:" + + build() { + Column() { + Search() + .keyboardShortcut('C', [ModifierKey.CTRL], () => { + console.log("keyboardShortcut ") + this.eventListening += "\nCTRL+C 被keyboardShortcut消费" + return true; + }) + .onKeyPreIme((event: KeyEvent) => { + console.log("onKeyPreIme event.keyCode=="+event.keyCode) + if (event.keyCode == KeyCode.KEYCODE_A) { + this.eventListening += "\nA 被onKeyPreIme消费" + return true; + } + return false; + }) + .onKeyEvent((event: KeyEvent)=>{ + console.log("onKeyEvent event.keyCode=="+event.keyCode) + if (event.keyCode == KeyCode.KEYCODE_C) { + this.eventListening += "\nC 被onKeyEvent消费" + return true; + } + return false; + }) + Text(this.eventListening) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIActionEventIntercept/UIActionEventIntercept0070.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIActionEventIntercept/UIActionEventIntercept0070.ets new file mode 100644 index 0000000000000000000000000000000000000000..fdea3548d154c9da1840f84448738815965310cd --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIActionEventIntercept/UIActionEventIntercept0070.ets @@ -0,0 +1,45 @@ +/* + * 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 { webview } from '@kit.ArkWeb'; +import { KeyCode } from '@kit.InputKit'; + +@Entry +@Component +struct UIActionEventIntercept0070 { + @State eventListening: string = "事件监听状态:" + controller: webview.WebviewController = new webview.WebviewController(); + + build() { + Column() { + Search() + .onKeyPreIme((event: KeyEvent) => { + if (event.keyCode == KeyCode.KEYCODE_A) { + this.eventListening += "\nA 被onKeyPreIme消费" + return true; + } + return false + }) + .keyboardShortcut('C', [ModifierKey.CTRL], () => { + this.eventListening += "\nCTRL+C 被keyboardShortcut消费" + }) + .onKeyEvent((event: KeyEvent) => { + if (event.keyCode == KeyCode.KEYCODE_ALT_LEFT) { + this.eventListening += "\nAIt 被onKeyEvent消费" + } + }) + Text(this.eventListening) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIActionEventIntercept/UIActionEventIntercept0080.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIActionEventIntercept/UIActionEventIntercept0080.ets new file mode 100644 index 0000000000000000000000000000000000000000..cf7b215297418e2aec553b820c50b838bae5b293 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIActionEventIntercept/UIActionEventIntercept0080.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 { KeyCode } from '@kit.InputKit'; +import inputMethod from '@ohos.inputMethod'; +import { BusinessError } from '@kit.BasicServicesKit'; + +@Entry +@Component +struct UIActionEventIntercept0080 { + @State eventListening:string='' + build() { + Column() { + Search({ + placeholder: "Search..." + }) + .id("mSearch") + .width("80%") + .height("40vp") + .border({ radius: "20vp" }) + .onKeyPreIme((event:KeyEvent) => { + console.log("onKeyPreIme event.keyCode=="+event.keyCode) + if (event.keyCode == KeyCode.KEYCODE_A) { + this.eventListening +="\n event.keyCode"+event.keyCode+"已被onKeyPreIme消费拦截" + return true; + } else if (event.keyCode == KeyCode.KEYCODE_C) { + this.eventListening +="\n event.keyCode"+event.keyCode+"未被onKeyPreIme消费拦截" + } + return false; + }) + .onKeyEvent((event: KeyEvent) => { + console.log("onKeyEvent event.keyCode=="+event.keyCode) + if (event.keyCode == KeyCode.KEYCODE_C) { + this.eventListening +="\n event.keyCode"+event.keyCode+"被onKeyEvent消费拦截" + return true; + } + return false; + }) + Text(this.eventListening) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIActionEventIntercept/UIActionEventIntercept0090.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIActionEventIntercept/UIActionEventIntercept0090.ets new file mode 100644 index 0000000000000000000000000000000000000000..d6bfcfb3840a774001668718278d489694b07451 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIActionEventIntercept/UIActionEventIntercept0090.ets @@ -0,0 +1,33 @@ +/* + * 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 { KeyCode } from '@kit.InputKit'; + +@Entry +@Component +struct UIActionEventIntercept0090 { + build() { + Column() { + Search({ + placeholder: "Search..." + }) + .id("mSearch") + .width("80%") + .height("40vp") + .border({ radius:"20vp" }) + .keyboardShortcut("C", [ModifierKey.CTRL],()=>{ + }) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIActionEventIntercept/UISupportGlobalshortcutKeyRegistratton0010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIActionEventIntercept/UISupportGlobalshortcutKeyRegistratton0010.ets new file mode 100644 index 0000000000000000000000000000000000000000..18a4515d0d7cd98ad97466acd695afa337e476c5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIActionEventIntercept/UISupportGlobalshortcutKeyRegistratton0010.ets @@ -0,0 +1,31 @@ +/* + * 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 { KeyCode } from '@kit.InputKit'; + +@Entry +@Component +struct UISupportGlobalshortcutKeyRegistratton0010 { + @State eventListening: string = "事件监听状态" + + build() { + Column() { + Button("keyboardShortcut") + .keyboardShortcut('C', [ModifierKey.CTRL], () => { + this.eventListening = "FunctionKeyC…ModifierKey.CTRL" + }) + Text(this.eventListening) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIActionEventIntercept/UISupportGlobalshortcutKeyRegistratton0100.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIActionEventIntercept/UISupportGlobalshortcutKeyRegistratton0100.ets new file mode 100644 index 0000000000000000000000000000000000000000..bb3e84e6b70461887608946ef95a20ce8df7aea9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIActionEventIntercept/UISupportGlobalshortcutKeyRegistratton0100.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 UISupportGlobalshortcutKeyRegistratton0100 { + @State eventListening: string = "事件监听状态" + @State mF1F12Listening: string = "" + + build() { + Column() { + Button("组合键") + .id("button") + .onClick((event: ClickEvent) => { + console.log("I clicked this.mF1F12Listening==" + this.mF1F12Listening); + if (this.mF1F12Listening = "F1F2F3F4F5F6F7F7F8F10F11F12") { + this.eventListening = "FunctionKeyF(1-12) ·ModifierKey.CTRL" + } + }) + .keyboardShortcut(FunctionKey.F1, [ModifierKey.CTRL], () => { + this.mF1F12Listening = "F1" + }) + .keyboardShortcut(FunctionKey.F2, [ModifierKey.CTRL], () => { + this.mF1F12Listening += "F2" + }) + .keyboardShortcut(FunctionKey.F3, [ModifierKey.CTRL], () => { + this.mF1F12Listening += "F3" + }) + .keyboardShortcut(FunctionKey.F4, [ModifierKey.CTRL], () => { + }) + .keyboardShortcut(FunctionKey.F5, [ModifierKey.CTRL], () => { + this.mF1F12Listening += "F5" + }) + .keyboardShortcut(FunctionKey.F6, [ModifierKey.CTRL], () => { + this.mF1F12Listening += "F6" + }) + .keyboardShortcut(FunctionKey.F7, [ModifierKey.CTRL], () => { + this.mF1F12Listening += "F7" + }) + .keyboardShortcut(FunctionKey.F8, [ModifierKey.CTRL], () => { + this.mF1F12Listening += "F7" + }) + .keyboardShortcut(FunctionKey.F9, [ModifierKey.CTRL], () => { + this.mF1F12Listening += "F8" + }) + .keyboardShortcut(FunctionKey.F10, [ModifierKey.CTRL], () => { + this.mF1F12Listening += "F10" + }) + .keyboardShortcut(FunctionKey.F11, [ModifierKey.CTRL], () => { + this.mF1F12Listening += "F11" + }) + .keyboardShortcut(FunctionKey.F12, [ModifierKey.CTRL], () => { + this.mF1F12Listening += "F12" + }) + Text(this.eventListening) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIActionEventIntercept/UISupportGlobalshortcutKeyRegistratton0150.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIActionEventIntercept/UISupportGlobalshortcutKeyRegistratton0150.ets new file mode 100644 index 0000000000000000000000000000000000000000..532112bd609b99c1592e8ce47d95611242d97245 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIActionEventIntercept/UISupportGlobalshortcutKeyRegistratton0150.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 UISupportGlobalshortcutKeyRegistratton0150 { + @State eventListening: string = "事件监听状态" + @State mF1F12Listening: string = "" + + build() { + Column() { + Button("组合键") + .id("button") + .onClick((event: ClickEvent) => { + console.log("I clicked this.mF1F12Listening==" + this.mF1F12Listening); + if (this.mF1F12Listening = "F1F2F3F4F5F6F7F7F8F10F11F12") { + this.eventListening = "FunctionKeyF(1-12) ·ModifierKey.SHIFT" + } + }) + .keyboardShortcut(FunctionKey.F1, [ModifierKey.SHIFT], () => { + this.mF1F12Listening = "F1" + }) + .keyboardShortcut(FunctionKey.F2, [ModifierKey.SHIFT], () => { + this.mF1F12Listening += "F2" + }) + .keyboardShortcut(FunctionKey.F3, [ModifierKey.SHIFT], () => { + this.mF1F12Listening += "F3" + }) + .keyboardShortcut(FunctionKey.F4, [ModifierKey.SHIFT], () => { + }) + .keyboardShortcut(FunctionKey.F5, [ModifierKey.SHIFT], () => { + this.mF1F12Listening += "F5" + }) + .keyboardShortcut(FunctionKey.F6, [ModifierKey.SHIFT], () => { + this.mF1F12Listening += "F6" + }) + .keyboardShortcut(FunctionKey.F7, [ModifierKey.SHIFT], () => { + this.mF1F12Listening += "F7" + }) + .keyboardShortcut(FunctionKey.F8, [ModifierKey.SHIFT], () => { + this.mF1F12Listening += "F7" + }) + .keyboardShortcut(FunctionKey.F9, [ModifierKey.SHIFT], () => { + this.mF1F12Listening += "F8" + }) + .keyboardShortcut(FunctionKey.F10, [ModifierKey.SHIFT], () => { + this.mF1F12Listening += "F10" + }) + .keyboardShortcut(FunctionKey.F11, [ModifierKey.CTRL], () => { + this.mF1F12Listening += "F11" + }) + .keyboardShortcut(FunctionKey.F12, [ModifierKey.SHIFT], () => { + this.mF1F12Listening += "F12" + }) + Text(this.eventListening) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIActionEventIntercept/UISupportGlobalshortcutKeyRegistratton0200.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIActionEventIntercept/UISupportGlobalshortcutKeyRegistratton0200.ets new file mode 100644 index 0000000000000000000000000000000000000000..f2614b416f01a0494a8037e7c2db27ff4957ad8a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIActionEventIntercept/UISupportGlobalshortcutKeyRegistratton0200.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 UISupportGlobalshortcutKeyRegistratton0200 { + @State eventListening: string = "事件监听状态" + @State mF1F12Listening: string = "" + + build() { + Column() { + Button("组合键") + .id("button") + .onClick((event: ClickEvent) => { + console.log("I clicked this.mF1F12Listening==" + this.mF1F12Listening); + if (this.mF1F12Listening = "F1F2F3F4F5F6F7F7F8F10F11F12") { + this.eventListening = "FunctionKeyF(1-12) ·ModifierKey.ALT" + } + }) + .keyboardShortcut(FunctionKey.F1, [ModifierKey.ALT], () => { + this.mF1F12Listening = "F1" + }) + .keyboardShortcut(FunctionKey.F2, [ModifierKey.ALT], () => { + this.mF1F12Listening += "F2" + }) + .keyboardShortcut(FunctionKey.F3, [ModifierKey.ALT], () => { + this.mF1F12Listening += "F3" + }) + .keyboardShortcut(FunctionKey.F4, [ModifierKey.ALT], () => { + }) + .keyboardShortcut(FunctionKey.F5, [ModifierKey.ALT], () => { + this.mF1F12Listening += "F5" + }) + .keyboardShortcut(FunctionKey.F6, [ModifierKey.ALT], () => { + this.mF1F12Listening += "F6" + }) + .keyboardShortcut(FunctionKey.F7, [ModifierKey.ALT], () => { + this.mF1F12Listening += "F7" + }) + .keyboardShortcut(FunctionKey.F8, [ModifierKey.ALT], () => { + this.mF1F12Listening += "F7" + }) + .keyboardShortcut(FunctionKey.F9, [ModifierKey.ALT], () => { + this.mF1F12Listening += "F8" + }) + .keyboardShortcut(FunctionKey.F10, [ModifierKey.ALT], () => { + this.mF1F12Listening += "F10" + }) + .keyboardShortcut(FunctionKey.F11, [ModifierKey.ALT], () => { + this.mF1F12Listening += "F11" + }) + .keyboardShortcut(FunctionKey.F12, [ModifierKey.ALT], () => { + this.mF1F12Listening += "F12" + }) + Text(this.eventListening) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIActionEventIntercept/UISupportGlobalshortcutKeyRegistratton0260.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIActionEventIntercept/UISupportGlobalshortcutKeyRegistratton0260.ets new file mode 100644 index 0000000000000000000000000000000000000000..f9e3069ece8dd5de5ab2dae9129ae63d91c9caa9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIActionEventIntercept/UISupportGlobalshortcutKeyRegistratton0260.ets @@ -0,0 +1,31 @@ +/* + * 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 { KeyCode } from '@kit.InputKit'; + +@Entry +@Component +struct UISupportGlobalshortcutKeyRegistratton0260 { + @State eventListening: string = "事件监听状态" + + build() { + Column() { + Button("keyboardShortcut") + .keyboardShortcut(FunctionKey.TAB, [], () => { + this.eventListening= "TAB ·ModiferKey.不设置" + }) + Text(this.eventListening) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIActionEventIntercept/UISupportGlobalshortcutKeyRegistratton0300.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIActionEventIntercept/UISupportGlobalshortcutKeyRegistratton0300.ets new file mode 100644 index 0000000000000000000000000000000000000000..759f96f50f9aaf2d284230bd98df3aed385dfcc4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIActionEventIntercept/UISupportGlobalshortcutKeyRegistratton0300.ets @@ -0,0 +1,31 @@ +/* + * 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 { KeyCode } from '@kit.InputKit'; + +@Entry +@Component +struct UISupportGlobalshortcutKeyRegistratton0300 { + @State eventListening: string = "事件监听状态" + + build() { + Column() { + Button("keyboardShortcut") + .keyboardShortcut("TAB",[ModifierKey.SHIFT,ModifierKey.ALT], () => { + this.eventListening = "FunctionKeyC…ModifierKey.F1-F12" + }) + Text(this.eventListening) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesEnabledInterface/UIAttributesEnabledInterface10.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesEnabledInterface/UIAttributesEnabledInterface10.ets new file mode 100644 index 0000000000000000000000000000000000000000..5b3058d58299eae6a2124d799beb0b0aab8fa6a2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesEnabledInterface/UIAttributesEnabledInterface10.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. + */ +@Entry +@Component +struct UIAttributesEnabledInterface10 { + @State text:string='button '; + + build() { + Column({ space: 5 }) { + Button(this.text) + .enabled(true) + .id('UIAttributesEnabledInterface10') + .gesture( + TapGesture({ count:1}) + .onAction((event: GestureEvent) => { + if (event) { + this.text = 'success' + } + }) + ) + .backgroundColor(0x317aff) + + Button('disable').enabled(false).backgroundColor(0x317aff).opacity(0.4) + }.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/UIAttributesEnabledInterface/UIAttributesEnabledInterface20.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesEnabledInterface/UIAttributesEnabledInterface20.ets new file mode 100644 index 0000000000000000000000000000000000000000..ddd4e5454c6fdc97f3853d8a144cb917977286d4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesEnabledInterface/UIAttributesEnabledInterface20.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. + */ +@Entry +@Component +struct UIAttributesEnabledInterface20 { + @State text:string='button '; + + build() { + Column({ space: 5 }) { + Button(this.text) + .enabled(true) + .id('UIAttributesEnabledInterface20') + .gesture( + TapGesture({ count:1}) + .onAction((event: GestureEvent) => { + if (event) { + this.text = 'success' + } + }) + ) + .backgroundColor(0x317aff) + + Button('disable').enabled(false).backgroundColor(0x317aff).opacity(0.4) + }.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/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0090.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0090.ets new file mode 100644 index 0000000000000000000000000000000000000000..7ee328611c0f59cb77295ed1541cf576037ee293 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0090.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. + */ + +@Entry +@Component +struct UIAttributesTouchableInteraction0090 { + @State message: string = 'ROW1'; + @State message2: string = 'ROW2'; + + build() { + Column(){ + Row(){ + Text(this.message) + } + .id('UIAttributesTouchableInteraction0090_001') + .hitTestBehavior(HitTestMode.None) + .onDragEnter((dragEnter)=>{ + + }) + .onDrop(()=>{ + + }) + Row(){ + Text(this.message2) + } + } + // Row() { + // Column() { + // Rect({ width: '90%', height: 80 }) + // .hitTestBehavior(HitTestMode.None) + // .onTouch((event) => { + // this.message = 'Rect Touched'; + // }) + // .radiusHeight(20) + // .radiusWidth(40) + // .fill(Color.Pink) + // .id('UIAttributesTouchableInteraction0090_001') + // Text(this.message) + // } + // .width('100%') + // } + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0130.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0130.ets new file mode 100644 index 0000000000000000000000000000000000000000..8729a4b22b017842d3299c8cd61346314ec85b13 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0130.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 UIAttributesTouchableInteraction0130 { + @State message: string = ''; + + build() { + Row() { + Column() { + Rect({ width: '90%', height: 80 }) + .hitTestBehavior(HitTestMode.None) + .onTouch((event) => { + this.message = 'Rect Touched'; + }) + .radiusHeight(20) + .radiusWidth(40) + .fill(Color.Pink) + .id('UIAttributesTouchableInteraction0130_001') + Text(this.message) + } + .width('100%') + } + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0160.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0160.ets new file mode 100644 index 0000000000000000000000000000000000000000..89b3b66afc2d63a817f2693229562730939bdca5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0160.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. + */ + +@Entry +@Component +struct UIAttributesTouchableInteraction0160 { + @State message: string = ''; + + build() { + Row() { + Column() { + Button('testButton') + .onKeyEvent((event)=>{ + this.message = 'keyEvent Touched' + event.keyCode; + }) + Rect({ width: '90%', height: 80 }) + // .hitTestBehavior(HitTestMode.None) + .onKeyEvent((event)=>{ + this.message = 'keyEvent Touched' + event.keyCode; + }) + .focusable(true) + .radiusHeight(20) + .radiusWidth(40) + .fill(Color.Pink) + .id('UIAttributesTouchableInteraction0160_001') + Text(this.message) + } + .width('100%') + } + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0170.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0170.ets new file mode 100644 index 0000000000000000000000000000000000000000..f2fc94e13f6008fd697a7e0c550ac1a4974cfcc5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0170.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 UIAttributesTouchableInteraction0170 { + @State message: string = ''; + + build() { + Row() { + Column() { + Rect({ width: '90%', height: 80 }) + .hitTestBehavior(HitTestMode.None) + .onClick(() => { + this.message = 'Rect Clicked'; + }) + .radiusHeight(20) + .radiusWidth(40) + .fill(Color.Pink) + .id('UIAttributesTouchableInteraction0170_001') + Text(this.message) + } + .width('100%') + } + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0200.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0200.ets new file mode 100644 index 0000000000000000000000000000000000000000..8202e73594119c9bacd53198ba3e466105b23edf --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0200.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 UIAttributesTouchableInteraction0200 { + @State message: string = ''; + + build() { + Row() { + Column() { + Rect({ width: '90%', height: 80 }) + .hitTestBehavior(HitTestMode.None) + .onTouch((event) => { + this.message = 'Rect Touched'; + }) + .radiusHeight(20) + .radiusWidth(40) + .fill(Color.Pink) + .id('UIAttributesTouchableInteraction0200_001') + Text(this.message) + } + .width('100%') + } + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0240.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0240.ets new file mode 100644 index 0000000000000000000000000000000000000000..7e3e0d12da54e95c7ca6d3d0546f7cd3c5239f87 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0240.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. + */ + +@Entry +@Component +struct UIAttributesTouchableInteraction0240 { + @State message: string = ''; + + build() { + Row() { + Column() { + Rect({ width: '90%', height: 80 }) + .hitTestBehavior(HitTestMode.Transparent) + .radiusHeight(20) + .radiusWidth(40) + .fill(Color.Pink) + .id('UIAttributesTouchableInteraction0240_001') + .gesture( + LongPressGesture() + .onAction((event) => { + if (event) { + this.message = 'LongPressGesture success'; + } + }) + ) + Text(this.message) + } + .width('100%') + } + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0280.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0280.ets new file mode 100644 index 0000000000000000000000000000000000000000..c3f51dc5ee9da098522b763a50c97aa8fd5b9576 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0280.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. + */ + +@Entry +@Component +struct UIAttributesTouchableInteraction0280 { + @State message: string = ''; + + build() { + Row() { + Column() { + Rect({ width: '90%', height: 80 }) + .hitTestBehavior(HitTestMode.Transparent) + .radiusHeight(20) + .radiusWidth(40) + .fill(Color.Pink) + .id('UIAttributesTouchableInteraction0280_001') + .gesture( + SwipeGesture() + .onAction((event) => { + if (event) { + this.message = 'SwipeGesture success'; + } + }) + ) + Text(this.message) + } + .width('100%') + } + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0300.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0300.ets new file mode 100644 index 0000000000000000000000000000000000000000..e12df34663a0f83d13d88f7e761ef523bb5e258b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0300.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 UIAttributesTouchableInteraction0300 { + @State message: string = ''; + + build() { + Row() { + Column() { + Rect({ width: '90%', height: 80 }) + .hitTestBehavior(HitTestMode.None) + .onTouch((event) => { + this.message = 'Rect Touched'; + }) + .radiusHeight(20) + .radiusWidth(40) + .fill(Color.Pink) + .id('UIAttributesTouchableInteraction0300_001') + Text(this.message) + } + .width('100%') + } + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0320.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0320.ets new file mode 100644 index 0000000000000000000000000000000000000000..cea2800f7cfd1d31f5e13438c647ae9a7436c78a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0320.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 UIAttributesTouchableInteraction0320 { + @State message: string = ''; + + build() { + Row() { + Column() { + Rect({ width: '90%', height: 80 }) + .hitTestBehavior(HitTestMode.None) + .onTouch((event) => { + this.message = 'Rect Touched'; + }) + .radiusHeight(20) + .radiusWidth(40) + .fill(Color.Pink) + .id('UIAttributesTouchableInteraction0320_001') + Text(this.message) + } + .width('100%') + } + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0330.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0330.ets new file mode 100644 index 0000000000000000000000000000000000000000..bc7317d6ee29a8e2b6dcc63f3a5ac3cf04fa8dfb --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0330.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 UIAttributesTouchableInteraction0330 { + @State message: string = ''; + + build() { + Row() { + Column() { + Rect({ width: '90%', height: 80 }) + .hitTestBehavior(HitTestMode.None) + .onTouch((event) => { + this.message = 'Rect Touched'; + }) + .radiusHeight(20) + .radiusWidth(40) + .fill(Color.Pink) + .id('UIAttributesTouchableInteraction0330_001') + Text(this.message) + } + .width('100%') + } + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0350.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0350.ets new file mode 100644 index 0000000000000000000000000000000000000000..d5f62897a4b2f07e4d764ee62031eb0a0a2f6341 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0350.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 UIAttributesTouchableInteraction0350 { + @State message: string = ''; + + build() { + Row() { + Column() { + Rect({ width: '90%', height: 80 }) + .hitTestBehavior(HitTestMode.None) + .onTouch((event) => { + this.message = 'Rect Touched'; + }) + .radiusHeight(20) + .radiusWidth(40) + .fill(Color.Pink) + .id('UIAttributesTouchableInteraction0350_001') + Text(this.message) + } + .width('100%') + } + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0360.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0360.ets new file mode 100644 index 0000000000000000000000000000000000000000..cc2f016a8f8dd82ade420f21c6fe8c424e0860a6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0360.ets @@ -0,0 +1,45 @@ +/* + * 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 UIAttributesTouchableInteraction0360 { + @State message: string = ''; + @State show: boolean = false; + + build() { + Row() { + Column() { + Button('changeShow') + .id('UIAttributesTouchableInteraction0360_001') + .onClick(() => { + this.show = !this.show; + }) + if (this.show){ + Button('testButton') + .onAppear(() => { + this.message = 'testButton onAppear'; + }) + .onDisAppear(()=>{ + this.message = 'testButton onDisAppear'; + }) + } + Text(this.message) + } + .width('100%') + } + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0370.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0370.ets new file mode 100644 index 0000000000000000000000000000000000000000..09d25b500af6137d4e18193b943577d37704414b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0370.ets @@ -0,0 +1,45 @@ +/* + * 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 UIAttributesTouchableInteraction0370 { + @State message: string = ''; + @State show: boolean = true; + + build() { + Row() { + Column() { + Button('changeShow') + .id('UIAttributesTouchableInteraction0370_001') + .onClick(() => { + this.show = !this.show; + }) + if (this.show){ + Button('testButton') + .onAppear(() => { + this.message = 'testButton onAppear'; + }) + .onDisAppear(()=>{ + this.message = 'testButton onDisAppear'; + }) + } + Text(this.message) + } + .width('100%') + } + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0410.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0410.ets new file mode 100644 index 0000000000000000000000000000000000000000..81dd7e8c1dd9ed03652c4489a3875b8281bd0205 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0410.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 UIAttributesTouchableInteraction0410 { + @State message: string = ''; + + build() { + Row() { + Column() { + Rect({ width: '90%', height: 80 }) + .hitTestBehavior(HitTestMode.None) + .onTouch((event) => { + this.message = 'Rect Touched'; + }) + .radiusHeight(20) + .radiusWidth(40) + .fill(Color.Pink) + .id('UIAttributesTouchableInteraction0410_001') + Text(this.message) + } + .width('100%') + } + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction10.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction10.ets new file mode 100644 index 0000000000000000000000000000000000000000..c10dbdb26bd50a27111f8ce47918fa760cb4031e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction10.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. + */ +@Entry +@Component +struct UIAttributesTouchableInteraction10 { + @State count: number = 0 + + build() { + Column() { + Text('LongPress onAction:' + this.count) + .fontSize(28) + .hitTestBehavior(HitTestMode.None) + .id('UIAttributesTouchableInteraction10') + .gesture( + LongPressGesture({ repeat: true }) + .onAction((event: GestureEvent) => { + if (event && event.repeat) { + this.count++ + } + }) + .onActionEnd((event: GestureEvent) => { + this.count = 0 + }) + ) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction100.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction100.ets new file mode 100644 index 0000000000000000000000000000000000000000..b204899c97344bb4d9d7a1463ce93aaaf2e91990 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction100.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 UDC from '@ohos.data.unifiedDataChannel'; +import UTD from '@ohos.data.uniformTypeDescriptor'; + +@Entry +@Component +struct UIAttributesTouchableInteraction100 { + @State uri: string = "" + @State AblockArr: string[] = [] + @State BblockArr: string[] = [] + @State AVisible: Visibility = Visibility.Visible + @State dragSuccess :Boolean = false + + build() { + Column() { + Text('Image拖拽') + .width(100) + .height(100) + .border({ width: 1 }) + .visibility(this.AVisible) + .draggable(true) + .hitTestBehavior(HitTestMode.None) + .id('UIAttributesTouchableInteraction100') + .onDragLeave(() =>{ + + this.uri = 'onDragLeave'; + }) + .onDragStart(() => { + }) + .onDragEnd((event: DragEvent) => { + let ret = event.getResult(); + if(ret == 0) { + console.log("enter ret == 0") + this.AVisible = Visibility.Hidden; + } else { + console.log("enter ret != 0") + this.AVisible = Visibility.Visible; + } + }) + + Row() { + Column(){ + Text('不允许释放区域(显示不允许角标但可以释放)') + .fontSize('15dp') + .height('10%') + List(){ + ForEach(this.AblockArr, (item:string, index) => { + ListItem() { + Image(item) + .width(100) + .height(100) + .border({width: 1}) + } + .margin({ left: 30 , top : 30}) + }, (item:string) => item) + } + .height('90%') + .width('100%') + .allowDrop([UTD.UniformDataType.TEXT]) + .onDrop((event?: DragEvent, extraParams?: string) => { + this.uri = JSON.parse(extraParams as string).extraInfo; + this.AblockArr.splice(JSON.parse(extraParams as string).insertIndex, 0, this.uri); + }) + .border({width: 1}) + } + .height("50%") + .width("45%") + .border({ width: 1 }) + .margin({ left: 12 }) + Column(){ + Text('可释放区域') + .fontSize('15dp') + .height('10%') + List(){ + ForEach(this.BblockArr, (item:string, index) => { + ListItem() { + Image(item) + .width(100) + .height(100) + .border({width: 1}) + } + .margin({ left: 30 , top : 30}) + }, (item:string) => item) + } + .id('UIAttributesTouchableInteraction100_1') + .border({width: 1}) + .height('90%') + .width('100%') + .allowDrop([UTD.UniformDataType.IMAGE]) + .onDrop((event?: DragEvent, extraParams?: string) => { + console.log("enter onDrop") + let dragData:UnifiedData = (event as DragEvent).getData() as UnifiedData; + if(dragData != undefined) { + let arr:Array = dragData.getRecords(); + if(arr.length > 0) { + let image = arr[0] as UDC.Image; + this.uri = image.imageUri; + this.BblockArr.splice(JSON.parse(extraParams as string).insertIndex, 0, this.uri); + } else { + } + } else { + } + this.dragSuccess = true + }) + } + .height("50%") + .width("45%") + .border({ width: 1 }) + .margin({ left: 12 }) + } + }.width('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction110.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction110.ets new file mode 100644 index 0000000000000000000000000000000000000000..59498518ab1e4d7320de79bf814402d6cefd8124 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction110.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 UDC from '@ohos.data.unifiedDataChannel'; +import UTD from '@ohos.data.uniformTypeDescriptor'; + +@Entry +@Component +struct UIAttributesTouchableInteraction110 { + @State uri: string = "" + @State AblockArr: string[] = [] + @State BblockArr: string[] = [] + @State AVisible: Visibility = Visibility.Visible + @State dragSuccess :Boolean = false + + build() { + Column() { + Text('Image拖拽') + .width(100) + .height(100) + .border({ width: 1 }) + .visibility(this.AVisible) + .draggable(true) + .hitTestBehavior(HitTestMode.None) + .id('UIAttributesTouchableInteraction110') + .onDragMove(() =>{ + + this.uri = 'onDragLeave'; + }) + .onDragStart(() => { + }) + .onDragEnd((event: DragEvent) => { + let ret = event.getResult(); + if(ret == 0) { + console.log("enter ret == 0") + this.AVisible = Visibility.Hidden; + } else { + console.log("enter ret != 0") + this.AVisible = Visibility.Visible; + } + }) + + Row() { + Column(){ + Text('不允许释放区域(显示不允许角标但可以释放)') + .fontSize('15dp') + .height('10%') + List(){ + ForEach(this.AblockArr, (item:string, index) => { + ListItem() { + Image(item) + .width(100) + .height(100) + .border({width: 1}) + } + .margin({ left: 30 , top : 30}) + }, (item:string) => item) + } + .height('90%') + .width('100%') + .allowDrop([UTD.UniformDataType.TEXT]) + .onDrop((event?: DragEvent, extraParams?: string) => { + this.uri = JSON.parse(extraParams as string).extraInfo; + this.AblockArr.splice(JSON.parse(extraParams as string).insertIndex, 0, this.uri); + }) + .border({width: 1}) + } + .height("50%") + .width("45%") + .border({ width: 1 }) + .margin({ left: 12 }) + Column(){ + Text('可释放区域') + .fontSize('15dp') + .height('10%') + List(){ + ForEach(this.BblockArr, (item:string, index) => { + ListItem() { + Image(item) + .width(100) + .height(100) + .border({width: 1}) + } + .margin({ left: 30 , top : 30}) + }, (item:string) => item) + } + .id('UIAttributesTouchableInteraction110_1') + .border({width: 1}) + .height('90%') + .width('100%') + .allowDrop([UTD.UniformDataType.IMAGE]) + .onDrop((event?: DragEvent, extraParams?: string) => { + console.log("enter onDrop") + let dragData:UnifiedData = (event as DragEvent).getData() as UnifiedData; + if(dragData != undefined) { + let arr:Array = dragData.getRecords(); + if(arr.length > 0) { + let image = arr[0] as UDC.Image; + this.uri = image.imageUri; + this.BblockArr.splice(JSON.parse(extraParams as string).insertIndex, 0, this.uri); + } else { + } + } else { + } + this.dragSuccess = true + }) + } + .height("50%") + .width("45%") + .border({ width: 1 }) + .margin({ left: 12 }) + } + }.width('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction140.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction140.ets new file mode 100644 index 0000000000000000000000000000000000000000..bcb6377da492bf9d456dc0312c5b97291509aa7f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction140.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 '@kit.ArkUI' + +@Entry +@Component +struct UIAttributesTouchableInteraction140 { + @State isShow: boolean = true + @State changeAppear: string = '点我卸载挂载组件' + private myText: string = 'Text for onAppear' + + build() { + Column() { + Button(this.changeAppear) + .id('UIAttributesTouchableInteraction140') + .hitTestBehavior(HitTestMode.None) + .onClick(() => { + this.isShow = !this.isShow + }).margin(15) + if (this.isShow) { + Text(this.myText).fontSize(26).fontWeight(FontWeight.Bold) + .onAttach(() => { + promptAction.showToast({ + message: 'The text is shown', + duration: 2000, + bottom: 500 + }) + }) + .onAppear(() =>{ + this.myText = 'Text for onAppear'; + }) + .onDetach(() => { + promptAction.showToast({ + message: 'The text is hidden', + duration: 2000, + bottom: 500 + }) + }) + .onDisAppear(() =>{ + this.myText = 'Text for DisAppear'; + }) + } + }.padding(30).width('100%') + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction180.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction180.ets new file mode 100644 index 0000000000000000000000000000000000000000..2aca2c30a0d59fb10cd3cab5c27a77ddfafcbe1f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction180.ets @@ -0,0 +1,42 @@ +/* + * 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 UIAttributesTouchableInteraction180 { + @State value: string = 'Text' + @State sizeValue: string = '' + + build() { + Column() { + Text(this.value) + .id('UIAttributesTouchableInteraction180') + .hitTestBehavior(HitTestMode.None) + .backgroundColor(Color.Green) + .margin(30) + .fontSize(20) + .onClick(() => { + this.value = this.value + 'Text' + }) + .onAreaChange((oldValue: Area, newValue: Area) => { + console.info(`Ace: on area change, oldValue is ${JSON.stringify(oldValue)} value is ${JSON.stringify(newValue)}`) + this.sizeValue = JSON.stringify(newValue) + }) + Text('new area is: \n' + this.sizeValue).margin({ right: 30, left: 30 }) + } + .width('100%').height('100%').margin({ top: 30 }) + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction190.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction190.ets new file mode 100644 index 0000000000000000000000000000000000000000..d948f6b6aed2637d6b377abac1277b9d31641998 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction190.ets @@ -0,0 +1,111 @@ +/* + * 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 UIAttributesTouchableInteraction190 { + scroller: Scroller = new Scroller() + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + @State testTextStr: string = 'test' + @State testRowStr: string = 'test' + + build() { + Column() { + Column() { + Text(this.testTextStr) + .fontSize(20) + + Text(this.testRowStr) + .fontSize(20) + } + .height(100) + .backgroundColor(Color.Gray) + .opacity(0.3) + + Scroll(this.scroller) { + Column() { + Text("Test Text Visible Change") + .fontSize(20) + .height(200) + .margin({ top: 50, bottom: 20 }) + .backgroundColor(Color.Green) + .onVisibleAreaChange([0.0, 1.0], (isVisible: boolean, currentRatio: number) => { + console.info('Test Text isVisible: ' + isVisible + ', currentRatio:' + currentRatio) + if (isVisible && currentRatio >= 1.0) { + console.info('Test Text is fully visible. currentRatio:' + currentRatio) + this.testTextStr = 'Test Text is fully visible' + } + + if (!isVisible && currentRatio <= 0.0) { + console.info('Test Text is completely invisible.') + this.testTextStr = 'Test Text is completely invisible' + } + }) + + Row() { + Text('Test Row Visible Change') + .fontSize(20) + .margin({ bottom: 20 }) + + } + .height(200) + .backgroundColor(Color.Yellow) + .onVisibleAreaChange([0.0, 1.0], (isVisible: boolean, currentRatio: number) => { + console.info('Test Row isVisible:' + isVisible + ', currentRatio:' + currentRatio) + if (isVisible && currentRatio >= 1.0) { + console.info('Test Row is fully visible.') + this.testRowStr = 'Test Row is fully visible' + } + + if (!isVisible && currentRatio <= 0.0) { + console.info('Test Row is completely invisible.') + this.testRowStr = 'Test Row is completely invisible' + } + }) + + ForEach(this.arr, (item:number) => { + Text(item.toString()) + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + }, (item:number) => (item.toString())) + + }.width('100%') + } + .id('UIAttributesTouchableInteraction190') + .hitTestBehavior(HitTestMode.None) + .backgroundColor(0x317aff) + .scrollable(ScrollDirection.Vertical) + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + .onWillScroll((xOffset: number, yOffset: number, scrollState: ScrollState) => { + console.info(xOffset + ' ' + yOffset) + }) + .onScrollEdge((side: Edge) => { + console.info('To the edge') + }) + .onScrollStop(() => { + console.info('Scroll Stop') + }) + + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction20.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction20.ets new file mode 100644 index 0000000000000000000000000000000000000000..de9d0005ebaba4c641222ab1cd075e84343229d1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction20.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 UIAttributesTouchableInteraction20 { + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + @State Text: string = 'Text PanGesture'; + private panOption: PanGestureOptions = new PanGestureOptions({ direction: PanDirection.Left | PanDirection.Right }); + + build() { + Column() { + Text(this.Text) + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(50) + .translate({ x: this.offsetX, y: this.offsetY, z: 0 }) + .hitTestBehavior(HitTestMode.None) + .id('UIAttributesTouchableInteraction20') + .gesture( + PanGesture(this.panOption) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + this.Text = 'PanGesture success'; + }) + ) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction210.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction210.ets new file mode 100644 index 0000000000000000000000000000000000000000..79648abf1817d7dcb74e8c1040db05b4404c207e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction210.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. + */ +@Entry +@Component +struct UIAttributesTouchableInteraction210 { + @State mouseText: string = ''; + build() { + Column() { + Rect() + .id('UIAttributesTouchableInteraction210') + .width('90%') + .height(50) + .fillOpacity(0) + .stroke(Color.Red) + .hitTestBehavior(HitTestMode.None) + .strokeWidth(3) + .width(180).height(80) + .onMouse((event: MouseEvent):void => { + if(event.action == MouseAction.Press){ + this.mouseText = 'Mouse click' ; + } + }) + Text(this.mouseText) + }.padding({ top: 30 }).width('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction220.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction220.ets new file mode 100644 index 0000000000000000000000000000000000000000..72e877012a2b2090f81f499d62dc49df561351a5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction220.ets @@ -0,0 +1,75 @@ +/* + * 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 UIAttributesTouchableInteraction220 { + @State hoverText: string = 'no hover'; + @State mouseText: string = ''; + @State action: string = ''; + @State mouseBtn: string = ''; + @State color: Color = Color.Blue; + + build() { + Column({ space: 20 }) { + + Rect() + .width(180).height(80) + .id('UIAttributesTouchableInteraction220') + .hitTestBehavior(HitTestMode.None) + .onMouse((event: MouseEvent):void => { + if(event){ + switch (event.button) { + case MouseButton.None: + this.mouseBtn = 'None'; + break; + case MouseButton.Left: + this.mouseBtn = 'Left'; + break; + case MouseButton.Right: + this.mouseBtn = 'Right'; + break; + case MouseButton.Back: + this.mouseBtn = 'Back'; + break; + case MouseButton.Forward: + this.mouseBtn = 'Forward'; + break; + case MouseButton.Middle: + this.mouseBtn = 'Middle'; + break; + } + switch (event.action) { + case MouseAction.Hover: + this.action = 'Hover'; + break; + case MouseAction.Press: + this.action = 'Press'; + break; + case MouseAction.Move: + this.action = 'Move'; + break; + case MouseAction.Release: + this.action = 'Release'; + break; + } + this.mouseText = 'onMouse:\nButton = ' + this.mouseBtn + + '\nAction = ' + this.action + '\nXY=(' + event.x + ',' + event.y + ')' + + '\nwindowXY=(' + event.windowX + ',' + event.windowY + ')'; + } + }) + Text(this.mouseText) + }.padding({ top: 30 }).width('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction230.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction230.ets new file mode 100644 index 0000000000000000000000000000000000000000..a49cc11d23bcfe315a2fe23cba833ac373ea30b6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction230.ets @@ -0,0 +1,41 @@ +/* + * 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 UIAttributesTouchableInteraction230 { + @State value: string = '' + + build() { + Column() { + Text('Click ').fontSize(28) + .id('UIAttributesTouchableInteraction230') + .hitTestBehavior(HitTestMode.Transparent) + .gesture( + TapGesture({ count: 1 }) + .onAction((event: GestureEvent) => { + if (event) { + this.value = 'onAction'; + } + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction250.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction250.ets new file mode 100644 index 0000000000000000000000000000000000000000..e31e0f06ac31ba80a009434b75b3f0e860356ebc --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction250.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 UIAttributesTouchableInteraction250 { + @State value: string = ''; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + private panOption: PanGestureOptions = new PanGestureOptions({ direction: PanDirection.All }); + + build() { + Column() { + Text('Click ').fontSize(28) + .id('UIAttributesTouchableInteraction250') + .hitTestBehavior(HitTestMode.Transparent) + .translate({ x: this.offsetX, y: this.offsetY, z: 0 }) + .gesture( + PanGesture(this.panOption) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + this.value = 'onActionEnd'; + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction260.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction260.ets new file mode 100644 index 0000000000000000000000000000000000000000..dcf1506b4784069e17da9affb9234983104b183c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction260.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. + */ +@Entry +@Component +struct UIAttributesTouchableInteraction260 { + @State value: string = ''; + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + + build() { + Column() { + Text('Click ').fontSize(28) + .id('UIAttributesTouchableInteraction260') + .hitTestBehavior(HitTestMode.Transparent) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({ fingers: 2 }) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.pinchValue = this.scaleValue; + this.value = 'PinchGesture onActionEnd'; + }) + ) + Text(this.value) + Button('restore') + .id('UIAttributesTouchableInteraction260_1') + .onClick(() =>{ + this.scaleValue = 1; + this.pinchValue = 1; + }) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction270.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction270.ets new file mode 100644 index 0000000000000000000000000000000000000000..7347dfc74de3d225000c30eb1fcbe478846ee753 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction270.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 UIAttributesTouchableInteraction270 { + @State value: string = ''; + @State angle: number = 0; + @State rotateValue: number = 0; + build() { + Column() { + Text('Click ').fontSize(28) + .id('UIAttributesTouchableInteraction270') + .hitTestBehavior(HitTestMode.Transparent) + .rotate({ angle: this.angle }) + .gesture( + RotationGesture() + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle; + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle; + this.value = 'RotationGesture onActionEnd'; + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction290.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction290.ets new file mode 100644 index 0000000000000000000000000000000000000000..745cfa9b051d37b6aaf0b3f6e656628fda91246c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction290.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. + */ +@Entry +@Component +struct UIAttributesTouchableInteraction290 { + @State value: string = ''; + @State count: number = 0; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + @State borderStyles: BorderStyle = BorderStyle.Solid; + build() { + Column() { + Text('Click ').fontSize(28) + .id('UIAttributesTouchableInteraction290') + .hitTestBehavior(HitTestMode.Transparent) + .translate({ x: this.offsetX, y: this.offsetY, z: 0 }) + .gesture( + GestureGroup(GestureMode.Parallel, + LongPressGesture({ repeat: true }) + .onAction((event?: GestureEvent) => { + if (event && event.repeat) { + this.count++ + } + this.value = 'LongPress onAction'; + }), + PanGesture() + .onActionStart(() => { + this.borderStyles = BorderStyle.Dashed; + }) + .onActionUpdate((event?: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + } + }) + .onActionEnd(() => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + this.borderStyles = BorderStyle.Solid; + + this.value += 'PanGesture onAction'; + }) + ) + .onCancel(() => { + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction30.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction30.ets new file mode 100644 index 0000000000000000000000000000000000000000..3e5fbf5bb57a9bc4d4faf496c8e02479f03a4175 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction30.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. + */ +@Entry +@Component +struct UIAttributesTouchableInteraction30 { + @State Text: string = 'Text PinchGesture'; + @State scaleValue: number = 1; + @State pinchValue: number = 1; + @State pinchX: number = 0; + @State pinchY: number = 0; + build() { + Column() { + + Text(this.Text) + .id('UIAttributesTouchableInteraction30') + .width('90%') + .height(50) + .hitTestBehavior(HitTestMode.None) + .width(180).height(80) + .scale({ x: this.scaleValue, y: this.scaleValue, z: 1 }) + .gesture( + PinchGesture({ fingers: 2 }) + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.scaleValue = this.pinchValue * event.scale; + this.pinchX = event.pinchCenterX; + this.pinchY = event.pinchCenterY; + } + }) + .onActionEnd((event: GestureEvent) => { + this.pinchValue = this.scaleValue; + this.Text = 'PinchGesture success'; + }) + ) + }.padding({ top: 30 }).width('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction310.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction310.ets new file mode 100644 index 0000000000000000000000000000000000000000..14b84ae1ca5aa12abf69945e5341aae8c093e74f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction310.ets @@ -0,0 +1,135 @@ +/* + * 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. + */ +// xxx.ets +import UDC from '@ohos.data.unifiedDataChannel'; +import UTD from '@ohos.data.uniformTypeDescriptor'; + +@Entry +@Component +struct UIAttributesTouchableInteraction310 { + @State uri: string = ""; + @State text: string = ""; + @State AblockArr: string[] = [] + @State BblockArr: string[] = [] + @State AVisible: Visibility = Visibility.Visible + @State dragSuccess :Boolean = false + + build() { + Column() { + Text(this.text) + .fontSize('30dp') + Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceAround }) { + Image($r('app.media.icon')) + .id('UIAttributesTouchableInteraction310') + .hitTestBehavior(HitTestMode.Transparent) + .width(100) + .height(100) + .border({ width: 1 }) + .visibility(this.AVisible) + .draggable(true) + .onDragStart(() =>{ + }) + .onDragEnd((event: DragEvent) => { + let ret = event.getResult(); + if(ret == 0) { + console.log("enter ret == 0") + this.AVisible = Visibility.Hidden; + } else { + console.log("enter ret != 0") + this.AVisible = Visibility.Visible; + } + }) + } + .margin({ bottom: 20 }) + Row() { + Column(){ + Text('不允许释放区域(显示不允许角标但可以释放)') + .fontSize('15dp') + .height('10%') + List(){ + ForEach(this.AblockArr, (item:string, index) => { + ListItem() { + Image(item) + .width(100) + .height(100) + .border({width: 1}) + } + .margin({ left: 30 , top : 30}) + }, (item:string) => item) + } + .height('90%') + .width('100%') + .allowDrop([UTD.UniformDataType.TEXT]) + .onDrop((event?: DragEvent, extraParams?: string) => { + this.uri = JSON.parse(extraParams as string).extraInfo; + this.AblockArr.splice(JSON.parse(extraParams as string).insertIndex, 0, this.uri); + console.log("ondrop not udmf data"); + }) + .border({width: 1}) + } + .height("50%") + .width("45%") + .border({ width: 1 }) + .margin({ left: 12 }) + Column(){ + Text('可释放区域') + .fontSize('15dp') + .height('10%') + List(){ + ForEach(this.BblockArr, (item:string, index) => { + ListItem() { + Image(item) + .width(100) + .height(100) + .border({width: 1}) + } + .margin({ left: 30 , top : 30}) + }, (item:string) => item) + } + .id('UIAttributesTouchableInteraction310_1') + .onDragEnter(() => { + this.text = 'onDragEnter'; + }) + .border({width: 1}) + .height('90%') + .width('100%') + .allowDrop([UTD.UniformDataType.IMAGE]) + .onDrop((event?: DragEvent, extraParams?: string) => { + console.log("enter onDrop") + let dragData:UnifiedData = (event as DragEvent).getData() as UnifiedData; + if(dragData != undefined) { + let arr:Array = dragData.getRecords(); + if(arr.length > 0) { + let image = arr[0] as UDC.Image; + this.uri = image.imageUri; + this.BblockArr.splice(JSON.parse(extraParams as string).insertIndex, 0, this.uri); + } else { + console.log(`dragData arr is null`) + } + } else { + console.log(`dragData is undefined`) + } + console.log("ondrop udmf data"); + this.dragSuccess = true + }) + } + .height("50%") + .width("45%") + .border({ width: 1 }) + .margin({ left: 12 }) + } + }.width('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction340.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction340.ets new file mode 100644 index 0000000000000000000000000000000000000000..e9afe2be79096ca4b9c3992ff6fc82e0823e238a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction340.ets @@ -0,0 +1,133 @@ +/* + * 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. + */ +// xxx.ets +import UDC from '@ohos.data.unifiedDataChannel'; +import UTD from '@ohos.data.uniformTypeDescriptor'; + +@Entry +@Component +struct UIAttributesTouchableInteraction340 { + @State uri: string = ""; + @State text: string = ""; + @State AblockArr: string[] = [] + @State BblockArr: string[] = [] + @State AVisible: Visibility = Visibility.Visible + @State dragSuccess :Boolean = false + + build() { + Column() { + Text(this.text) + .fontSize('30dp') + Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceAround }) { + Image($r('app.media.icon')) + .id('UIAttributesTouchableInteraction340') + .hitTestBehavior(HitTestMode.Transparent) + .width(100) + .height(100) + .border({ width: 1 }) + .visibility(this.AVisible) + .draggable(true) + .onDragStart(() =>{ + this.text = 'onDragStart'; + }) + .onDragEnd((event: DragEvent) => { + let ret = event.getResult(); + if(ret == 0) { + console.log("enter ret == 0") + this.AVisible = Visibility.Hidden; + } else { + console.log("enter ret != 0") + this.AVisible = Visibility.Visible; + } + }) + } + .margin({ bottom: 20 }) + Row() { + Column(){ + Text('不允许释放区域(显示不允许角标但可以释放)') + .fontSize('15dp') + .height('10%') + List(){ + ForEach(this.AblockArr, (item:string, index) => { + ListItem() { + Image(item) + .width(100) + .height(100) + .border({width: 1}) + } + .margin({ left: 30 , top : 30}) + }, (item:string) => item) + } + .height('90%') + .width('100%') + .allowDrop([UTD.UniformDataType.TEXT]) + .onDrop((event?: DragEvent, extraParams?: string) => { + this.uri = JSON.parse(extraParams as string).extraInfo; + this.AblockArr.splice(JSON.parse(extraParams as string).insertIndex, 0, this.uri); + console.log("ondrop not udmf data"); + }) + .border({width: 1}) + } + .height("50%") + .width("45%") + .border({ width: 1 }) + .margin({ left: 12 }) + Column(){ + Text('可释放区域') + .fontSize('15dp') + .height('10%') + List(){ + ForEach(this.BblockArr, (item:string, index) => { + ListItem() { + Image(item) + .width(100) + .height(100) + .border({width: 1}) + } + .margin({ left: 30 , top : 30}) + }, (item:string) => item) + } + .id('UIAttributesTouchableInteraction340_1') + .border({width: 1}) + .height('90%') + .width('100%') + .allowDrop([UTD.UniformDataType.IMAGE]) + .onDrop((event?: DragEvent, extraParams?: string) => { + console.log("enter onDrop") + let dragData:UnifiedData = (event as DragEvent).getData() as UnifiedData; + if(dragData != undefined) { + let arr:Array = dragData.getRecords(); + if(arr.length > 0) { + let image = arr[0] as UDC.Image; + this.uri = image.imageUri; + this.BblockArr.splice(JSON.parse(extraParams as string).insertIndex, 0, this.uri); + } else { + console.log(`dragData arr is null`) + } + } else { + console.log(`dragData is undefined`) + } + console.log("ondrop udmf data"); + this.dragSuccess = true + }) + } + .height("50%") + .width("45%") + .border({ width: 1 }) + .margin({ left: 12 }) + } + }.width('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction380.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction380.ets new file mode 100644 index 0000000000000000000000000000000000000000..d76ac63ab59514e6dc4ce2008221804a65d1257b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction380.ets @@ -0,0 +1,43 @@ +/* + * 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 UIAttributesTouchableInteraction380 { + @State value: string = ''; + + build() { + Column() { + Rect() + .width(180).height(80) + .id('UIAttributesTouchableInteraction380') + .hitTestBehavior(HitTestMode.Transparent) + .backgroundColor(Color.Black) + .gesture( + TapGesture({ count: 1 }) + .onAction((event: GestureEvent) => { + if (event) { + this.value = 'Rect Clicked'; + } + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction390.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction390.ets new file mode 100644 index 0000000000000000000000000000000000000000..1a6f485f1f9f59e5cc9eca38d855f369baedc418 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction390.ets @@ -0,0 +1,42 @@ +/* + * 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 UIAttributesTouchableInteraction390 { + @State value: string = 'Text' + @State sizeValue: string = '' + + build() { + Column() { + Text(this.value) + .id('UIAttributesTouchableInteraction390') + .hitTestBehavior(HitTestMode.Transparent) + .backgroundColor(Color.Green) + .margin(30) + .fontSize(20) + .onClick(() => { + this.value = this.value + 'Text' + }) + .onAreaChange((oldValue: Area, newValue: Area) => { + console.info(`Ace: on area change, oldValue is ${JSON.stringify(oldValue)} value is ${JSON.stringify(newValue)}`) + this.sizeValue = JSON.stringify(newValue) + }) + Text('new area is: \n' + this.sizeValue).margin({ right: 30, left: 30 }) + } + .width('100%').height('100%').margin({ top: 30 }) + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction40.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction40.ets new file mode 100644 index 0000000000000000000000000000000000000000..516db6ea48eb36bd1c215f0b3d358c300d491a26 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction40.ets @@ -0,0 +1,48 @@ +/* + * 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 UIAttributesTouchableInteraction40 { + @State angle: number = 0; + @State rotateValue: number = 0; + + build() { + Column() { + Text('RotationGesture angle:' + this.angle) + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(80) + .rotate({ angle: this.angle }) + .hitTestBehavior(HitTestMode.None) + .id('UIAttributesTouchableInteraction40') + .gesture( + RotationGesture() + .onActionStart((event: GestureEvent) => { + }) + .onActionUpdate((event: GestureEvent) => { + if (event) { + this.angle = this.rotateValue + event.angle; + } + }) + .onActionEnd((event: GestureEvent) => { + this.rotateValue = this.angle; + }) + ) + }.width('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction400.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction400.ets new file mode 100644 index 0000000000000000000000000000000000000000..2af4b6f92bd3e92b32566139de8df66231bda8ae --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction400.ets @@ -0,0 +1,111 @@ +/* + * 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 UIAttributesTouchableInteraction400 { + scroller: Scroller = new Scroller() + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + @State testTextStr: string = 'test' + @State testRowStr: string = 'test' + + build() { + Column() { + Column() { + Text(this.testTextStr) + .fontSize(20) + + Text(this.testRowStr) + .fontSize(20) + } + .height(100) + .backgroundColor(Color.Gray) + .opacity(0.3) + + Scroll(this.scroller) { + Column() { + Text("Test Text Visible Change") + .fontSize(20) + .height(200) + .margin({ top: 50, bottom: 20 }) + .backgroundColor(Color.Green) + .onVisibleAreaChange([0.0, 1.0], (isVisible: boolean, currentRatio: number) => { + console.info('Test Text isVisible: ' + isVisible + ', currentRatio:' + currentRatio) + if (isVisible && currentRatio >= 1.0) { + console.info('Test Text is fully visible. currentRatio:' + currentRatio) + this.testTextStr = 'Test Text is fully visible' + } + + if (!isVisible && currentRatio <= 0.0) { + console.info('Test Text is completely invisible.') + this.testTextStr = 'Test Text is completely invisible' + } + }) + + Row() { + Text('Test Row Visible Change') + .fontSize(20) + .margin({ bottom: 20 }) + + } + .height(200) + .backgroundColor(Color.Yellow) + .onVisibleAreaChange([0.0, 1.0], (isVisible: boolean, currentRatio: number) => { + console.info('Test Row isVisible:' + isVisible + ', currentRatio:' + currentRatio) + if (isVisible && currentRatio >= 1.0) { + console.info('Test Row is fully visible.') + this.testRowStr = 'Test Row is fully visible' + } + + if (!isVisible && currentRatio <= 0.0) { + console.info('Test Row is completely invisible.') + this.testRowStr = 'Test Row is completely invisible' + } + }) + + ForEach(this.arr, (item:number) => { + Text(item.toString()) + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + }, (item:number) => (item.toString())) + + }.width('100%') + } + .id('UIAttributesTouchableInteraction400') + .hitTestBehavior(HitTestMode.Transparent) + .backgroundColor(0x317aff) + .scrollable(ScrollDirection.Vertical) + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + .onWillScroll((xOffset: number, yOffset: number, scrollState: ScrollState) => { + console.info(xOffset + ' ' + yOffset) + }) + .onScrollEdge((side: Edge) => { + console.info('To the edge') + }) + .onScrollStop(() => { + console.info('Scroll Stop') + }) + + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction420.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction420.ets new file mode 100644 index 0000000000000000000000000000000000000000..8b87c59a565c29585c8362fe7bac25ae932947a4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction420.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. + */ +@Entry +@Component +struct UIAttributesTouchableInteraction420 { + @State value: string = ''; + + build() { + Column() { + Rect() + .width(180).height(80) + .id('UIAttributesTouchableInteraction420') + .hitTestBehavior(HitTestMode.Transparent) + .enabled(false) + .backgroundColor(Color.Black) + .gesture( + TapGesture({ count: 1 }) + .onAction((event: GestureEvent) => { + if (event) { + this.value = 'Rect Clicked'; + } + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction50.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction50.ets new file mode 100644 index 0000000000000000000000000000000000000000..b21e4962676a56f2cf1b6eab32a7e6e2e1be280e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction50.ets @@ -0,0 +1,42 @@ +/* + * 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 UIAttributesTouchableInteraction50 { + @State rotateAngle: number = 0; + @State speed: number = 1; + + build() { + Column() { + Text("SwipeGesture speed\n" + this.speed) + .border({ width: 3 }) + .width(300) + .height(200) + .margin(100) + .rotate({ angle: this.rotateAngle }) + .hitTestBehavior(HitTestMode.None) + .id('UIAttributesTouchableInteraction50') + .gesture( + SwipeGesture({ direction: SwipeDirection.Vertical }) + .onAction((event: GestureEvent) => { + if (event) { + this.speed = event.speed; + this.rotateAngle = event.angle; + } + }) + ) + }.width('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction60.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction60.ets new file mode 100644 index 0000000000000000000000000000000000000000..ba12f54b6ce9355e9c47142fae72a58e7c0acd22 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction60.ets @@ -0,0 +1,43 @@ +/* + * 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 UIAttributesTouchableInteraction60 { + @State value: string = '' + + build() { + Column() { + Text('Click ') + .fontSize(28) + .hitTestBehavior(HitTestMode.None) + .id('UIAttributesTouchableInteraction60') + .gesture( + TapGesture({ count: 1 }) + .onAction((event: GestureEvent) => { + if (event) { + this.value = JSON.stringify(event.fingerList[0]) + } + }) + ) + Text(this.value) + } + .height(200) + .width(300) + .padding(20) + .border({ width: 3 }) + .margin(30) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction70.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction70.ets new file mode 100644 index 0000000000000000000000000000000000000000..de56dbce848057912d15a3ee6d08e2aea3cffe12 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction70.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. + */ +// xxx.ets +@Entry +@Component +struct UIAttributesTouchableInteraction70 { + @State count: number = 0; + @State offsetX: number = 0; + @State offsetY: number = 0; + @State positionX: number = 0; + @State positionY: number = 0; + @State borderStyles: BorderStyle = BorderStyle.Solid; + + build() { + Text('sequence gesture\n' + 'LongPress onAction:' + this.count + '\nPanGesture offset:\nX: ' + this.offsetX + '\n' + 'Y: ' + this.offsetY) + .fontSize(15) + .translate({ x: this.offsetX, y: this.offsetY, z: 0 }) + .height(150) + .width(200) + .padding(20) + .margin(20) + .border({ width: 3, style: this.borderStyles }) + .hitTestBehavior(HitTestMode.None) + .id('UIAttributesTouchableInteraction70') + .gesture( + GestureGroup(GestureMode.Sequence, + LongPressGesture({ repeat: true }) + .onAction((event?: GestureEvent) => { + if (event && event.repeat) { + this.count++; + } + }), + PanGesture() + .onActionStart(() => { + this.borderStyles = BorderStyle.Dashed; + }) + .onActionUpdate((event?: GestureEvent) => { + if (event) { + this.offsetX = this.positionX + event.offsetX; + this.offsetY = this.positionY + event.offsetY; + } + }) + .onActionEnd(() => { + this.positionX = this.offsetX; + this.positionY = this.offsetY; + this.borderStyles = BorderStyle.Solid; + }) + ) + .onCancel(() => { + }) + ) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction80.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction80.ets new file mode 100644 index 0000000000000000000000000000000000000000..8e7e0c3a14706df617f39d013c6eba4e18cdbcd8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction80.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 UDC from '@ohos.data.unifiedDataChannel'; +import UTD from '@ohos.data.uniformTypeDescriptor'; + +@Entry +@Component +struct ImageExample { + @State uri: string = "" + @State AblockArr: string[] = [] + @State BblockArr: string[] = [] + @State AVisible: Visibility = Visibility.Visible + @State dragSuccess :Boolean = false + + build() { + Column() { + Text('Image拖拽') + .width(100) + .height(100) + .border({ width: 1 }) + .visibility(this.AVisible) + .draggable(true) + .hitTestBehavior(HitTestMode.None) + .id('UIAttributesTouchableInteraction80') + .onDragStart(() => { + }) + .onDragEnd((event: DragEvent) => { + let ret = event.getResult(); + if(ret == 0) { + console.log("enter ret == 0") + this.AVisible = Visibility.Hidden; + } else { + console.log("enter ret != 0") + this.AVisible = Visibility.Visible; + } + }) + + Row() { + Column(){ + Text('不允许释放区域(显示不允许角标但可以释放)') + .fontSize('15dp') + .height('10%') + List(){ + ForEach(this.AblockArr, (item:string, index) => { + ListItem() { + Image(item) + .width(100) + .height(100) + .border({width: 1}) + } + .margin({ left: 30 , top : 30}) + }, (item:string) => item) + } + .height('90%') + .width('100%') + .allowDrop([UTD.UniformDataType.TEXT]) + .onDrop((event?: DragEvent, extraParams?: string) => { + this.uri = JSON.parse(extraParams as string).extraInfo; + this.AblockArr.splice(JSON.parse(extraParams as string).insertIndex, 0, this.uri); + console.log("ondrop not udmf data"); + }) + .border({width: 1}) + } + .height("50%") + .width("45%") + .border({ width: 1 }) + .margin({ left: 12 }) + Column(){ + Text('可释放区域') + .fontSize('15dp') + .height('10%') + List(){ + ForEach(this.BblockArr, (item:string, index) => { + ListItem() { + Image(item) + .width(100) + .height(100) + .border({width: 1}) + } + .margin({ left: 30 , top : 30}) + }, (item:string) => item) + } + .id('UIAttributesTouchableInteraction80_1') + .border({width: 1}) + .height('90%') + .width('100%') + .allowDrop([UTD.UniformDataType.IMAGE]) + .onDrop((event?: DragEvent, extraParams?: string) => { + console.log("enter onDrop") + let dragData:UnifiedData = (event as DragEvent).getData() as UnifiedData; + if(dragData != undefined) { + let arr:Array = dragData.getRecords(); + if(arr.length > 0) { + let image = arr[0] as UDC.Image; + this.uri = image.imageUri; + this.BblockArr.splice(JSON.parse(extraParams as string).insertIndex, 0, this.uri); + } else { + console.log(`dragData arr is null`) + } + } else { + console.log(`dragData is undefined`) + } + console.log("ondrop udmf data"); + this.dragSuccess = true + }) + } + .height("50%") + .width("45%") + .border({ width: 1 }) + .margin({ left: 12 }) + } + }.width('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UIComponentCommonattrFocusoptimization130.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UIComponentCommonattrFocusoptimization130.ets new file mode 100644 index 0000000000000000000000000000000000000000..45cbd88133ca2dd57f6ae3cab93cebd79d9e70e0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UIComponentCommonattrFocusoptimization130.ets @@ -0,0 +1,93 @@ +/* + * 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 UIComponentCommonattrFocusoptimization130 { + pageInfos: NavPathStack = new NavPathStack() + isUseInterception: boolean = false; + + registerInterception() { + this.pageInfos.setInterception({ + // 页面跳转前拦截,允许操作栈,在当前跳转中生效。 + willShow: (from: NavDestinationContext | "navBar", to: NavDestinationContext | "navBar", + operation: NavigationOperation, animated: boolean) => { + if (!this.isUseInterception) { + return; + } + if (typeof to === "string") { + console.log("target page is navigation home"); + return; + } + // 重定向目标页面,更改为pageTwo页面到pageOne页面。 + let target: NavDestinationContext = to as NavDestinationContext; + if (target.pathInfo.name === 'pageTwo') { + target.pathStack.pop(); + target.pathStack.pushPathByName('pageOne', null); + } + }, + // 页面跳转后回调,在该回调中操作栈在下一次跳转中刷新。 + didShow: (from: NavDestinationContext | "navBar", to: NavDestinationContext | "navBar", + operation: NavigationOperation, isAnimated: boolean) => { + if (!this.isUseInterception) { + return; + } + if (typeof from === "string") { + console.log("current transition is from navigation home"); + } else { + console.log(`current transition is from ${(from as NavDestinationContext).pathInfo.name}`) + } + if (typeof to === "string") { + console.log("current transition to is navBar"); + } else { + console.log(`current transition is to ${(to as NavDestinationContext).pathInfo.name}`); + } + }, + // Navigation单双栏显示状态发生变更时触发该回调。 + modeChange: (mode: NavigationMode) => { + if (!this.isUseInterception) { + return; + } + console.log(`current navigation mode is ${mode}`); + } + }) + } + + build() { + Navigation(this.pageInfos) { + Column() { + Button('pushPath', { stateEffect: true, type: ButtonType.Capsule }) + .width('80%') + .height(40) + .margin(20) + .id('btn1') + .onClick(() => { + this.pageInfos.pushPath({ name: 'pageTwo' }) //将name指定的NavDestination页面信息入栈 + }) + Button('use interception', { stateEffect: true, type: ButtonType.Capsule }) + .width('80%') + .height(40) + .margin(20) + .onClick(() => { + this.isUseInterception = !this.isUseInterception; + if (this.isUseInterception) { + this.registerInterception(); + } else { + this.pageInfos.setInterception(undefined); + } + }) + } + }.title('NavIndex') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UIComponentCommonattrFocusoptimization133.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UIComponentCommonattrFocusoptimization133.ets new file mode 100644 index 0000000000000000000000000000000000000000..b6b07e081b26d93d3c285b53a70b85cd34665d12 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UIComponentCommonattrFocusoptimization133.ets @@ -0,0 +1,93 @@ +/* + * 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 UIComponentCommonattrFocusoptimization133 { + pageInfos: NavPathStack = new NavPathStack() + isUseInterception: boolean = false; + + registerInterception() { + this.pageInfos.setInterception({ + // 页面跳转前拦截,允许操作栈,在当前跳转中生效。 + willShow: (from: NavDestinationContext | "navBar", to: NavDestinationContext | "navBar", + operation: NavigationOperation, animated: boolean) => { + if (!this.isUseInterception) { + return; + } + if (typeof to === "string") { + console.log("target page is navigation home"); + return; + } + // 重定向目标页面,更改为pageTwo页面到pageOne页面。 + let target: NavDestinationContext = to as NavDestinationContext; + if (target.pathInfo.name === 'pageTwo') { + target.pathStack.pop(); + target.pathStack.pushPathByName('pageOne', null); + } + }, + // 页面跳转后回调,在该回调中操作栈在下一次跳转中刷新。 + didShow: (from: NavDestinationContext | "navBar", to: NavDestinationContext | "navBar", + operation: NavigationOperation, isAnimated: boolean) => { + if (!this.isUseInterception) { + return; + } + if (typeof from === "string") { + console.log("current transition is from navigation home"); + } else { + console.log(`current transition is from ${(from as NavDestinationContext).pathInfo.name}`) + } + if (typeof to === "string") { + console.log("current transition to is navBar"); + } else { + console.log(`current transition is to ${(to as NavDestinationContext).pathInfo.name}`); + } + }, + // Navigation单双栏显示状态发生变更时触发该回调。 + modeChange: (mode: NavigationMode) => { + if (!this.isUseInterception) { + return; + } + console.log(`current navigation mode is ${mode}`); + } + }) + } + + build() { + Navigation(this.pageInfos) { + Column() { + Button('pushPath', { stateEffect: true, type: ButtonType.Capsule }) + .width('80%') + .height(40) + .margin(20) + .id('btn1') + .onClick(() => { + this.pageInfos.pushPath({ name: 'pageTwo' }) //将name指定的NavDestination页面信息入栈 + }) + Button('use interception', { stateEffect: true, type: ButtonType.Capsule }) + .width('80%') + .height(40) + .margin(20) + .onClick(() => { + this.isUseInterception = !this.isUseInterception; + if (this.isUseInterception) { + this.registerInterception(); + } else { + this.pageInfos.setInterception(undefined); + } + }) + } + }.title('NavIndex') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UIComponentCommonattrFocusoptimization134.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UIComponentCommonattrFocusoptimization134.ets new file mode 100644 index 0000000000000000000000000000000000000000..0ad7ef94cc947523d58d79e2ff17a5f68ddbfacd --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UIComponentCommonattrFocusoptimization134.ets @@ -0,0 +1,93 @@ +/* + * 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 UIComponentCommonattrFocusoptimization134 { + pageInfos: NavPathStack = new NavPathStack() + isUseInterception: boolean = false; + + registerInterception() { + this.pageInfos.setInterception({ + // 页面跳转前拦截,允许操作栈,在当前跳转中生效。 + willShow: (from: NavDestinationContext | "navBar", to: NavDestinationContext | "navBar", + operation: NavigationOperation, animated: boolean) => { + if (!this.isUseInterception) { + return; + } + if (typeof to === "string") { + console.log("target page is navigation home"); + return; + } + // 重定向目标页面,更改为pageTwo页面到pageOne页面。 + let target: NavDestinationContext = to as NavDestinationContext; + if (target.pathInfo.name === 'pageTwo') { + target.pathStack.pop(); + target.pathStack.pushPathByName('pageOne', null); + } + }, + // 页面跳转后回调,在该回调中操作栈在下一次跳转中刷新。 + didShow: (from: NavDestinationContext | "navBar", to: NavDestinationContext | "navBar", + operation: NavigationOperation, isAnimated: boolean) => { + if (!this.isUseInterception) { + return; + } + if (typeof from === "string") { + console.log("current transition is from navigation home"); + } else { + console.log(`current transition is from ${(from as NavDestinationContext).pathInfo.name}`) + } + if (typeof to === "string") { + console.log("current transition to is navBar"); + } else { + console.log(`current transition is to ${(to as NavDestinationContext).pathInfo.name}`); + } + }, + // Navigation单双栏显示状态发生变更时触发该回调。 + modeChange: (mode: NavigationMode) => { + if (!this.isUseInterception) { + return; + } + console.log(`current navigation mode is ${mode}`); + } + }) + } + + build() { + Navigation(this.pageInfos) { + Column() { + Button('pushPath', { stateEffect: true, type: ButtonType.Capsule }) + .width('80%') + .height(40) + .margin(20) + .id('btn1') + .onClick(() => { + this.pageInfos.pushPath({ name: 'pageTwo' }) //将name指定的NavDestination页面信息入栈 + }) + Button('use interception', { stateEffect: true, type: ButtonType.Capsule }) + .width('80%') + .height(40) + .margin(20) + .onClick(() => { + this.isUseInterception = !this.isUseInterception; + if (this.isUseInterception) { + this.registerInterception(); + } else { + this.pageInfos.setInterception(undefined); + } + }) + } + }.title('NavIndex') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UIComponentCommonattrFocusoptimization135.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UIComponentCommonattrFocusoptimization135.ets new file mode 100644 index 0000000000000000000000000000000000000000..43d9f03a92d14cdae7dede60d4b9323ec5d9bebe --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UIComponentCommonattrFocusoptimization135.ets @@ -0,0 +1,93 @@ +/* + * 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 UIComponentCommonattrFocusoptimization135 { + pageInfos: NavPathStack = new NavPathStack() + isUseInterception: boolean = false; + + registerInterception() { + this.pageInfos.setInterception({ + // 页面跳转前拦截,允许操作栈,在当前跳转中生效。 + willShow: (from: NavDestinationContext | "navBar", to: NavDestinationContext | "navBar", + operation: NavigationOperation, animated: boolean) => { + if (!this.isUseInterception) { + return; + } + if (typeof to === "string") { + console.log("target page is navigation home"); + return; + } + // 重定向目标页面,更改为pageTwo页面到pageOne页面。 + let target: NavDestinationContext = to as NavDestinationContext; + if (target.pathInfo.name === 'pageTwo') { + target.pathStack.pop(); + target.pathStack.pushPathByName('pageOne', null); + } + }, + // 页面跳转后回调,在该回调中操作栈在下一次跳转中刷新。 + didShow: (from: NavDestinationContext | "navBar", to: NavDestinationContext | "navBar", + operation: NavigationOperation, isAnimated: boolean) => { + if (!this.isUseInterception) { + return; + } + if (typeof from === "string") { + console.log("current transition is from navigation home"); + } else { + console.log(`current transition is from ${(from as NavDestinationContext).pathInfo.name}`) + } + if (typeof to === "string") { + console.log("current transition to is navBar"); + } else { + console.log(`current transition is to ${(to as NavDestinationContext).pathInfo.name}`); + } + }, + // Navigation单双栏显示状态发生变更时触发该回调。 + modeChange: (mode: NavigationMode) => { + if (!this.isUseInterception) { + return; + } + console.log(`current navigation mode is ${mode}`); + } + }) + } + + build() { + Navigation(this.pageInfos) { + Column() { + Button('pushPath', { stateEffect: true, type: ButtonType.Capsule }) + .width('80%') + .height(40) + .margin(20) + .id('btn1') + .onClick(() => { + this.pageInfos.pushPath({ name: 'pageTwo' }) //将name指定的NavDestination页面信息入栈 + }) + Button('use interception', { stateEffect: true, type: ButtonType.Capsule }) + .width('80%') + .height(40) + .margin(20) + .onClick(() => { + this.isUseInterception = !this.isUseInterception; + if (this.isUseInterception) { + this.registerInterception(); + } else { + this.pageInfos.setInterception(undefined); + } + }) + } + }.title('NavIndex') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UIComponentCommonattrFocusoptimization173.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UIComponentCommonattrFocusoptimization173.ets new file mode 100644 index 0000000000000000000000000000000000000000..9316009e0939301f0c6cb43ce81b52fa7f34686e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UIComponentCommonattrFocusoptimization173.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. + */ +@Entry +@Component +struct UIComponentCommonattrFocusoptimization173 { + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + @State currentIndex: number = 0 + + + build() { + Column() { + Navigation() { + TextInput({ placeholder: 'search...' }) + .width('90%') + .height(40) + .backgroundColor('#FFFFFF') + .margin({ top: 8 }) + } + .focusOnTouch(true) + .title('Title') + .toolbarConfiguration([ + { + value: '1', + icon: $r("app.media.icon") + }, + { + value: '2', + icon: $r("app.media.icon") + }, + { + value: '3', + icon: $r("app.media.icon") + } + ]) + .onTitleModeChange((titleModel: NavigationTitleMode) => { + console.info('titleMode' + titleModel) + }) + }.width(400).height(300).backgroundColor('#F1F3F5').margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UIComponentCommonattrFocusoptimization174.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UIComponentCommonattrFocusoptimization174.ets new file mode 100644 index 0000000000000000000000000000000000000000..677d94277069c8d697c1a1ca286d359ddf02314b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UIComponentCommonattrFocusoptimization174.ets @@ -0,0 +1,87 @@ +/* + * 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 UIComponentCommonattrFocusoptimization174 { + @State fontColor: string = '#182431' + @State selectedFontColor: string = '#007DFF' + @State currentIndex: number = 0 + @State selectedIndex: number = 0 + private controller: TabsController = new TabsController() + + @Builder tabBuilder(index: number, name: string) { + Column() { + Text(name) + .fontColor(this.selectedIndex === index ? this.selectedFontColor : this.fontColor) + .fontSize(16) + .fontWeight(this.selectedIndex === index ? 500 : 400) + .lineHeight(22) + .margin({ top: 17, bottom: 7 }) + Divider() + .strokeWidth(2) + .color('#007DFF') + .opacity(this.selectedIndex === index ? 1 : 0) + }.width('100%') + } + + build() { + Column() { + Tabs({ barPosition: BarPosition.Start, index: this.currentIndex, controller: this.controller }) { + TabContent() { + Column({space: 10}){ + TextInput({text: '这是textInput'}) + Button('modalPageTwo').width(150).height(60).margin({top: 30}) + }.width('100%').height('100%').backgroundColor('#00CB87') + }.tabBar(this.tabBuilder(0, 'modalPageOne')) + + TabContent() { + Column({space: 10}){ + TextInput({text: '这是textInput'}) + Button('modalPageThree').width(150).height(60).margin({top: 30}) + }.width('100%').height('100%').backgroundColor('#007DFF') + }.tabBar(this.tabBuilder(1, 'modalPageTwo')) + + TabContent() { + Column({space: 10}){ + TextInput({text: '这是textInput'}) + Button('modalPageOne').width(150).height(60).margin({top: 30}) + }.width('100%').height('100%').backgroundColor('#FFBF00') + }.tabBar(this.tabBuilder(2, 'modalPageThree')) + } + .width(500) + .vertical(false) + .barMode(BarMode.Fixed) + .barWidth(450) + .barHeight(56) + .animationDuration(400) + .onChange((index: number) => { + // currentIndex控制TabContent显示页签 + this.currentIndex = index + this.selectedIndex = index + }) + .onAnimationStart((index: number, targetIndex: number, event: TabsAnimationEvent) => { + if (index === targetIndex) { + return + } + // selectedIndex控制自定义TabBar内Image和Text颜色切换 + this.selectedIndex = targetIndex + }) + .width(450) + .height(300) + .margin({ top: 52 }) + .backgroundColor('#F1F3F5') + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UIComponentCommonattrFocusoptimization175.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UIComponentCommonattrFocusoptimization175.ets new file mode 100644 index 0000000000000000000000000000000000000000..abbe101ee3c26c025616772fb915a3ecb6aa5232 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UIComponentCommonattrFocusoptimization175.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. + */ +@Entry +@Component +struct UIComponentCommonattrFocusoptimization175 { + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + @State currentIndex: number = 0 + + + build() { + Column() { + Navigation() { + TextInput({ placeholder: 'search...' }) + .width('90%') + .height(40) + .backgroundColor('#FFFFFF') + .margin({ top: 8 }) + } + .focusOnTouch(true) + .title('Title') + .toolbarConfiguration([ + { + value: '1', + icon: $r("app.media.icon") + }, + { + value: '2', + icon: $r("app.media.icon") + }, + { + value: '3', + icon: $r("app.media.icon") + } + ]) + .onTitleModeChange((titleModel: NavigationTitleMode) => { + console.info('titleMode' + titleModel) + }) + }.width(400).height(300).backgroundColor('#F1F3F5').margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UIComponentCommonattrFocusoptimization178.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UIComponentCommonattrFocusoptimization178.ets new file mode 100644 index 0000000000000000000000000000000000000000..846f1dd57ed1bbf28e6f6faa27345b00c3b73c44 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UIComponentCommonattrFocusoptimization178.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 UIComponentCommonattrFocusoptimization178 { + build() { + Column() { + Navigation(){ + Column(){ + Button('buttonOne').width(150).height(60) + } + .width(200) + .height(200) + .borderWidth(1) + .id('column1') + Column(){ + + } + .id('column2') + .width(200) + .height(200) + .borderWidth(1) + .margin({ top: 30 }) + } + }.width('100%').margin({ top: 30 }) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UIComponentCommonattrFocusoptimization179.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UIComponentCommonattrFocusoptimization179.ets new file mode 100644 index 0000000000000000000000000000000000000000..64a72e4e9c45385d99f40c269acf5fc74e90bd87 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UIComponentCommonattrFocusoptimization179.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. + */ +@Entry +@Component +struct UIComponentCommonattrFocusoptimization179 { + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + @State currentIndex: number = 0 + + + build() { + Column() { + Navigation() { + TextInput({ placeholder: 'search...' }) + .width('90%') + .height(40) + .backgroundColor('#FFFFFF') + .margin({ top: 8 }) + } + .focusOnTouch(true) + .title('Title') + .toolbarConfiguration([ + { + value: '1', + icon: $r("app.media.icon") + }, + { + value: '2', + icon: $r("app.media.icon") + }, + { + value: '3', + icon: $r("app.media.icon") + } + ]) + .onTitleModeChange((titleModel: NavigationTitleMode) => { + console.info('titleMode' + titleModel) + }) + }.width(400).height(300).backgroundColor('#F1F3F5').margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UIComponentCommonattrFocusoptimization180.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UIComponentCommonattrFocusoptimization180.ets new file mode 100644 index 0000000000000000000000000000000000000000..192d200c7a1cbfe400fd880b6777b358637ff558 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UIComponentCommonattrFocusoptimization180.ets @@ -0,0 +1,27 @@ +/* + * 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 UIComponentCommonattrFocusoptimization180 { + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + @State currentIndex: number = 0 + + + build() { + Column() { + Image($r('app.media.icon')).width(150).height(150).border({width: 1}) + }.width(400).height(300).backgroundColor('#F1F3F5').margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlActtonEventCommonattrlfocusoptimizatton140.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlActtonEventCommonattrlfocusoptimizatton140.ets new file mode 100644 index 0000000000000000000000000000000000000000..6fa7b6e6982dc443e1b4fa30d4271ba116e156d1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlActtonEventCommonattrlfocusoptimizatton140.ets @@ -0,0 +1,167 @@ +/* + * 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 { unifiedDataChannel, uniformTypeDescriptor } from '@kit.ArkData'; +import { promptAction } from '@kit.ArkUI'; +import { BusinessError } from '@kit.BasicServicesKit'; +import { image } from '@kit.ImageKit'; + +@Entry +@Component +struct UlActtonEventCommonattrlfocusoptimizatton140 { + @State targetImage: string = ''; + @State imageWidth: number = 100; + @State imageHeight: number = 100; + @State imgState: Visibility = Visibility.Visible; + @State pixmap: image.PixelMap | undefined = undefined + + @Builder + pixelMapBuilder() { + Column() { + Image($r('app.media.icon')) + .width(120) + .height(120) + .backgroundColor(Color.Yellow) + } + } + + getDataFromUdmfRetry(event: DragEvent, callback: (data: DragEvent) => void) { + try { + let data: UnifiedData = event.getData(); + if (!data) { + return false; + } + let records: Array = data.getRecords(); + if (!records || records.length <= 0) { + return false; + } + callback(event); + return true; + } catch (e) { + console.log("getData failed, code: " + (e as BusinessError).code + ", message: " + (e as BusinessError).message); + return false; + } + } + + getDataFromUdmf(event: DragEvent, callback: (data: DragEvent) => void) { + if (this.getDataFromUdmfRetry(event, callback)) { + return; + } + setTimeout(() => { + this.getDataFromUdmfRetry(event, callback); + }, 1500); + } + + private getComponentSnapshot(): void { + this.getUIContext().getComponentSnapshot().createFromBuilder(() => { + this.pixelMapBuilder() + }, + (error: Error, pixmap: image.PixelMap) => { + if (error) { + console.log("error: " + JSON.stringify(error)) + return; + } + this.pixmap = pixmap; + }) + } + + private PreDragChange(preDragStatus: PreDragStatus): void { + if (preDragStatus == PreDragStatus.ACTION_DETECTING_STATUS) { + this.getComponentSnapshot(); + } + } + + build() { + Row() { + Column() { + Text('start Drag') + .id('UIActtonEventComdneventDracInterface0020_2') + .fontSize(18) + .width('100%') + .height(40) + .margin(10) + .backgroundColor('#008888') + Row() { + Image($r('app.media.app_icon')) + .id('UlActtonEventCommonattrlfocusoptimizatton140_1') + .width(100) + .height(100) + .draggable(true) + .margin({ left: 15 }) + .visibility(this.imgState) + .parallelGesture(LongPressGesture().onAction(() => { + promptAction.showToast({ duration: 100, message: 'Long press gesture trigger' }); + })) + .onDragStart((event) => { + let data: unifiedDataChannel.Image = new unifiedDataChannel.Image(); + data.imageUri = 'common/pic/img.png'; + let unifiedData = new unifiedDataChannel.UnifiedData(data); + event.setData(unifiedData); + + let dragItemInfo: DragItemInfo = { + pixelMap: this.pixmap, + extraInfo: "this is extraInfo", + }; + return dragItemInfo; + }) + .onPreDrag((status: PreDragStatus) => { + this.PreDragChange(status); + }) + .onDragEnd((event) => { + if (event.getResult() === DragResult.DRAG_SUCCESSFUL) { + promptAction.showToast({ duration: 100, message: 'Drag Success' }); + } else if (event.getResult() === DragResult.DRAG_FAILED) { + promptAction.showToast({ duration: 100, message: 'Drag failed' }); + } + }) + } + + Text('Drag Target Area') + .fontSize(20) + .width('100%') + .height(40) + .margin(10) + .backgroundColor('#008888') + Row() { + Image(this.targetImage) + .width(this.imageWidth) + .height(this.imageHeight) + .draggable(true) + .margin({ left: 15 }) + .border({ color: Color.Black, width: 1 }) + .onDragMove((event) => { + event.setResult(DragResult.DROP_ENABLED) + event.dragBehavior = DragBehavior.MOVE + }) + .allowDrop([uniformTypeDescriptor.UniformDataType.IMAGE]) + .onDrop((dragEvent?: DragEvent) => { + this.getDataFromUdmf((dragEvent as DragEvent), (event: DragEvent) => { + let records: Array = event.getData().getRecords(); + let rect: Rectangle = event.getPreviewRect(); + this.imageWidth = Number(rect.width); + this.imageHeight = Number(rect.height); + this.targetImage = (records[0] as unifiedDataChannel.Image).imageUri; + this.imgState = Visibility.None; + event.setResult(DragResult.DRAG_SUCCESSFUL); + }) + }) + } + } + .width('100%') + .height('100%') + } + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton126.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton126.ets new file mode 100644 index 0000000000000000000000000000000000000000..0dfe548b8787b243ea550cc44e873d29336109d0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton126.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 UlComponentCommonattrlfocusoptimizatton126 { + @Provide('pageInfos') pageInfos: NavPathStack = new NavPathStack() + + build() { + Column() { + Navigation(this.pageInfos) { + + Column() { + Button('button1') + .id('button1ID') + .onClick(() => { + + }); + + Button('button2') + .id('button2ID') + .onClick(() => { + + }); + + Button('button3') + .id('button3ID') + .onClick(() => { + + }); + } + .width('100%') + .height('100%') + .alignItems(HorizontalAlign.Center) + .justifyContent(FlexAlign.Center) + } + } + .height('100%') + .width('100%') + .backgroundColor('#F1F3F5') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton132.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton132.ets new file mode 100644 index 0000000000000000000000000000000000000000..1472497c45ff9c9c83a270365df122fb4fce1d95 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton132.ets @@ -0,0 +1,125 @@ +/* + * 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 UlComponentCommonattrlfocusoptimizatton132 { + @Provide('pageInfos') pageInfos: NavPathStack = new NavPathStack() + private arr: string[] = ['pushpageOne']; + + @Builder + PageMap(name: string) { + if (name === "pushpageOne") { + pageOne() + } + } + + build() { + Column() { + Navigation(this.pageInfos) { + + List({ space: 12 }) { + ForEach(this.arr, (item:string, index: number) => { + ListItem() { + Text(item) + .width("100%") + .height(72) + .backgroundColor('#FFFFFF') + .borderRadius(24) + .fontSize(16) + .fontWeight(500) + .textAlign(TextAlign.Center) + .id('pushpageOneID') + .onClick(()=>{ + this.pageInfos.pushPath({ name: item}) + }) + } + }, (item:number) => item.toString()) + } + .width("90%") + .margin({ top: 12 }) + } + .mode(NavigationMode.Stack) + .navDestination(this.PageMap) + } + .height('100%') + .width('100%') + .backgroundColor('#F1F3F5') + } +} + +// PageOne.ets +@Component +export struct pageOne { + @Consume('pageInfos') pageInfos: NavPathStack; + build() { + NavDestination() { + Column() { + Button('button1') + .id('button1') + .onClick(() => { + + }) + Button('button2') + .id('button2') + .onClick(() => { + this.pageInfos.pop() + }) + }.width('100%').height('100%').justifyContent(FlexAlign.Center) + }.title("pushpageOne1Title") + .onBackPressed(() => { + const popDestinationInfo = this.pageInfos.pop() // 弹出路由栈栈顶元素 + console.log('pop' + '返回值' + JSON.stringify(popDestinationInfo)) + return true + }) + .id('popID') + } +} + +// PageTwo.ets +@Component +export struct pageTwo { + @Consume('pageInfos') pageInfos: NavPathStack; + build() { + NavDestination() { + Column() { + Text("NavDestinationContent2") + }.width('100%').height('100%') + }.title("NavDestinationTitle2") + .onBackPressed(() => { + const popDestinationInfo = this.pageInfos.pop() // 弹出路由栈栈顶元素 + console.log('pop' + '返回值' + JSON.stringify(popDestinationInfo)) + return true + }) + } +} + +// PageThree.ets +@Component +export struct pageThree { + @Consume('pageInfos') pageInfos: NavPathStack; + build() { + NavDestination() { + Column() { + Text("NavDestinationContent3") + }.width('100%').height('100%') + }.title("NavDestinationTitle3") + .onBackPressed(() => { + const popDestinationInfo = this.pageInfos.pop() // 弹出路由栈栈顶元素 + console.log('pop' + '返回值' + JSON.stringify(popDestinationInfo)) + return true + }) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton136.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton136.ets new file mode 100644 index 0000000000000000000000000000000000000000..c1bfd16ce834a8830c27026efde005b28d36dba8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton136.ets @@ -0,0 +1,75 @@ +/* + * 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 UlComponentCommonattrlfocusoptimizatton136 { + @State isShow: boolean = false + scroller: Scroller = new Scroller; + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] + + @Builder + myBuilder() { + Column() { + Scroll(this.scroller) { + Column() { + ForEach(this.arr, (item: number) => { + Button("content1") + .margin(10) + .fontSize(20) + }, (item: string) => item) + }.width('100%').backgroundColor(0xDCDCDC) + } + .backgroundColor(Color.Yellow) + .height('100%') + .edgeEffect(EdgeEffect.Spring) + .scrollSnap({ + snapAlign: ScrollSnapAlign.START, + snapPagination: 400, + enableSnapToStart: true, + enableSnapToEnd: true + }) + } + .width('100%') + } + + build() { + Column() { + Button("transition modal 1") + .id('UlComponentCommonattrlfocusoptimizatton_136_1') + .onClick(() => { + this.isShow = true + }) + .focusable(false) + .fontSize(20) + .margin(10) + .bindSheet($$this.isShow, this.myBuilder(), { + detents: [SheetSize.MEDIUM, SheetSize.LARGE, 200], + backgroundColor: Color.Gray, + blurStyle: BlurStyle.Thick, + showClose: true, + title: { title: "title", subtitle: "subtitle" }, + preferType: SheetType.CENTER, + shouldDismiss: ((sheetDismiss: SheetDismiss) => { + console.log("bind sheet shouldDismiss") + sheetDismiss.dismiss() + }) + }) + } + .justifyContent(FlexAlign.Start) + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton137.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton137.ets new file mode 100644 index 0000000000000000000000000000000000000000..a1d5d92d0c0c18d1bdbd7a985aef4df5d1061b09 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton137.ets @@ -0,0 +1,79 @@ +/* + * 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 UlComponentCommonattrlfocusoptimizatton137 { + @State isShow: boolean = false + @State isShow2: boolean = false + @State sheetHeight: number = 300; + @State button1BC: Color = Color.Blue; + @State button2BC: Color = Color.Blue; + + @Builder + myBuilder() { + Column() { + Button("button1") + .margin(10) + .fontSize(20) + .id('button1ID') + .backgroundColor(this.button1BC) + .onClick(() => { + this.button1BC = Color.Green + }) + + Button("close modal 1") + .id('closeID') + .margin(10) + .fontSize(20) + .onClick(() => { + this.isShow = false; + }) + } + .width('100%') + .height('100%') + } + + build() { + Column() { + Button("bindSheet") + .id('bindSheetButtonID') + .onClick(() => { + this.isShow = true + }) + .fontSize(20) + .margin(10) + .bindSheet($$this.isShow, this.myBuilder(), { + height: this.sheetHeight, + backgroundColor: Color.Orange, + onWillAppear: () => { + console.log("BindSheet onWillAppear.") + }, + onAppear: () => { + console.log("BindSheet onAppear.") + }, + onWillDisappear: () => { + console.log("BindSheet onWillDisappear.") + }, + onDisappear: () => { + console.log("BindSheet onDisappear.") + } + }) + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton138.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton138.ets new file mode 100644 index 0000000000000000000000000000000000000000..bd9b0b8cc401dec6c3c493c76a88c3df990b391c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton138.ets @@ -0,0 +1,83 @@ +/* + * 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 UlComponentCommonattrlfocusoptimizatton138 { + @State isShow: boolean = false + @State isShow2: boolean = false + @State sheetHeight: number = 300; + @State button1BC: Color = Color.Blue; + @State button2BC: Color = Color.Blue; + + @Builder + myBuilder() { + Column() { + Button("button1") + .margin(10) + .fontSize(20) + .id('button1ID') + .backgroundColor(this.button1BC) + .onClick(() => { + }) + + Button("close modal 1") + .id('closeID') + .margin(10) + .fontSize(20) + .onClick(() => { + this.isShow = false; + }) + } + .width('100%') + .height('100%') + } + + build() { + Column() { + Button("button2") + .id('button2ID') + .onClick(() => { + + }) + Button("bindSheet") + .id('bindSheetButtonID') + .onClick(() => { + this.isShow = true + }) + .fontSize(20) + .margin(10) + .bindSheet($$this.isShow, this.myBuilder(), { + height: this.sheetHeight, + backgroundColor: Color.Orange, + onWillAppear: () => { + console.log("BindSheet onWillAppear.") + }, + onAppear: () => { + console.log("BindSheet onAppear.") + }, + onWillDisappear: () => { + console.log("BindSheet onWillDisappear.") + }, + onDisappear: () => { + console.log("BindSheet onDisappear.") + } + }) + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton139.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton139.ets new file mode 100644 index 0000000000000000000000000000000000000000..6f5e0287bade8848a89c3dbd97d4f1c71eee1706 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton139.ets @@ -0,0 +1,72 @@ +/* + * 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 UlComponentCommonattrlfocusoptimizatton139 { + @State isShow:boolean = false + scroller: Scroller = new Scroller; + private arr: number[] = [0, 1] + @Builder myBuilder() { + Column() { + Scroll(this.scroller) { + Column() { + ForEach(this.arr, (item: number) => { + Button("content1") + .margin(10) + .fontSize(20) + }, (item: string) => item) + }.width('100%').backgroundColor(0xDCDCDC) + } + .focusable(true) + .backgroundColor(Color.Yellow) + .height('100%') + .edgeEffect(EdgeEffect.Spring) + .scrollSnap({snapAlign:ScrollSnapAlign.START, snapPagination:400, enableSnapToStart:true, enableSnapToEnd:true}) + } + .width('100%') + } + + build() { + Column() { + TextInput({ placeholder: 'input ...' }) + .width(380) + .height(60) + Button("transition modal 1") + .id('UlComponentCommonattrlfocusoptimizatton_139_1') + .onClick(() => { + this.isShow = true + }) + .focusable(false) + .fontSize(20) + .margin(10) + .bindSheet($$this.isShow, this.myBuilder(),{ + detents:[SheetSize.MEDIUM,SheetSize.LARGE,200], + backgroundColor:Color.Gray, + blurStyle:BlurStyle.Thick, + showClose:true, + title:{title:"title", subtitle:"subtitle"}, + preferType: SheetType.CENTER, + shouldDismiss:((sheetDismiss: SheetDismiss)=> { + console.log("bind sheet shouldDismiss") + sheetDismiss.dismiss() + }) + }) + } + .justifyContent(FlexAlign.Start) + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton140.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton140.ets new file mode 100644 index 0000000000000000000000000000000000000000..c06494e5570a8d499ccc147b0b13a186d7293fc6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton140.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 UlComponentCommonattrlfocusoptimizatton140 { + @State isShow: boolean = false + scroller: Scroller = new Scroller; + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] + + @Builder + myBuilder() { + Column() { + Scroll(this.scroller) { + Column() { + ForEach(this.arr, (item: number) => { + Button("content1") + .margin(10) + .fontSize(20) + }, (item: string) => item) + }.width('100%').backgroundColor(0xDCDCDC) + } + .backgroundColor(Color.Yellow) + .height('100%') + .edgeEffect(EdgeEffect.Spring) + .scrollSnap({ + snapAlign: ScrollSnapAlign.START, + snapPagination: 400, + enableSnapToStart: true, + enableSnapToEnd: true + }) + } + .width('100%') + } + + build() { + Column() { + Button("transition modal 1") + .id('UlComponentCommonattrlfocusoptimizatton_140_1') + .onClick(() => { + this.isShow = true + }) + .fontSize(20) + .margin(10) + .bindSheet($$this.isShow, this.myBuilder(), { + detents: [SheetSize.MEDIUM, SheetSize.LARGE, 200], + backgroundColor: Color.Gray, + blurStyle: BlurStyle.Thick, + showClose: true, + title: { title: "title", subtitle: "subtitle" }, + preferType: SheetType.CENTER, + shouldDismiss: ((sheetDismiss: SheetDismiss) => { + console.log("bind sheet shouldDismiss") + sheetDismiss.dismiss() + }) + }) + TextInput({ placeholder: 'input ...', }) + .width(380) + .height(60) + } + .justifyContent(FlexAlign.Start) + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton141.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton141.ets new file mode 100644 index 0000000000000000000000000000000000000000..b099221dd723d55069e0240e197fd99a3006b270 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton141.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 UlComponentCommonattrlfocusoptimizatton141 { + @State isShow: boolean = false + @State isShow2: boolean = false + @State sheetHeight: number = 300; + @State button1BC: Color = Color.Blue; + @State button2BC: Color = Color.Blue; + + @Builder + myBuilder() { + Column() { + Button("button1") + .margin(10) + .fontSize(20) + .id('button1ID') + .backgroundColor(this.button1BC) + .onClick(() => { + this.button1BC = Color.Green + }) + + Button("Set Illegal height") + .margin(10) + .fontSize(20) + .onClick(() => { + // this.sheetHeight = -1; + }) + + Button("close modal 1") + .id('closeID') + .margin(10) + .fontSize(20) + .onClick(() => { + this.isShow = false; + }) + } + .width('100%') + .height('100%') + } + + build() { + Column() { + Button("button2") + .id('button2ID') + .backgroundColor(this.button2BC) + .onClick(() => { + this.button2BC = Color.Green; + }) + Button("bindSheet") + .id('bindSheetButtonID') + .onClick(() => { + this.isShow = true + }) + .fontSize(20) + .margin(10) + .bindSheet($$this.isShow, this.myBuilder(), { + height: this.sheetHeight, + backgroundColor: Color.Orange, + onWillAppear: () => { + console.log("BindSheet onWillAppear.") + }, + onAppear: () => { + console.log("BindSheet onAppear.") + }, + onWillDisappear: () => { + console.log("BindSheet onWillDisappear.") + }, + onDisappear: () => { + console.log("BindSheet onDisappear.") + } + }) + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton149.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton149.ets new file mode 100644 index 0000000000000000000000000000000000000000..0ddf2662f45a48d8b36bebd1fb4c5642dccfdd85 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton149.ets @@ -0,0 +1,100 @@ +/* + * 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 { CustomContentDialog } from '@kit.ArkUI' + +@Entry +@Component +struct UlComponentCommonattrlfocusoptimizatton149 { + dialogController: CustomDialogController = new CustomDialogController({ + builder: CustomContentDialog({ + primaryTitle: '标题', + secondaryTitle: '辅助文本', + contentBuilder: () => { + this.buildContent(); + }, + buttons: [{ + value: 'Cancel', action: () => { + console.info('Callback when the button is clicked') + this.getUIContext().getFocusController().clearFocus(); + this.dialogController.close(); + } + }], + contentAreaPadding: { + bottom: 100 + } + }), + autoCancel: true, + }); + + @State changeValue: string = '' + searchController: SearchController = new SearchController() + + build() { + Column() { + Button('dialog') + .id('getFocus') + .onClick(() => { + + }) + Button("ComponentDialog") + .id('button') + .onClick(() => { + this.dialogController.open() + }) + } + .width('100%') + .height('100%') + .justifyContent(FlexAlign.Center) + } + + @State text: string = '' + controller: TextInputController = new TextInputController( + + ) + + @Builder + buildContent(): void { + Column() { + TextInput({ + text: this.text, + placeholder: '请输入内容', + controller: this.controller, + }) + .defaultFocus(true) + .onChange((value: string) => { + this.text = value + }) + .cancelButton({ style: CancelButtonStyle.CONSTANT }) + Line() + TextArea({text:"我是TextArea我是Text"}) + .id('TextAreaID') + Line() + Search({ value: this.changeValue, placeholder: '请输入内容', controller: this.searchController }) + .id('SearchID') + .onChange((value: string) => { + this.changeValue = value + }) + .margin(20) + Button('Cancel') + .onClick(() => { + this.getUIContext().getFocusController().clearFocus(); + this.dialogController.close(); + }) + } + .justifyContent(FlexAlign.Start) + .alignItems(HorizontalAlign.Start) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton150.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton150.ets new file mode 100644 index 0000000000000000000000000000000000000000..94428eb2a396635de36d2402e412d131612389e1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton150.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. + */ + +import { CustomContentDialog } from '@kit.ArkUI' + +@Entry +@Component +struct UlComponentCommonattrlfocusoptimizatton150 { + dialogController: CustomDialogController = new CustomDialogController({ + builder: CustomContentDialog({ + contentBuilder: () => { + this.buildContent(); + }, + }), + }); + + build() { + Column() { + Button("支持自定义内容弹出框") + .id('UlComponentCommonattrlfocusoptimizatton_150_1') + .onClick(() => { + this.dialogController.open() + }) + } + .width('100%') + .height('100%') + .justifyContent(FlexAlign.Center) + } + + @Builder + buildContent(): void { + Column() { + TextInput({ placeholder: 'input ...' }) + Button('count is odd').fontSize(30).height(50).margin({ top: 20 }) + TextArea({ + placeholder: 'The text area can hold an unlimited amount of text. input your word...', + }) + .placeholderFont({ size: 16, weight: 400 }) + .width(336) + .height(56) + .margin(20) + .fontSize(16) + .fontColor('#182431') + .backgroundColor('#FFFFFF') + Search({ placeholder: 'Type to search...', }) + .searchButton('SEARCH') + .width('95%') + .height(40) + .backgroundColor('#F5F5F5') + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .textFont({ size: 14, weight: 400 }) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton151.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton151.ets new file mode 100644 index 0000000000000000000000000000000000000000..6f73bd3f756ee995863631a5a1e2382d3bd5f9b0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton151.ets @@ -0,0 +1,87 @@ +/* + * 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 { CustomContentDialog } from '@kit.ArkUI' + +@Entry +@Component +struct UlComponentCommonattrlfocusoptimizatton151 { + dialogController: CustomDialogController = new CustomDialogController({ + builder: CustomContentDialog({ + primaryTitle: '标题', + secondaryTitle: '辅助文本', + contentBuilder: () => { + this.buildContent(); + }, + // buttons: [{ + // value: '按钮1', buttonStyle: ButtonStyleMode.TEXTUAL, action: () => { + // console.info('Callback when the button is clicked') + // } + // }, { value: '按钮2', buttonStyle: ButtonStyleMode.TEXTUAL, role: ButtonRole.ERROR }], + }), + autoCancel: true, + }); + + @State changeValue: string = '' + searchController: SearchController = new SearchController() + + build() { + Column() { + Button("ComponentDialog") + .id('ComponentDialog') + .onClick(() => { + this.dialogController.open() + }) + TextArea({text:"我是TextArea我是Text"}) + .defaultFocus(true) + Search({ value: this.changeValue, placeholder: '请输入内容', controller: this.searchController }) + .onChange((value: string) => { + this.changeValue = value + }) + .margin(20) + Button('获取焦点') + .onClick(() => { + + }) + } + .width('100%') + .height('100%') + .justifyContent(FlexAlign.Center) + } + + @State text: string = '' + controller: TextInputController = new TextInputController( + + ) + + @Builder + buildContent(): void { + Column() { + TextInput({ + text: this.text, + placeholder: '请输入内容', + controller: this.controller, + }) + .defaultFocus(true) + .onChange((value: string) => { + this.text = value + }) + .cancelButton({ style: CancelButtonStyle.CONSTANT }) + Line() + TextArea({text:"我是TextArea我是Text"}) + + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton152.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton152.ets new file mode 100644 index 0000000000000000000000000000000000000000..9da7761bf730c2d098ac484f744790e38c1460fb --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton152.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. + */ + +import { CustomContentDialog } from '@kit.ArkUI' + +@Entry +@Component +struct UlComponentCommonattrlfocusoptimizatton152 { + dialogController: CustomDialogController = new CustomDialogController({ + builder: CustomContentDialog({ + contentBuilder: () => { + this.buildContent(); + }, + }), + }); + + build() { + Column() { + Button("支持自定义内容弹出框") + .id('UlComponentCommonattrlfocusoptimizatton_152_1') + .onClick(() => { + this.dialogController.open() + }) + } + .width('100%') + .height('100%') + .justifyContent(FlexAlign.Center) + } + + @Builder + buildContent(): void { + Column() { + TextInput({ placeholder: 'input ...' }) + Button('count is odd').fontSize(30).height(50).margin({ top: 20 }) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton153.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton153.ets new file mode 100644 index 0000000000000000000000000000000000000000..5c620326d5db032c07d3caa1d084ea9431ce7b72 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton153.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 { CustomContentDialog } from '@kit.ArkUI' + +@Entry +@Component +struct UlComponentCommonattrlfocusoptimizatton153 { + dialogController: CustomDialogController = new CustomDialogController({ + builder: CustomContentDialog({ + contentBuilder: () => { + this.buildContent(); + }, + buttons: [{ + value: '按钮1', buttonStyle: ButtonStyleMode.TEXTUAL, action: () => { + console.info('Callback when the button is clicked') + } + }, { value: '按钮2', buttonStyle: ButtonStyleMode.TEXTUAL, role: ButtonRole.ERROR }], + }), + }); + + build() { + Column() { + Button("支持自定义内容弹出框") + .id('UlComponentCommonattrlfocusoptimizatton_153_1') + .onClick(() => { + this.dialogController.open() + }) + } + .width('100%') + .height('100%') + .justifyContent(FlexAlign.Center) + } + + @Builder + buildContent(): void { + Column() { + TextInput({ placeholder: 'input ...' }) + } + + Checkbox({ name: 'checkbox1', group: 'checkboxGroup' }) + .select(true) + .selectedColor(0xed6f21) + .shape(CheckBoxShape.CIRCLE) + .onChange((value: boolean) => { + console.info('Checkbox1 change is' + value) + }) + Checkbox({ name: 'checkbox1', group: 'checkboxGroup' }) + .select(true) + .selectedColor(0xed6f21) + .shape(CheckBoxShape.CIRCLE) + .onChange((value: boolean) => { + console.info('Checkbox1 change is' + value) + }) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton154.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton154.ets new file mode 100644 index 0000000000000000000000000000000000000000..059d1d35fd4e8c366045944aa1df30b3603237a5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton154.ets @@ -0,0 +1,73 @@ +/* + * 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 UlComponentCommonattrlfocusoptimizatton154 { + @State select: boolean = true + private iconStr: ResourceStr = $r("app.media.app_icon") + private iconStr2: ResourceStr = $r("app.media.app_icon") + + @Builder + SubMenu() { + Menu() { + MenuItem({ content: "菜单选项1", labelInfo: "菜单选项1" }) + MenuItem({ content: "菜单选项2", labelInfo: "菜单选项2" }) + } + } + + @Builder + MyMenu() { + Menu() { + MenuItem({ + startIcon: this.iconStr, + content: "菜单选项", + endIcon: $r("app.media.app_icon"), + builder: this.SubMenu + }) + .id('UlComponentCommonattrlfocusoptimizatton_154_2') + MenuItem({ + startIcon: this.iconStr, + content: "菜单选项", + endIcon: $r("app.media.app_icon"), + builder: this.SubMenu + }) + MenuItem({ + startIcon: this.iconStr, + content: "菜单选项", + endIcon: $r("app.media.app_icon"), + builder: this.SubMenu + }) + MenuItem({ + startIcon: this.iconStr, + content: "菜单选项", + endIcon: $r("app.media.app_icon"), + builder: this.SubMenu + }) + MenuItem({ + startIcon: this.iconStr, + content: "菜单选项", + endIcon: $r("app.media.app_icon"), + builder: this.SubMenu + }) + } + } + + build() { + Button('click for Menu') + .id('UlComponentCommonattrlfocusoptimizatton_154_1') + .bindMenu(this.MyMenu) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton155.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton155.ets new file mode 100644 index 0000000000000000000000000000000000000000..f409e8b81c6a42e6221604db74b3eef953062b5e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton155.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. + */ + +class Tmp155 { + iconStr2: ResourceStr = $r("app.media.app_icon") + + set(val: Resource) { + this.iconStr2 = val + } +} + +@Entry +@Component +struct UlComponentCommonattrlfocusoptimizatton155 { + @State select: boolean = true + private iconStr: ResourceStr = $r("app.media.app_icon") + private iconStr2: ResourceStr = $r("app.media.app_icon") + + @Builder + SubMenu() { + Menu() { + MenuItem({ content: "复制", labelInfo: "Ctrl+C" }) + MenuItem({ content: "粘贴", labelInfo: "Ctrl+V" }) + } + } + + @Builder + MyMenu() { + Menu() { + MenuItem({ + startIcon: this.iconStr, + content: "菜单选项", + endIcon: $r("app.media.app_icon"), + builder: this.SubMenu + }) + .id('UlComponentCommonattrlfocusoptimizatton_155_2') + } + } + + build() { + Button('click for Menu') + .id('UlComponentCommonattrlfocusoptimizatton_155_1') + .bindMenu(this.MyMenu) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton157.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton157.ets new file mode 100644 index 0000000000000000000000000000000000000000..5a5de41725598bdcb140b3b137af8d96f4128fde --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton157.ets @@ -0,0 +1,73 @@ +/* + * 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 UlComponentCommonattrlfocusoptimizatton157 { + @State select: boolean = true + private iconStr: ResourceStr = $r("app.media.app_icon") + private iconStr2: ResourceStr = $r("app.media.app_icon") + + @Builder + SubMenu() { + Menu() { + MenuItem({ content: "菜单选项1", labelInfo: "菜单选项1" }) + MenuItem({ content: "菜单选项2", labelInfo: "菜单选项2" }) + } + } + + @Builder + MyMenu() { + Menu() { + MenuItem({ + startIcon: this.iconStr, + content: "菜单选项", + endIcon: $r("app.media.app_icon"), + builder: this.SubMenu + }).focusable(false) + MenuItem({ + startIcon: this.iconStr, + content: "菜单选项", + endIcon: $r("app.media.app_icon"), + builder: this.SubMenu + }) + .id('UlComponentCommonattrlfocusoptimizatton_157_2') + MenuItem({ + startIcon: this.iconStr, + content: "菜单选项", + endIcon: $r("app.media.app_icon"), + builder: this.SubMenu + }) + MenuItem({ + startIcon: this.iconStr, + content: "菜单选项", + endIcon: $r("app.media.app_icon"), + builder: this.SubMenu + }) + MenuItem({ + startIcon: this.iconStr, + content: "菜单选项", + endIcon: $r("app.media.app_icon"), + builder: this.SubMenu + }) + } + } + + build() { + Button('click for Menu') + .id('UlComponentCommonattrlfocusoptimizatton_157_1') + .bindMenu(this.MyMenu) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton158.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton158.ets new file mode 100644 index 0000000000000000000000000000000000000000..66f6b998913cca93502195dece5ce961d666dc4a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton158.ets @@ -0,0 +1,118 @@ +/* + * 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. + */ + +class Tmp { + iconStr2: ResourceStr = "./view_list_filled.png" + + set(val: ResourceStr) { + this.iconStr2 = val + } +} + +@Entry +@Component +struct UlComponentCommonattrlfocusoptimizatton158 { + @State listData: number[] = [0, 0, 0, 0, 0] + @State select: boolean = true + private iconStr: ResourceStr = "./view_list_filled.png" + private iconStr2: ResourceStr = "./view_list_filled.png" + + @Builder + SubMenu() { + Menu() { + MenuItem({ content: "复制", labelInfo: "Ctrl+C" }) + MenuItem({ content: "粘贴", labelInfo: "Ctrl+V" }) + } + } + + @Builder + MyMenu() { + Menu() { + MenuItem({ startIcon: $r("app.media.icon"), content: "菜单选项" }) + .id('item1ID') + MenuItem({ + startIcon: this.iconStr, + content: "菜单选项", + endIcon: "./arrow_right_filled.png", + // 当builder参数进行配置时,表示与menuItem项绑定了子菜单。鼠标hover在该菜单项时,会显示子菜单。 + builder: this.SubMenu + }) + .id('item2ID') + MenuItem({ startIcon: "./icon.png", content: "菜单选项" }).enabled(false) + + .enabled(false) + MenuItemGroup({ header: '小标题' }) { + MenuItem({ content: "菜单选项" }) + .selectIcon(true) + .selected(this.select) + .onChange((selected) => { + console.info("menuItem select" + selected); + let Str: Tmp = new Tmp() + Str.set("./icon.png") + }) + MenuItem({ + startIcon: "./view_list_filled.png", + content: "菜单选项", + endIcon: "./arrow_right_filled.png", + builder: this.SubMenu + }) + } + + MenuItem({ + startIcon: this.iconStr2, + content: "菜单选项", + endIcon: "./arrow_right_filled.png" + }) + } + } + + @Builder MenuBuilder() { + Flex({ direction: FlexDirection.Column, justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) { + ForEach(this.listData, (item:number, index) => { + Column() { + Row() { + Image($r("app.media.icon")).width(20).height(20).margin({ right: 5 }) + Text(`Menu${index as number + 1}`).fontSize(20) + } + .width('100%') + .height(30) + .justifyContent(FlexAlign.Center) + .align(Alignment.Center) + .onClick(() => { + console.info(`Menu${index as number + 1} Clicked!`) + }) + + if (index != this.listData.length - 1) { + Divider().height(10).width('80%').color('#ccc') + } + }.padding(5).height(40) + }) + }.width(100) + } + + build() { + Column() { + Text('click for menu') + .id('textID') + .fontSize(20) + .margin({ top: 20 }) + .bindContextMenu(this.MyMenu, ResponseType.LongPress) + // .bindMenu(this.MyMenu, ) + } + .height('100%') + .width('100%') + .backgroundColor('#f0f0f0') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton159.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton159.ets new file mode 100644 index 0000000000000000000000000000000000000000..95f0f49f287a92041490be77f15e05b6faaba68b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton159.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 UlComponentCommonattrlfocusoptimizatton159 { + @State select: boolean = true + private iconStr: ResourceStr = $r("app.media.app_icon") + private iconStr2: ResourceStr = $r("app.media.app_icon") + + @Builder + SubMenu() { + Menu() { + MenuItem({ content: "菜单选项1", labelInfo: "菜单选项1" }) + MenuItem({ content: "菜单选项2", labelInfo: "菜单选项2" }) + } + } + + @Builder + MyMenu() { + Menu() { + MenuItem({ + startIcon: this.iconStr, + content: "菜单选项", + endIcon: $r("app.media.app_icon"), + builder: this.SubMenu + }).focusable(false) + MenuItem({ + startIcon: this.iconStr, + content: "菜单选项", + endIcon: $r("app.media.app_icon"), + builder: this.SubMenu + }) + .id('UlComponentCommonattrlfocusoptimizatton_159_2') + MenuItem({ + startIcon: this.iconStr, + content: "菜单选项", + endIcon: $r("app.media.app_icon"), + builder: this.SubMenu + }).focusable(false) + } + } + + build() { + Button('click for Menu') + .id('UlComponentCommonattrlfocusoptimizatton_159_1') + .bindMenu(this.MyMenu) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton160.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton160.ets new file mode 100644 index 0000000000000000000000000000000000000000..2af795dafb79523a0319d6a1cf492d34535c4ca7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton160.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. + */ + +@Entry +@Component +struct UlComponentCommonattrlfocusoptimizatton160 { + private iconStr: ResourceStr = $r("app.media.icon") + + @Builder + MyMenu() { + Menu() { + MenuItem({ startIcon: this.iconStr, content: "菜单选项" }) + MenuItem({ startIcon: this.iconStr, content: "菜单选项" }) + MenuItem({ startIcon: this.iconStr, content: "菜单选项" }) + MenuItem({ startIcon: this.iconStr, content: "菜单选项" }) + MenuItem({ startIcon: this.iconStr, content: "菜单选项" }) + } + } + + @Builder + MyPreview() { + Column() { + Image($r('app.media.icon')) + .width(200) + .height(200) + } + } + + build() { + Column({ space: 50 }) { + Column() { + Column() { + Text('preview-builder') + .id('UlComponentCommonattrlfocusoptimizatton_160') + .width(200) + .height(100) + .textAlign(TextAlign.Center) + .margin(100) + .fontSize(30) + .bindContextMenu(this.MyMenu, ResponseType.LongPress, + { + preview: this.MyPreview + }) + } + }.width('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton161.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton161.ets new file mode 100644 index 0000000000000000000000000000000000000000..7cfcdc1a3243e0b60a2443d77d4f4e45131de528 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton161.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. + */ + +@Entry +@Component +struct UlComponentCommonattrlfocusoptimizatton161 { + private iconStr: ResourceStr = $r("app.media.icon") + + @Builder + MyMenu() { + Menu() { + MenuItem({ startIcon: this.iconStr, content: "菜单选项" }) + MenuItem({ startIcon: this.iconStr, content: "菜单选项" }).focusable(false) + MenuItem({ startIcon: this.iconStr, content: "菜单选项" }).focusable(false) + MenuItem({ startIcon: this.iconStr, content: "菜单选项" }) + MenuItem({ startIcon: this.iconStr, content: "菜单选项" }) + } + } + + @Builder + MyPreview() { + Column() { + Image($r('app.media.icon')) + .width(200) + .height(200) + } + } + + build() { + Column({ space: 50 }) { + Column() { + Column() { + Text('preview-builder') + .id('UlComponentCommonattrlfocusoptimizatton_161') + .width(200) + .height(100) + .textAlign(TextAlign.Center) + .margin(100) + .fontSize(30) + .bindContextMenu(this.MyMenu, ResponseType.LongPress, + { + preview: this.MyPreview + }) + } + }.width('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton162.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton162.ets new file mode 100644 index 0000000000000000000000000000000000000000..da67570e799fdc797987cff396921968aacf1cf5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton162.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 UlComponentCommonattrlfocusoptimizatton162 { + @Builder MenuBuilder() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Button('Test ContextMenu1') + Divider().strokeWidth(2).margin(5).color(Color.Black) + Button('Test ContextMenu2') + Divider().strokeWidth(2).margin(5).color(Color.Black) + Button('Test ContextMenu3') + Divider().strokeWidth(2).margin(5).color(Color.Black) + Button('Test ContextMenu4') + Divider().strokeWidth(2).margin(5).color(Color.Black) + Button('Test ContextMenu5') + } + .width(200) + .height(160) + } + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Column() { + Text("Test ContextMenu") + .id('UlComponentCommonattrlfocusoptimizatton_1') + .fontSize(20) + .width('100%') + .height(500) + .backgroundColor(0xAFEEEE) + .textAlign(TextAlign.Center) + } + .bindContextMenu(this.MenuBuilder, ResponseType.LongPress) + .onDragStart(()=>{ + ContextMenu.close() + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton164.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton164.ets new file mode 100644 index 0000000000000000000000000000000000000000..4460d58e0b53598891fe5d840c6a5c3512d20579 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton164.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 UlComponentCommonattrlfocusoptimizatton164 { + @Builder MenuBuilder() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Button('Test ContextMenu1') + Divider().strokeWidth(2).margin(5).color(Color.Black) + Button('Test ContextMenu2') + Divider().strokeWidth(2).margin(5).color(Color.Black) + Button('Test ContextMenu3') + Divider().strokeWidth(2).margin(5).color(Color.Black) + Button('Test ContextMenu4') + Divider().strokeWidth(2).margin(5).color(Color.Black) + Button('Test ContextMenu5') + } + .width(200) + .height(160) + } + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Column() { + Text("Test ContextMenu") + .fontSize(20) + .width('100%') + .height(500) + .backgroundColor(0xAFEEEE) + .textAlign(TextAlign.Center) + } + .id('button') + .bindContextMenu(this.MenuBuilder, ResponseType.LongPress) + .onDragStart(()=>{ + // 拖拽时关闭菜单 + ContextMenu.close() + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton165.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton165.ets new file mode 100644 index 0000000000000000000000000000000000000000..8c571dbc43d842c876e853fe171c21d524873070 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton165.ets @@ -0,0 +1,72 @@ +/* + * 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 UlComponentCommonattrlfocusoptimizatton165 { + @State select: boolean = true + private iconStr: ResourceStr = $r("app.media.app_icon") + private iconStr2: ResourceStr = $r("app.media.app_icon") + + @Builder + SubMenu() { + Menu() { + MenuItem({ content: "菜单选项1", labelInfo: "菜单选项1" }).focusable(false) + MenuItem({ content: "菜单选项2", labelInfo: "菜单选项2" }).focusable(false) + } + } + + @Builder + MyMenu() { + Menu() { + MenuItem({ + startIcon: this.iconStr, + content: "菜单选项", + endIcon: $r("app.media.app_icon"), + builder: this.SubMenu + }).focusable(false) + MenuItem({ + startIcon: this.iconStr, + content: "菜单选项", + endIcon: $r("app.media.app_icon"), + builder: this.SubMenu + }) + MenuItem({ + startIcon: this.iconStr, + content: "菜单选项", + endIcon: $r("app.media.app_icon"), + builder: this.SubMenu + }) + MenuItem({ + startIcon: this.iconStr, + content: "菜单选项", + endIcon: $r("app.media.app_icon"), + builder: this.SubMenu + }) + MenuItem({ + startIcon: this.iconStr, + content: "菜单选项", + endIcon: $r("app.media.app_icon"), + builder: this.SubMenu + }) + } + } + + build() { + Button('click for Menu') + .id('UlComponentCommonattrlfocusoptimizatton_165') + .bindMenu(this.MyMenu) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton166.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton166.ets new file mode 100644 index 0000000000000000000000000000000000000000..e86c62f4b860efbe4fe116d2941d85e2444291bb --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton166.ets @@ -0,0 +1,79 @@ +/* + * 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 UlComponentCommonattrlfocusoptimizatton166 { + @State handlePopup: boolean = false + @State customPopup: boolean = false + scroller: Scroller = new Scroller; + @Builder popupBuilder() { + Row({ space: 2 }) { + Scroll(this.scroller) { + Column() { + TextInput({ placeholder: 'input ...'}) + .id('UlComponentCommonattrlfocusoptimizatton_166_2') + .margin({top:10}) + .width(380) + .height(60) + TextInput({ placeholder: 'input ...'}) + .margin({top:10}) + .width(380) + .height(60) + TextInput({ placeholder: 'input ...'}) + .margin({top:10}) + .width(380) + .height(60) + TextInput({ placeholder: 'input ...'}) + .margin({top:10}) + .width(380) + .height(60) + }.width('100%') + } + .focusable(true) + .backgroundColor(Color.Yellow) + .height('100%') + .edgeEffect(EdgeEffect.Spring) + .scrollSnap({snapAlign:ScrollSnapAlign.START, snapPagination:400, enableSnapToStart:true, enableSnapToEnd:true}) + } + } + + build() { + Flex({ direction: FlexDirection.Column }) { + TextInput({ placeholder: 'input ...'}) + .width(380) + .height(60) + Button('CustomPopupOptions') + .id('UlComponentCommonattrlfocusoptimizatton_166_1') + .onClick(() => { + this.customPopup = !this.customPopup + }) + .bindPopup(this.customPopup, { + builder: this.popupBuilder, + placement: Placement.Top, + mask: {color:'#33000000'}, + popupColor: Color.Yellow, + enableArrow: true, + showInSubWindow: false, + onStateChange: (e) => { + if (!e.isVisible) { + this.customPopup = false + } + } + }) + .position({ x: 80, y: 300 }) + }.width('100%').padding({ top: 5 }) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton167.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton167.ets new file mode 100644 index 0000000000000000000000000000000000000000..55c0bb6c2919e7b86558d79d839972bb9c5a30d3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton167.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. + */ + +@Entry +@Component +struct UlComponentCommonattrlfocusoptimizatton167 { + @State handlePopup: boolean = false + @State customPopup: boolean = false + + // popup构造器定义弹框内容 + @Builder popupBuilder() { + Row({ space: 2 }) { + Image($r("app.media.icon")).width(24).height(24).margin({ left: -5 }) + Text('Custom Popup').fontSize(10) + }.width(100).height(50).padding(5) + } + + build() { + Flex({ direction: FlexDirection.Column }) { + TextInput({ placeholder: 'input ...'}) + .width(380) + .height(60) + Button('CustomPopupOptions') + .id('UlComponentCommonattrlfocusoptimizatton_167_1') + .onClick(() => { + this.customPopup = !this.customPopup + }) + .bindPopup(this.customPopup, { + builder: this.popupBuilder, + placement: Placement.Top, + mask: {color:'#33000000'}, + popupColor: Color.Yellow, + enableArrow: true, + showInSubWindow: false, + onStateChange: (e) => { + if (!e.isVisible) { + this.customPopup = false + } + } + }) + .position({ x: 80, y: 300 }) + }.width('100%').padding({ top: 5 }) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton168.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton168.ets new file mode 100644 index 0000000000000000000000000000000000000000..6e7687da03ffb8cc094c85f23bdf01df6cd4c193 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton168.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 UlComponentCommonattrlfocusoptimizatton168 { + @State handlePopup: boolean = false + @State customPopup: boolean = false + + @Builder popupBuilder() { + Row() { + TextInput({ placeholder: 'input ...' }) + Button('PopupOptions') + }.height(50).padding(5) + } + + build() { + Column({space: 100}) { + TextInput({ placeholder: 'input ...' }) + Button('CustomPopupOptions') + .id('UlComponentCommonattrlfocusoptimizatton_168') + .onClick(() => { + this.customPopup = !this.customPopup + }) + .bindPopup(this.customPopup, { + builder: this.popupBuilder, + targetSpace: '15vp', + enableArrow: false, + onStateChange: (e) => { + if (!e.isVisible) { + this.customPopup = false + } + } + }) + }.margin(20) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton170.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton170.ets new file mode 100644 index 0000000000000000000000000000000000000000..66cff55b7a810adcd0d8cbfa1727558cd572b765 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton170.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 UlComponentCommonattrlfocusoptimizatton170 { + @State handlePopup: boolean = false + @State customPopup: boolean = false + + @Builder popupBuilder() { + Row({ space: 2 }) { + TextInput({ placeholder: 'input ...'}) + .id('UlComponentCommonattrlfocusoptimizatton_170_2') + .width(380) + .height(60) + } + } + + build() { + Flex({ direction: FlexDirection.Column }) { + TextInput({ placeholder: 'input ...'}) + .width(380) + .height(60) + Button('CustomPopupOptions') + .id('UlComponentCommonattrlfocusoptimizatton_170_1') + .onClick(() => { + this.customPopup = !this.customPopup + }) + .bindPopup(this.customPopup, { + builder: this.popupBuilder, + placement: Placement.Top, + mask: {color:'#33000000'}, + popupColor: Color.Yellow, + enableArrow: true, + showInSubWindow: false, + onStateChange: (e) => { + if (!e.isVisible) { + this.customPopup = false + } + } + }) + .position({ x: 80, y: 300 }) + }.width('100%').padding({ top: 5 }) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testrunner/arrow_right_filled.png b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testrunner/arrow_right_filled.png new file mode 100644 index 0000000000000000000000000000000000000000..85ee01d624d53333ffdfa7c9c840581d0e84acd4 Binary files /dev/null and b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testrunner/arrow_right_filled.png differ diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testrunner/view_list_filled.png b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testrunner/view_list_filled.png new file mode 100644 index 0000000000000000000000000000000000000000..957be2080650e80ba524630dca470d46d770d722 Binary files /dev/null and b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testrunner/view_list_filled.png differ 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..f6139f5f0af3f010486af1b71d6fdd1e8e5b357a 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 @@ -1801,6 +1801,612 @@ "testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface007", "testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface008", "testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface009", - "testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface0010" + "testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface0010", + "testability/pages/AceActionGestureMonopolize/AceActionGestureMonopolize140", + "testability/pages/AceActionGestureMonopolize/AceActionGestureMonopolize10", + "testability/pages/AceActionGestureMonopolize/AceActionGestureMonopolize50", + "testability/pages/AceActionGestureMonopolize/AceActionGestureMonopolize70", + "testability/pages/AceActionGestureJudge/AceActionGestureJudge10", + "testability/pages/AceActionGestureJudge/AceActionGestureJudge20", + "testability/pages/AceActionGestureJudge/AceActionGestureJudge30", + "testability/pages/AceActionGestureJudge/AceActionGestureJudge40", + "testability/pages/AceActionGestureJudge/AceActionGestureJudge50", + "testability/pages/AceActionGestureJudge/AceActionGestureJudge60", + "testability/pages/AceActionGestureJudge/AceActionGestureJudge70", + "testability/pages/AceActionGestureJudge/AceActionGestureJudge80", + "testability/pages/AceActionGestureJudge/AceActionGestureJudge90", + "testability/pages/AceActionGestureJudge/AceActionGestureJudge120", + "testability/pages/AceActionGestureJudge/AceActionGestureJudge130", + "testability/pages/AceActionGestureJudge/AceActionGestureJudge140", + "testability/pages/AceActionGestureJudge/AceActionGestureJudge150", + "testability/pages/AceActionGestureJudge/AceActionGestureJudge160", + "testability/pages/AceActionGestureJudge/AceActionGestureJudge170", + "testability/pages/AceActionGestureJudge/AceActionGestureJudge180", + "testability/pages/AceActionGestureJudge/AceActionGestureJudge190", + "testability/pages/AceActionGestureJudge/AceActionGestureJudge200", + "testability/pages/AceActionGestureJudge/AceActionGestureJudge210", + "testability/pages/AceActionGestureJudge/AceActionGestureJudge220", + "testability/pages/AceActionGestureJudge/AceActionGestureJudge230", + "testability/pages/AceActionGestureJudge/AceActionGestureJudge270", + "testability/pages/AceActionGestureJudge/AceActionGestureJudge290", + "testability/pages/AceActionGestureJudge/AceActionGestureJudge300", + "testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface10", + "testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface20", + "testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface30", + "testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface40", + "testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface50", + "testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface60", + "testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface70", + "testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface80", + "testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface90", + "testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface100", + "testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface110", + "testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface200", + "testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface130", + "testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface140", + "testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface150", + "testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface160", + "testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface170", + "testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface180", + "testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface190", + "testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface230", + "testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface240", + "testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface50", + "testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface70", + "testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface90", + "testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface110", + "testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface130", + "testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface140", + "testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface150", + "testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface160", + "testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface170", + "testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface180", + "testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface190", + "testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface210", + "testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface230", + "testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface250", + "testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface280", + "testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface300", + "testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface340", + "testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface350", + "testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface380", + "testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface390", + "testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface400", + "testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface410", + "testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface430", + "testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface440", + "testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface450", + "testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface460", + "testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface470", + "testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface500", + "testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface520", + "testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface530", + "testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface540", + "testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface560", + "testability/pages/AceActionGestureGesturegroupInterface/AceActionGestureGesturegroupInterface580", + "testability/pages/AceActionGestureEventEnhancement/AceActionGestureEventEnhancement60", + "testability/pages/AceActionGestureEventEnhancement/AceActionGestureEventEnhancement20", + "testability/pages/AceActionGestureEventEnhancement/AceActionGestureEventEnhancement100", + "testability/pages/AceActionGestureEventEnhancement/AceActionGestureEventEnhancement120", + "testability/pages/AceActionGestureEventEnhancement/AceActionGestureEventEnhancement140", + "testability/pages/AceActionGestureEventEnhancement/AceActionGestureEventEnhancement180", + "testability/pages/AceActionGestureEventEnhancement/AceActionGestureEventEnhancement200", + "testability/pages/AceActionGestureEventEnhancement/AceActionGestureEventEnhancement230", + "testability/pages/AceActionGestureEventEnhancement/AceActionGestureEventEnhancement260", + "testability/pages/AceActionEventCommoneventClickInterface/AceActionEventCommoneventClickInterface10", + "testability/pages/AceActionEventCommoneventClickInterface/AceActionEventCommoneventClickInterface20", + "testability/pages/AceActionEventCommoneventClickInterface/AceActionEventCommoneventClickInterface30", + "testability/pages/AceActionEventCommoneventClickInterface/AceActionEventCommoneventClickInterface40", + "testability/pages/AceActionEventCommoneventClickInterface/AceActionEventCommoneventClickInterface60", + "testability/pages/AceActionEventCommoneventClickInterface/AceActionEventCommoneventClickInterface80", + "testability/pages/AceActionEventCommoneventClickSpecification/AceActionEventCommoneventClickSpecification10", + "testability/pages/AceActionEventCommoneventClickSpecification/AceActionEventCommoneventClickSpecification40", + "testability/pages/AceActionEventCommoneventClickSpecification/AceActionEventCommoneventClickSpecification80", + "testability/pages/AceActionEventCommoneventClickSpecification/AceActionEventCommoneventClickSpecification90", + "testability/pages/AceActionEventCommoneventClickSpecification/AceActionEventCommoneventClickSpecification140", + "testability/pages/AceActionEventCommoneventClickSpecification/AceActionEventCommoneventClickSpecification0120", + "testability/pages/UIAttributesEnabledInterface/UIAttributesEnabledInterface20", + "testability/pages/UIAttributesEnabledInterface/UIAttributesEnabledInterface10", + "testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface380", + "testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface10", + "testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface20", + "testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface60", + "testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface70", + "testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface80", + "testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface90", + "testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface100", + "testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface140", + "testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface150", + "testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface160", + "testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface170", + "testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface180", + "testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface330", + "testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface340", + "testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface390", + "testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface10", + "testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface20", + "testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface30", + "testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface70", + "testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface80", + "testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface90", + "testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface100", + "testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface120", + "testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface130", + "testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface140", + "testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface160", + "testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface190", + "testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface200", + "testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface220", + "testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface240", + "testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface250", + "testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface270", + "testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface290", + "testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface310", + "testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface330", + "testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface340", + "testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface350", + "testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface370", + "testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface390", + "testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface420", + "testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface440", + "testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface450", + "testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface460", + "testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface470", + "testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface490", + "testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface510", + "testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface530", + "testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface540", + "testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface550", + "testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface560", + "testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface610", + "testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface660", + "testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface670", + "testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface680", + "testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface690", + "testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface700", + "testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface750", + "testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface780", + "testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface790", + "testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface800", + "testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface810", + "testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface820", + "testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface830", + "testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface840", + "testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface860", + "testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface890", + "testability/pages/ActionGesturePangestureIntureface/ActionGesturePangestureIntureface940", + "testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface0210", + "testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface0220", + "testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface0230", + "testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface0240", + "testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface0250", + "testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface0260", + "testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0010", + "testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0020", + "testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0490", + "testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0400", + "testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0030", + "testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0040", + "testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0050", + "testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0060", + "testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0070", + "testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0080", + "testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0090", + "testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0100", + "testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0110", + "testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0260", + "testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0340", + "testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0350", + "testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0360", + "testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0440", + "testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0120", + "testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0130", + "testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0140", + "testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0150", + "testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0160", + "testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0180", + "testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0190", + "testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0270", + "testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0280", + "testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0320", + "testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0330", + "testability/pages/ActionGestureLonggestureInterface/ActionGestureLonggestureInterface0170", + "testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0220", + "testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0230", + "testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0140", + "testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0150", + "testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0160", + "testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0260", + "testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0270", + "testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0290", + "testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0320", + "testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0370", + "testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0380", + "testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0400", + "testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0450", + "testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0520", + "testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0580", + "testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0110", + "testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0120", + "testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0180", + "testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0190", + "testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0200", + "testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0210", + "testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0250", + "testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0420", + "testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0470", + "testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0310", + "testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0010", + "testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0030", + "testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0040", + "testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0050", + "testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0060", + "testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0070", + "testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0080", + "testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0090", + "testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0100", + "testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0110", + "testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0120", + "testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0130", + "testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0140", + "testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0150", + "testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0160", + "testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0170", + "testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0180", + "testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0190", + "testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0200", + "testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0210", + "testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0220", + "testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0230", + "testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0240", + "testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0250", + "testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0260", + "testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0270", + "testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0280", + "testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0290", + "testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0300", + "testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0310", + "testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0320", + "testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0330", + "testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0340", + "testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0350", + "testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0360", + "testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0370", + "testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0410", + "testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0420", + "testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0430", + "testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0440", + "testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0450", + "testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0460", + "testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0500", + "testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0510", + "testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0520", + "testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0530", + "testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0540", + "testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0550", + "testability/pages/ActionGesturePinchgesrureInterface/ActionGesturePinchgesrureInterface0590", + "testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0010", + "testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0020", + "testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0030", + "testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0040", + "testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0050", + "testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0060", + "testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0070", + "testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0080", + "testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0090", + "testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0100", + "testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0110", + "testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0120", + "testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0130", + "testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0140", + "testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0150", + "testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0160", + "testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0170", + "testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0180", + "testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0260", + "testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0310", + "testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0340", + "testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0350", + "testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0400", + "testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0230", + "testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0270", + "testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0360", + "testability/pages/ActionGestureRotationgestureInterface/ActionGestureRotationgestureInterface0190", + "testability/pages/ActionEventCommoneventChange/ActionEventCommoneventChange0340", + "testability/pages/ActionEventCommoneventChange/ActionEventCommoneventChange0140", + "testability/pages/ActionEventCommoneventChange/ActionEventCommoneventChange0530", + "testability/pages/ActionEventCommoneventChange/ActionEventCommoneventChange0110", + "testability/pages/ActionEventCommoneventChange/ActionEventCommoneventChange0120", + "testability/pages/ActionEventCommoneventChange/ActionEventCommoneventChange0490", + "testability/pages/ActionEventCommoneventChange/ActionEventCommoneventChange0520", + "testability/pages/ActionEventCommoneventChange/ActionEventCommoneventChange0550", + "testability/pages/ActionGesturePinchgesrureJump/ActionGesturePinchgesrureJump0040", + "testability/pages/ActionGesturePinchgesrureJump/ActionGesturePinchgesrureJump0050", + "testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface10", + "testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface20", + "testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface0030", + "testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface40", + "testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface50", + "testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface60", + "testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface70", + "testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface100", + "testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface110", + "testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface140", + "testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface150", + "testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface160", + "testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface170", + "testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface180", + "testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface210", + "testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface230", + "testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface270", + "testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface290", + "testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface310", + "testability/pages/ActionGestureSwipegestureInterface/ActionGestureSwipegestureInterface340", + "testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface10", + "testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface20", + "testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface30", + "testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface40", + "testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface50", + "testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface60", + "testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface70", + "testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface90", + "testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface100", + "testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface140", + "testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface150", + "testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface170", + "testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface180", + "testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface190", + "testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface200", + "testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface210", + "testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface220", + "testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface230", + "testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface240", + "testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface250", + "testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface260", + "testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface270", + "testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface280", + "testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface290", + "testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface300", + "testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface360", + "testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface370", + "testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface380", + "testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface390", + "testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface400", + "testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface410", + "testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface470", + "testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface480", + "testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface490", + "testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface310", + "testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface330", + "testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface500", + "testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface510", + "testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface520", + "testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface530", + "testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface540", + "testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface550", + "testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface560", + "testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface570", + "testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface580", + "testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface590", + "testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface600", + "testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface610", + "testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface620", + "testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface640", + "testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface650", + "testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface660", + "testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface680", + "testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface690", + "testability/pages/ActionGestureTouchpadInterface/ActionGestureTouchpadInterface700", + "testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction10", + "testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction20", + "testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction30", + "testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction40", + "testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction50", + "testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction60", + "testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction70", + "testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction80", + "testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction100", + "testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction110", + "testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction140", + "testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction180", + "testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction190", + "testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction210", + "testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction220", + "testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction230", + "testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction250", + "testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction260", + "testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction270", + "testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction290", + "testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction310", + "testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction340", + "testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction380", + "testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction390", + "testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction400", + "testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction420", + "testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0090", + "testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0130", + "testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0160", + "testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0170", + "testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0200", + "testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0240", + "testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0280", + "testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0300", + "testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0320", + "testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0330", + "testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0350", + "testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0360", + "testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0370", + "testability/pages/UIAttributesTouchableInteraction/UIAttributesTouchableInteraction0410", + "testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer30", + "testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer40", + "testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer50", + "testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer60", + "testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer70", + "testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer80", + "testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer120", + "testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer130", + "testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer140", + "testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer150", + "testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer160", + "testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer170", + "testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer180", + "testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0360", + "testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0090", + "testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0020", + "testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0030", + "testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0010", + "testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0190", + "testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0260", + "testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0270", + "testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0250", + "testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0220", + "testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0240", + "testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0200", + "testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0210", + "testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0100", + "testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0110", + "testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0150", + "testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0160", + "testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0280", + "testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0290", + "testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0300", + "testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0310", + "testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0320", + "testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0330", + "testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0370", + "testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0380", + "testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0390", + "testability/pages/ActionGestureEventRecognizer/ActionGestureEventRecognizer0400", + "testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation20", + "testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0010", + "testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0050", + "testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0080", + "testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0070", + "testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0090", + "testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0110", + "testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0130", + "testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0140", + "testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0170", + "testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0180", + "testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0190", + "testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0120", + "testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation60", + "testability/pages/ActionGestureEventMitigation/ActionGestureEventMitigation0040", + "testability/pages/UIActionEventIntercept/UIActionEventIntercept0010", + "testability/pages/UIActionEventIntercept/UIActionEventIntercept0050", + "testability/pages/UIActionEventIntercept/UIActionEventIntercept0080", + "testability/pages/UIActionEventIntercept/UIActionEventIntercept0090", + "testability/pages/UIActionEventIntercept/UIActionEventIntercept0060", + "testability/pages/UIActionEventIntercept/UIActionEventIntercept0030", + "testability/pages/UIActionEventIntercept/UIActionEventIntercept0040", + "testability/pages/UIActionEventIntercept/UIActionEventIntercept0070", + "testability/pages/UIActionEventIntercept/UISupportGlobalshortcutKeyRegistratton0010", + "testability/pages/UIActionEventIntercept/UISupportGlobalshortcutKeyRegistratton0150", + "testability/pages/UIActionEventIntercept/UISupportGlobalshortcutKeyRegistratton0260", + "testability/pages/UIActionEventIntercept/UISupportGlobalshortcutKeyRegistratton0300", + "testability/pages/UIActionEventIntercept/UISupportGlobalshortcutKeyRegistratton0100", + "testability/pages/UIActionEventIntercept/UISupportGlobalshortcutKeyRegistratton0200", + "testability/pages/ActionGestureExcepionHanding/ActionGestureExcepionHanding0570", + "testability/pages/ActionGestureExcepionHanding/ActionGestureExcepionHanding0010", + "testability/pages/ActionEventCommoneventClickScenarios/ActionEventCommoneventClickScenarios0020", + "testability/pages/ActionEventCommoneventClickDfx/ActionEventCommoneventClickDfx0010", + "testability/pages/ActionEventCommoneventClickDfx/ActionEventCommoneventClickDfx0020", + "testability/pages/ActionEventCommoneventClickDfx/ActionEventCommoneventClickDfx0030", + "testability/pages/ActionEventCommoneventClickDfx/ActionEventCommoneventClickDfx0040", + "testability/pages/ActionEventCommoneventClickDfx/ActionEventCommoneventClickDfx0050", + "testability/pages/ActionGestureTapgestureDfx/ActionGestureTapgestureDfx0010", + "testability/pages/ActionGestureTapgestureDfx/ActionGestureTapgestureDfx0020", + "testability/pages/ActionGestureLonggestureDfx/ActionGestureLonggestureDfx0010", + "testability/pages/ActionGestureLonggestureDfx/ActionGestureLonggestureDfx0020", + "testability/pages/ActionEventCommoneventClick/ActionEventCommoneventClick0030", + "testability/pages/ActionEventCommoneventClick/ActionEventCommoneventClick0040", + "testability/pages/ActionGestureAttributemodifier/ActionGestureAttributemodifier0110", + "testability/pages/ActionGestureAttributemodifier/ActionGestureAttributemodifier0130", + "testability/pages/ActionGestureAttributemodifier/ActionGestureAttributemodifier0140", + "testability/pages/ActionGestureAttributemodifier/ActionGestureAttributemodifier0150", + "testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0550", + "testability/pages/ActionEvenTRegisterComponentsChangeEventCallbackActionsheet/ActionEvenTRegisterComponentsChangeEventCallbackActionsheet020", + "testability/pages/ActionEvenTRegisterComponentsChangeEventCallbackActionsheet/ActionEvenTRegisterComponentsChangeEventCallbackActionsheet010", + "testability/pages/SUB_ACE_ActionEventRegisterRouterChangeEventCallback/SUB_ACE_ActionEventRegisterRouterChangeEventCallback010", + "testability/pages/ActionEventConnect/ActionEventConnect010", + "testability/pages/ActionEventRegisterWebsearchEventCallback/ActionEventRegisterWebsearchEventCallback010", + "testability/pages/ActionGestureGesturegroupInterface/ActionGestureGesturegroupInterface0040", + "testability/pages/ActionGestureGesturegroupInterface/ActionGestureGesturegroupInterface0020", + "testability/pages/AceActionEventGetinspectorTree/AceActionEventGetinspectorTree010", + "testability/pages/ActionEventRegisterComponentChangeEventCallbackAlertdialog/ActionEventRegisterComponentChangeEventCallbackAlertdialog020", + "testability/pages/ActionEventRegisterComponentChangeEventCallbackActonsheet/ActionEventRegisterComponentChangeEventCallbackActonsheet010", + "testability/pages/ActionEventRegisterComponentChangeEventCallbackCounter/ActionEventRegisterComponentChangeEventCallbackCounter030", + "testability/pages/ActionEventRegisterComponentChangeEventCallbackGrid/ActionEventRegisterComponentChangeEventCallbackGrid040", + "testability/pages/ActionEventRegisterComponentChangeEventCallbackTextinput/ActionEventRegisterComponentChangeEventCallbackTextinput150", + "testability/pages/ActionEventRegisterComponentChangeEventCallbackToggle/ActionEventRegisterComponentChangeEventCallbackToggle160", + "testability/pages/ActionEventRegisterComponentChangeEventCallbackWaterflow/ActionEventRegisterComponentChangeEventCallbackWaterflow170", + "testability/pages/AnalyseActionEventCommoneventDrag/AnalyseActionEventCommoneventDrag0210", + "testability/pages/AnalyseActionEventCommoneventDrag/AnalyseActionEventCommoneventDrag0220", + "testability/pages/AnalyseActionEventCommoneventDrag/AnalyseActionEventCommoneventDrag0230", + "testability/pages/SubAceActionGestureSpeedInterface/SubAceActionGestureSpeedInterface0010", + "testability/pages/SubAceActionGestureSpeedInterface/SubAceActionGestureSpeedInterface0020", + "testability/pages/SubAceActionGestureSpeedInterface/SubAceActionGestureSpeedInterface0030", + "testability/pages/SubAceActionGestureSpeedInterface/SubAceActionGestureSpeedInterface0040", + "testability/pages/SubAceActionGestureSpeedInterface/SubAceActionGestureSpeedInterface0050", + "testability/pages/SubAceActionGestureSpeedInterface/SubAceActionGestureSpeedInterface0060", + "testability/pages/SubAceActionEventIntercept/SubAceActionEventIntercept0100", + "testability/pages/SubAceActionGestureOnChildTouch/SubAceActionGestureOnChildTouch0010", + "testability/pages/SubAceUIComponentCommonattrFocusoptimization/SubAceUIComponentCommonattrFocusoptimization125", + "testability/pages/SubAceUIComponentCommonattrFocusoptimization/SubAceUIComponentCommonattrFocusoptimization128", + "testability/pages/SubAceUIComponentCommonattrFocusoptimization/SubAceUIComponentCommonattrFocusoptimization142", + "testability/pages/SubAceUIComponentCommonattrFocusoptimization/SubAceUIComponentCommonattrFocusoptimization143", + "testability/pages/SubAceUIComponentCommonattrFocusoptimization/SubAceUIComponentCommonattrFocusoptimization146", + "testability/pages/ActionGestureSpeedInterface/ActionGestureSpeedInterface0070", + "testability/pages/ActionGestureSpeedInterface/ActionGestureSpeedInterface0080", + "testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0330", + "testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0340", + "testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0360", + "testability/pages/ActionGestureReplenishmentgertureInterface/ActionGestureReplenishmentgertureInterface0350", + "testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface0120", + "testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface0210", + "testability/pages/AceActionGestureDisableInterface/AceActionGestureDisableInterface0220", + "testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface0290", + "testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface0310", + "testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface0320", + "testability/pages/ActionGestureTapgeatureIntureface/ActionGestureTapgeatureIntureface0300", + "testability/pages/AnalyseActionEventCommoneventDrag/AnalyseActionEventCommoneventDrag0200", + "testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton162", + "testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton155", + "testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton160", + "testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton154", + "testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton161", + "testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton159", + "testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton168", + "testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton165", + "testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton157", + "testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton153", + "testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton150", + "testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton152", + "testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton167", + "testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton170", + "testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton166", + "testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton136", + "testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton139", + "testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton140", + "testability/pages/UlComponentCommonattrlfocusoptimizatton/UlActtonEventCommonattrlfocusoptimizatton140", + "testability/pages/UlComponentCommonattrlfocusoptimizatton/UIComponentCommonattrFocusoptimization179", + "testability/pages/UlComponentCommonattrlfocusoptimizatton/UIComponentCommonattrFocusoptimization173", + "testability/pages/UlComponentCommonattrlfocusoptimizatton/UIComponentCommonattrFocusoptimization135", + "testability/pages/UlComponentCommonattrlfocusoptimizatton/UIComponentCommonattrFocusoptimization134", + "testability/pages/UlComponentCommonattrlfocusoptimizatton/UIComponentCommonattrFocusoptimization175", + "testability/pages/UlComponentCommonattrlfocusoptimizatton/UIComponentCommonattrFocusoptimization133", + "testability/pages/UlComponentCommonattrlfocusoptimizatton/UIComponentCommonattrFocusoptimization178", + "testability/pages/UlComponentCommonattrlfocusoptimizatton/UIComponentCommonattrFocusoptimization130", + "testability/pages/UlComponentCommonattrlfocusoptimizatton/UIComponentCommonattrFocusoptimization174", + "testability/pages/UlComponentCommonattrlfocusoptimizatton/UIComponentCommonattrFocusoptimization180", + "testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton126", + "testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton132", + "testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton137", + "testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton138", + "testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton141", + "testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton149", + "testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton151", + "testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton158", + "testability/pages/UlComponentCommonattrlfocusoptimizatton/UlComponentCommonattrlfocusoptimizatton164" ] }