diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ArkUIScrollbarScrollTest/ArkUIScrollbarScroll.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ArkUIScrollbarScrollTest/ArkUIScrollbarScroll.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..a3265728d5f7d09bfdf781331a9a4b961327ffad --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ArkUIScrollbarScrollTest/ArkUIScrollbarScroll.test.ets @@ -0,0 +1,1305 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT 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 ArkUIScrollbarScroll() { + + describe('ArkUIScrollbarScroll', () => { + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0030 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0030 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0030', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0030 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll30") + await Utils.sleep(2000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll30')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0030 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0040 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0040 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0040', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0040 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll40") + await Utils.sleep(2000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll40')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0040 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0050 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0050 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0050', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0050 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll50") + await Utils.sleep(2000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll50')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0050 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0130 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0130 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0130', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0130 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll130") + await Utils.sleep(2000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll130')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0130 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0140 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0140 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0140', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0140 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll140") + await Utils.sleep(2000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll140')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0140 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0150 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0150 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0150', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0150 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll150") + await Utils.sleep(2000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll150')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0150 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0230 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0230 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0230', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0230 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll230") + await Utils.sleep(2000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll230')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0230 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0240 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0240 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0240', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0240 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll240") + await Utils.sleep(2000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll240')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0240 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0250 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0250 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0250', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0250 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll250") + await Utils.sleep(2000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll250')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0250 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0360 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0360 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0360', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0360 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll360") + await Utils.sleep(2000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll360')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0360 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0370 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0370 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0370', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0370 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll370") + await Utils.sleep(2000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll370')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0370 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0380 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0380 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0380', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0380 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll380") + await Utils.sleep(2000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll380')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0380 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0460 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0460 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0460', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0460 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll460") + await Utils.sleep(2000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll460')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0460 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0470 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0470 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0470', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0470 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll470") + await Utils.sleep(2000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll470')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0470 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0480 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0480 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0480', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0480 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll480") + await Utils.sleep(2000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll480')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0480 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0560 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0560 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0560', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0560 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll560") + await Utils.sleep(2000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll560')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0560 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0570 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0570 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0570', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0570 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll570") + await Utils.sleep(2000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll570')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0570 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0580 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0580 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0580', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0580 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll580") + await Utils.sleep(2000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll580')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0580 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0580 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0580 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0790', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0790 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll790") + await Utils.sleep(2000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll790')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0790 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0260 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0260 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0260', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0260 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll260") + await Utils.sleep(2000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll260')) + await button.click() + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('index3')) + await button1.click() + await Utils.sleep(2000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0260 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0270 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0270 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0270', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0270 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll270") + await Utils.sleep(2000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll270')) + await button.click() + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('index3')) + await button1.click() + await Utils.sleep(2000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0270 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0280 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0280 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0280', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0280 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll280") + await Utils.sleep(2000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll280')) + await button.click() + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('index2')) + await button1.click() + await Utils.sleep(2000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0280 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0300 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0300 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0300', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0300 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll300") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll300')); + let info = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.fling({x: center.x, y:center.y},{x: center.x, y: info.bottom},5,20000); + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0300 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0830 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0830 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0830', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0830 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll830") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll830')); + let info = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.drag(center.x, info.top,center.x, center.y ); + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0830 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0840 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0840 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0840', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0840 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll840") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let List: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll840')); + let info = await List.getBounds(); + let center = await List.getBoundsCenter(); + await driver.drag(center.x, info.top,center.x, center.y ); + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0840 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0850 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0850 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0850', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0850 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll850") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let List: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll850')); + let info = await List.getBounds(); + let center = await List.getBoundsCenter(); + await driver.drag(center.x, info.top,center.x, center.y ); + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0850 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0860 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0860 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0860', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0860 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll860") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let Scroll: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll860')); + let info = await Scroll.getBounds(); + let center = await Scroll.getBoundsCenter(); + await driver.fling({x: center.x, y: info.top},{x: center.x, y: center.y},5,5000); + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0860 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0870 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0870 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0870', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0870 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll870") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let List: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll870')); + let info = await List.getBounds(); + let center = await List.getBoundsCenter(); + await driver.fling({x: center.x, y: info.top},{x: center.x, y: center.y},5,5000); + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0870 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0880 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0880 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0880', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0880 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll880") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let List: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll880')); + let info = await List.getBounds(); + let center = await List.getBoundsCenter(); + await driver.fling({x: center.x, y: info.top},{x: center.x, y: center.y},5,5000); + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0880 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0500 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0500 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0500', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0500 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll500") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let List: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll500')); + let info = await List.getBounds(); + let center = await List.getBoundsCenter(); + await driver.fling({x: center.x, y: info.top},{x: center.x, y: center.y},5,5000); + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0500 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0600 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0600 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0600', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0600 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll600") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let List: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll600')); + let info = await List.getBounds(); + let center = await List.getBoundsCenter(); + await driver.fling({x: info.top, y: center.y},{x: center.x, y: center.y},5,5000); + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0600 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0490 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0490 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0490', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0490 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll490") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let List: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll490')); + let info = await List.getBounds(); + let center = await List.getBoundsCenter(); + await driver.drag(center.x, info.top,center.x, center.y ); + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0490 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0590 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0590 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0590', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0590 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll590") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let List: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll590')); + let info = await List.getBounds(); + let center = await List.getBoundsCenter(); + await driver.drag(info.top,center.y,center.x, center.y ); + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0590 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0290 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0290 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0290', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0290 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll290") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let List: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll290')); + let info = await List.getBounds(); + let center = await List.getBoundsCenter(); + await driver.drag(center.x, info.top,center.x, center.y ); + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0290 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0390 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0390 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0390', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0390 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll390") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let List: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll390')); + let info = await List.getBounds(); + let center = await List.getBoundsCenter(); + await driver.drag(info.top,center.y,center.x, center.y ); + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0390 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0400 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0400 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0400', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0400 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll400") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let List: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll400')); + let info = await List.getBounds(); + let center = await List.getBoundsCenter(); + await driver.fling({x: info.top, y: center.y},{x: center.x, y: center.y},5,5000); + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0400 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0060 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0060 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0060', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0060 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll60") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let List: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll60')); + let info = await List.getBounds(); + let center = await List.getBoundsCenter(); + await driver.drag(center.x, info.top,center.x, center.y ); + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0060 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0070 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0070 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0070', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0070 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll70") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let List: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll70')); + let info = await List.getBounds(); + let center = await List.getBoundsCenter(); + await driver.fling({x: center.x, y: info.top},{x: center.x, y: center.y},5,5000); + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0070 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0160 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0160 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0160', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0160 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll160") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let List: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll160')); + let info = await List.getBounds(); + let center = await List.getBoundsCenter(); + await driver.drag(info.top,center.y,center.x, center.y ); + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0160 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0170 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0170 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0170', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0170 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll170") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let List: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll170')); + let info = await List.getBounds(); + let center = await List.getBoundsCenter(); + await driver.fling({x: info.top, y: center.y},{x: center.x, y: center.y},20,5000); + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0170 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0660 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0660 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0660', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0660 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll660") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let List: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll660')); + let info = await List.getBounds(); + let center = await List.getBoundsCenter(); + await driver.drag(center.x, info.top,center.x, center.y ); + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0660 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0740 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0740 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0740', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0740 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll740") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let List: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll740')); + let info = await List.getBounds(); + let center = await List.getBoundsCenter(); + await driver.fling({x: info.top, y: center.y},{x: center.x, y: center.y},5,5000); + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0740 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0670 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0670 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0670', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0670 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll670") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let List: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll670')); + let info = await List.getBounds(); + let center = await List.getBoundsCenter(); + await driver.drag(info.top,center.x,center.x, center.y ); + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0670 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0750 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0750 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0750', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0750 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll750") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let List: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll750')); + let info = await List.getBounds(); + let center = await List.getBoundsCenter(); + await driver.fling({x: info.top, y: center.y},{x: center.x, y: center.y},20,5000); + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0750 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0320 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0320 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0320', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0320 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll320") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll320')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0320 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0330 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0330 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0330', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0330 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll330") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll330_1')) + let button1: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll330_2')) + await button.click() + await Utils.sleep(500) + await button1.click() + await Utils.sleep(2000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0330 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0420 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0420 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0420', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0420 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll420") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll420')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0420 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0430 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0430 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0430', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0430 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll430") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll430_1')) + let button1: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll430_2')) + await button.click() + await Utils.sleep(500) + await button1.click() + await Utils.sleep(2000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0430 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0520 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0520 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0520', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0520 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll520") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll520')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0520 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0530 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0530 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0530', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0530 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll530") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll530_1')) + let button1: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll530_2')) + await button.click() + await Utils.sleep(500) + await button1.click() + await Utils.sleep(2000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0530 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0620 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0620 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0620', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0620 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll620") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll620')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0620 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0630 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0630 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0630', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0630 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll630") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll630_1')) + let button1: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll630_2')) + await button.click() + await Utils.sleep(500) + await button1.click() + await Utils.sleep(2000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0630 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0090 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0090 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0090', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0090 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll90") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll90')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0090 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0100 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0100 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0100', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0100 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll100") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll100_1')) + let button1: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll100_2')) + await button.click() + await Utils.sleep(500) + await button1.click() + await Utils.sleep(2000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0100 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0190 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0190 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0190', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0190 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll190") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll190')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0190 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0200 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0200 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0200', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0200 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll200") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll200_1')) + let button1: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll200_2')) + await button.click() + await Utils.sleep(500) + await button1.click() + await Utils.sleep(2000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0200 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0700 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0700 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0700', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0700 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll700") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll700')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0700 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0710 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0710 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0710', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0710 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll710") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll710_1')) + let button1: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll710_2')) + await button.click() + await Utils.sleep(500) + await button1.click() + await Utils.sleep(2000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0710 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0770 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0770 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0770', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0770 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll770") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll770')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0770 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0780 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0780 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0780', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0780 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll780") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll780_1')) + let button1: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll780_2')) + await button.click() + await Utils.sleep(500) + await button1.click() + await Utils.sleep(2000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0780 finish.`); + done() + }) + + + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/List.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/List.test.ets index 87c82566b0734d29c4501028abbf54e47fb8eb2b..1484098d74b23502d3e663697b0395c62b636ab2 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 @@ -80,6 +80,28 @@ import UIComponentScrollSwiperAcross from './UIComponentScrollSwiperAcrossTest/U import UIComponentScrollSwiperTeace from './UIComponentScrollSwiperTeaceTest/UIComponentScrollSwiperTeace.test'; import UIComponentScrollSwiperDisplaycount from './UIComponentScrollSwiperDisplaycountTest/UIComponentScrollSwiperDisplaycount.test'; import UIComponentScrollSwiperArrowHead from './UIComponentScrollSwiperArrowHeadTest/UIComponentScrollSwiperArrowHead.test'; +import UIComponentListandgridGridInterface + from './UIComponentListandgridGridInterfaceTest/UIComponentListandgridGridInterface.test' +import UIComponentUisupportColor + from './UIComponentUisupportColorTest/UIComponentUisupportColor.test' +import UIComponentListandgridXommonSmooth + from './UIComponentListandgridXommonSmoothTest/UIComponentListandgridXommonSmooth.test' +import UIComponentGridModifier + from './UIComponentGridModifierTest/UIComponentGridModifier.test' +import UIComponentScrollScrollExtra + from './UIComponentScrollScrollExtraTest/UIComponentScrollScrollExtra.test' +import UIComponentScrollAlphabetindexermodifier + from './UIComponentScrollAlphabetindexermodifierTest/UIComponentScrollAlphabetindexermodifier.test' +import UIComponentListandgridModifier + from './UIComponentListandgridModifierTest/UIComponentListandgridModifier.test' +import ArkUIScrollbarScroll + from './ArkUIScrollbarScrollTest/ArkUIScrollbarScroll.test' +import UIComponentListandgridXommonScrollto + from './UIComponentListandgridXommonScrolltoTest/UIComponentListandgridXommonScrollto.test' +import UIComponentListandgridXommonOnscroll + from './UIComponentListandgridXommonOnscrollTest/UIComponentListandgridXommonOnscroll.test' +import UiComponentAlphabetindexerAttributeAutocollapse + from './UiComponentAlphabetindexerAttributeAutocollapseTest/UiComponentAlphabetindexerAttributeAutocollapse.test' export default function testsuite() { @@ -137,4 +159,15 @@ export default function testsuite() { UIComponentScrollSwiperTeace(); UIComponentScrollSwiperDisplaycount(); UIComponentScrollSwiperArrowHead(); + UIComponentListandgridGridInterface(); + UIComponentUisupportColor(); + UIComponentListandgridXommonSmooth(); + UIComponentGridModifier(); + UIComponentScrollScrollExtra(); + UIComponentScrollAlphabetindexermodifier(); + UIComponentListandgridModifier(); + ArkUIScrollbarScroll(); + UIComponentListandgridXommonScrollto(); + UIComponentListandgridXommonOnscroll(); + UiComponentAlphabetindexerAttributeAutocollapse(); } \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentGridModifierTest/UIComponentGridModifier.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentGridModifierTest/UIComponentGridModifier.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..5c28f485795167925c4a6c0cfee80a3f94a14550 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentGridModifierTest/UIComponentGridModifier.test.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. + */ +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 UIComponentGridModifier() { + + describe('UIComponentGridModifier', () => { + + /** + * @tc.number SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0140 + * @tc.name SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0140 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0140', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0140 start.`); + Settings.createWindow("testability/pages/UIComponentGridModifier/UIComponentGridModifier0130"); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0140 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0130 + * @tc.name SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0130 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0130', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0130 start.`); + Settings.createWindow("testability/pages/UIComponentGridModifier/UIComponentGridModifier0130"); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0130 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0150 + * @tc.name SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0150 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0150', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0150 start.`); + Settings.createWindow("testability/pages/UIComponentGridModifier/UIComponentGridModifier0150"); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0150 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0160 + * @tc.name SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0160 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0160', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0160 start.`); + Settings.createWindow("testability/pages/UIComponentGridModifier/UIComponentGridModifier0160"); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0160 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0170 + * @tc.name SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0170 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0170', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0170 start.`); + Settings.createWindow("testability/pages/UIComponentGridModifier/UIComponentGridModifier0170"); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0170 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0180 + * @tc.name SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0180 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0180', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0180 start.`); + Settings.createWindow("testability/pages/UIComponentGridModifier/UIComponentGridModifier0180"); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0180 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0190 + * @tc.name SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0190 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0190', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0190 start.`); + Settings.createWindow("testability/pages/UIComponentGridModifier/UIComponentGridModifier0190"); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0190 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0200 + * @tc.name SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0200 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0200', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0200 start.`); + Settings.createWindow("testability/pages/UIComponentGridModifier/UIComponentGridModifier0200"); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0200 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0460 + * @tc.name SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0460 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0460', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0460 start.`); + Settings.createWindow("testability/pages/UIComponentGridModifier/UIComponentGridModifier0460"); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0460 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0470 + * @tc.name SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0470 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0470', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0470 start.`); + Settings.createWindow("testability/pages/UIComponentGridModifier/UIComponentGridModifier0470"); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0470 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0410 + * @tc.name SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0410 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0410', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0410 start.`); + Settings.createWindow("testability/pages/UIComponentGridModifier/UIComponentGridModifier0410"); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0410 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0450 + * @tc.name SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0450 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0450', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0450 start.`); + Settings.createWindow("testability/pages/UIComponentGridModifier/UIComponentGridModifier0450"); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0450 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0230 + * @tc.name SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0230 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0230', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0230 start.`); + Settings.createWindow("testability/pages/UIComponentGridModifier/UIComponentGridModifier0230"); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0230 finish.`); + done(); + }) + + + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentListandgridGridInterfaceTest/UIComponentListandgridGridInterface.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentListandgridGridInterfaceTest/UIComponentListandgridGridInterface.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..5309deda5bfa8e503d72a49bda57408967793a90 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentListandgridGridInterfaceTest/UIComponentListandgridGridInterface.test.ets @@ -0,0 +1,494 @@ +/* + * 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 { Component, Driver, ON } from '@ohos.UiTest' + +export default function UIComponentListandgridGridInterface() { + + describe('UIComponentListandgridGridInterface', () => { + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0240_486 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0240_486 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0240_486', 1, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0240_486 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0240_486"); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0240_486 finish.`); + done(); + }) + + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0250_798 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0250_798 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0250_798', 2, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0250_798 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0250_798"); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0250_798 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0260_891 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0260_891 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0260_891', 3, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0260_891 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0260_891"); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0260_891 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0270_291 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0270_291 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0270_291', 4, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0270_291 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0270_291"); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0270_291 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0230_102 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0230_102 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0230_102', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0230_102 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0270_291"); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0230_102 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0850_504 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0850_504 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0850_504', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0850_504 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0850_504"); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0850_504 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0840_624 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0840_624 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0840_624', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0840_624 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0840_624"); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0840_624 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0190_620 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0190_620 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0190_620', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0190_620 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0190_620"); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0190_620 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0200_308 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0200_308 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0200_308', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0200_308 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0200_308"); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0200_308 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0210_300 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0210_300 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0210_300', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0210_300 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0210_300"); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0210_300 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0470_052 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0470_052 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0470_052', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0470_052 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0470_052"); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0470_052 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0480_955 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0480_955 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0480_955', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0480_955 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0480_955"); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0480_955 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0300_345 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0300_345 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0300_345', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0300_345 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0300_345"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0300_345 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0280_218 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0280_218 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0280_218', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0280_218 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0280_218"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0280_218v finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0270_110 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0270_110 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0270_110', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0270_110 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0270_110"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0270_110 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0290_772 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0290_772 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0290_722', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0290_722 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0290_722"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0290_722 finish.`); + done(); + }) + + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0420_773 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0420_773 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0420_773', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0420_773 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0420_773"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0420_773 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0430_891 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0430_891 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0430_891', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0430_891 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0430_891"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0430_891 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0440_612 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0440_612 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0440_612', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0440_612 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0440_612"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0440_612 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0450_917 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0450_917 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0450_917', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0450_917 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0450_917"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0450_917 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0460_322 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0460_322 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0460_322', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0460_322 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0460_322"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0460_322 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0130_440 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0130_440 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0130_440', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0130_440 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0130_440"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0130_440 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0100_565 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0100_565 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0100_565', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0100_565 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0100_565"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0100_565 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_090_321 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_090_321 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_090_321', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_090_321 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_090_321"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_090_321 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0270_967 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0270_967 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0270_967', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0270_967 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0270_967"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0270_967 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0280_006 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0280_006 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0280_006', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0280_006 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0280_006"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0280_006 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0250_323 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0250_323 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0250_323', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0250_323 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0250_323"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0250_323 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0240_264 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0240_264 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0240_264', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0240_264 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0240_264"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0240_264 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0120_874 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0120_874 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0120_874', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0120_874 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0120_874"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0120_874 finish.`); + done(); + }) + + + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentListandgridModifierTest/UIComponentListandgridModifier.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentListandgridModifierTest/UIComponentListandgridModifier.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..beabfac849a6475b8ad6d0cfc9e361748bfdace6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentListandgridModifierTest/UIComponentListandgridModifier.test.ets @@ -0,0 +1,195 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT 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 UIComponentListandgridModifier() { + + describe('UIComponentListandgridModifier', () => { + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0040 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0040 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0040', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0040 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier40"); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0040 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0230 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0230 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0230', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0230 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier230"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridModifier230')); + await button.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0230 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0470 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0470 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0470', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0470 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier470"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0470 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0480 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0480 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0480', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0480 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier480"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0480 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0520 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0520 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0520', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0520 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier520"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridModifier520')); + await button.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0520 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0810 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0810 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0810', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0810 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier810"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridModifier810')); + await button.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0810 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0760 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0760 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0760', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0760 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier760"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridModifier760')); + await button.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0760 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0930 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0930 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0930', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0930 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier930"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridModifier930')); + await button.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0930 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0980 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0980 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0980', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0980 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier980"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridModifier980')); + await button.click(); + await Utils.sleep(2000); + windowSnap.snapShot() + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0980 finish.`); + done(); + }) + + + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentListandgridXommonOnscrollTest/UIComponentListandgridXommonOnscroll.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentListandgridXommonOnscrollTest/UIComponentListandgridXommonOnscroll.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..33258168dc9e0927db172b5d913e8c44a7c44bfa --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentListandgridXommonOnscrollTest/UIComponentListandgridXommonOnscroll.test.ets @@ -0,0 +1,1172 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT 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 {PointerMatrix} from '@ohos.UiTest'; + +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 UIComponentListandgridXommonOnscroll() { + + describe('UIComponentListandgridXommonOnscroll', () => { + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0330 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0330 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0330', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0330 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll330") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll330')); + let info = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.fling({x: center.x, y:center.y},{x: center.x, y: info.bottom},5,5000); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0330 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0200 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0200 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0200', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0200 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll200") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll200')); + let info = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.fling({x: center.x, y: info.bottom},{x: center.x, y:center.y},5,5000); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0200 finish.`); + done(); + + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0340 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0340 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0340', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0340 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll340") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll340')); + let info = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.fling({x: center.x, y: info.bottom},{x: center.x, y:center.y},5,5000); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0340 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0080 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0080 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0080', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0080 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll80") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll80')); + let info = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.fling({x: center.x, y: info.bottom},{x: center.x, y:center.y},5,5000); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0080 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0180 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0180 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0180', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0180 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll180") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll180')); + let info = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.fling({x: center.x, y: info.bottom},{x: center.x, y:center.y},5,5000); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0180 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0170_1 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0170_1 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0170_1', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0170_1 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll170") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll170')); + let info = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.fling({x: info.top, y: info.top},{x: center.x, y:center.y},20,10000); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0170_1 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0170_2 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0170_2 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0170_2', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0170_2 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll170") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll170')); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll170_button')) + await button.click() + let info = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.fling({x: center.x, y: center.y},{x: info.top, y:center.y},50,20000); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0170_2 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0070 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0070 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0070', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0070 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll70") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll70')); + let info = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.fling({x: info.top, y: info.top},{x: center.x, y:center.y},5,10000); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0070 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0060 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0060 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0060', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0060 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll60") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll60')); + let info = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.fling({x: info.top, y: info.top},{x: center.x, y:center.y},5,10000); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0060 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0190 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0190 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0190', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0190 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll190") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll190')); + let info = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.fling({x: info.top, y: info.top},{x: center.x, y:center.y},5,10000); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0190 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0380 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0380 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0380', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0380 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll380") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll380')); + let info = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.fling({x: info.top, y: info.top},{x: center.x, y:center.y},5,10000); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0380 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0460 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0460 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0460', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0460 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll460") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll460')); + let info = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.fling({x: info.top, y: info.top},{x: center.x, y:center.y},5,10000); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0460 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0450 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0450 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0450', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0450 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll450") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll450')); + let info = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.fling({x: center.x, y: info.bottom},{x:info.bottom, y:info.top},20,20000); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0450 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0500 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0500 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0500', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0500 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll500") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll500')); + let info = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.fling({x: center.x, y: info.bottom},{x:info.bottom, y:info.top},20,20000); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0500 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0220 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0220 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0220', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0220 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll210") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll210')); + let info = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.fling({x: center.x, y: info.bottom},{x:info.bottom, y:info.top},20,20000); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0220 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0040 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0040 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0040', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0040 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll30") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll30')); + let info = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.fling({x: center.x, y: center.y},{x:center.x, y:info.top},20,10000); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0040 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0480 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0480 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0480', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0480 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll470") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll470')); + let info = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.fling({x: center.x, y: center.y},{x:center.x, y:info.top},20,10000); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0480 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0590 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0590 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0590', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0590 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll590") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll590')); + let positionInfo = await scroll.getBoundsCenter() + let info = await scroll.getBounds(); + let x = positionInfo.x + let y = positionInfo.y + let pointers: PointerMatrix = PointerMatrix.create(1, 2); + pointers.setPoint(0, 0, { + x: x , y: info.bottom + }); + pointers.setPoint(0, 1, { + x: x , y: y + }); + await driver.injectMultiPointerAction(pointers,600); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0590 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0600 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0600 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0600', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0600 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll600") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll600')); + let positionInfo = await scroll.getBoundsCenter() + let info = await scroll.getBounds(); + let x = positionInfo.x + let y = positionInfo.y + let pointers: PointerMatrix = PointerMatrix.create(1, 2); + pointers.setPoint(0, 0, { + x: x , y: info.top + }); + pointers.setPoint(0, 1, { + x: x , y: y + }); + await driver.injectMultiPointerAction(pointers,600); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0600 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0350 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0350 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0350', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0350 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll350") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll350')); + let positionInfo = await scroll.getBoundsCenter() + let info = await scroll.getBounds(); + let x = positionInfo.x + let y = positionInfo.y + let pointers: PointerMatrix = PointerMatrix.create(1, 2); + pointers.setPoint(0, 0, {x: x , y: y}); + pointers.setPoint(0, 1, {x: x , y: info.top}); + await driver.injectMultiPointerAction(pointers,1000); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0350 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0360 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0360 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0360', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0360 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll360") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll360')); + let positionInfo = await scroll.getBoundsCenter() + let info = await scroll.getBounds(); + let x = positionInfo.x + let y = positionInfo.y + let pointers: PointerMatrix = PointerMatrix.create(1, 2); + pointers.setPoint(0, 0, {x: x , y: y}); + pointers.setPoint(0, 1, {x: x , y: info.top}); + await driver.injectMultiPointerAction(pointers,600); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0360 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0210 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0210 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0210', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0210 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll210") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll210')); + let positionInfo = await scroll.getBoundsCenter() + let info = await scroll.getBounds(); + let x = positionInfo.x + let y = positionInfo.y + let pointers: PointerMatrix = PointerMatrix.create(1, 2); + pointers.setPoint(0, 0, {x: x , y: y}); + pointers.setPoint(0, 1, {x: x , y: info.top}); + await driver.injectMultiPointerAction(pointers,600); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0210 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0030 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0030 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0030', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0030 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll30") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll30')); + let positionInfo = await scroll.getBoundsCenter() + let info = await scroll.getBounds(); + let x = positionInfo.x + let y = positionInfo.y + let pointers: PointerMatrix = PointerMatrix.create(1, 2); + pointers.setPoint(0, 0, {x: x , y: y}); + pointers.setPoint(0, 1, {x: x , y: info.top}); + await driver.injectMultiPointerAction(pointers,600); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0030 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0470 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0470 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0470', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0470 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll470") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll470')); + let positionInfo = await scroll.getBoundsCenter() + let info = await scroll.getBounds(); + let x = positionInfo.x + let y = positionInfo.y + let pointers: PointerMatrix = PointerMatrix.create(1, 2); + pointers.setPoint(0, 0, {x: x , y: y}); + pointers.setPoint(0, 1, {x: x , y: info.top}); + await driver.injectMultiPointerAction(pointers,600); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0470 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0240 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0240 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0240', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0240 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll240") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll240')); + let positionInfo = await scroll.getBoundsCenter() + let info = await scroll.getBounds(); + let x = positionInfo.x + let y = positionInfo.y + let pointers: PointerMatrix = PointerMatrix.create(1, 2); + pointers.setPoint(0, 0, {x: x , y: y}); + pointers.setPoint(0, 1, {x: x , y: info.top}); + await driver.injectMultiPointerAction(pointers,600); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0240 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0250 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0250 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0250', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0250 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll250") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll250')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0250 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0260 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0260 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0260', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0260 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll260") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll260')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0260 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0270 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0270 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0270', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0270 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll270") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll270')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0270 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0280 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0280 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0280', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0280 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll280") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll280')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0280 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0290 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0290 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0290', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0290 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll290") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll290')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0290 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0300 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0300 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0300', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0300 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll300") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll300')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0300 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0310 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0310 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0310', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0310 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll310") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll310')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0310 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0560 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0560 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0560', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0560 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll560") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll560')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0560 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0570 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0570 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0570', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0570 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll570") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll570')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0570 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0550 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0550 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0550', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0550 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll550") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll550')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0550 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0510 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0510 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0510', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0510 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll510") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll510')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0510 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0530 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0530 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0530', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0530 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll530") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll530')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0530 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0540 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0540 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0540', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0540 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll540") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll540')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0540 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0520 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0520 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0520', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0420 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll520") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll520')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0520 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0420 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0420 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0420', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0420 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll420") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll420')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0420 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0430 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0430 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0430', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0430 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll430") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll430')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0430 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0410 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0410 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0410', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0410 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll410") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll410')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0410 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0390 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0390 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0390', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0390 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll390") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll390')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0390 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0400 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0400 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0400', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0400 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll400") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll400')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0400 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0110 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0110 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0110', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0110 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll110") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll110')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0110 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0090 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0090 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0090', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0090 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll90") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll90')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0090 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0160 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0160 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0160', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0160 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll160") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll160')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0160 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0130 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0130 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0130', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0130 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll130") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll130')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0130 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0140 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0140 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0140', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0140 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll140") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll140')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0140 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0150 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0150 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0150', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0150 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll150") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll150')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0150 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0120 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0120 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0120', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0120 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll120") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll120')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0120 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0100 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0100 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0100', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0100 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll100") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll100')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0100 finish.`); + done() + }) + + + + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentListandgridXommonSmoothTest/UIComponentListandgridXommonSmooth.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentListandgridXommonSmoothTest/UIComponentListandgridXommonSmooth.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..bb076aab9796e24644541fd951d2a5374f9566e4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentListandgridXommonSmoothTest/UIComponentListandgridXommonSmooth.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 } from '@ohos.UiTest' + +export default function UIComponentListandgridXommonSmooth() { + + describe('UIComponentListandgridXommonSmooth', () => { + +/** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0050 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0050 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ +it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0050', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0050 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0050"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonSmooth0050')); + await button.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0050 finish.`); + done(); +}) + + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0060 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0060 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0060', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0060 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0060"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonSmooth0060')); + await button.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0060 finish.`); + done(); + }) + + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0070 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0070 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0070', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0070 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0070"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonSmooth0070')); + await button.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0070 finish.`); + done(); + }) + + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0080 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0080 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0080', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0080 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0080"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonSmooth0080')); + await button.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0080 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0170 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0170 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0170', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0170 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0170"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonSmooth0170')); + await button.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0170 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0180 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0180 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0180', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0180 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0180"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonSmooth0180')); + await button.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0180 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0190 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0190 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0190', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0190 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0190"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonSmooth0190')); + await button.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0190 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0200 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0200 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0200', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0200 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0200"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonSmooth0200')); + await button.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0200 finish.`); + done(); + }) + + + + + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentScrollAlphabetindexermodifierTest/UIComponentScrollAlphabetindexermodifier.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentScrollAlphabetindexermodifierTest/UIComponentScrollAlphabetindexermodifier.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..4fc2cff1bfda7ac4e8e6c19e4e3dbdd1818ac123 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentScrollAlphabetindexermodifierTest/UIComponentScrollAlphabetindexermodifier.test.ets @@ -0,0 +1,1537 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT 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 UIComponentScrollAlphabetindexermodifier() { + + describe('UIComponentScrollAlphabetindexermodifier', () => { + 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_SCROLL_ALPHABETINDEXERMODIFIER_0010 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0010 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0010', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0010 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier10"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier10')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0010 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0020 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0020 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0020', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0020 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier20"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier20')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0020 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0030 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0030 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0030', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0030 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier30"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier30')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0030 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0040 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0040 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0040', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0040 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier40"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier40')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0040 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0050 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0050 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0050', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0050 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier50"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier50')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0050 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0060 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0060 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0060', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0060 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier60"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier60')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0060 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0070 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0070 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0070', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0070 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier70"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier70')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0070 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0080 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0080 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0080', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0080 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier80"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier80')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0080 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0090 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0090 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0090', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0090 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier90"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier90')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0090 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0100 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0100 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0100', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0100 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier100"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier100')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0100 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0290 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0290 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0290', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0290 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier290"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier290')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0290 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0300 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0300 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0300', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0300 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier300"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier300')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0300 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0310 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0310 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0310', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0300 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier310"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier310')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0310 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0320 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0320 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0320', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0320 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier320"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier320')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0320 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0330 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0330 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0330', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0330 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier330"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier330')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0330 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0340 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0340 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0340', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0340 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier340"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier340')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0340 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0350 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0350 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0350', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0350 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier350"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier350')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0350 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0360 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0360 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0360', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0360 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier360"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier360')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0360 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0370 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0370 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0370', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0370 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier370"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier370')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0370 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0380 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0380 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0380', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0380 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier380"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier380')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0380 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0390 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0390 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0390', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0390 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier390"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier390')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0390 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0400 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0400 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0400', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0340 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier400"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier400')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0400 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0410 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0410 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0410', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0410 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier410"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier410')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0410 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0420 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0420 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0420', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0420 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier420"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier420')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0420 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0430 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0430 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0430', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0430 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier430"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier430')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0430 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0440 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0440 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0440', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0440 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier440"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier440')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0440 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0450 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0450 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0450', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0340 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier450"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier450')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0450 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0460 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0460 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0460', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0460 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier460"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier460')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0460 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0470 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0470 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0470', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0470 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier470"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier470')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0470 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0480 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0480 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0480', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0480 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier480"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier480')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0480 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0490 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0490 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0490', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0490 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier490"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier490')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0490 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0500 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0500 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0500', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0500 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier500"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier500')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0500 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0510 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0510 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0510', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0510 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier510"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier510')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0510 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0520 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0520 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0520', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0520 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier520"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier520')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0520 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0530 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0530 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0530', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0530 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier530"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier530')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0530 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0540 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0540 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0540', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0540 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier540"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier540')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0540 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0550 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0550 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0550', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0550 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier550"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier550')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0550 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0560 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0560 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0560', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0560 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier560"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier560')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0560 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0570 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0570 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0570', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0570 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier570"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier570')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0570 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0580 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0580 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0580', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0580 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier580"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier580')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0580 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0590 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0590 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0590', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0590 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier590"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier590')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0590 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0600 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0600 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0600', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0600 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier600"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier600')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0600 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0610 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0610 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0610', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0610 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier610"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier610')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0610 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0620 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0620 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0620', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0620 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier620"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier620')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0620 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0680 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0680 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0680', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0680 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier680"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier680')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0680 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0690 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0690 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0690', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0690 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier690"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier690')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0690 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0700 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0700 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0700', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0700 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier700"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier700')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0700 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0710 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0710 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0710', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0710 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier710"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier710')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0710 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0940 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0940 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0940', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0940 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier940"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier940')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0940 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0950 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0950 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0950', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0950 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier950"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier950')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0950 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0960 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0960 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0960', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0960 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier960"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier960')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0960 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1060 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1060 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1060', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1060 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1060"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier1060')); + let info = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + let pointers = PointerMatrix.create(1, 2); + pointers.setPoint(0, 0, { + x: center.x, y: center.y + }); + pointers.setPoint(0, 1, { + x: center.x, y: info.top+10 + }); + await driver.injectMultiPointerAction(pointers, 0); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1060 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1070 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1070 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1070', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1070 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1070"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier1070')); + let info = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + let pointers = PointerMatrix.create(1, 2); + pointers.setPoint(0, 0, { + x: center.x, y: center.y + }); + pointers.setPoint(0, 1, { + x: center.x, y: info.top+10 + }); + await driver.injectMultiPointerAction(pointers, 0); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1070 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1120 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1120 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1120', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1120 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1120"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier1120')); + let info = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + let pointers = PointerMatrix.create(1, 2); + pointers.setPoint(0, 0, { + x: center.x, y: center.y + }); + pointers.setPoint(0, 1, { + x: center.x, y: info.top+10 + }); + await driver.injectMultiPointerAction(pointers, 0); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1120 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1130 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1130 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1130', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1130 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1130"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier1130')); + let info = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + let pointers = PointerMatrix.create(1, 2); + pointers.setPoint(0, 0, { + x: center.x, y: center.y + }); + pointers.setPoint(0, 1, { + x: center.x, y: info.top+10 + }); + await driver.injectMultiPointerAction(pointers, 0); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1130 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1140 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1140 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1140', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1140 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1140"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier1140')); + let info = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + let pointers = PointerMatrix.create(1, 2); + pointers.setPoint(0, 0, { + x: center.x, y: center.y + }); + pointers.setPoint(0, 1, { + x: center.x, y: info.top+10 + }); + await driver.injectMultiPointerAction(pointers, 0); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1140 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1150 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1150 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1150', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1150 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1150"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier1150')); + let info = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + let pointers = PointerMatrix.create(1, 2); + pointers.setPoint(0, 0, { + x: center.x, y: center.y + }); + pointers.setPoint(0, 1, { + x: center.x, y: info.top+10 + }); + await driver.injectMultiPointerAction(pointers, 0); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1150 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1160 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1160 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1160', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1160 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1160"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier1160')); + let info = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + let pointers = PointerMatrix.create(1, 2); + pointers.setPoint(0, 0, { + x: center.x, y: center.y + }); + pointers.setPoint(0, 1, { + x: center.x, y: info.top+10 + }); + await driver.injectMultiPointerAction(pointers, 0); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1160 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1550 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1550 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1550', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1550 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1550"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier1550')); + let info = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + let pointers = PointerMatrix.create(1, 2); + pointers.setPoint(0, 0, { + x: center.x, y: center.y + }); + pointers.setPoint(0, 1, { + x: center.x, y: info.top+10 + }); + await driver.injectMultiPointerAction(pointers, 0); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1550 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1560 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1560 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1560', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1560 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1560"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier1560')); + let info = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + let pointers = PointerMatrix.create(1, 2); + pointers.setPoint(0, 0, { + x: center.x, y: center.y + }); + pointers.setPoint(0, 1, { + x: center.x, y: info.top+10 + }); + await driver.injectMultiPointerAction(pointers, 0); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1560 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1620 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1620 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1620', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1620 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1620"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier1620')); + let info = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + let pointers = PointerMatrix.create(1, 2); + pointers.setPoint(0, 0, { + x: center.x, y: center.y + }); + pointers.setPoint(0, 1, { + x: center.x, y: info.top+10 + }); + await driver.injectMultiPointerAction(pointers, 0); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1620 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1640 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1640 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1640', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1640 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1640") + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1640 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1650 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1650 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1650', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1650 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1650") + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1650 finish.`); + done() + }) + + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentScrollScrollExtraTest/UIComponentScrollScrollExtra.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentScrollScrollExtraTest/UIComponentScrollScrollExtra.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..d3efb66e86e97625b3d4dcfdc9838851bc642bd6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentScrollScrollExtraTest/UIComponentScrollScrollExtra.test.ets @@ -0,0 +1,826 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT 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 UIComponentScrollScrollExtra() { + + describe('UIComponentScrollScrollExtra', () => { + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0010 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0010 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0010', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0010 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra10") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra10')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0010 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0020 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0020 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0020', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0020 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra20") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra20')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0020 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0030 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0030 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0030', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0030 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra30") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra30')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0030 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0040 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0040 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0040', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0040 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra40") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra40')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0040 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0050 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0050 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0050', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0050 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra50") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra50')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0050 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0060 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0060 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0060', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0060 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra60") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra60')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0060 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0070 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0070 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0070', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0070 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra70") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra70')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0070 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0080 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0080 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0080', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0080 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra80") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra80')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0080 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0090 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0090 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0090', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0090 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra90") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra90')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0090 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0100 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0100 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0100', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0100 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra100") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra100')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0100 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0110 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0110 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0110', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0110 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra110") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra110')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0110 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0120 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0120 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0120', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0120 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra120") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra120')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0120 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0130 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0130 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0130', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0130 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra130") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra130')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0130 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0140 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0140 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0140', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0140 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra140") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra140')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0140 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0150 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0150 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0150', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0150 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra150") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra150')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0150 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0160 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0160 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0160', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0160 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra160") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra160')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0160 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0170 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0170 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0170', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0170 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra170") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra170')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0170 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0180 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0180 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0180', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0180 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra180") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra180')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0180 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0190 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0190 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0190', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0190 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra190") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra190')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0190 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0210 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0210 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0210', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0210 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra210"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra210')); + await button.click(); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0210 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0220 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0220 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0220', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0220 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra220"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra220')); + await button.click(); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0220 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0230 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0230 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0230', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0230 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra230"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra230')); + await button.click(); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0230 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0240 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0240 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0240', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0240 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra240"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra240')); + await button.click(); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0240 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0250 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0250 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0250', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0250 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra250"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra250')); + await button.click(); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0250 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0260 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0260 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0260', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0260 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra260"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra260')); + await button.click(); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0260 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0270 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0270 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0270', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0270 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra270"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra270')); + await button.click(); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0270 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0280 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0280 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0280', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0280 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra280"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra280')); + await button.click(); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0280 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0290 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0290 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0290', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0290 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra290"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra290')); + await button.click(); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0290 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0310 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0310 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0310', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0310 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra310"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra310')); + await button.click(); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0310 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0320 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0320 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0320', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0320 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra320"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra320')); + await button.click(); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0320 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0330 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0330 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0330', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0330 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra330"); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0330 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0340 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0340 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0340', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0340 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra340"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra340')); + await button.click(); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0340 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0350 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0350 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0350', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0350 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra350"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra350')); + await button.click(); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0350 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0360 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0360 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0360', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0360 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra360"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra360')); + await button.click(); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0360 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0380 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0380 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0380', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0380 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra380"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra380')); + await button.click(); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0380 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0390 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0390 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0390', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0390 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra390"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra390')); + await button.click(); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0390 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0400 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0400 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0400', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0400 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra400"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra400')); + await button.click(); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0400 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0410 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0410 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0410', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0410 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra410"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra410')); + await button.click(); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0410 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0430 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0430 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0430', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0430 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra430"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra430')); + await button.click(); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0430 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0440 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0440 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0440', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0440 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra440"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra440')); + await button.click(); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0440 finish.`); + done(); + }) + + + + + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentUISupportColorTest/UIComponentUISupportColor.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentUISupportColorTest/UIComponentUISupportColor.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..80a7ae48019d01e23f648b626f299913d217f3f9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentUISupportColorTest/UIComponentUISupportColor.test.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. + */ +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 UIComponentUisupportColor() { + + describe('UIComponentUisupportColor', () => { + + /** + * @tc.number SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0010 + * @tc.name SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0010 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0010', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0010 start.`); + Settings.createWindow("testability/pages/UIComponentUisupportColor/UIComponentUisupportColor_0010"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentUisupportColor_0010')); + await button.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0010 finish.`); + done(); + }) + + + /** + * @tc.number SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0020 + * @tc.name SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0020 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0020', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0020 start.`); + Settings.createWindow("testability/pages/UIComponentUisupportColor/UIComponentUisupportColor_0020"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentUisupportColor_0020')); + await button.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0020 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0040 + * @tc.name SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0040 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0040', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0040 start.`); + Settings.createWindow("testability/pages/UIComponentUisupportColor/UIComponentUisupportColor_0040"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentUisupportColor_0040')); + await button.click(); + await Utils.sleep(5000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0040 finish.`); + done(); + }) + + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UiComponentAlphabetindexerAttributeAutocollapseTest/UiComponentAlphabetindexerAttributeAutocollapse.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UiComponentAlphabetindexerAttributeAutocollapseTest/UiComponentAlphabetindexerAttributeAutocollapse.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..2d74e4b076ac0728b3acbd946b16c07c317c1d5f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UiComponentAlphabetindexerAttributeAutocollapseTest/UiComponentAlphabetindexerAttributeAutocollapse.test.ets @@ -0,0 +1,190 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT 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 UiComponentAlphabetindexerAttributeAutocollapse() { + + describe('UiComponentAlphabetindexerAttributeAutocollapse', () => { + + /** + * @tc.number SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0050_1 + * @tc.name SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0050_1 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0050_1', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0050_1 start.`); + Settings.createWindow("testability/pages/UiComponentAlphabetindexerAttributeAutocollapse/UiComponentAlphabetindexerAttributeAutocollapse20"); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0050_1 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0040_1 + * @tc.name SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0040_1 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0040_1', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0040_1 start.`); + Settings.createWindow("testability/pages/UiComponentAlphabetindexerAttributeAutocollapse/UiComponentAlphabetindexerAttributeAutocollapse40"); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0040_1 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0030_1 + * @tc.name SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0030_1 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0030_1', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0030_1 start.`); + Settings.createWindow("testability/pages/UiComponentAlphabetindexerAttributeAutocollapse/UiComponentAlphabetindexerAttributeAutocollapse30"); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0030_1 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0020_1 + * @tc.name SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0020_1 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0020_1', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0020_1 start.`); + Settings.createWindow("testability/pages/UiComponentAlphabetindexerAttributeAutocollapse/UiComponentAlphabetindexerAttributeAutocollapse20"); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0020_1 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0050_2 + * @tc.name SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0050_2 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0050_2', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0050_2 start.`); + Settings.createWindow("testability/pages/UiComponentAlphabetindexerAttributeAutocollapse/UiComponentAlphabetindexerAttributeAutocollapse50") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UiComponentAlphabetindexerAttributeAutocollapse50')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0050_2 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0040_2 + * @tc.name SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0040_2 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0040_2', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0040_2 start.`); + Settings.createWindow("testability/pages/UiComponentAlphabetindexerAttributeAutocollapse/UiComponentAlphabetindexerAttributeAutocollapse40") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UiComponentAlphabetindexerAttributeAutocollapse40')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0040_2 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0030_2 + * @tc.name SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0030_2 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0030_2', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0030_2 start.`); + Settings.createWindow("testability/pages/UiComponentAlphabetindexerAttributeAutocollapse/UiComponentAlphabetindexerAttributeAutocollapse30") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UiComponentAlphabetindexerAttributeAutocollapse30')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0030_2 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0020_2 + * @tc.name SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0020_2 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0020_2', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0020_2 start.`); + Settings.createWindow("testability/pages/UiComponentAlphabetindexerAttributeAutocollapse/UiComponentAlphabetindexerAttributeAutocollapse20") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UiComponentAlphabetindexerAttributeAutocollapse20_1')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0020_2 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0020_3 + * @tc.name SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0020_3 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0020_3', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0020_3 start.`); + Settings.createWindow("testability/pages/UiComponentAlphabetindexerAttributeAutocollapse/UiComponentAlphabetindexerAttributeAutocollapse20") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UiComponentAlphabetindexerAttributeAutocollapse20_2')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0020_3 finish.`); + done() + }) + + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UiComponentListandgridXommonScrolltoTest/UiComponentListandgridXommonScrollto.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UiComponentListandgridXommonScrolltoTest/UiComponentListandgridXommonScrollto.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..8121b3ef343b374c019b59d254ba3df105ffc0ce --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UiComponentListandgridXommonScrolltoTest/UiComponentListandgridXommonScrollto.test.ets @@ -0,0 +1,388 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT 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 UIComponentListandgridXommonScrollto() { + + describe('UIComponentListandgridXommonScrollto', () => { + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0090 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0090 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0090', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0090 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto90") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonScrollto90')); + await button.click(); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0090 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0230 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0230 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0230', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0230 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto230") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonScrollto230')) + await button.click(); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0230 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0370 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0370 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0370', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0370 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto370") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonScrollto370')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0370 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0510 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0510 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0510', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0510 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto510") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonScrollto510')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0510 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0570 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0570 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0570', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0570 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto570") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonScrollto570')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0570 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0580 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0580 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0580', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0580 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto580") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonScrollto580')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0580 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0590 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0590 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0590', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0590 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto590") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonScrollto590')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0590 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0600 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0600 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0600', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0600 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto600") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonScrollto600')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0600 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0610 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0610 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0610', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0610 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto610") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonScrollto610')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0610 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0620 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0620 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0620', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0620 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto620") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonScrollto620')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0620 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0630 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0630 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0630', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0630 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto630") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonScrollto630')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0630 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0640 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0640 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0640', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0640 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto640") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonScrollto640')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0640 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0650 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0650 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0650', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0650 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto650") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonScrollto650')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0650 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0660 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0660 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0660', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0660 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto660") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonScrollto660')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0660 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0670 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0670 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0670', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0670 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto670") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonScrollto670')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0670 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0680 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0680 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0680', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0680 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto680") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonScrollto680')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0680 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0690 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0690 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0690', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0690 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto690") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonScrollto690')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0690 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0700 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0700 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0700', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0700 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto700") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonScrollto700')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0700 finish.`); + done() + }) + + + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll100.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll100.ets new file mode 100644 index 0000000000000000000000000000000000000000..384149f7802015938a0b416a811dd4539a842889 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll100.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 ArkUIScrollbarScroll100 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]; + @State flag: boolean = false; + build() { + Row() { + Column(){ + + Button('On') + .margin({bottom:20}) + .id('ArkUIScrollbarScroll100_1') + .onClick(() => { + this.flag = true; + }) + Button('Off') + .margin({top:30}) + .id('ArkUIScrollbarScroll100_2') + .onClick(() => { + this.flag = false; + }) + } + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + Flex({ direction: FlexDirection.Column }) { + ForEach(this.arr, (item: number) => { + Row() { + Text(item.toString()) + .width('80%') + .height(60) + .backgroundColor('#3366CC') + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 5 }) + } + }, (item:number) => item.toString()) + }.margin({ right: 15 }) + } + .width('80%') + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Vertical) + } + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Vertical, state: BarState.On }) { + if (this.flag == true) { + Text() + .width(20) + .height(100) + .borderRadius(10) + .backgroundColor('#C0C0C0') + } + } + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll130.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll130.ets new file mode 100644 index 0000000000000000000000000000000000000000..f2b0c1be7de20149fcda69da67bef455d87ebb59 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll130.ets @@ -0,0 +1,39 @@ +@Entry +@Component +struct ArkUIScrollbarScroll130 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [0, 1, 2, 3, 4, 5] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + Flex({ direction: FlexDirection.Row }) { + ForEach(this.arr, (item: number) => { + Row() { + Text(item.toString()) + .width('80%') + .height(60) + .backgroundColor('#3366CC') + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 5 }) + } + }, (item:number) => item.toString()) + }.margin({ right: 15 }) + } + .width('90%') + .initialOffset({ xOffset: '1000%', yOffset: '0%' }) + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Horizontal) + } + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Horizontal,state: BarState.On }) + Button('Button') + .id('ArkUIScrollbarScroll130') + .onClick(() => { + this.arr.push(37, 38, 39, 40); + }) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll140.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll140.ets new file mode 100644 index 0000000000000000000000000000000000000000..fa84a72bd56a5bbc4aedc717834dcdc510c4bbe2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll140.ets @@ -0,0 +1,39 @@ +@Entry +@Component +struct ArkUIScrollbarScroll140 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [0, 1, 2, 3, 4, 5] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + Flex({ direction: FlexDirection.Row }) { + ForEach(this.arr, (item: number) => { + Row() { + Text(item.toString()) + .width('80%') + .height(60) + .backgroundColor('#3366CC') + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 5 }) + } + }, (item:number) => item.toString()) + }.margin({ right: 15 }) + } + .width('90%') + .initialOffset({ xOffset: '200%', yOffset: '0%' }) + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Horizontal) + } + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Horizontal,state: BarState.On }) + Button('Button') + .id('ArkUIScrollbarScroll140') + .onClick(() => { + this.arr.push(37, 38, 39, 40); + }) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll150.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll150.ets new file mode 100644 index 0000000000000000000000000000000000000000..1273dd5970a7a5a8523501010199cdefe59acfd9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll150.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 ArkUIScrollbarScroll150 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [0, 1, 2, 3, 4, 5] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + Flex({ direction: FlexDirection.Row }) { + ForEach(this.arr, (item: number) => { + Row() { + Text(item.toString()) + .width('80%') + .height(60) + .backgroundColor('#3366CC') + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 5 }) + } + }, (item:number) => item.toString()) + }.margin({ right: 15 }) + } + .width('90%') + .initialOffset({ xOffset: '0%', yOffset: '0%' }) + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Horizontal) + } + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Horizontal,state: BarState.On }) + Button('Button') + .id('ArkUIScrollbarScroll150') + .onClick(() => { + this.arr.push(37, 38, 39, 40); + }) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll160.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll160.ets new file mode 100644 index 0000000000000000000000000000000000000000..0560f8235d5bae6577b5e3f00655452a28d959fb --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll160.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 ArkUIScrollbarScroll160 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [0, 1, 2, 3, 4] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + Flex({ direction: FlexDirection.Row }) { + ForEach(this.arr, (item: number) => { + Row() { + Text(item.toString()) + .width('80%') + .height(60) + .backgroundColor('#3366CC') + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 5 }) + } + }, (item:number) => item.toString()) + }.margin({ right: 15 }) + } + .id('ArkUIScrollbarScroll160') + .width('90%') + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Horizontal) + .edgeEffect(EdgeEffect.Spring,{ alwaysEnabled: true }) + } + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Horizontal,state: BarState.On }) + + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll170.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll170.ets new file mode 100644 index 0000000000000000000000000000000000000000..21e283dcfd076577a31fe00f91af3b56587b0349 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll170.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 ArkUIScrollbarScroll170 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [0, 1, 2, 3, 4] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + Flex({ direction: FlexDirection.Row }) { + ForEach(this.arr, (item: number) => { + Row() { + Text(item.toString()) + .width('80%') + .height(60) + .backgroundColor('#3366CC') + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 5 }) + } + }, (item:number) => item.toString()) + }.margin({ right: 15 }) + .id('ArkUIScrollbarScroll170') + } + .width('90%') + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Horizontal) + .edgeEffect(EdgeEffect.Spring,{ alwaysEnabled: true }) + } + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Horizontal,state: BarState.On }) + + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll190.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll190.ets new file mode 100644 index 0000000000000000000000000000000000000000..f609a31b3b0d6d3f2ef1d78c9a6a8c0d69007165 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll190.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 ArkUIScrollbarScroll190 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]; + @State flag: boolean = false; + build() { + Column(){ + Button('On') + .margin({bottom:20}) + .id('ArkUIScrollbarScroll190') + .onClick(() => { + this.flag = true; + }) + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + Flex({ direction: FlexDirection.Row }) { + ForEach(this.arr, (item: number) => { + Row() { + Text(item.toString()) + .width('80%') + .height(60) + .backgroundColor('#3366CC') + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 5 }) + } + }, (item:number) => item.toString()) + }.margin({ right: 15 }) + } + .width('80%') + .height('80%') + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Horizontal) + } + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Horizontal, state: BarState.On }) { + if (this.flag == true) { + Text() + .width(100) + .height(20) + .borderRadius(10) + .backgroundColor('#C0C0C0') + } + } + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll200.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll200.ets new file mode 100644 index 0000000000000000000000000000000000000000..13f932b4df0f2cd8a6b9a7a7f8a8091d533a936a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll200.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 ArkUIScrollbarScroll200 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]; + @State flag: boolean = false; + build() { + Column(){ + Button('On') + .margin({bottom:20}) + .id('ArkUIScrollbarScroll200_1') + .onClick(() => { + this.flag = true; + }) + Button('Off') + .margin({top:30}) + .id('ArkUIScrollbarScroll200_2') + .onClick(() => { + this.flag = false; + }) + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + Flex({ direction: FlexDirection.Row }) { + ForEach(this.arr, (item: number) => { + Row() { + Text(item.toString()) + .width('80%') + .height(60) + .backgroundColor('#3366CC') + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 5 }) + } + }, (item:number) => item.toString()) + }.margin({ right: 15 }) + } + .width('80%') + .height('80%') + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Horizontal) + } + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Horizontal, state: BarState.On }) { + if (this.flag == true) { + Text() + .width(100) + .height(20) + .borderRadius(10) + .backgroundColor('#C0C0C0') + } + } + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll230.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll230.ets new file mode 100644 index 0000000000000000000000000000000000000000..614397f3f9b4316c9d1304fe2a780059a808b610 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll230.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 ArkUIScrollbarScroll230 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [1, 2, 3, 4, 5, 6,7, 8, 9, 10] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%').height(100).fontSize(16) + .textAlign(TextAlign.Center).borderRadius(10).backgroundColor(Color.Yellow) + }.backgroundColor(Color.Green) + }, (item: string) => item) + }.margin({ right: 15 }) + .listDirection(Axis.Vertical) + } + .width('90%') + .initialOffset({xOffset:'0%',yOffset:'100%'}) + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Vertical) + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Vertical,state: BarState.On }) + + Button('Button') + .id('ArkUIScrollbarScroll230') + .onClick(() => { + this.arr.push(17, 18, 19, 20); + }) + } + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll240.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll240.ets new file mode 100644 index 0000000000000000000000000000000000000000..a2b63ca17b1ca7c6cc0107cea1438b457feb30c5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll240.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 ArkUIScrollbarScroll240 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [1, 2, 3, 4, 5, 6,7, 8, 9, 10] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%').height(100).fontSize(16) + .textAlign(TextAlign.Center).borderRadius(10).backgroundColor(Color.Yellow) + }.backgroundColor(Color.Green) + }, (item: string) => item) + }.margin({ right: 15 }) + .listDirection(Axis.Vertical) + } + .width('90%') + .initialOffset({xOffset:'0%',yOffset:'100%'}) + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Vertical) + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Vertical,state: BarState.On }) + Button('Button') + .margin({bottom:200,right:100}) + .id('ArkUIScrollbarScroll240') + .onClick(() => { + this.arr.push(17, 18, 19, 20); + }) + } + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll250.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll250.ets new file mode 100644 index 0000000000000000000000000000000000000000..2c01a57bfbac1314dae3651e5e31a26ab7e5ca89 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll250.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 ArkUIScrollbarScroll250 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%').height(100).fontSize(16) + .textAlign(TextAlign.Center).borderRadius(10).backgroundColor(0xFFFFFF) + } + }, (item: string) => item) + }.margin({ right: 15 }) + .listDirection(Axis.Vertical) + .scrollBar(BarState.Off) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0x000000, startMargin: 20, endMargin: 20 }) + } + .width('90%') + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Vertical) + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Vertical,state: BarState.On }) + Button('Button') + .id('ArkUIScrollbarScroll250') + .onClick(() => { + this.arr.push(17, 18, 19, 20); + }) + } + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll260.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll260.ets new file mode 100644 index 0000000000000000000000000000000000000000..2c945625c6feb17068531511bb33230e7dda84a5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll260.ets @@ -0,0 +1,71 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct ArkUIScrollbarScroll260 { + @State arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + @State editFlag: boolean = false + private scroller: Scroller = new Scroller() + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Column() { + Scroll(this.scroller) { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number, index?: number) => { + ListItem() { + Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) { + Text('' + item) + .width('100%') + .height(80) + .fontSize(20) + .textAlign(TextAlign.Center) + .borderRadius(10) + .backgroundColor(0xFFFFFF) + .flexShrink(1) + if (this.editFlag) { + Button() { + Text("delete").fontSize(16) + }.width('30%').height(40) + .id('index' + (index)) + .onClick(() => { + if (index != undefined) { + console.info(this.arr[index] + 'Delete') + this.arr.splice(index, 1) + console.info(JSON.stringify(this.arr)) + this.editFlag = false + } + }).stateEffect(true) + } + } + } + }, (item: string) => item) + }.width('90%') + .scrollBar(BarState.Off) + .friction(0.6) + }.initialOffset({ xOffset: '0%', yOffset: '100%' }) + }.width('100%') + + Button('edit list') + .id('ArkUIScrollbarScroll260') + .onClick(() => { + this.editFlag = !this.editFlag + }).margin({ top: 5, left: 20 }) + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding({ top: 5 }) + } +} + + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll270.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll270.ets new file mode 100644 index 0000000000000000000000000000000000000000..bc431c32f5d03b370f8fb6a5a7b04b8558057db0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll270.ets @@ -0,0 +1,71 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct ArkUIScrollbarScroll270 { + @State arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + @State editFlag: boolean = false + private scroller: Scroller = new Scroller() + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Column() { + Scroll(this.scroller) { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number, index?: number) => { + ListItem() { + Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) { + Text('' + item) + .width('100%') + .height(80) + .fontSize(20) + .textAlign(TextAlign.Center) + .borderRadius(10) + .backgroundColor(0xFFFFFF) + .flexShrink(1) + if (this.editFlag) { + Button() { + Text("delete").fontSize(16) + }.width('30%').height(40) + .id('index' + (index)) + .onClick(() => { + if (index != undefined) { + console.info(this.arr[index] + 'Delete') + this.arr.splice(index, 1) + console.info(JSON.stringify(this.arr)) + this.editFlag = false + } + }).stateEffect(true) + } + } + } + }, (item: string) => item) + }.width('90%') + .scrollBar(BarState.Off) + .friction(0.6) + }.initialOffset({ xOffset: '0%', yOffset: '100%' }) + }.width('100%') + + Button('edit list') + .id('ArkUIScrollbarScroll270') + .onClick(() => { + this.editFlag = !this.editFlag + }).margin({ top: 5, left: 20 }) + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding({ top: 5 }) + } +} + + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll280.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll280.ets new file mode 100644 index 0000000000000000000000000000000000000000..2729c16f63499ab6f7594351c446e80cae9918d3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll280.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 ArkUIScrollbarScroll280 { + @State arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + @State editFlag: boolean = false + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Column() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number, index?: number) => { + ListItem() { + Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) { + Text('' + item) + .width('100%') + .height(80) + .fontSize(20) + .textAlign(TextAlign.Center) + .borderRadius(10) + .backgroundColor(0xFFFFFF) + .flexShrink(1) + if (this.editFlag) { + Button() { + Text("delete").fontSize(16) + }.width('30%').height(40) + .id('index'+ (index)) + .onClick(() => { + if (index != undefined) { + console.info(this.arr[index] + 'Delete') + this.arr.splice(index, 1) + console.info(JSON.stringify(this.arr)) + this.editFlag = false + } + }).stateEffect(true) + } + } + } + }, (item: string) => item) + }.width('90%') + .scrollBar(BarState.Off) + .friction(0.6) + }.width('100%') + + Button('edit list') + .id('ArkUIScrollbarScroll280') + .onClick(() => { + this.editFlag = !this.editFlag + }).margin({ top: 5, left: 20 }) + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding({ top: 5 }) + } +} + + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll290.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll290.ets new file mode 100644 index 0000000000000000000000000000000000000000..ca1f39b79bbbee6ac7e7f27f4d188409c809ab84 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll290.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 ArkUIScrollbarScroll290 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [1, 2, 3, 4, 5, 6,7, 8, 9, 10] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%').height(100).fontSize(16) + .textAlign(TextAlign.Center).borderRadius(10).backgroundColor(Color.Yellow) + }.backgroundColor(Color.Green) + }, (item: string) => item) + }.margin({ right: 15 }) + .listDirection(Axis.Vertical) + .id('ArkUIScrollbarScroll290') + } + .width('90%') + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Vertical) + .edgeEffect(EdgeEffect.Spring,{ alwaysEnabled: true }) + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Vertical,state: BarState.On }) + + } + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll30.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll30.ets new file mode 100644 index 0000000000000000000000000000000000000000..a86edb6e8d305b43a9c1c73bb477368d8cd6a1cf --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll30.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 ArkUIScrollbarScroll30 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + Flex({ direction: FlexDirection.Column }) { + ForEach(this.arr, (item: number) => { + Row() { + Text(item.toString()) + .width('80%') + .height(60) + .backgroundColor('#3366CC') + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 5 }) + } + }, (item:number) => item.toString()) + }.margin({ right: 15 }) + } + .width('90%') + .initialOffset({ xOffset: '0%', yOffset: '100%' }) + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Vertical) + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Vertical,state: BarState.On }) + Button('Button') + .id('ArkUIScrollbarScroll30') + .onClick(() => { + this.arr.push(37, 38, 39, 40); + }) + } + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll300.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll300.ets new file mode 100644 index 0000000000000000000000000000000000000000..2c4bf53bb85122bf2b9058782d2d1d7597f619a3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll300.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 ArkUIScrollbarScroll300 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [1, 2, 3, 4, 5, 6,7, 8, 9, 10] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%').height(100).fontSize(16) + .textAlign(TextAlign.Center).borderRadius(10).backgroundColor(Color.Yellow) + }.backgroundColor(Color.Green) + }, (item: string) => item) + }.margin({ right: 15 }) + .listDirection(Axis.Vertical) + .id('ArkUIScrollbarScroll300') + } + .width('90%') + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Vertical) + .edgeEffect(EdgeEffect.Spring,{ alwaysEnabled: true }) + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Vertical,state: BarState.On }) + + } + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll320.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll320.ets new file mode 100644 index 0000000000000000000000000000000000000000..d70827df207faab6b8a17c8e7db1423d6718d6ae --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll320.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 ArkUIScrollbarScroll320 { + private scroller: Scroller = new Scroller(); + @State arr: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; + @State flag: boolean = false; + + build() { + Column() { + Button('On') + .margin({ bottom: 20 }) + .id('ArkUIScrollbarScroll320') + .onClick(() => { + this.flag = true; + }) + Stack({ alignContent: Alignment.End }) { + List({ space: 20, initialIndex: 0, scroller: this.scroller }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%') + .height(100) + .fontSize(16) + .textAlign(TextAlign.Center) + .borderRadius(10) + .backgroundColor(Color.Yellow) + }.backgroundColor(Color.Green) + }, (item: string) => item) + }.margin({ right: 15 }) + .listDirection(Axis.Vertical) + .scrollBar(BarState.Off) + + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Vertical, state: BarState.On }) { + if (this.flag == true) { + Text() + .width(20) + .height(100) + .borderRadius(10) + .backgroundColor('#C0C0C0') + } + } + } + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll330.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll330.ets new file mode 100644 index 0000000000000000000000000000000000000000..67b23339d1f462bdc73d8192c02ad8b35f2b9a0b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll330.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 ArkUIScrollbarScroll330 { + private scroller: Scroller = new Scroller(); + @State arr: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; + @State flag: boolean = false; + + build() { + Column() { + Button('On') + .margin({ bottom: 20 }) + .id('ArkUIScrollbarScroll330_1') + .onClick(() => { + this.flag = true; + }) + Button('Off') + .margin({ top: 30 }) + .id('ArkUIScrollbarScroll330_2') + .onClick(() => { + this.flag = false; + }) + Stack({ alignContent: Alignment.End }) { + List({ space: 20, initialIndex: 0, scroller: this.scroller }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%') + .height(100) + .fontSize(16) + .textAlign(TextAlign.Center) + .borderRadius(10) + .backgroundColor(Color.Yellow) + }.backgroundColor(Color.Green) + }, (item: string) => item) + }.margin({ right: 15 }) + .listDirection(Axis.Vertical) + .scrollBar(BarState.Off) + + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Vertical, state: BarState.On }) { + if (this.flag == true) { + Text() + .width(20) + .height(100) + .borderRadius(10) + .backgroundColor('#C0C0C0') + } + } + } + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll360.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll360.ets new file mode 100644 index 0000000000000000000000000000000000000000..a77a2778c62a21ae5d3a49a0a3baafa59e905beb --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll360.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 ArkUIScrollbarScroll360 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [1, 2, 3, 4, 5, 6,7, 8, 9, 10] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%').height(100).fontSize(16) + .textAlign(TextAlign.Center).borderRadius(10).backgroundColor(Color.Yellow) + }.backgroundColor(Color.Green) + }, (item: string) => item) + }.margin({ right: 15 }) + .listDirection(Axis.Horizontal) + } + .width('90%') + .initialOffset({xOffset:'1000%',yOffset:'0%'}) + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Horizontal) + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Horizontal,state: BarState.On }) + Button('Button') + .margin({bottom:200,right:100}) + .id('ArkUIScrollbarScroll360') + .onClick(() => { + this.arr.push(17, 18, 19, 20); + }) + } + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll370.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll370.ets new file mode 100644 index 0000000000000000000000000000000000000000..43397e0b17640b895a113c78422f1340a7f1815e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll370.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 ArkUIScrollbarScroll370 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [1, 2, 3, 4, 5, 6] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%').height(100).fontSize(16) + .textAlign(TextAlign.Center).borderRadius(10).backgroundColor(Color.Yellow) + }.backgroundColor(Color.Green) + }, (item: string) => item) + }.margin({ right: 15 }) + .listDirection(Axis.Horizontal) + } + .width('90%') + .initialOffset({xOffset:'250%',yOffset:0}) + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Horizontal) + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Horizontal,state: BarState.On }) + + Button('Button') + .id('ArkUIScrollbarScroll370') + .onClick(() => { + this.arr.push(7, 8, 9, 10); + }) + } + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll380.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll380.ets new file mode 100644 index 0000000000000000000000000000000000000000..9de9d2f6c279a4fdab1c2093a2044188abc5e3c6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll380.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. + */ +// xxx.ets +@Entry +@Component +struct ArkUIScrollbarScroll380 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [1, 2, 3, 4, 5, 6] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%').height(100).fontSize(16) + .textAlign(TextAlign.Center).borderRadius(10).backgroundColor(Color.Yellow) + }.backgroundColor(Color.Green) + }, (item: string) => item) + }.margin({ right: 15 }) + .listDirection(Axis.Horizontal) + } + .width('90%') + .initialOffset({xOffset:0,yOffset:'100%'}) + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Horizontal) + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Horizontal,state: BarState.On }) + + Button('Button') + .id('ArkUIScrollbarScroll380') + .onClick(() => { + this.arr.push(7, 8, 9, 10) + }) + } + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll390.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll390.ets new file mode 100644 index 0000000000000000000000000000000000000000..5731f7e7b3537fd8f55e520a0065abb309587243 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll390.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 ArkUIScrollbarScroll390 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [1, 2, 3, 4] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%').height(100).fontSize(16) + .textAlign(TextAlign.Center).borderRadius(10).backgroundColor(Color.Yellow) + }.backgroundColor(Color.Green) + }, (item: string) => item) + }.margin({ right: 15 }) + .listDirection(Axis.Horizontal) + .id('ArkUIScrollbarScroll390') + } + .width('90%') + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Horizontal) + .edgeEffect(EdgeEffect.Spring,{ alwaysEnabled: true }) + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Horizontal,state: BarState.On }) + } + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll40.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll40.ets new file mode 100644 index 0000000000000000000000000000000000000000..b42c5802dd91eb9b31d9b5d90611fad9d936cf83 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll40.ets @@ -0,0 +1,39 @@ +@Entry +@Component +struct ArkUIScrollbarScroll40 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + Flex({ direction: FlexDirection.Column }) { + ForEach(this.arr, (item: number) => { + Row() { + Text(item.toString()) + .width('80%') + .height(60) + .backgroundColor('#3366CC') + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 5 }) + } + }, (item:number) => item.toString()) + }.margin({ right: 15 }) + } + .width('90%') + .initialOffset({ xOffset: '0%', yOffset: '20%' }) + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Vertical) + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Vertical,state: BarState.On }) + Button('Button') + .id('ArkUIScrollbarScroll40') + .onClick(() => { + this.arr.push(37, 38, 39, 40); + }) + } + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll400.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll400.ets new file mode 100644 index 0000000000000000000000000000000000000000..b415b9cffba5ee3b67b5eab206e5e581b4c48b46 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll400.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 ArkUIScrollbarScroll400 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [1, 2, 3, 4] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%').height(100).fontSize(16) + .textAlign(TextAlign.Center).borderRadius(10).backgroundColor(Color.Yellow) + }.backgroundColor(Color.Green) + }, (item: string) => item) + }.margin({ right: 15 }) + .listDirection(Axis.Horizontal) + .id('ArkUIScrollbarScroll400') + } + .width('90%') + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Horizontal) + .edgeEffect(EdgeEffect.Spring,{ alwaysEnabled: true }) + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Horizontal,state: BarState.On }) + } + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll420.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll420.ets new file mode 100644 index 0000000000000000000000000000000000000000..e22660691b607ee3227fc9775c5bca4ab4d3deee --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll420.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 ArkUIScrollbarScroll420 { + private scroller: Scroller = new Scroller(); + @State arr: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; + @State flag: boolean = false; + + build() { + Column() { + Button('On') + .margin({ bottom: 20 }) + .id('ArkUIScrollbarScroll420') + .onClick(() => { + this.flag = true; + }) + Stack({ alignContent: Alignment.End }) { + List({ space: 20, initialIndex: 0, scroller: this.scroller }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%') + .height(100) + .fontSize(16) + .textAlign(TextAlign.Center) + .borderRadius(10) + .backgroundColor(Color.Yellow) + }.backgroundColor(Color.Green) + }, (item: string) => item) + }.margin({ right: 15 }) + .listDirection(Axis.Horizontal) + .scrollBar(BarState.Off) + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Horizontal, state: BarState.On }) { + if (this.flag == true) { + Text() + .width(100) + .height(20) + .borderRadius(10) + .backgroundColor('#C0C0C0') + } + } + } + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll430.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll430.ets new file mode 100644 index 0000000000000000000000000000000000000000..508d4c98e15e169989e92c25ff2f24291eda8300 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll430.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 ArkUIScrollbarScroll430 { + private scroller: Scroller = new Scroller(); + @State arr: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; + @State flag: boolean = false; + + build() { + Column() { + Button('On') + .margin({ bottom: 20 }) + .id('ArkUIScrollbarScroll430_1') + .onClick(() => { + this.flag = true; + }) + Button('Off') + .margin({ top: 30 }) + .id('ArkUIScrollbarScroll430_2') + .onClick(() => { + this.flag = false; + }) + Stack({ alignContent: Alignment.End }) { + List({ space: 20, initialIndex: 0, scroller: this.scroller }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%') + .height(100) + .fontSize(16) + .textAlign(TextAlign.Center) + .borderRadius(10) + .backgroundColor(Color.Yellow) + }.backgroundColor(Color.Green) + }, (item: string) => item) + }.margin({ right: 15 }) + .listDirection(Axis.Horizontal) + .scrollBar(BarState.Off) + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Horizontal, state: BarState.On }) { + if (this.flag == true) { + Text() + .width(100) + .height(20) + .borderRadius(10) + .backgroundColor('#C0C0C0') + } + } + } + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll460.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll460.ets new file mode 100644 index 0000000000000000000000000000000000000000..486eed3b5df721f5e151c58573c8b000452216b1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll460.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 ArkUIScrollbarScroll460 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10,11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 27, 28, 29,] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + Grid() { + ForEach(this.arr, (item: number) => { + GridItem() { + Text(item + '') + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .columnsTemplate('1fr 1fr') + .columnsGap(10) + .rowsGap(10) + } + .initialOffset({ xOffset: '0%', yOffset: '100%' }) + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Vertical) + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Vertical, state: BarState.On }) + Button('Button') + .margin({ bottom: 200, right: 100 }) + .id('ArkUIScrollbarScroll460') + .onClick(() => { + this.arr.push(37, 38, 39, 40); + }) + } + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll470.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll470.ets new file mode 100644 index 0000000000000000000000000000000000000000..eebec487dbe7bb4b053dcb74ee862279dbd12748 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll470.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 ArkUIScrollbarScroll470 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10,11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 27, 28, 29,] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + Grid() { + ForEach(this.arr, (item: number) => { + GridItem() { + Text(item + '') + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .columnsTemplate('1fr 1fr') + .columnsGap(10) + .rowsGap(10) + } + .initialOffset({ xOffset: '0%', yOffset: '30%' }) + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Vertical) + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Vertical, state: BarState.On }) + Button('Button') + .margin({ bottom: 200, right: 100 }) + .id('ArkUIScrollbarScroll470') + .onClick(() => { + this.arr.push(37, 38, 39, 40); + }) + } + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll480.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll480.ets new file mode 100644 index 0000000000000000000000000000000000000000..c832eac124529421ae1d4561ac3c43f2cd340658 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll480.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 ArkUIScrollbarScroll480 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + Grid() { + ForEach(this.arr, (day: string) => { + ForEach(this.arr, (day: string) => { + GridItem() { + Text() + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + }, (day: string) => day) + } + .columnsTemplate('1fr 1fr 1fr 1fr 1fr') + .columnsGap(10) + .rowsGap(10) + } + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Vertical) + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Vertical, state: BarState.On }) + Button('Button') + .margin({ bottom: 200, right: 100 }) + .id('ArkUIScrollbarScroll480') + .onClick(() => { + this.arr.push(17, 18, 19, 20); + }) + } + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll490.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll490.ets new file mode 100644 index 0000000000000000000000000000000000000000..081ff5eee454af66a7f40c6e8d22c39774cff6e5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll490.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 ArkUIScrollbarScroll490 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + Grid() { + ForEach(this.arr, (item: number) => { + GridItem() { + Text(item + '') + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .id('ArkUIScrollbarScroll490') + .height('50%') + .columnsTemplate('1fr 1fr 1fr') + .columnsGap(10) + .rowsGap(10) + .edgeEffect(EdgeEffect.Spring,{ alwaysEnabled: true }) + } + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Vertical) + } + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Vertical, state: BarState.On }) + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll50.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll50.ets new file mode 100644 index 0000000000000000000000000000000000000000..82554dff8d59fbc66409bd6a9cba46e8dc0e0a3d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll50.ets @@ -0,0 +1,39 @@ +@Entry +@Component +struct ArkUIScrollbarScroll50 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + Flex({ direction: FlexDirection.Column }) { + ForEach(this.arr, (item: number) => { + Row() { + Text(item.toString()) + .width('80%') + .height(60) + .backgroundColor('#3366CC') + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 5 }) + } + }, (item:number) => item.toString()) + }.margin({ right: 15 }) + } + .width('90%') + .initialOffset({ xOffset: '0%', yOffset: '100%' }) + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Vertical) + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Vertical,state: BarState.On }) + Button('Button') + .id('ArkUIScrollbarScroll50') + .onClick(() => { + this.arr.push(37, 38, 39, 40); + }) + } + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll500.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll500.ets new file mode 100644 index 0000000000000000000000000000000000000000..bbdb0d43bf9404d8330ec08d2f0a06288ec1a933 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll500.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 ArkUIScrollbarScroll500 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + Grid() { + ForEach(this.arr, (item: number) => { + GridItem() { + Text(item + '') + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .id('ArkUIScrollbarScroll500') + .height('50%') + .columnsTemplate('1fr 1fr 1fr') + .columnsGap(10) + .rowsGap(10) + .edgeEffect(EdgeEffect.Spring,{ alwaysEnabled: true }) + } + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Vertical) + } + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Vertical, state: BarState.On }) + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll520.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll520.ets new file mode 100644 index 0000000000000000000000000000000000000000..293307b5cb41cd914b4dc61d6bbce67cb8ba8af6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll520.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 ArkUIScrollbarScroll520 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]; + @State flag: boolean = false; + build() { + Row() { + Column(){ + + Button('On') + .margin({bottom:20}) + .id('ArkUIScrollbarScroll520') + .onClick(() => { + this.flag = true; + }) + } + Stack({ alignContent: Alignment.End }) { + Grid(this.scroller) { + ForEach(this.arr, (item: number) => { + GridItem() { + Text(item + '') + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .height('50%') + .width('80%') + .columnsTemplate('1fr 1fr 1fr') + .rowsGap(20) + .scrollBar(BarState.Off) + } + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Vertical, state: BarState.On }) { + if (this.flag == true) { + Text() + .width(20) + .height(100) + .borderRadius(10) + .backgroundColor('#C0C0C0') + } + } + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll530.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll530.ets new file mode 100644 index 0000000000000000000000000000000000000000..9d7dac718537fff49ffc8fe32207f1ce56c6683b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll530.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 ArkUIScrollbarScroll530 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]; + @State flag: boolean = false; + build() { + Row() { + Column(){ + + Button('On') + .margin({bottom:20}) + .id('ArkUIScrollbarScroll530_1') + .onClick(() => { + this.flag = true; + }) + Button('Off') + .margin({top:30}) + .id('ArkUIScrollbarScroll530_2') + .onClick(() => { + this.flag = false; + }) + } + Stack({ alignContent: Alignment.End }) { + Grid(this.scroller) { + ForEach(this.arr, (item: number) => { + GridItem() { + Text(item + '') + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .height('50%') + .width('80%') + .columnsTemplate('1fr 1fr 1fr') + .rowsGap(20) + .scrollBar(BarState.Off) + } + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Vertical, state: BarState.On }) { + if (this.flag == true) { + Text() + .width(20) + .height(100) + .borderRadius(10) + .backgroundColor('#C0C0C0') + } + } + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll560.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll560.ets new file mode 100644 index 0000000000000000000000000000000000000000..dc3045b74d142e1a5b5940bbcab181794a2d521d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll560.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 ArkUIScrollbarScroll560 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [1, 2, 3, 4,] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + Grid() { + ForEach(this.arr, (item: number) => { + GridItem() { + Text(item + '') + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .height('20%') + .rowsTemplate('1fr 1fr') + .rowsGap(20) + } + .initialOffset({ xOffset: '100%', yOffset: '0%' }) + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Horizontal) + } + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Horizontal, state: BarState.On }) + Button('Button') + .margin({ bottom: 20 }) + .id('ArkUIScrollbarScroll560') + .onClick(() => { + this.arr.push(37, 38, 39, 40); + }) + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll570.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll570.ets new file mode 100644 index 0000000000000000000000000000000000000000..ffce497bc3087eb0348fbbb1f34c4a6ae95eb3db --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll570.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 ArkUIScrollbarScroll570 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [1, 2, 3, 4,] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + Grid() { + ForEach(this.arr, (item: number) => { + GridItem() { + Text(item + '') + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .height('20%') + .rowsTemplate('1fr 1fr') + .rowsGap(20) + } + .initialOffset({ xOffset: '50%', yOffset: '0%' }) + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Horizontal) + } + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Horizontal, state: BarState.On }) + Button('Button') + .margin({ bottom: 20 }) + .id('ArkUIScrollbarScroll570') + .onClick(() => { + this.arr.push(37, 38, 39, 40); + }) + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll580.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll580.ets new file mode 100644 index 0000000000000000000000000000000000000000..c06b6afc837c205a798043004a002426605046ab --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll580.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 ArkUIScrollbarScroll580 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [1, 2, 3, 4,] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + Grid() { + ForEach(this.arr, (item: number) => { + GridItem() { + Text(item + '') + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .height('20%') + .rowsTemplate('1fr 1fr') + .rowsGap(20) + } + .initialOffset({ xOffset: '0%', yOffset: '0%' }) + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Horizontal) + } + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Horizontal, state: BarState.On }) + Button('Button') + .margin({ bottom: 20 }) + .id('ArkUIScrollbarScroll580') + .onClick(() => { + this.arr.push(37, 38, 39, 40); + }) + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll590.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll590.ets new file mode 100644 index 0000000000000000000000000000000000000000..e4bebb7c40cf9d23384fe4e85962c54ed798f9a0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll590.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 ArkUIScrollbarScroll590 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + Grid() { + ForEach(this.arr, (item: number) => { + GridItem() { + Text(item + '') + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .id('ArkUIScrollbarScroll590') + .height('50%') + .rowsTemplate('1fr 1fr 1fr') + .rowsGap(20) + } + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Horizontal) + .edgeEffect(EdgeEffect.Spring,{ alwaysEnabled: true }) + } + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Horizontal, state: BarState.On }) + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll60.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll60.ets new file mode 100644 index 0000000000000000000000000000000000000000..1648637dd9bdd76afaab76a6c289fd526653689e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll60.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 ArkUIScrollbarScroll60 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + Flex({ direction: FlexDirection.Column }) { + ForEach(this.arr, (item: number) => { + Row() { + Text(item.toString()) + .width('80%') + .height(60) + .backgroundColor('#3366CC') + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 5 }) + } + }, (item:number) => item.toString()) + }.margin({ right: 15 }) + .id('ArkUIScrollbarScroll60') + } + .width('90%') + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Vertical) + .edgeEffect(EdgeEffect.Spring,{ alwaysEnabled: true }) + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Vertical,state: BarState.On }) + } + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll600.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll600.ets new file mode 100644 index 0000000000000000000000000000000000000000..96775b74053468d01596487d1ab5f4d7f8bd0caf --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll600.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 ArkUIScrollbarScroll600 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + Grid() { + ForEach(this.arr, (item: number) => { + GridItem() { + Text(item + '') + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .id('ArkUIScrollbarScroll600') + .height('50%') + .rowsTemplate('1fr 1fr 1fr') + .rowsGap(20) + } + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Horizontal) + .edgeEffect(EdgeEffect.Spring,{ alwaysEnabled: true }) + } + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Horizontal, state: BarState.On }) + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll620.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll620.ets new file mode 100644 index 0000000000000000000000000000000000000000..bb2d11cc26593805271756cfeb43ceee60361abb --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll620.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 ArkUIScrollbarScroll620 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9]; + @State flag: boolean = false; + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Grid(this.scroller) { + ForEach(this.arr, (item: number) => { + GridItem() { + Text(item + '') + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .id('ArkUIScrollbarScroll620') + .height('50%') + .rowsTemplate('1fr 1fr 1fr') + .rowsGap(20) + .scrollBar(BarState.Off) + } + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Horizontal, state: BarState.On }) { + if (this.flag == true) { + Text() + .width(100) + .height(20) + .borderRadius(10) + .backgroundColor('#C0C0C0') + } + } + Button('On') + .margin({bottom:20}) + .id('ArkUIScrollbarScroll620') + .onClick(() => { + this.flag = true; + }) + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll630.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll630.ets new file mode 100644 index 0000000000000000000000000000000000000000..c7ac43d7d53654442594904e84b0e913b8a5d432 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll630.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 ArkUIScrollbarScroll630 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9]; + @State flag: boolean = false; + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Grid(this.scroller) { + ForEach(this.arr, (item: number) => { + GridItem() { + Text(item + '') + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .id('ArkUIScrollbarScroll630') + .height('50%') + .rowsTemplate('1fr 1fr 1fr') + .rowsGap(20) + .scrollBar(BarState.Off) + } + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Horizontal, state: BarState.On }) { + if (this.flag == true) { + Text() + .width(100) + .height(20) + .borderRadius(10) + .backgroundColor('#C0C0C0') + } + } + Button('On') + .margin({bottom:20}) + .id('ArkUIScrollbarScroll630_1') + .onClick(() => { + this.flag = true; + }) + Button('Off') + .margin({top:30}) + .id('ArkUIScrollbarScroll630_2') + .onClick(() => { + this.flag = false; + }) + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll660.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll660.ets new file mode 100644 index 0000000000000000000000000000000000000000..87434ecfe7b6488086c526e9645a71bf91167d2c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll660.ets @@ -0,0 +1,96 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT 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 { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct ArkUIScrollbarScroll660 { + @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[] = [] + + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + setItemSizeArray() { + for (let i = 0; i < 100; 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') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .onAppear(() => { + // 即将触底时提前增加数据 + if (item + 20 == this.dataSource.totalCount()) { + for (let i = 0; i < 100; i++) { + this.dataSource.addLastItem() + } + } + }) + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .id('ArkUIScrollbarScroll660') + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('90%') + .height('90%') + .scrollBar(BarState.On) + .edgeEffect(EdgeEffect.Spring,{ alwaysEnabled: true }) + } + + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll670.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll670.ets new file mode 100644 index 0000000000000000000000000000000000000000..fa606ee02f3b36a496cdb7f1f17d38acc5d1ecd9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll670.ets @@ -0,0 +1,96 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT 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 { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct ArkUIScrollbarScroll670 { + @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[] = [] + + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + setItemSizeArray() { + for (let i = 0; i < 100; 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') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .onAppear(() => { + // 即将触底时提前增加数据 + if (item + 20 == this.dataSource.totalCount()) { + for (let i = 0; i < 100; i++) { + this.dataSource.addLastItem() + } + } + }) + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('90%') + .height('90%') + .scrollBar(BarState.On) + .edgeEffect(EdgeEffect.Spring,{ alwaysEnabled: true }) + } + .id('ArkUIScrollbarScroll670') + + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll70.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll70.ets new file mode 100644 index 0000000000000000000000000000000000000000..f011c6c1d812065d2f88587bdca4dd3894386309 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll70.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 ArkUIScrollbarScroll70 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + Flex({ direction: FlexDirection.Column }) { + ForEach(this.arr, (item: number) => { + Row() { + Text(item.toString()) + .width('80%') + .height(60) + .backgroundColor('#3366CC') + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 5 }) + } + }, (item:number) => item.toString()) + }.margin({ right: 15 }) + .id('ArkUIScrollbarScroll70') + } + .width('90%') + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Vertical) + .edgeEffect(EdgeEffect.Spring,{ alwaysEnabled: true }) + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Vertical,state: BarState.On }) + } + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll700.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll700.ets new file mode 100644 index 0000000000000000000000000000000000000000..6857cea5b931ad32060ab5d35830e522ff4f274d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll700.ets @@ -0,0 +1,94 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT 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 { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct ArkUIScrollbarScroll700 { + @State minSize: number = 80 + @State maxSize: number = 180 + @State fontSize: number = 24 + @State flag: boolean = false + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F] + scroller: Scroller = new Scroller() + dataSource: WaterFlowDataSource = new WaterFlowDataSource() + private itemWidthArray: number[] = [] + private itemHeightArray: number[] = [] + + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + setItemSizeArray() { + for (let i = 0; i < 100; i++) { + this.itemWidthArray.push(this.getSize()) + this.itemHeightArray.push(this.getSize()) + } + } + + aboutToAppear() { + this.setItemSizeArray() + } + + @Builder + + build() { + Row({ space: 2 }) { + WaterFlow({scroller: this.scroller}) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .rowsTemplate("1fr 1fr") + .layoutDirection(FlexDirection.Row) + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('90%') + .height('90%') + .edgeEffect(EdgeEffect.Spring, { alwaysEnabled: true }) + .scrollBar(BarState.Off) + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Vertical, state: BarState.On }) { + if(this.flag == true){ + Text() + .width(20) + .height(100) + .borderRadius(10) + .backgroundColor('#C0C0C0') + } + } + Button('On') + .id('ArkUIScrollbarScroll700') + .onClick(() => { + this.flag = true; + }) + } + + + + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll710.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll710.ets new file mode 100644 index 0000000000000000000000000000000000000000..3eac1c829743ef610c2afc6ba3fea744a0d16e4c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll710.ets @@ -0,0 +1,101 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct ArkUIScrollbarScroll710 { + @State minSize: number = 80 + @State maxSize: number = 180 + @State fontSize: number = 24 + @State flag: boolean = false + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F] + scroller: Scroller = new Scroller() + dataSource: WaterFlowDataSource = new WaterFlowDataSource() + private itemWidthArray: number[] = [] + private itemHeightArray: number[] = [] + + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + setItemSizeArray() { + for (let i = 0; i < 100; i++) { + this.itemWidthArray.push(this.getSize()) + this.itemHeightArray.push(this.getSize()) + } + } + + aboutToAppear() { + this.setItemSizeArray() + } + + @Builder + + build() { + Row({ space: 2 }) { + + Column(){ + + Button('On') + .margin({bottom:20}) + .id('ArkUIScrollbarScroll710_1') + .onClick(() => { + this.flag = true; + }) + Button('Off') + .margin({top:30}) + .id('ArkUIScrollbarScroll710_2') + .onClick(() => { + this.flag = false; + }) + } + WaterFlow({scroller: this.scroller}) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('80%') + .height('80%') + .edgeEffect(EdgeEffect.Spring, { alwaysEnabled: true }) + .scrollBar(BarState.Off) + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Vertical, state: BarState.On }) { + if(this.flag == true){ + Text() + .width(20) + .height(100) + .borderRadius(10) + .backgroundColor('#C0C0C0') + } + } + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll740.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll740.ets new file mode 100644 index 0000000000000000000000000000000000000000..083ca8792ae3d534c2c408960559a2d12df1cd24 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll740.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. + */ +// Index.ets +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct ArkUIScrollbarScroll740 { + @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[] = [] + + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + setItemSizeArray() { + for (let i = 0; i < 100; 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') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .onAppear(() => { + // 即将触底时提前增加数据 + if (item + 20 == this.dataSource.totalCount()) { + for (let i = 0; i < 100; i++) { + this.dataSource.addLastItem() + } + } + }) + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .id('ArkUIScrollbarScroll740') + .layoutDirection(FlexDirection.Row) + .rowsTemplate("1fr 1fr 1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('90%') + .height('90%') + .scrollBar(BarState.On) + .edgeEffect(EdgeEffect.Spring,{ alwaysEnabled: true }) + } + + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll750.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll750.ets new file mode 100644 index 0000000000000000000000000000000000000000..d18885cc7bbc11a8603822ea94f117b55a0f1a5a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll750.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. + */ +// Index.ets +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct ArkUIScrollbarScroll750 { + @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[] = [] + + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + setItemSizeArray() { + for (let i = 0; i < 100; 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') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .onAppear(() => { + // 即将触底时提前增加数据 + if (item + 20 == this.dataSource.totalCount()) { + for (let i = 0; i < 100; i++) { + this.dataSource.addLastItem() + } + } + }) + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .id('ArkUIScrollbarScroll750') + .layoutDirection(FlexDirection.Row) + .rowsTemplate("1fr 1fr 1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('90%') + .height('90%') + .scrollBar(BarState.On) + .edgeEffect(EdgeEffect.Spring,{ alwaysEnabled: true }) + } + + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll770.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll770.ets new file mode 100644 index 0000000000000000000000000000000000000000..aa265e6ff398a59a93f9107231c6db776e4cf68b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll770.ets @@ -0,0 +1,94 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT 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 { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct ArkUIScrollbarScroll770 { + @State minSize: number = 80 + @State maxSize: number = 180 + @State fontSize: number = 24 + @State flag: boolean = false + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F] + scroller: Scroller = new Scroller() + dataSource: WaterFlowDataSource = new WaterFlowDataSource() + private itemWidthArray: number[] = [] + private itemHeightArray: number[] = [] + + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + setItemSizeArray() { + for (let i = 0; i < 100; i++) { + this.itemWidthArray.push(this.getSize()) + this.itemHeightArray.push(this.getSize()) + } + } + + aboutToAppear() { + this.setItemSizeArray() + } + + @Builder + + build() { + Column({ space: 2 }) { + WaterFlow({scroller: this.scroller}) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .rowsTemplate("1fr 1fr") + .layoutDirection(FlexDirection.Row) + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('90%') + .height('90%') + .edgeEffect(EdgeEffect.Spring, { alwaysEnabled: true }) + .scrollBar(BarState.Off) + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Horizontal, state: BarState.On }) { + if(this.flag == true){ + Text() + .width(100) + .height(20) + .borderRadius(10) + .backgroundColor('#C0C0C0') + } + } + Button('On') + .id('ArkUIScrollbarScroll770') + .onClick(() => { + this.flag = true; + }) + } + + + + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll780.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll780.ets new file mode 100644 index 0000000000000000000000000000000000000000..a8a19394fe29dfec14c5743409b7c98ad7368b6d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll780.ets @@ -0,0 +1,99 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT 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 { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct ArkUIScrollbarScroll780 { + @State minSize: number = 80 + @State maxSize: number = 180 + @State fontSize: number = 24 + @State flag: boolean = false + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F] + scroller: Scroller = new Scroller() + dataSource: WaterFlowDataSource = new WaterFlowDataSource() + private itemWidthArray: number[] = [] + private itemHeightArray: number[] = [] + + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + setItemSizeArray() { + for (let i = 0; i < 100; i++) { + this.itemWidthArray.push(this.getSize()) + this.itemHeightArray.push(this.getSize()) + } + } + + aboutToAppear() { + this.setItemSizeArray() + } + + @Builder + + build() { + Column({ space: 2 }){ + Button('On') + .margin({bottom:20}) + .id('ArkUIScrollbarScroll780_1') + .onClick(() => { + this.flag = true; + }) + Button('Off') + .margin({top:30}) + .id('ArkUIScrollbarScroll780_2') + .onClick(() => { + this.flag = false; + }) + + WaterFlow({scroller: this.scroller}) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .rowsTemplate("1fr 1fr 1fr") + .layoutDirection(FlexDirection.Row) + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('80%') + .height('80%') + .edgeEffect(EdgeEffect.Spring, { alwaysEnabled: true }) + .scrollBar(BarState.Off) + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Horizontal, state: BarState.On }) { + if(this.flag == true){ + Text() + .width(100) + .height(20) + .borderRadius(10) + .backgroundColor('#C0C0C0') + } + } + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll790.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll790.ets new file mode 100644 index 0000000000000000000000000000000000000000..2b10f48f1a9f18c50ee97b01be3fe9730b1bd4b6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll790.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. + */ +// xxx.ets +@Entry +@Component +struct ArkUIScrollbarScroll790 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%').height(100).fontSize(16) + .textAlign(TextAlign.Center).borderRadius(10).backgroundColor(0xFFFFFF) + } + }, (item: string) => item) + }.margin({ right: 15 }) + .listDirection(Axis.Vertical) // 排列方向 + .scrollBar(BarState.Off) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0x000000, startMargin: 20, endMargin: 20 }) // 每行之间的分界线 + } + .width('90%') + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Vertical) + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Vertical,state: BarState.On }) + Button('Button') + .id('ArkUIScrollbarScroll790') + .onClick(() => { + const yOffset: number = this.scroller.currentOffset().yOffset; + this.scroller.scrollTo({ xOffset: 0, yOffset: yOffset + 100 }) + this.arr.unshift(this.arr[0]-1) + }) + } + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll830.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll830.ets new file mode 100644 index 0000000000000000000000000000000000000000..de81b4cbba113f49aeedf18731c870ef9a7b72a8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll830.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 ArkUIScrollbarScroll830 { + @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) + + List({ space: 10 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text("item" + item) + .fontSize(16) + }.listCard() + }, (item: string) => item) + }.width("100%") + .height("60%") + .edgeEffect(EdgeEffect.Spring) + Text("Scroll Area") + .width("100%") + .height("40%") + .backgroundColor('#0080DC') + .textAlign(TextAlign.Center) + + }.width("100%") + } + .id('ArkUIScrollbarScroll830') + .edgeEffect(EdgeEffect.Spring) + .friction(0.6) + .backgroundColor('#DCDCDC') + .scrollBar(BarState.On) + .width('100%') + .height('100%') + } + + aboutToAppear() { + for (let i = 0; i < 30; i++) { + this.arr.push(i) + } + } +} + + + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll840.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll840.ets new file mode 100644 index 0000000000000000000000000000000000000000..4b618eee1b9f38fc22a1d8879935e421270ed56c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll840.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 ArkUIScrollbarScroll840 { + @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) + + List({ space: 10 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text("item" + item) + .fontSize(16) + }.listCard() + }, (item: string) => item) + }.id('ArkUIScrollbarScroll840') + .width("100%") + .height("60%") + .edgeEffect(EdgeEffect.Spring) + .nestedScroll({ + scrollForward: NestedScrollMode.PARENT_FIRST, + scrollBackward: NestedScrollMode.PARENT_FIRST + }) + Text("Scroll Area") + .width("100%") + .height("40%") + .backgroundColor('#0080DC') + .textAlign(TextAlign.Center) + + }.width("100%") + } + .edgeEffect(EdgeEffect.Spring) + .friction(0.6) + .backgroundColor('#DCDCDC') + .scrollBar(BarState.On) + .width('100%') + .height('100%') + } + + aboutToAppear() { + for (let i = 0; i < 30; i++) { + this.arr.push(i) + } + } +} + + + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll850.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll850.ets new file mode 100644 index 0000000000000000000000000000000000000000..d22a20ce978c88fc4924a0e58f4612ad8ae54a27 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll850.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 ArkUIScrollbarScroll850 { + @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) + + List({ space: 10 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text("item" + item) + .fontSize(16) + }.listCard() + }, (item: string) => item) + }.id('ArkUIScrollbarScroll850') + .width("100%") + .height("60%") + .edgeEffect(EdgeEffect.Spring) + .nestedScroll({ + scrollForward: NestedScrollMode.SELF_FIRST, + scrollBackward: NestedScrollMode.SELF_FIRST + }) + Text("Scroll Area") + .width("100%") + .height("40%") + .backgroundColor('#0080DC') + .textAlign(TextAlign.Center) + + }.width("100%") + } + .edgeEffect(EdgeEffect.Spring) + .friction(0.6) + .backgroundColor('#DCDCDC') + .scrollBar(BarState.On) + .width('100%') + .height('100%') + } + + aboutToAppear() { + for (let i = 0; i < 30; i++) { + this.arr.push(i) + } + } +} + + + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll860.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll860.ets new file mode 100644 index 0000000000000000000000000000000000000000..325e88417d652fb7e3016b36a96a75ec7ae3dd7d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll860.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 ArkUIScrollbarScroll860 { + @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) + + List({ space: 10 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text("item" + item) + .fontSize(16) + }.listCard() + }, (item: string) => item) + }.width("100%") + .height("60%") + .edgeEffect(EdgeEffect.Spring) + .nestedScroll({ + scrollForward: NestedScrollMode.PARALLEL, + scrollBackward: NestedScrollMode.PARALLEL + }) + Text("Scroll Area") + .width("100%") + .height("40%") + .backgroundColor('#0080DC') + .textAlign(TextAlign.Center) + + }.width("100%") + } + .id('ArkUIScrollbarScroll860') + .edgeEffect(EdgeEffect.Spring) + .friction(0.6) + .backgroundColor('#DCDCDC') + .scrollBar(BarState.On) + .width('100%') + .height('100%') + } + + aboutToAppear() { + for (let i = 0; i < 30; i++) { + this.arr.push(i) + } + } +} + + + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll870.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll870.ets new file mode 100644 index 0000000000000000000000000000000000000000..284a5a5b58eeafa68266628b18141ce68563372f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll870.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 ArkUIScrollbarScroll870 { + @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) + + List({ space: 10 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text("item" + item) + .fontSize(16) + }.listCard() + }, (item: string) => item) + }.id('ArkUIScrollbarScroll870') + .width("100%") + .height("60%") + .edgeEffect(EdgeEffect.Spring) + .nestedScroll({ + scrollForward: NestedScrollMode.PARENT_FIRST, + scrollBackward: NestedScrollMode.PARENT_FIRST + }) + Text("Scroll Area") + .width("100%") + .height("40%") + .backgroundColor('#0080DC') + .textAlign(TextAlign.Center) + + }.width("100%") + } + .edgeEffect(EdgeEffect.Spring) + .friction(0.6) + .backgroundColor('#DCDCDC') + .scrollBar(BarState.On) + .width('100%') + .height('100%') + } + + aboutToAppear() { + for (let i = 0; i < 30; i++) { + this.arr.push(i) + } + } +} + + + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll880.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll880.ets new file mode 100644 index 0000000000000000000000000000000000000000..65cb4b40598131472381be4679c157757f533bb3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll880.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 ArkUIScrollbarScroll880 { + @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) + + List({ space: 10 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text("item" + item) + .fontSize(16) + }.listCard() + }, (item: string) => item) + }.id('ArkUIScrollbarScroll880') + .width("100%") + .height("60%") + .edgeEffect(EdgeEffect.Spring) + .nestedScroll({ + scrollForward: NestedScrollMode.SELF_FIRST, + scrollBackward: NestedScrollMode.SELF_FIRST + }) + Text("Scroll Area") + .width("100%") + .height("40%") + .backgroundColor('#0080DC') + .textAlign(TextAlign.Center) + + }.width("100%") + } + .edgeEffect(EdgeEffect.Spring) + .friction(0.6) + .backgroundColor('#DCDCDC') + .scrollBar(BarState.On) + .width('100%') + .height('100%') + } + + aboutToAppear() { + for (let i = 0; i < 30; i++) { + this.arr.push(i) + } + } +} + + + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll90.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll90.ets new file mode 100644 index 0000000000000000000000000000000000000000..7abcd4217e440a0df062f423bdd8a0a2aea9d6c0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll90.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 ArkUIScrollbarScroll90 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]; + @State flag: boolean = false; + build() { + Row() { + Column(){ + + Button('On') + .margin({bottom:20}) + .id('ArkUIScrollbarScroll90') + .onClick(() => { + this.flag = true; + }) + } + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + Flex({ direction: FlexDirection.Column }) { + ForEach(this.arr, (item: number) => { + Row() { + Text(item.toString()) + .width('80%') + .height(60) + .backgroundColor('#3366CC') + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 5 }) + } + }, (item:number) => item.toString()) + }.margin({ right: 15 }) + } + .width('80%') + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Vertical) + } + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Vertical, state: BarState.On }) { + if (this.flag == true) { + Text() + .width(20) + .height(100) + .borderRadius(10) + .backgroundColor('#C0C0C0') + } + } + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/WaterFlowDataSource.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/WaterFlowDataSource.ets new file mode 100644 index 0000000000000000000000000000000000000000..60644b7d88fa8851f1a7695ded264907b0f41eff --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/WaterFlowDataSource.ets @@ -0,0 +1,129 @@ +// WaterFlowDataSource.ets + +// 实现IDataSource接口的对象,用于瀑布流组件加载数据 +export class WaterFlowDataSource implements IDataSource { + private dataArray: number[] = [] + private listeners: DataChangeListener[] = [] + + constructor() { + for (let i = 0; i < 100; i++) { + this.dataArray.push(i) + } + } + + // 获取索引对应的数据 + public getData(index: number): number { + return this.dataArray[index] + } + + // 通知控制器数据重新加载 + notifyDataReload(): void { + this.listeners.forEach(listener => { + listener.onDataReloaded() + }) + } + + // 通知控制器数据增加 + notifyDataAdd(index: number): void { + this.listeners.forEach(listener => { + listener.onDataAdd(index) + }) + } + + // 通知控制器数据变化 + notifyDataChange(index: number): void { + this.listeners.forEach(listener => { + listener.onDataChange(index) + }) + } + + // 通知控制器数据删除 + notifyDataDelete(index: number): void { + this.listeners.forEach(listener => { + listener.onDataDelete(index) + }) + } + + // 通知控制器数据位置变化 + notifyDataMove(from: number, to: number): void { + this.listeners.forEach(listener => { + listener.onDataMove(from, to) + }) + } + + //通知控制器数据批量修改 + notifyDatasetChange(operations: DataOperation[]): void { + this.listeners.forEach(listener => { + listener.onDatasetChange(operations); + }) + } + + // 获取数据总数 + public totalCount(): number { + return this.dataArray.length + } + + // 注册改变数据的控制器 + registerDataChangeListener(listener: DataChangeListener): void { + if (this.listeners.indexOf(listener) < 0) { + this.listeners.push(listener) + } + } + + // 注销改变数据的控制器 + unregisterDataChangeListener(listener: DataChangeListener): void { + const pos = this.listeners.indexOf(listener) + if (pos >= 0) { + this.listeners.splice(pos, 1) + } + } + + // 增加数据 + public add1stItem(): void { + this.dataArray.splice(0, 0, this.dataArray.length) + this.notifyDataAdd(0) + } + + // 在数据尾部增加一个元素 + public addLastItem(): void { + this.dataArray.splice(this.dataArray.length, 0, this.dataArray.length) + this.notifyDataAdd(this.dataArray.length - 1) + } + + // 在指定索引位置增加一个元素 + public addItem(index: number): void { + this.dataArray.splice(index, 0, this.dataArray.length) + this.notifyDataAdd(index) + } + + // 删除第一个元素 + public delete1stItem(): void { + this.dataArray.splice(0, 1) + this.notifyDataDelete(0) + } + + // 删除第二个元素 + public delete2ndItem(): void { + this.dataArray.splice(1, 1) + this.notifyDataDelete(1) + } + + // 删除最后一个元素 + public deleteLastItem(): void { + this.dataArray.splice(-1, 1) + this.notifyDataDelete(this.dataArray.length) + } + + // 在指定索引位置删除一个元素 + public deleteItem(index: number): void { + this.dataArray.splice(index, 1) + this.notifyDataDelete(index) + } + + // 重新加载数据 + public reload(): void { + this.dataArray.splice(1, 1) + this.dataArray.splice(3, 2) + this.notifyDataReload() + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0130.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0130.ets new file mode 100644 index 0000000000000000000000000000000000000000..2cd1e874fe23bd21d5b16a917d702042eeee39a4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0130.ets @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { GridModifier } from '@ohos.arkui.modifier' +@Entry +@Component +struct UIComponentGridModifier0140 { + @State numbers: string[] = []; + @State modifier: GridModifier = new GridModifier().height(300).columnsGap(10).rowsGap(10).backgroundColor(0xFAEEE0).maxCount(6).minCount(2); + aboutToAppear() { + for (let i = 1; i <= 30; i++) { + this.numbers.push(i + ''); + } + } + build() { + Scroll() { + Column({ space: 5 }) { + Grid() { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day).fontSize(16).backgroundColor(0xF9CF93) + }.width(40).height(80).borderWidth(2).borderColor(Color.Red) + }, (day: string) => day) + } + .cellLength(50) + .layoutDirection(GridDirection.Row) + .attributeModifier(this.modifier) + } + .width('90%').margin({ top: 5, left: 5, right: 5 }) + .align(Alignment.Center) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0140.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0140.ets new file mode 100644 index 0000000000000000000000000000000000000000..2ab20123641ecfe94f0af4a88788597c473fa2dd --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0140.ets @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { GridModifier } from '@ohos.arkui.modifier' +@Entry +@Component +struct UIComponentGridModifier0140 { + @State numbers: string[] = []; + @State modifier: GridModifier = new GridModifier().height(300).columnsGap(10).rowsGap(10).backgroundColor(0xFAEEE0).maxCount(6).minCount(2); + aboutToAppear() { + for (let i = 1; i <= 30; i++) { + this.numbers.push(i + ''); + } + } + build() { + Scroll() { + Column({ space: 5 }) { + Grid() { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day).fontSize(16).backgroundColor(0xF9CF93) + }.width(40).height(80).borderWidth(2).borderColor(Color.Red) + }, (day: string) => day) + } + .cellLength(30) + .layoutDirection(GridDirection.ColumnReverse) + .attributeModifier(this.modifier) + } + .width('90%').margin({ top: 5, left: 5, right: 5 }) + .align(Alignment.Center) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0150.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0150.ets new file mode 100644 index 0000000000000000000000000000000000000000..9bb6c529fe66f83bef71a044737d1f3bdaab8604 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0150.ets @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { GridModifier } from '@ohos.arkui.modifier' +@Entry +@Component +struct UIComponentGridModifier0140 { + @State numbers: string[] = []; + @State modifier: GridModifier = new GridModifier().height(300).columnsGap(10).rowsGap(10).backgroundColor(0xFAEEE0).maxCount(6).minCount(2); + aboutToAppear() { + for (let i = 1; i <= 30; i++) { + this.numbers.push(i + ''); + } + } + build() { + Scroll() { + Column({ space: 5 }) { + Grid() { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day).fontSize(16).backgroundColor(0xF9CF93) + }.width(40).height(80).borderWidth(2).borderColor(Color.Red) + }, (day: string) => day) + } + .cellLength(50) + .layoutDirection(GridDirection.RowReverse) + .attributeModifier(this.modifier) + } + .width('90%').margin({ top: 5, left: 5, right: 5 }) + .align(Alignment.Center) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0160.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0160.ets new file mode 100644 index 0000000000000000000000000000000000000000..861a619e7c64d31ac077f76ef4c9e52ef062dc92 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0160.ets @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { GridModifier } from '@ohos.arkui.modifier' +@Entry +@Component +struct UIComponentGridModifier0160 { + @State numbers: string[] = []; + @State modifier: GridModifier = new GridModifier().height(300).columnsGap(10).rowsGap(10).backgroundColor(0xFAEEE0).maxCount(6).minCount(2); + aboutToAppear() { + for (let i = 1; i <= 30; i++) { + this.numbers.push(i + ''); + } + } + build() { + Scroll() { + Column({ space: 5 }) { + Grid() { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day).fontSize(16).backgroundColor(0xF9CF93) + }.width(40).height(80).borderWidth(2).borderColor(Color.Red) + }, (day: string) => day) + } + .cellLength(30) + .layoutDirection(GridDirection.Column) + .attributeModifier(this.modifier) + } + .width('90%').margin({ top: 5, left: 5, right: 5 }) + .align(Alignment.Center) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0170.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0170.ets new file mode 100644 index 0000000000000000000000000000000000000000..9e95558982dbbb49ef29cfec75e90e972263ae18 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0170.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. + */ +import { GridModifier } from '@ohos.arkui.modifier' +@Entry +@Component +struct UIComponentGridModifier0170 { + @State numbers: string[] = []; + @State modifier: GridModifier = new GridModifier().height(300).columnsGap(10).rowsGap(10).backgroundColor(0xFAEEE0).maxCount(5).minCount(3); + + aboutToAppear() { + for (let i = 1; i <= 30; i++) { + this.numbers.push(i + ''); + } + } + + build() { + Scroll() { + Column({ space: 5 }) { + Grid() { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day).fontSize(16).backgroundColor(0xF9CF93) + }.width(40).height(80).borderWidth(2).borderColor(Color.Red) + }, (day: string) => day) + } + .layoutDirection(GridDirection.RowReverse) + + .attributeModifier(this.modifier) + } + .width('90%').margin({ top: 5, left: 5, right: 5 }) + .align(Alignment.Center) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0180.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0180.ets new file mode 100644 index 0000000000000000000000000000000000000000..ddbbb9d8edbaeeddf31d4677059974ea515f5dd3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0180.ets @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { GridModifier } from '@ohos.arkui.modifier' +@Entry +@Component +struct UIComponentGridModifier0180 { + @State numbers: string[] = []; + @State modifier: GridModifier = new GridModifier().height(300).columnsGap(10).rowsGap(10).backgroundColor(0xFAEEE0).maxCount(5).minCount(3); + + aboutToAppear() { + for (let i = 1; i <= 30; i++) { + this.numbers.push(i + ''); + } + } + + build() { + Scroll() { + Column({ space: 5 }) { + Grid() { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day).fontSize(16).backgroundColor(0xF9CF93) + }.width(40).height(80).borderWidth(2).borderColor(Color.Red) + }, (day: string) => day) + } + .layoutDirection(GridDirection.ColumnReverse) + + .attributeModifier(this.modifier) + } + .width('90%').margin({ top: 5, left: 5, right: 5 }) + .align(Alignment.Center) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0190.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0190.ets new file mode 100644 index 0000000000000000000000000000000000000000..5c057a747adf317ef488e5168f756174b98389e4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0190.ets @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { GridModifier } from '@ohos.arkui.modifier' +@Entry +@Component +struct UIComponentGridModifier0190 { + @State numbers: string[] = []; + @State modifier: GridModifier = new GridModifier().height(300).columnsGap(10).rowsGap(10).backgroundColor(0xFAEEE0).maxCount(3).minCount(5); + + aboutToAppear() { + for (let i = 1; i <= 30; i++) { + this.numbers.push(i + ''); + } + } + + build() { + Scroll() { + Column({ space: 5 }) { + Grid() { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day).fontSize(16).backgroundColor(0xF9CF93) + }.width(40).height(80).borderWidth(2).borderColor(Color.Red) + }, (day: string) => day) + } + .layoutDirection(GridDirection.RowReverse) + + .attributeModifier(this.modifier) + } + .width('90%').margin({ top: 5, left: 5, right: 5 }) + .align(Alignment.Center) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0200.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0200.ets new file mode 100644 index 0000000000000000000000000000000000000000..132777b9a92d4338a512da4d82f58db23932c1fe --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0200.ets @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { GridModifier } from '@ohos.arkui.modifier' +@Entry +@Component +struct UIComponentGridModifier0200 { + @State numbers: string[] = []; + @State modifier: GridModifier = new GridModifier().height(300).columnsGap(10).rowsGap(10).backgroundColor(0xFAEEE0).maxCount(-1).minCount(-1); + + aboutToAppear() { + for (let i = 1; i <= 30; i++) { + this.numbers.push(i + ''); + } + } + + build() { + Scroll() { + Column({ space: 5 }) { + Grid() { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day).fontSize(16).backgroundColor(0xF9CF93) + }.width(40).height(80).borderWidth(2).borderColor(Color.Red) + }, (day: string) => day) + } + .layoutDirection(GridDirection.RowReverse) + + .attributeModifier(this.modifier) + } + .width('90%').margin({ top: 5, left: 5, right: 5 }) + .align(Alignment.Center) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0230.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0230.ets new file mode 100644 index 0000000000000000000000000000000000000000..4c2e52a0bc387598c4a692e36fb60ac7d099fac0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0230.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 { GridModifier } from '@ohos.arkui.modifier' +@Entry +@Component +struct UIComponentGridModifier0230 { + @State numbers: string[] = []; + @State modifier: GridModifier = new GridModifier().height(300).columnsGap(10).rowsGap(10).backgroundColor(0xFAEEE0).maxCount(6).minCount(2); + aboutToAppear() { + for (let i = 1; i <= 30; i++) { + this.numbers.push(i + ''); + } + } + build() { + Scroll() { + Column({ space: 5 }) { + Grid() { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day).fontSize(16).backgroundColor(0xF9CF93) + }.width(40).height(80).borderWidth(2).borderColor(Color.Red).selected(false) + }, (day: string) => day) + }.height(300) + .columnsGap(10) + .rowsGap(10) + .backgroundColor(0xFAEEE0) + .multiSelectable(false) + } + .width('90%').margin({ top: 5, left: 5, right: 5 }) + .align(Alignment.Center) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0410.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0410.ets new file mode 100644 index 0000000000000000000000000000000000000000..4b48a198aea2d8c00cb89fa456c527173fa6aa1f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0410.ets @@ -0,0 +1,161 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT 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 { GridModifier } from '@ohos.arkui.modifier' +class BasicDataSource470 implements IDataSource { + private listeners: DataChangeListener[] = []; + private originDataArray: string[] = []; + + public totalCount(): number { + return 0; + } + + public getData(index: number): string { + return this.originDataArray[index]; + } + + registerDataChangeListener(listener: DataChangeListener): void { + if (this.listeners.indexOf(listener) < 0) { + console.info('add listener'); + this.listeners.push(listener); + } + } + + unregisterDataChangeListener(listener: DataChangeListener): void { + const pos = this.listeners.indexOf(listener); + if (pos >= 0) { + console.info('remove listener'); + this.listeners.splice(pos, 1); + } + } + + notifyDataReload(): void { + this.listeners.forEach(listener => { + listener.onDataReloaded(); + }) + } + + notifyDataAdd(index: number): void { + this.listeners.forEach(listener => { + listener.onDataAdd(index); + }) + } + + notifyDataChange(index: number): void { + this.listeners.forEach(listener => { + listener.onDataChange(index); + }) + } + + notifyDataDelete(index: number): void { + this.listeners.forEach(listener => { + listener.onDataDelete(index); + }) + } + + notifyDataMove(from: number, to: number): void { + this.listeners.forEach(listener => { + listener.onDataMove(from, to); + }) + } + + notifyDatasetChange(operations: DataOperation[]):void{ + this.listeners.forEach(listener => { + listener.onDatasetChange(operations); + }) + } +} + +class MyDataSource470 extends BasicDataSource470 { + private dataArray: string[] = []; + + public totalCount(): number { + return this.dataArray.length; + } + + public getData(index: number): string { + return this.dataArray[index]; + } + + public addData(index: number, data: string): void { + this.dataArray.splice(index, 0, data); + this.notifyDataAdd(index); + } + + public pushData(data: string): void { + this.dataArray.push(data); + this.notifyDataAdd(this.dataArray.length - 1); + } + + public deleteData(index: number): void { + this.dataArray.splice(index, 1); + this.notifyDataDelete(index); + } + + public changeData(index: number): void { + this.notifyDataChange(index); + } + + operateData():void { + const totalCount = this.dataArray.length; + const batch=5; + for (let i = totalCount; i < totalCount + batch; i++) { + this.dataArray.push(`Hello ${i}`) + } + this.notifyDataReload(); + } +} + + +@Entry +@Component +struct SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0470 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0 ; + @State modifier: GridModifier = new GridModifier() + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300); + private data: MyDataSource470 = new MyDataSource470(); + + aboutToAppear() { + for (let i = 0; i <= 29; i++) { + this.data.pushData(`${i}`); + } + } + + + build() { + Column({ space: 5 }) { + Grid(this.scroller) { + LazyForEach(this.data, (day: string) => { + GridItem() { + Text(day + 'data') + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + .columnStart(2) + .rowEnd(5) + }, (day: string) => 'day') + }.attributeModifier(this.modifier) + .columnsTemplate('1fr 1fr 2fr') + .rowsTemplate('1fr 1fr 2fr') + + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0420.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0420.ets new file mode 100644 index 0000000000000000000000000000000000000000..d62d5fcd71d9d48d54199652629e6d99ed8188f3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0420.ets @@ -0,0 +1,161 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT 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 { GridModifier } from '@ohos.arkui.modifier' +class BasicDataSource470 implements IDataSource { + private listeners: DataChangeListener[] = []; + private originDataArray: string[] = []; + + public totalCount(): number { + return 0; + } + + public getData(index: number): string { + return this.originDataArray[index]; + } + + registerDataChangeListener(listener: DataChangeListener): void { + if (this.listeners.indexOf(listener) < 0) { + console.info('add listener'); + this.listeners.push(listener); + } + } + + unregisterDataChangeListener(listener: DataChangeListener): void { + const pos = this.listeners.indexOf(listener); + if (pos >= 0) { + console.info('remove listener'); + this.listeners.splice(pos, 1); + } + } + + notifyDataReload(): void { + this.listeners.forEach(listener => { + listener.onDataReloaded(); + }) + } + + notifyDataAdd(index: number): void { + this.listeners.forEach(listener => { + listener.onDataAdd(index); + }) + } + + notifyDataChange(index: number): void { + this.listeners.forEach(listener => { + listener.onDataChange(index); + }) + } + + notifyDataDelete(index: number): void { + this.listeners.forEach(listener => { + listener.onDataDelete(index); + }) + } + + notifyDataMove(from: number, to: number): void { + this.listeners.forEach(listener => { + listener.onDataMove(from, to); + }) + } + + notifyDatasetChange(operations: DataOperation[]):void{ + this.listeners.forEach(listener => { + listener.onDatasetChange(operations); + }) + } +} + +class MyDataSource470 extends BasicDataSource470 { + private dataArray: string[] = []; + + public totalCount(): number { + return this.dataArray.length; + } + + public getData(index: number): string { + return this.dataArray[index]; + } + + public addData(index: number, data: string): void { + this.dataArray.splice(index, 0, data); + this.notifyDataAdd(index); + } + + public pushData(data: string): void { + this.dataArray.push(data); + this.notifyDataAdd(this.dataArray.length - 1); + } + + public deleteData(index: number): void { + this.dataArray.splice(index, 1); + this.notifyDataDelete(index); + } + + public changeData(index: number): void { + this.notifyDataChange(index); + } + + operateData():void { + const totalCount = this.dataArray.length; + const batch=5; + for (let i = totalCount; i < totalCount + batch; i++) { + this.dataArray.push(`Hello ${i}`) + } + this.notifyDataReload(); + } +} + + +@Entry +@Component +struct SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0470 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0 ; + @State modifier: GridModifier = new GridModifier() + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300); + private data: MyDataSource470 = new MyDataSource470(); + + aboutToAppear() { + for (let i = 0; i <= 29; i++) { + this.data.pushData(`${i}`); + } + } + + + build() { + Column({ space: 5 }) { + Grid(this.scroller) { + LazyForEach(this.data, (day: string) => { + GridItem() { + Text(day + 'data') + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + .columnStart(4) + .rowEnd(3) + }, (day: string) => 'day') + }.attributeModifier(this.modifier) + .columnsTemplate('1fr 1fr 2fr') + .rowsTemplate('1fr 1fr 2fr') + + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0450.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0450.ets new file mode 100644 index 0000000000000000000000000000000000000000..ace1dc4fae51dfd23d52c9c73cb5d9b5b52a9d18 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0450.ets @@ -0,0 +1,161 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT 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 { GridModifier } from '@ohos.arkui.modifier' +class BasicDataSource470 implements IDataSource { + private listeners: DataChangeListener[] = []; + private originDataArray: string[] = []; + + public totalCount(): number { + return 0; + } + + public getData(index: number): string { + return this.originDataArray[index]; + } + + registerDataChangeListener(listener: DataChangeListener): void { + if (this.listeners.indexOf(listener) < 0) { + console.info('add listener'); + this.listeners.push(listener); + } + } + + unregisterDataChangeListener(listener: DataChangeListener): void { + const pos = this.listeners.indexOf(listener); + if (pos >= 0) { + console.info('remove listener'); + this.listeners.splice(pos, 1); + } + } + + notifyDataReload(): void { + this.listeners.forEach(listener => { + listener.onDataReloaded(); + }) + } + + notifyDataAdd(index: number): void { + this.listeners.forEach(listener => { + listener.onDataAdd(index); + }) + } + + notifyDataChange(index: number): void { + this.listeners.forEach(listener => { + listener.onDataChange(index); + }) + } + + notifyDataDelete(index: number): void { + this.listeners.forEach(listener => { + listener.onDataDelete(index); + }) + } + + notifyDataMove(from: number, to: number): void { + this.listeners.forEach(listener => { + listener.onDataMove(from, to); + }) + } + + notifyDatasetChange(operations: DataOperation[]):void{ + this.listeners.forEach(listener => { + listener.onDatasetChange(operations); + }) + } +} + +class MyDataSource470 extends BasicDataSource470 { + private dataArray: string[] = []; + + public totalCount(): number { + return this.dataArray.length; + } + + public getData(index: number): string { + return this.dataArray[index]; + } + + public addData(index: number, data: string): void { + this.dataArray.splice(index, 0, data); + this.notifyDataAdd(index); + } + + public pushData(data: string): void { + this.dataArray.push(data); + this.notifyDataAdd(this.dataArray.length - 1); + } + + public deleteData(index: number): void { + this.dataArray.splice(index, 1); + this.notifyDataDelete(index); + } + + public changeData(index: number): void { + this.notifyDataChange(index); + } + + operateData():void { + const totalCount = this.dataArray.length; + const batch=5; + for (let i = totalCount; i < totalCount + batch; i++) { + this.dataArray.push(`Hello ${i}`) + } + this.notifyDataReload(); + } +} + + +@Entry +@Component +struct SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0470 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0 ; + @State modifier: GridModifier = new GridModifier() + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300); + private data: MyDataSource470 = new MyDataSource470(); + + aboutToAppear() { + for (let i = 0; i <= 29; i++) { + this.data.pushData(`${i}`); + } + } + + + build() { + Column({ space: 5 }) { + Grid(this.scroller) { + LazyForEach(this.data, (day: string) => { + GridItem() { + Text(day + 'data') + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + .columnStart(-2) + .rowEnd(-5) + }, (day: string) => 'day') + }.attributeModifier(this.modifier) + .columnsTemplate('1fr 1fr 2fr') + .rowsTemplate('1fr 1fr 2fr') + + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0460.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0460.ets new file mode 100644 index 0000000000000000000000000000000000000000..51821b839919c1f8316fb1d4c40e0943127182ce --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0460.ets @@ -0,0 +1,164 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT 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 { GridModifier } from '@ohos.arkui.modifier' +class BasicDataSource460 implements IDataSource { + private listeners: DataChangeListener[] = []; + private originDataArray: string[] = []; + + public totalCount(): number { + return 0; + } + + public getData(index: number): string { + return this.originDataArray[index]; + } + + registerDataChangeListener(listener: DataChangeListener): void { + if (this.listeners.indexOf(listener) < 0) { + console.info('add listener'); + this.listeners.push(listener); + } + } + + unregisterDataChangeListener(listener: DataChangeListener): void { + const pos = this.listeners.indexOf(listener); + if (pos >= 0) { + console.info('remove listener'); + this.listeners.splice(pos, 1); + } + } + + notifyDataReload(): void { + this.listeners.forEach(listener => { + listener.onDataReloaded(); + }) + } + + notifyDataAdd(index: number): void { + this.listeners.forEach(listener => { + listener.onDataAdd(index); + }) + } + + notifyDataChange(index: number): void { + this.listeners.forEach(listener => { + listener.onDataChange(index); + }) + } + + notifyDataDelete(index: number): void { + this.listeners.forEach(listener => { + listener.onDataDelete(index); + }) + } + + notifyDataMove(from: number, to: number): void { + this.listeners.forEach(listener => { + listener.onDataMove(from, to); + }) + } + + notifyDatasetChange(operations: DataOperation[]):void{ + this.listeners.forEach(listener => { + listener.onDatasetChange(operations); + }) + } +} + +class MyDataSource2 extends BasicDataSource460 { + private dataArray: string[] = []; + + public totalCount(): number { + return this.dataArray.length; + } + + public getData(index: number): string { + return this.dataArray[index]; + } + + public addData(index: number, data: string): void { + this.dataArray.splice(index, 0, data); + this.notifyDataAdd(index); + } + + public pushData(data: string): void { + this.dataArray.push(data); + this.notifyDataAdd(this.dataArray.length - 1); + } + + public deleteData(index: number): void { + this.dataArray.splice(index, 1); + this.notifyDataDelete(index); + } + + public changeData(index: number): void { + this.notifyDataChange(index); + } + + operateData():void { + const totalCount = this.dataArray.length; + const batch=5; + for (let i = totalCount; i < totalCount + batch; i++) { + this.dataArray.push(`Hello ${i}`) + } + this.notifyDataReload(); + } +} + + +@Entry +@Component +struct SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0460 { + @State numbers: String[] = ['0', '1', '2', '3', '4'] + scroller: Scroller = new Scroller() + @State gridPosition: number = 0 //0代表滚动到grid顶部,1代表中间值,2代表滚动到grid底部。 + @State modifier: GridModifier = new GridModifier().columnsTemplate('1fr 1fr 2fr') + .rowsTemplate('1fr 1fr 2fr') + .friction(0.6) + .enableScrollInteraction(true) + .supportAnimation(false) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + + private data: MyDataSource2 = new MyDataSource2(); + + aboutToAppear() { + for (let i = 0; i <= 29; i++) { + this.data.pushData(`${i}`); + } + } + + + build() { + Column({ space: 5 }) { + Grid(this.scroller) { + LazyForEach(this.data, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + }.columnStart(3) + }, (day: string) => 'day') + } + .attributeModifier(this.modifier) + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0470.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0470.ets new file mode 100644 index 0000000000000000000000000000000000000000..e26c900df695c000295865902398c5247870489c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0470.ets @@ -0,0 +1,162 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT 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 { GridModifier } from '@ohos.arkui.modifier' +class BasicDataSource470 implements IDataSource { + private listeners: DataChangeListener[] = []; + private originDataArray: string[] = []; + + public totalCount(): number { + return 0; + } + + public getData(index: number): string { + return this.originDataArray[index]; + } + + registerDataChangeListener(listener: DataChangeListener): void { + if (this.listeners.indexOf(listener) < 0) { + console.info('add listener'); + this.listeners.push(listener); + } + } + + unregisterDataChangeListener(listener: DataChangeListener): void { + const pos = this.listeners.indexOf(listener); + if (pos >= 0) { + console.info('remove listener'); + this.listeners.splice(pos, 1); + } + } + + notifyDataReload(): void { + this.listeners.forEach(listener => { + listener.onDataReloaded(); + }) + } + + notifyDataAdd(index: number): void { + this.listeners.forEach(listener => { + listener.onDataAdd(index); + }) + } + + notifyDataChange(index: number): void { + this.listeners.forEach(listener => { + listener.onDataChange(index); + }) + } + + notifyDataDelete(index: number): void { + this.listeners.forEach(listener => { + listener.onDataDelete(index); + }) + } + + notifyDataMove(from: number, to: number): void { + this.listeners.forEach(listener => { + listener.onDataMove(from, to); + }) + } + + notifyDatasetChange(operations: DataOperation[]):void{ + this.listeners.forEach(listener => { + listener.onDatasetChange(operations); + }) + } +} + +class MyDataSource470 extends BasicDataSource470 { + private dataArray: string[] = []; + + public totalCount(): number { + return this.dataArray.length; + } + + public getData(index: number): string { + return this.dataArray[index]; + } + + public addData(index: number, data: string): void { + this.dataArray.splice(index, 0, data); + this.notifyDataAdd(index); + } + + public pushData(data: string): void { + this.dataArray.push(data); + this.notifyDataAdd(this.dataArray.length - 1); + } + + public deleteData(index: number): void { + this.dataArray.splice(index, 1); + this.notifyDataDelete(index); + } + + public changeData(index: number): void { + this.notifyDataChange(index); + } + + operateData():void { + const totalCount = this.dataArray.length; + const batch=5; + for (let i = totalCount; i < totalCount + batch; i++) { + this.dataArray.push(`Hello ${i}`) + } + this.notifyDataReload(); + } +} + + +@Entry +@Component +struct SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0470 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0 ; + @State modifier: GridModifier = new GridModifier().columnsTemplate('1fr 1fr 2fr') + .rowsTemplate('1fr 1fr 2fr') + .friction(0.6) + .enableScrollInteraction(true) + .supportAnimation(false) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300); + private data: MyDataSource470 = new MyDataSource470(); + + aboutToAppear() { + for (let i = 0; i <= 29; i++) { + this.data.pushData(`${i}`); + } + } + + + build() { + Column({ space: 5 }) { + Grid(this.scroller) { + LazyForEach(this.data, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + }.columnStart(3) + }, (day: string) => 'day') + }.attributeModifier(this.modifier) + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0100_565.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0100_565.ets new file mode 100644 index 0000000000000000000000000000000000000000..1185f41776eece03f96a908512813c5710053d15 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0100_565.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 UIComponentListandgridGridInterface_0100_565 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0 ; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + 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) + } + .columnsTemplate("repeat(auto-fit,90px)") + .margin(20) + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0120_874.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0120_874.ets new file mode 100644 index 0000000000000000000000000000000000000000..842e6ce5996207c2c4b28491d0c63fdbf7e18d94 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0120_874.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 UIComponentListandgridGridInterface_0120_874 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0 ; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + 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) + } + .constraintSize({ maxWidth: 200 }) + .columnsTemplate("repeat(auto-fit,90px)") + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0130_440.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0130_440.ets new file mode 100644 index 0000000000000000000000000000000000000000..9d673c4a04780397aee1c6b361c05e610310c907 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0130_440.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 UIComponentListandgridGridInterface_0130_440 { + @State numbers: String[] = ['0', '1', '2', '3', '4'] + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0 ; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + 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) + } + .constraintSize({ maxWidth: 200 }) + }, (day: string) => day) + }, (day: string) => day) + } + .columnsTemplate("repeat(auto-fit,90px)") + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0190_620.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0190_620.ets new file mode 100644 index 0000000000000000000000000000000000000000..5a171bd6f043e3bca65920a39315c833cfa619fe --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0190_620.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 UIComponentListandgridGridInterface_0190_620 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + @State numbers1: String[] = ['0', '1']; + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0 ; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.numbers1, (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) + } + .columnsTemplate('1fr 1fr 1fr 1fr 1fr') + .rowsTemplate('1fr 1fr 1fr 1fr 1fr') + .columnsGap(10) + .friction(0.6) + .enableScrollInteraction(true) + .supportAnimation(false) + .multiSelectable(false) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.Auto) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .onScrollIndex((first: number, last: number) => { + console.info(first.toString()) + console.info(last.toString()) + }) + .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 } + }) //只适用于当前示例代码数据源,如果数据源有变化,则需要修改该部分代码,或者删掉此属性 + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + console.info(scrollOffset.toString()) + console.info(scrollState.toString()) + }) + .onScrollStart(() => { + console.info("XXX" + "Grid onScrollStart") + }) + .onScrollStop(() => { + console.info("XXX" + "Grid onScrollStop") + }) + .onReachStart(() => { + this.gridPosition = 0 + console.info("XXX" + "Grid onReachStart") + }) + .onReachEnd(() => { + this.gridPosition = 2 + console.info("XXX" + "Grid onReachEnd") + }) + + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0200_308.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0200_308.ets new file mode 100644 index 0000000000000000000000000000000000000000..fc6985688d0fc0e135cb132e5076081675831a5e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0200_308.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 UIComponentListandgridGridInterface_0200_308 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + @State numbers1: String[] = ['0', '1']; + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0 ; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.numbers1, (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) + } + .columnsTemplate('1fr 1fr 1fr 1fr 1fr') + .rowsTemplate('1fr 1fr 1fr 1fr 1fr') + .columnsGap(10) + .friction(0.6) + .enableScrollInteraction(true) + .supportAnimation(false) + .multiSelectable(false) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.Off) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .onScrollIndex((first: number, last: number) => { + console.info(first.toString()); + console.info(last.toString()); + }) + + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0210_300.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0210_300.ets new file mode 100644 index 0000000000000000000000000000000000000000..38a1a49bb8244a4b3008ae02eaf8f23d1c791faa --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0210_300.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 UIComponentListandgridGridInterface_0210_300 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + @State numbers1: String[] = ['0', '1']; + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.numbers1, (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) + } + .columnsTemplate('1fr 1fr 1fr 1fr 1fr') + .rowsTemplate('1fr 1fr 1fr 1fr 1fr') + .columnsGap(10) + .friction(0.6) + .enableScrollInteraction(true) + .supportAnimation(false) + .multiSelectable(false) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .onScrollIndex((first: number, last: number) => { + console.info(first.toString()); + console.info(last.toString()); + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + console.info(scrollOffset.toString()); + console.info(scrollState.toString()); + }) + .onScrollStart(() => { + console.info("XXX" + "Grid onScrollStart"); + }) + .onScrollStop(() => { + console.info("XXX" + "Grid onScrollStop"); + }) + .onReachStart(() => { + this.gridPosition = 0; + console.info("XXX" + "Grid onReachStart"); + }) + .onReachEnd(() => { + this.gridPosition = 2; + console.info("XXX" + "Grid onReachEnd"); + }) + + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0230_102.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0230_102.ets new file mode 100644 index 0000000000000000000000000000000000000000..4c0d21b785627d6fa4d266aa6591915400085384 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0230_102.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 UIComponentListandgridGridInterface_0230_102 { + @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(-1) + .width(300) + .height(300) + + Text('GridLayoutOptions的使用:onGetRectByIndex。').fontColor(0xCCCCCC).fontSize(9).width('90%') + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0240_264.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0240_264.ets new file mode 100644 index 0000000000000000000000000000000000000000..c64cf2fd88e200be7fa63828ab6ed171ef5249d0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0240_264.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 UIComponentListandgridGridInterface_0240_264 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0 ; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + 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) + } + .rowsTemplate("repeat(auto-fit,90px)") + .padding(20) + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0240_486.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0240_486.ets new file mode 100644 index 0000000000000000000000000000000000000000..9f45717a2a8991bfebdc77e660191856cdd216ed --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0240_486.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 UIComponentListandgridGridInterface_0240_486 { + @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(0) + .width(300) + .height(300) + + Text('GridLayoutOptions的使用:onGetRectByIndex。').fontColor(0xCCCCCC).fontSize(9).width('90%') + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0250_323.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0250_323.ets new file mode 100644 index 0000000000000000000000000000000000000000..266df2e872c43d7b228c05efd29d38e0acf3fd71 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0250_323.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 UIComponentListandgridGridInterface_0250_323 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0 ; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + 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) + } + .rowsTemplate("repeat(auto-fit,90px)") + .margin(20) + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0250_798.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0250_798.ets new file mode 100644 index 0000000000000000000000000000000000000000..57d4d1da50fcaa20eb0af8e1d0098df5011ff8fe --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0250_798.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 UIComponentListandgridGridInterface_0250_798 { + @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(2) + .width(300) + .height(300) + + Text('GridLayoutOptions的使用:onGetRectByIndex。').fontColor(0xCCCCCC).fontSize(9).width('90%') + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0260_891.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0260_891.ets new file mode 100644 index 0000000000000000000000000000000000000000..65043c58332f7715f6a18741fb224518b4a5b9a0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0260_891.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 UIComponentListandgridGridInterface_0260_891 { + @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') + .rowsGap(-1) + .width(300) + .height(300) + + Text('GridLayoutOptions的使用:onGetRectByIndex。').fontColor(0xCCCCCC).fontSize(9).width('90%') + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0270_110.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0270_110.ets new file mode 100644 index 0000000000000000000000000000000000000000..a409ef84b492f75a3b76a62a51583b8b49f45bf3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0270_110.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 UIComponentListandgridGridInterface_0270_110 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0 ; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + 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) + } + .columnsTemplate('1fr 1fr 1fr 1fr 1fr') + .columnsGap(10) + .rowsGap(10) + .friction(0.6) + .enableScrollInteraction(true) + .supportAnimation(false) + .multiSelectable(false) + .edgeEffect(EdgeEffect.Spring) + .scrollBarWidth(0) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .onScrollIndex((first: number, last: number) => { + console.info(first.toString()); + console.info(last.toString()); + }) + }.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/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0270_291.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0270_291.ets new file mode 100644 index 0000000000000000000000000000000000000000..f7bfabaa4bf027663e456525bb14f0307f30bc37 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0270_291.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 UIComponentListandgridGridInterface_0270_291 { + @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') + .rowsGap(0) + .width(300) + .height(300) + + Text('GridLayoutOptions的使用:onGetRectByIndex。').fontColor(0xCCCCCC).fontSize(9).width('90%') + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0270_967.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0270_967.ets new file mode 100644 index 0000000000000000000000000000000000000000..dabc25bf7cd643a5d8fa68ad1c1a9df5b5f3ca54 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0270_967.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 UIComponentListandgridGridInterface_0270_967 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0 ; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + 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) + } + .constraintSize({ maxWidth: 200 }) + .rowsTemplate("repeat(auto-fit,90px)") + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0280_006.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0280_006.ets new file mode 100644 index 0000000000000000000000000000000000000000..fd025fc175a43690dda675f94fcfe70130f22859 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0280_006.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 UIComponentListandgridGridInterface_0280_006 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0 ; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + 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) + } + .constraintSize({ maxWidth: 200 }) + }, (day: string) => day) + }, (day: string) => day) + } + .rowsTemplate("repeat(auto-fit,90px)") + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0280_218.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0280_218.ets new file mode 100644 index 0000000000000000000000000000000000000000..0640473a18db9f2f1011a74f2d65049daf233f63 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0280_218.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 UIComponentListandgridGridInterface_0280_218 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0 ; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + 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) + } + .columnsTemplate('1fr 1fr 1fr 1fr 1fr') + .columnsGap(10) + .rowsGap(10) + .friction(0.6) + .enableScrollInteraction(true) + .supportAnimation(false) + .multiSelectable(false) + .edgeEffect(EdgeEffect.Spring) + .scrollBarWidth(-5) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .onScrollIndex((first: number, last: number) => { + console.info(first.toString()); + console.info(last.toString()); + }) + }.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/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0290_722.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0290_722.ets new file mode 100644 index 0000000000000000000000000000000000000000..04f1f4ff8e5e4f3c35107307a4e53ac957a8fb26 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0290_722.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 UIComponentListandgridGridInterface_0290_722 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + 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) + } + .columnsTemplate('1fr 1fr 1fr 1fr 1fr') + .columnsGap(10) + .rowsGap(10) + .friction(0.6) + .enableScrollInteraction(true) + .supportAnimation(false) + .multiSelectable(false) + .edgeEffect(EdgeEffect.Spring) + .scrollBarWidth(500) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .onScrollIndex((first: number, last: number) => { + console.info(first.toString()); + console.info(last.toString()); + }) + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0300_345.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0300_345.ets new file mode 100644 index 0000000000000000000000000000000000000000..46a9594f4eeebc3750152915b12e7a2f81f333c7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0300_345.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 UIComponentListandgridGridInterface_0300_345 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0 ; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + 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) + } + .columnsTemplate('1fr 1fr 1fr 1fr 1fr') + .columnsGap(10) + .rowsGap(10) + .friction(0.6) + .enableScrollInteraction(true) + .supportAnimation(false) + .multiSelectable(false) + .edgeEffect(EdgeEffect.Spring) + .scrollBarWidth(undefined) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .onScrollIndex((first: number, last: number) => { + console.info(first.toString()); + console.info(last.toString()); + }) + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0420_773.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0420_773.ets new file mode 100644 index 0000000000000000000000000000000000000000..0a73239462e8ff47e5aea7b23ba7312ab06e0014 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0420_773.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 UIComponentListandgridGridInterface_0420_773 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + 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) + } + .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) + .scrollBarWidth(0) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .onScrollIndex((first: number, last: number) => { + console.info(first.toString()); + console.info(last.toString()); + }) + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0430_891.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0430_891.ets new file mode 100644 index 0000000000000000000000000000000000000000..46db2564c75cb71190853a30acd171a70acc5dd0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0430_891.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 UIComponentListandgridGridInterface_0430_891 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0 ; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + 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) + } + .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) + .scrollBarWidth(1) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .onScrollIndex((first: number, last: number) => { + console.info(first.toString()); + console.info(last.toString()); + }) + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0440_612.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0440_612.ets new file mode 100644 index 0000000000000000000000000000000000000000..efb5d0903474dfb52645afff2e9cfbe254187fcd --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0440_612.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 UIComponentListandgridGridInterface_0440_612 { + @State numbers: String[] = ['0', '1', '2', '3', '4'] + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + 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) + } + .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) + .scrollBarWidth(-2) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .onScrollIndex((first: number, last: number) => { + console.info(first.toString()); + console.info(last.toString()); + }) + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0450_917.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0450_917.ets new file mode 100644 index 0000000000000000000000000000000000000000..32f627d9aafe44126519b7dd3aba9d99b5420a15 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0450_917.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 UIComponentListandgridGridInterface_0450_917 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + 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) + } + .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) + .scrollBarWidth('20px') + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .onScrollIndex((first: number, last: number) => { + console.info(first.toString()); + console.info(last.toString()); + }) + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0460_322.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0460_322.ets new file mode 100644 index 0000000000000000000000000000000000000000..43d75516a1ec0bdc578a3959b76b11bf56b6dfbc --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0460_322.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 UIComponentListandgridGridInterface_0460_322 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0 ; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + 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) + } + .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) + .scrollBarWidth('90%') + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .onScrollIndex((first: number, last: number) => { + console.info(first.toString()); + console.info(last.toString()); + }) + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0470_052.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0470_052.ets new file mode 100644 index 0000000000000000000000000000000000000000..732443e302fb9df8397e151985df884ae0efeb3d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0470_052.ets @@ -0,0 +1,82 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridGridInterface_0470_052 { + @State numbers: String[] = ['0', '1', '2', '3', '4'] + scroller: Scroller = new Scroller() + @State gridPosition: number = 0 //0代表滚动到grid顶部,1代表中间值,2代表滚动到grid底部。 + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + 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) + } + .columnsTemplate('1fr 1fr 2fr') + .columnsGap(10) + .rowsGap(10) + .friction(0.6) + .enableScrollInteraction(true) + .supportAnimation(false) + .multiSelectable(false) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(0xff0000) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .onScrollIndex((first: number, last: number) => { + console.info(first.toString()) + console.info(last.toString()) + }) + .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 } + }) //只适用于当前示例代码数据源,如果数据源有变化,则需要修改该部分代码,或者删掉此属性 + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + console.info(scrollOffset.toString()) + console.info(scrollState.toString()) + }) + .onScrollStart(() => { + console.info("XXX" + "Grid onScrollStart") + }) + .onScrollStop(() => { + console.info("XXX" + "Grid onScrollStop") + }) + .onReachStart(() => { + this.gridPosition = 0 + console.info("XXX" + "Grid onReachStart") + }) + .onReachEnd(() => { + this.gridPosition = 2 + console.info("XXX" + "Grid onReachEnd") + }) + + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0480_955.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0480_955.ets new file mode 100644 index 0000000000000000000000000000000000000000..aa854e53f4bcaa7fa099412fab9a23e485e67e47 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0480_955.ets @@ -0,0 +1,82 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridGridInterface_0480_955 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + 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) + } + .columnsTemplate('1fr 1fr 2fr') + .columnsGap(10) + .rowsGap(10) + .friction(0.6) + .enableScrollInteraction(true) + .supportAnimation(false) + .multiSelectable(false) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor('#FF0000') + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .onScrollIndex((first: number, last: number) => { + console.info(first.toString()) + console.info(last.toString()) + }) + .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 }; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + console.info(scrollOffset.toString()); + console.info(scrollState.toString()); + }) + .onScrollStart(() => { + console.info("XXX" + "Grid onScrollStart"); + }) + .onScrollStop(() => {; + console.info("XXX" + "Grid onScrollStop"); + }) + .onReachStart(() => { + this.gridPosition = 0; + console.info("XXX" + "Grid onReachStart"); + }) + .onReachEnd(() => { + this.gridPosition = 2; + console.info("XXX" + "Grid onReachEnd"); + }) + + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0840_624.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0840_624.ets new file mode 100644 index 0000000000000000000000000000000000000000..cb1616f7669ccc045b124dd6921286771592130f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0840_624.ets @@ -0,0 +1,195 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT 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 BasicDataSource implements IDataSource { + private listeners: DataChangeListener[] = []; + private originDataArray: string[] = []; + + public totalCount(): number { + return 0; + } + + public getData(index: number): string { + return this.originDataArray[index]; + } + + registerDataChangeListener(listener: DataChangeListener): void { + if (this.listeners.indexOf(listener) < 0) { + console.info('add listener'); + this.listeners.push(listener); + } + } + + unregisterDataChangeListener(listener: DataChangeListener): void { + const pos = this.listeners.indexOf(listener); + if (pos >= 0) { + console.info('remove listener'); + this.listeners.splice(pos, 1); + } + } + + notifyDataReload(): void { + this.listeners.forEach(listener => { + listener.onDataReloaded(); + }) + } + + notifyDataAdd(index: number): void { + this.listeners.forEach(listener => { + listener.onDataAdd(index); + }) + } + + notifyDataChange(index: number): void { + this.listeners.forEach(listener => { + listener.onDataChange(index); + }) + } + + notifyDataDelete(index: number): void { + this.listeners.forEach(listener => { + listener.onDataDelete(index); + }) + } + + notifyDataMove(from: number, to: number): void { + this.listeners.forEach(listener => { + listener.onDataMove(from, to); + }) + } + + notifyDatasetChange(operations: DataOperation[]):void{ + this.listeners.forEach(listener => { + listener.onDatasetChange(operations); + }) + } +} + +class MyDataSource extends BasicDataSource { + private dataArray: string[] = []; + + public totalCount(): number { + return this.dataArray.length; + } + + public getData(index: number): string { + return this.dataArray[index]; + } + + public addData(index: number, data: string): void { + this.dataArray.splice(index, 0, data); + this.notifyDataAdd(index); + } + + public pushData(data: string): void { + this.dataArray.push(data); + this.notifyDataAdd(this.dataArray.length - 1); + } + + public deleteData(index: number): void { + this.dataArray.splice(index, 1); + this.notifyDataDelete(index); + } + + public changeData(index: number): void { + this.notifyDataChange(index); + } + + operateData():void { + const totalCount = this.dataArray.length; + const batch=5; + for (let i = totalCount; i < totalCount + batch; i++) { + this.dataArray.push(`Hello ${i}`) + } + this.notifyDataReload(); + } +} + + +@Entry +@Component +struct UIComponentListandgridGridInterface_0840_624 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0 ; + private data: MyDataSource = new MyDataSource(); + + aboutToAppear() { + for (let i = 0; i <= 29; i++) { + this.data.pushData(`${i}`); + } + } + + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + LazyForEach(this.data, (day: string) => { + LazyForEach(this.data, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .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.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .onScrollIndex((first: number, last: number) => { + console.info(first.toString()) + console.info(last.toString()) + }) + .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 }; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + console.info(scrollOffset.toString()); + console.info(scrollState.toString()); + }) + .onScrollStart(() => { + console.info("XXX" + "Grid onScrollStart"); + }) + .onScrollStop(() => { + console.info("XXX" + "Grid onScrollStop"); + }) + .onReachStart(() => { + this.gridPosition = 0; + console.info("XXX" + "Grid onReachStart"); + }) + .onReachEnd(() => { + this.gridPosition = 2; + console.info("XXX" + "Grid onReachEnd"); + }) + + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0850_504.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0850_504.ets new file mode 100644 index 0000000000000000000000000000000000000000..0214c64b56139178d19cc1f172be1840a0079e6e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0850_504.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 UIComponentListandgridGridInterface_0850_504 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + 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) + } + .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('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .onScrollIndex((first: number, last: number) => { + console.info(first.toString()); + console.info(last.toString()); + }) + .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 }; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + console.info(scrollOffset.toString()); + console.info(scrollState.toString()); + }) + .onScrollStart(() => { + console.info("XXX" + "Grid onScrollStart"); + }) + .onScrollStop(() => { + console.info("XXX" + "Grid onScrollStop"); + }) + .onReachStart(() => { + this.gridPosition = 0; + console.info("XXX" + "Grid onReachStart"); + }) + .onReachEnd(() => { + this.gridPosition = 2; + console.info("XXX" + "Grid onReachEnd"); + }) + + + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_090_321.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_090_321.ets new file mode 100644 index 0000000000000000000000000000000000000000..ca82ffc338effc97b588fff2651614ac52f7a0c4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_090_321.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 UIComponentListandgridGridInterface_090_321 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0 ; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + 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) + } + .columnsTemplate("repeat(auto-fit,90px)") + .padding(20) + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier230.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier230.ets new file mode 100644 index 0000000000000000000000000000000000000000..8bd665a9064455510d6ed940867ba057d178fb06 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier230.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 { GridModifier, ListModifier } from '@ohos.arkui.modifier'; +@Entry +@Component +struct UIComponentListandgridModifier230 { + @State arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + @State scrollSnapAlign: ScrollSnapAlign = ScrollSnapAlign.START; + @State modifier: ListModifier = new ListModifier().scrollSnapAlign(ScrollSnapAlign.NONE); + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Column() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number, index?: number) => { + ListItem() { + Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) { + Text('' + item) + .width('100%') + .height(80) + .fontSize(20) + .textAlign(TextAlign.Center) + .borderRadius(10) + .backgroundColor(0xFFFFFF) + .flexShrink(1) + } + } + }, (item: string) => item) + }.width('90%') + .height('90%') + .friction(0.6) + .attributeModifier(this.modifier) + Button('edit list') + .id('UIComponentListandgridModifier230') + .onClick(() => { + this.modifier = new ListModifier().scrollSnapAlign(this.scrollSnapAlign); + }) + }.width('100%') + + + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding({ top: 5 }) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier40.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier40.ets new file mode 100644 index 0000000000000000000000000000000000000000..f85a79e1b333a2239ae55d193c121ced9b18907d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier40.ets @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { GridModifier, ListItemModifier, ListModifier } from '@ohos.arkui.modifier'; +@Entry +@Component +struct UIComponentListandgridModifier40 { + @State arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + @State modifier: ListItemModifier = new ListItemModifier().selectable(false); + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Column() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number, index?: number) => { + ListItem() { + Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) { + Text('' + item) + .width('100%') + .height(80) + .fontSize(20) + .textAlign(TextAlign.Center) + .borderRadius(10) + .backgroundColor(0xFFFFFF) + .flexShrink(1) + } + } + .selectable(true) + .attributeModifier(this.modifier) + }, (item: string) => item) + }.width('90%') + .height('90%') + .friction(0.6) + .contentStartOffset(10) + }.width('100%') + + + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding({ top: 5 }) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier470.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier470.ets new file mode 100644 index 0000000000000000000000000000000000000000..b48ed8cec45a0ddf3967836da2386c4f590af5e4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier470.ets @@ -0,0 +1,50 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { GridModifier, ListModifier } from '@ohos.arkui.modifier'; +@Entry +@Component +struct UIComponentListandgridModifier470 { + @State arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + @State modifier: ListModifier = new ListModifier().cachedCount(-1); + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Column() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number, index?: number) => { + ListItem() { + Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) { + Text('' + item) + .width('100%') + .height(80) + .fontSize(20) + .textAlign(TextAlign.Center) + .borderRadius(10) + .backgroundColor(0xFFFFFF) + .flexShrink(1) + } + } + }, (item: string) => item) + }.width('90%') + .height('90%') + .friction(0.6) + .attributeModifier(this.modifier) + }.width('100%') + + + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding({ top: 5 }) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier480.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier480.ets new file mode 100644 index 0000000000000000000000000000000000000000..f075bbeaa5615dc125669b33460f5b5f7160e33d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier480.ets @@ -0,0 +1,50 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { GridModifier, ListModifier } from '@ohos.arkui.modifier'; +@Entry +@Component +struct UIComponentListandgridModifier480 { + @State arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + @State modifier: ListModifier = new ListModifier().cachedCount(2); + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Column() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number, index?: number) => { + ListItem() { + Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) { + Text('' + item) + .width('100%') + .height(80) + .fontSize(20) + .textAlign(TextAlign.Center) + .borderRadius(10) + .backgroundColor(0xFFFFFF) + .flexShrink(1) + } + } + }, (item: string) => item) + }.width('90%') + .height('90%') + .friction(0.6) + .attributeModifier(this.modifier) + }.width('100%') + + + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding({ top: 5 }) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier520.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier520.ets new file mode 100644 index 0000000000000000000000000000000000000000..ae5a4974436c268501f765c4f4cb44cbc17bcfe8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier520.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 { GridModifier, ListModifier } from '@ohos.arkui.modifier'; +@Entry +@Component +struct UIComponentListandgridModifier520 { + @State arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + @State cachedCount: number = 2; + @State modifier: ListModifier = new ListModifier().cachedCount(1); + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Column() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number, index?: number) => { + ListItem() { + Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) { + Text('' + item) + .width('100%') + .height(80) + .fontSize(20) + .textAlign(TextAlign.Center) + .borderRadius(10) + .backgroundColor(0xFFFFFF) + .flexShrink(1) + } + } + }, (item: string) => item) + }.width('90%') + .height('90%') + .friction(0.6) + .attributeModifier(this.modifier) + Button('edit list') + .id('UIComponentListandgridModifier520') + .onClick(() => { + this.modifier = new ListModifier().cachedCount(this.cachedCount); + }) + }.width('100%') + + + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding({ top: 5 }) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier760.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier760.ets new file mode 100644 index 0000000000000000000000000000000000000000..3c600b85dbf7eeba912557eb95e32a6583d04583 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier760.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 { GridModifier, ListModifier } from '@ohos.arkui.modifier'; +@Entry +@Component +struct UIComponentListandgridModifier760 { + @State arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + @State listDirection : Axis = Axis.Vertical; + @State modifier: ListModifier = new ListModifier().listDirection(Axis.Horizontal); + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Column() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number, index?: number) => { + ListItem() { + Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) { + Text('' + item) + .width('100%') + .height(80) + .fontSize(20) + .textAlign(TextAlign.Center) + .borderRadius(10) + .backgroundColor(0xFFFFFF) + .flexShrink(1) + } + } + }, (item: string) => item) + }.width('90%') + .height('90%') + .friction(0.6) + .attributeModifier(this.modifier) + Button('edit list') + .id('UIComponentListandgridModifier760') + .onClick(() => { + this.modifier = new ListModifier().listDirection(this.listDirection); + }) + }.width('100%') + + + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding({ top: 5 }) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier810.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier810.ets new file mode 100644 index 0000000000000000000000000000000000000000..d8a4ba339f122ad810266d9e3d60b7d48354a714 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier810.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 { GridModifier, ListModifier } from '@ohos.arkui.modifier'; +@Entry +@Component +struct UIComponentListandgridModifier810 { + @State arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + @State alignListItem: ListItemAlign = ListItemAlign.Start; + @State modifier: ListModifier = new ListModifier().alignListItem(ListItemAlign.Center); + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Column() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number, index?: number) => { + ListItem() { + Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) { + Text('' + item) + .width('100%') + .height(80) + .fontSize(20) + .textAlign(TextAlign.Center) + .borderRadius(10) + .backgroundColor(0xFFFFFF) + .flexShrink(1) + } + } + }, (item: string) => item) + }.width('90%') + .height('90%') + .friction(0.6) + .attributeModifier(this.modifier) + Button('edit list') + .id('UIComponentListandgridModifier810') + .onClick(() => { + this.modifier = new ListModifier().alignListItem(this.alignListItem); + }) + }.width('100%') + + + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding({ top: 5 }) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier930.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier930.ets new file mode 100644 index 0000000000000000000000000000000000000000..1d9ee558a954784ac8c467cad4902122ccd704b6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier930.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 { GridModifier, ListModifier } from '@ohos.arkui.modifier'; +@Entry +@Component +struct UIComponentListandgridModifier930 { + @State arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + @State contentEndOffset: number = 0; + @State modifier: ListModifier = new ListModifier().contentEndOffset(10); + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Column() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number, index?: number) => { + ListItem() { + Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) { + Text('' + item) + .width('100%') + .height(80) + .fontSize(20) + .textAlign(TextAlign.Center) + .borderRadius(10) + .backgroundColor(0xFFFFFF) + .flexShrink(1) + } + } + }, (item: string) => item) + }.width('90%') + .height('90%') + .friction(0.6) + .attributeModifier(this.modifier) + Button('edit list') + .id('UIComponentListandgridModifier930') + .onClick(() => { + this.modifier = new ListModifier().contentEndOffset(this.contentEndOffset); + }) + }.width('100%') + + + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding({ top: 5 }) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier980.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier980.ets new file mode 100644 index 0000000000000000000000000000000000000000..ce6392dad6ef663a3a44790fe41ea08bbc55b370 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier980.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 { GridModifier, ListModifier } from '@ohos.arkui.modifier'; +@Entry +@Component +struct UIComponentListandgridModifier980 { + @State arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + @State contentStartOffset: number = 0; + @State modifier: ListModifier = new ListModifier().contentStartOffset(10); + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Column() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number, index?: number) => { + ListItem() { + Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) { + Text('' + item) + .width('100%') + .height(80) + .fontSize(20) + .textAlign(TextAlign.Center) + .borderRadius(10) + .backgroundColor(0xFFFFFF) + .flexShrink(1) + } + } + }, (item: string) => item) + }.width('90%') + .height('90%') + .friction(0.6) + .attributeModifier(this.modifier) + Button('edit list') + .id('UIComponentListandgridModifier980') + .onClick(() => { + this.modifier = new ListModifier().contentStartOffset(this.contentStartOffset); + }) + }.width('100%') + + + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding({ top: 5 }) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll100.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll100.ets new file mode 100644 index 0000000000000000000000000000000000000000..f889409b0cc6078f442ecfd4fb307fe1ccea348a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll100.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 UIComponentListandgridXommonOnscroll100 { + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + scroller: Scroller = new Scroller(); + + build() { + Column() { + List({scroller:this.scroller, space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%').height(100).fontSize(16) + .textAlign(TextAlign.Center).borderRadius(10).backgroundColor(0xFFFFFF) + } + }, (item: string) => item) + } + .listDirection(Axis.Vertical) + .scrollBar(BarState.On) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .width('90%') + .height('80%') + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Text('willscrollstate: '+ this.willscrollstate) + Text('didscrollstate: '+ this.didscrollstate) + Button('Button') + .id('UIComponentListandgridXommonOnscroll100') + .height('5%') + .onClick(() => { + const yOffset: number = this.scroller.currentOffset().yOffset; + this.scroller.scrollTo({ xOffset: 0, yOffset: yOffset + 100 }) + }) + } + .width('100%') + .height('100%') + .backgroundColor(0xDCDCDC) + .padding({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll110.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll110.ets new file mode 100644 index 0000000000000000000000000000000000000000..df8ecb9dcf6a55604afc70f4d61e2d6857826027 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll110.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 UIComponentListandgridXommonOnscroll110 { + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + scroller: Scroller = new Scroller(); + + build() { + Column() { + List({scroller:this.scroller, space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%').height(100).fontSize(16) + .textAlign(TextAlign.Center).borderRadius(10).backgroundColor(0xFFFFFF) + } + }, (item: string) => item) + } + .listDirection(Axis.Vertical) + .scrollBar(BarState.On) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .width('90%') + .height('80%') + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Text('willscrollstate: '+ this.willscrollstate) + Text('didscrollstate: '+ this.didscrollstate) + Button('Button') + .id('UIComponentListandgridXommonOnscroll110') + .height('5%') + .onClick(() => { + this.scroller.scrollToIndex(5, true, ScrollAlign.START); + }) + } + .width('100%') + .height('100%') + .backgroundColor(0xDCDCDC) + .padding({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll120.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll120.ets new file mode 100644 index 0000000000000000000000000000000000000000..6f69cb301ad3acfb03ea237e964575b092edf782 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll120.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 UIComponentListandgridXommonOnscroll120 { + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + scroller: Scroller = new Scroller(); + + build() { + Column() { + List({scroller:this.scroller, space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%').height(100).fontSize(16) + .textAlign(TextAlign.Center).borderRadius(10).backgroundColor(0xFFFFFF) + } + }, (item: string) => item) + } + .listDirection(Axis.Vertical) + .scrollBar(BarState.On) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .width('90%') + .height('80%') + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Text('willscrollstate: '+ this.willscrollstate) + Text('didscrollstate: '+ this.didscrollstate) + Button('Button') + .id('UIComponentListandgridXommonOnscroll120') + .height('5%') + .onClick(() => { + this.scroller.scrollToIndex(5, false, ScrollAlign.START); + }) + } + .width('100%') + .height('100%') + .backgroundColor(0xDCDCDC) + .padding({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll130.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll130.ets new file mode 100644 index 0000000000000000000000000000000000000000..b7dc8808af5f9cdea591878974aec97d5ee62f00 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll130.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 UIComponentListandgridXommonOnscroll130 { + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + scroller: Scroller = new Scroller(); + + build() { + Column() { + List({scroller:this.scroller, space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%').height(100).fontSize(16) + .textAlign(TextAlign.Center).borderRadius(10).backgroundColor(0xFFFFFF) + } + }, (item: string) => item) + } + .listDirection(Axis.Vertical) + .scrollBar(BarState.On) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .width('90%') + .height('80%') + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Text('willscrollstate: '+ this.willscrollstate) + Text('didscrollstate: '+ this.didscrollstate) + Button('scroll 150') + .id('UIComponentListandgridXommonOnscroll130') + .height('5%') + .onClick(() => { + this.scroller.scrollBy(0, 150); + }) + } + .width('100%') + .height('100%') + .backgroundColor(0xDCDCDC) + .padding({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll140.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll140.ets new file mode 100644 index 0000000000000000000000000000000000000000..6cb1052adb51ae4040018a4d2b942c0701f0b55c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll140.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 UIComponentListandgridXommonOnscroll140 { + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + scroller: Scroller = new Scroller(); + + build() { + Column() { + List({scroller:this.scroller, space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%').height(100).fontSize(16) + .textAlign(TextAlign.Center).borderRadius(10).backgroundColor(0xFFFFFF) + } + }, (item: string) => item) + } + .listDirection(Axis.Vertical) + .scrollBar(BarState.On) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .width('90%') + .height('80%') + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Text('willscrollstate: '+ this.willscrollstate) + Text('didscrollstate: '+ this.didscrollstate) + Button('Button') + .id('UIComponentListandgridXommonOnscroll140') + .height('5%') + .onClick(() => { + this.scroller.scrollPage({ next: true }); + }) + } + .width('100%') + .height('100%') + .backgroundColor(0xDCDCDC) + .padding({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll150.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll150.ets new file mode 100644 index 0000000000000000000000000000000000000000..8faf2b629ab909594ae3d9ef782392a2715598aa --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll150.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 UIComponentListandgridXommonOnscroll150 { + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + scroller: Scroller = new Scroller(); + + build() { + Column() { + List({scroller:this.scroller, space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%').height(100).fontSize(16) + .textAlign(TextAlign.Center).borderRadius(10).backgroundColor(0xFFFFFF) + } + }, (item: string) => item) + } + .listDirection(Axis.Vertical) + .scrollBar(BarState.On) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .width('90%') + .height('80%') + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Text('willscrollstate: '+ this.willscrollstate) + Text('didscrollstate: '+ this.didscrollstate) + Button('Button') + .id('UIComponentListandgridXommonOnscroll150') + .height('5%') + .onClick(() => { + this.scroller.scrollEdge(Edge.End); + }) + } + .width('100%') + .height('100%') + .backgroundColor(0xDCDCDC) + .padding({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll160.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll160.ets new file mode 100644 index 0000000000000000000000000000000000000000..9afb97437568b1b24654644faba5d380ce1f307d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll160.ets @@ -0,0 +1,102 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridXommonOnscroll160 { + scroller: ListScroller = new ListScroller(); + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + private timeTable: TimeTable[] = [ + { + title: '星期一', + projects: ['语文', '数学', '英语'] + }, + { + title: '星期二', + projects: ['物理', '化学', '生物'] + }, + { + title: '星期三', + projects: ['历史', '地理', '政治'] + }, + { + title: '星期四', + projects: ['美术', '音乐', '体育'] + } + ] + + @Builder + itemHead(text: string) { + Text(text) + .fontSize(20) + .backgroundColor(0xAABBCC) + .width("100%") + .padding(10) + } + + @Builder + itemFoot(num: number) { + Text('共' + num + "节课") + .fontSize(16) + .backgroundColor(0xAABBCC) + .width("100%") + .padding(5) + } + + build() { + Column() { + List({scroller:this.scroller, space: 20 }) { + ForEach(this.timeTable, (item: TimeTable) => { + ListItemGroup({ header: this.itemHead(item.title), footer: this.itemFoot(item.projects.length) }) { + ForEach(item.projects, (project: string) => { + ListItem() { + Text(project) + .width("100%") + .height(100) + .fontSize(20) + .textAlign(TextAlign.Center) + .backgroundColor(0xFFFFFF) + } + }, (item: string) => item) + } + .divider({ strokeWidth: 1, color: Color.Blue }) // 每行之间的分界线 + }) + } + .width('90%') + .height('80%') + .sticky(StickyStyle.Header | StickyStyle.Footer) + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Text('willscrollstate: '+ this.willscrollstate) + Text('didscrollstate: '+ this.didscrollstate) + Button('Button') + .id('UIComponentListandgridXommonOnscroll160') + .height('5%') + .onClick(() => { + this.scroller.scrollToItemInGroup(1,1); + }) + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding({ top: 5 }) + } +} + +interface TimeTable { + title: string; + projects: string[]; +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll170.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll170.ets new file mode 100644 index 0000000000000000000000000000000000000000..f8e946c448daccb1ecd26402799a3c35de61248d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll170.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 UIComponentListandgridXommonOnscroll170 { + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + @State listdirection : Axis = Axis.Vertical; + scroller: Scroller = new Scroller(); + + build() { + Column() { + List({scroller:this.scroller, space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%').height(100).fontSize(16) + .textAlign(TextAlign.Center).borderRadius(10).backgroundColor(0xFFFFFF) + } + }, (item: string) => item) + } + .id('UIComponentListandgridXommonOnscroll170') + .listDirection(this.listdirection) + .scrollBar(BarState.On) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .width('90%') + .height('50%') + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Text('willscrollstate: '+ this.willscrollstate) + Text('didscrollstate: '+ this.didscrollstate) + Button('Button') + .id('UIComponentListandgridXommonOnscroll170_button') + .height('5%') + .onClick(() => { + this.listdirection = Axis.Horizontal; + }) + } + .width('100%') + .height('100%') + .backgroundColor(0xDCDCDC) + .padding({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll180.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll180.ets new file mode 100644 index 0000000000000000000000000000000000000000..7e4bc9749e8ae80090ff44404e355cb54b677a36 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll180.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 UIComponentListandgridXommonOnscroll180 { + @State arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + scroller: Scroller = new Scroller(); + + build() { + Column() { + List({scroller:this.scroller, space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%').height(100).fontSize(16) + .textAlign(TextAlign.Center).borderRadius(10).backgroundColor(0xFFFFFF) + } + }, (item: string) => item) + } + .id('UIComponentListandgridXommonOnscroll180') + .listDirection(Axis.Vertical) + .scrollBar(BarState.On) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .width('90%') + .height('80%') + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + this.arr.push(10); + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + this.arr.push(11); + }) + Text('willscrollstate: '+ this.willscrollstate) + Text('didscrollstate: '+ this.didscrollstate) + } + .width('100%') + .height('100%') + .backgroundColor(0xDCDCDC) + .padding({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll190.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll190.ets new file mode 100644 index 0000000000000000000000000000000000000000..0738cc8ce218b9a6b53be2d4cf6e73497eb3d353 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll190.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 UIComponentListandgridXommonOnscroll190 { + @State arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13]; + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + @State lan:number = 2; + scroller: Scroller = new Scroller(); + + build() { + Column() { + List({scroller:this.scroller, space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%').height(100).fontSize(16) + .textAlign(TextAlign.Center).borderRadius(10).backgroundColor(0xFFFFFF) + } + }, (item: string) => item) + } + .id('UIComponentListandgridXommonOnscroll190') + .listDirection(Axis.Vertical) + .scrollBar(BarState.On) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .width('90%') + .height('80%') + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Text('willscrollstate: '+ this.willscrollstate) + Text('didscrollstate: '+ this.didscrollstate) + } + .width('100%') + .height('100%') + .backgroundColor(0xDCDCDC) + .padding({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll200.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll200.ets new file mode 100644 index 0000000000000000000000000000000000000000..80694964120d4d416663fc71d0a4ec3e5167d170 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll200.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 UIComponentListandgridXommonOnscroll200 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + scroller: Scroller = new Scroller(); + layoutOptions1: GridLayoutOptions = { + regularSize: [1, 1], + irregularIndexes: [0, 6], + } + + layoutOptions2: GridLayoutOptions = { + regularSize: [1, 1], + irregularIndexes: [0, 7], + onGetIrregularSizeByIndex: (index: number) => { + if (index === 0) { + return [1, 5] + } + return [1, index % 6 + 1] + } + } + + build() { + Column({ space: 5 }) { + Grid(this.scroller, this.layoutOptions1) { + ForEach(this.numbers, (day: string) => { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + }.selectable(false) + }, (day: string) => day) + }, (day: string) => day) + } + .id('UIComponentListandgridXommonOnscroll200') + .columnsTemplate('1fr 1fr 1fr 1fr 1fr') + .columnsGap(10) + .rowsGap(10) + .multiSelectable(true) + .scrollBar(BarState.Off) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Text('willscrollstate: '+ this.willscrollstate) + Text('didscrollstate: '+ this.didscrollstate) + }.width('100%').margin({ top: 5 }) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll210.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll210.ets new file mode 100644 index 0000000000000000000000000000000000000000..b97822f134875370f39485e4fbedc9a8c97c0e98 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll210.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 UIComponentListandgridXommonOnscroll210 { + @State numbers: String[] = ['0', '1', '2', '3', '4'] + scroller: Scroller = new Scroller(); + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + 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('UIComponentListandgridXommonOnscroll210') + .columnsTemplate('1fr 1fr 1fr 1fr 1fr') + .columnsGap(10) + .rowsGap(10) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Text('willscrollstate: '+ this.willscrollstate) + Text('didscrollstate: '+ this.didscrollstate) + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll240.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll240.ets new file mode 100644 index 0000000000000000000000000000000000000000..8b73895327e9c374a8e78e14ab0dc563a66c934e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll240.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 UIComponentListandgridXommonOnscroll240 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + 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('UIComponentListandgridXommonOnscroll240') + .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('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .enableScrollInteraction(false) + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Text('willscrollstate: '+ this.willscrollstate) + Text('didscrollstate: '+ this.didscrollstate) + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll250.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll250.ets new file mode 100644 index 0000000000000000000000000000000000000000..2be1de83506a903959e9b020b39505c4466e5c9f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll250.ets @@ -0,0 +1,71 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridXommonOnscroll250 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + 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) + } + .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('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Button('Button') + .id('UIComponentListandgridXommonOnscroll250') + .height('5%') + .onClick(() => { + const yOffset: number = this.scroller.currentOffset().yOffset; + this.scroller.scrollTo({ xOffset: 0, yOffset: yOffset + 100, animation: true }) + }) + Text('willscrollstate: '+ this.willscrollstate) + Text('didscrollstate: '+ this.didscrollstate) + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll260.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll260.ets new file mode 100644 index 0000000000000000000000000000000000000000..1018e42a50c4b157157c12d9f285b6065b417e7e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll260.ets @@ -0,0 +1,71 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridXommonOnscroll260 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + 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) + } + .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('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Button('Button') + .id('UIComponentListandgridXommonOnscroll260') + .height('5%') + .onClick(() => { + const yOffset: number = this.scroller.currentOffset().yOffset; + this.scroller.scrollTo({ xOffset: 0, yOffset: yOffset + 100, animation: false }) + }) + Text('willscrollstate: '+ this.willscrollstate) + Text('didscrollstate: '+ this.didscrollstate) + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll270.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll270.ets new file mode 100644 index 0000000000000000000000000000000000000000..97b043253d8f8e3ab11433913c32e65417a401b5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll270.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 UIComponentListandgridXommonOnscroll270 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + 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) + } + .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('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Button('Button') + .id('UIComponentListandgridXommonOnscroll270') + .height('5%') + .onClick(() => { + this.scroller.scrollToIndex(5, true, ScrollAlign.START); + }) + Text('willscrollstate: '+ this.willscrollstate) + Text('didscrollstate: '+ this.didscrollstate) + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll280.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll280.ets new file mode 100644 index 0000000000000000000000000000000000000000..878fb201d3e9146226739348221d91233e940f43 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll280.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 UIComponentListandgridXommonOnscroll280 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + 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) + } + .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('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Button('Button') + .id('UIComponentListandgridXommonOnscroll280') + .height('5%') + .onClick(() => { + this.scroller.scrollToIndex(5, false, ScrollAlign.START); + }) + Text('willscrollstate: '+ this.willscrollstate) + Text('didscrollstate: '+ this.didscrollstate) + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll290.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll290.ets new file mode 100644 index 0000000000000000000000000000000000000000..c4c02fa7bccbbcc587aec8dd3d3005cb45f7a48f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll290.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 UIComponentListandgridXommonOnscroll290 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + 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) + } + .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('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Button('Button') + .id('UIComponentListandgridXommonOnscroll290') + .height('5%') + .onClick(() => { + this.scroller.scrollBy(0, 150); + }) + Text('willscrollstate: '+ this.willscrollstate) + Text('didscrollstate: '+ this.didscrollstate) + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll30.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll30.ets new file mode 100644 index 0000000000000000000000000000000000000000..5da824bd70d2530046a037d09bd5b6604324e804 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll30.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 UIComponentListandgridXommonOnscroll30 { + @State arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13]; + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + scroller: Scroller = new Scroller(); + + build() { + Column() { + List({scroller:this.scroller, space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%').height(100).fontSize(16) + .textAlign(TextAlign.Center).borderRadius(10).backgroundColor(0xFFFFFF) + } + }, (item: string) => item) + } + .id('UIComponentListandgridXommonOnscroll30') + .scrollBar(BarState.On) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .width('90%') + .height('80%') + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Text('willscrollstate: '+ this.willscrollstate) + Text('didscrollstate: '+ this.didscrollstate) + } + .width('100%') + .height('100%') + .backgroundColor(0xDCDCDC) + .padding({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll300.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll300.ets new file mode 100644 index 0000000000000000000000000000000000000000..7662a6dc29fb7d243d08d83ba687a1cebf74c65a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll300.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 UIComponentListandgridXommonOnscroll300 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + 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) + } + .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('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Button('Button') + .id('UIComponentListandgridXommonOnscroll300') + .height('5%') + .onClick(() => { + this.scroller.scrollPage({ next: true }); + }) + Text('willscrollstate: '+ this.willscrollstate) + Text('didscrollstate: '+ this.didscrollstate) + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll310.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll310.ets new file mode 100644 index 0000000000000000000000000000000000000000..d58b7e10af9bbee3d0ad3988cbe33a0c71875294 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll310.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 UIComponentListandgridXommonOnscroll310 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + 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) + } + .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('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Button('Button') + .id('UIComponentListandgridXommonOnscroll310') + .height('5%') + .onClick(() => { + this.scroller.scrollEdge(Edge.End); + }) + Text('willscrollstate: '+ this.willscrollstate) + Text('didscrollstate: '+ this.didscrollstate) + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll330.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll330.ets new file mode 100644 index 0000000000000000000000000000000000000000..f8bff6837b331fe0c531b70f6812dddefe6b3459 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll330.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 UIComponentListandgridXommonOnscroll330 { + @State numbers: String[] = ['0', '1', '2', '3', '4'] + scroller: Scroller = new Scroller(); + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + 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('UIComponentListandgridXommonOnscroll330') + .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('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.numbers.push('5') + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.numbers.push('6') + }) + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll340.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll340.ets new file mode 100644 index 0000000000000000000000000000000000000000..f1091658e04083872e2f2e78e9a8835c9f9335bf --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll340.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 UIComponentListandgridXommonOnscroll340 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + 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('UIComponentListandgridXommonOnscroll340') + .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('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Text('willscrollstate: '+ this.willscrollstate) + Text('didscrollstate: '+ this.didscrollstate) + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll350.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll350.ets new file mode 100644 index 0000000000000000000000000000000000000000..3b5887806bb078de02fd9b69c212ead16c98ea75 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll350.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 UIComponentListandgridXommonOnscroll350 { + @State arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13]; + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + @State lan:number = 2; + scroller: Scroller = new Scroller(); + + build() { + Column() { + Scroll(){ + List({ scroller: this.scroller, space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%') + .height(100) + .fontSize(16) + .textAlign(TextAlign.Center) + .borderRadius(10) + .backgroundColor(0xFFFFFF) + } + }, (item: string) => item) + } + .id('UIComponentListandgridXommonOnscroll350') + .scrollBar(BarState.On) + .friction(0.6) + .divider({strokeWidth: 2,color: 0xFFFFFF,startMargin: 20,endMargin: 20}) + .width('90%') + .height('80%') + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate = scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate = scrollState; + }) + } + Text('willscrollstate: '+ this.willscrollstate) + Text('didscrollstate: '+ this.didscrollstate) + } + .width('100%') + .height('100%') + .backgroundColor(0xDCDCDC) + .padding({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll360.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll360.ets new file mode 100644 index 0000000000000000000000000000000000000000..ce5dd9879848b6c3a34bf393fc1482f4b77bbe8f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll360.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 UIComponentListandgridXommonOnscroll360 { + scroller: Scroller = new Scroller(); + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + 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('UIComponentListandgridXommonOnscroll360') + .height("80%") + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + . onWillScroll((xOffset: number, yOffset: number, scrollState: ScrollState) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Text('willscrollstate: '+ this.willscrollstate).margin({top:50}) + Text('didscrollstate: '+ this.didscrollstate).margin({top:70}) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll380.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll380.ets new file mode 100644 index 0000000000000000000000000000000000000000..5b90842997379f04e86a05c1aad86d80a235cbc3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll380.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. + */ +// xxx.ets +import { curves } from '@kit.ArkUI' + +@Entry +@Component +struct UIComponentListandgridXommonOnscroll380 { + scroller: Scroller = new Scroller(); + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + 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('UIComponentListandgridXommonOnscroll380') + .height("80%") + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + .enableScrollInteraction(false) + . onWillScroll((xOffset: number, yOffset: number, scrollState: ScrollState) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Text('willscrollstate: '+ this.willscrollstate).margin({top:50}) + Text('didscrollstate: '+ this.didscrollstate).margin({top:70}) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll390.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll390.ets new file mode 100644 index 0000000000000000000000000000000000000000..2ec7d4fdd7888c02257837d326667925fed7153d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll390.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 UIComponentListandgridXommonOnscroll390 { + scroller: Scroller = new Scroller(); + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + 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%') + } + .height("80%") + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + . onWillScroll((xOffset: number, yOffset: number, scrollState: ScrollState) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Button('Button') + .id('UIComponentListandgridXommonOnscroll390') + .height('5%') + .onClick(() => { + const yOffset: number = this.scroller.currentOffset().yOffset; + this.scroller.scrollTo({ xOffset: 0, yOffset: yOffset + 100, animation: true }) + }) + Text('willscrollstate: '+ this.willscrollstate).margin({top:50}) + Text('didscrollstate: '+ this.didscrollstate).margin({top:70}) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll400.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll400.ets new file mode 100644 index 0000000000000000000000000000000000000000..cf960788735ca5e64100b61634184c15c4659fa2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll400.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 UIComponentListandgridXommonOnscroll400 { + scroller: Scroller = new Scroller(); + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + 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%') + } + .height("80%") + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + . onWillScroll((xOffset: number, yOffset: number, scrollState: ScrollState) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Button('Button') + .id('UIComponentListandgridXommonOnscroll400') + .height('5%') + .onClick(() => { + const yOffset: number = this.scroller.currentOffset().yOffset; + this.scroller.scrollTo({ xOffset: 0, yOffset: yOffset + 100, animation: false }) + }) + Text('willscrollstate: '+ this.willscrollstate).margin({top:50}) + Text('didscrollstate: '+ this.didscrollstate).margin({top:70}) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll410.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll410.ets new file mode 100644 index 0000000000000000000000000000000000000000..0be69908697943d5b8b427d4356724af00e0a740 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll410.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. + */ +// xxx.ets +import { curves } from '@kit.ArkUI' + +@Entry +@Component +struct UIComponentListandgridXommonOnscroll410 { + scroller: Scroller = new Scroller(); + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + 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%') + } + .height("80%") + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + .enableScrollInteraction(false) + . onWillScroll((xOffset: number, yOffset: number, scrollState: ScrollState) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Button('button') + .id('UIComponentListandgridXommonOnscroll410') + .height('5%') + .onClick(() => { + this.scroller.scrollBy(0, 150); + }) + Text('willscrollstate: '+ this.willscrollstate).margin({top:50}) + Text('didscrollstate: '+ this.didscrollstate).margin({top:70}) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll420.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll420.ets new file mode 100644 index 0000000000000000000000000000000000000000..6873d34c9cf445d4a655c45ff018a9c05520b137 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll420.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 UIComponentListandgridXommonOnscroll420 { + scroller: Scroller = new Scroller(); + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + 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%') + } + .height("80%") + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + .enableScrollInteraction(false) + . onWillScroll((xOffset: number, yOffset: number, scrollState: ScrollState) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Button('button') + .id('UIComponentListandgridXommonOnscroll420') + .height('5%') + .onClick(() => { + this.scroller.scrollPage({ next: true });; + }) + Text('willscrollstate: '+ this.willscrollstate).margin({top:50}) + Text('didscrollstate: '+ this.didscrollstate).margin({top:70}) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll430.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll430.ets new file mode 100644 index 0000000000000000000000000000000000000000..2d2ccec9a31cf50c8f12a4c84fd6e63fd92242b2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll430.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 UIComponentListandgridXommonOnscroll430 { + scroller: Scroller = new Scroller(); + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + 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%') + } + .height("80%") + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + .enableScrollInteraction(false) + . onWillScroll((xOffset: number, yOffset: number, scrollState: ScrollState) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Button('button') + .id('UIComponentListandgridXommonOnscroll430') + .height('5%') + .onClick(() => { + this.scroller.scrollEdge(Edge.Bottom, { velocity: 700 }); + }) + Text('willscrollstate: '+ this.willscrollstate).margin({top:50}) + Text('didscrollstate: '+ this.didscrollstate).margin({top:70}) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll450.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll450.ets new file mode 100644 index 0000000000000000000000000000000000000000..a06c43e54e5498513ea80f43318705a9d1d874b5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll450.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 UIComponentListandgridXommonOnscroll450 { + scroller: Scroller = new Scroller(); + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + @State arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + 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('UIComponentListandgridXommonOnscroll450') + .height("80%") + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + .edgeEffect(EdgeEffect.Spring) + . onWillScroll((xOffset: number, yOffset: number, scrollState: ScrollState) => { + this.willscrollstate =scrollState; + this.arr.push(10); + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + this.arr.push(11); + }) + Text('willscrollstate: '+ this.willscrollstate).margin({top:50}) + Text('didscrollstate: '+ this.didscrollstate).margin({top:70}) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll460.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll460.ets new file mode 100644 index 0000000000000000000000000000000000000000..823e87aae500ca4a9516c5524ab65ff124546811 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll460.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 UIComponentListandgridXommonOnscroll460 { + scroller: Scroller = new Scroller(); + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + @State arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + 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('UIComponentListandgridXommonOnscroll460') + .height("80%") + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + .edgeEffect(EdgeEffect.Spring) + . onWillScroll((xOffset: number, yOffset: number, scrollState: ScrollState) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Text('willscrollstate: '+ this.willscrollstate).margin({top:50}) + Text('didscrollstate: '+ this.didscrollstate).margin({top:70}) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll470.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll470.ets new file mode 100644 index 0000000000000000000000000000000000000000..135de3c7d2bdfc319093aadc4a497d30ce28258b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll470.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 { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIComponentListandgridXommonOnscroll470 { + @State minSize: number = 80; + @State maxSize: number = 180; + @State fontSize: number = 24; + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F]; + scroller: Scroller = new Scroller(); + dataSource: WaterFlowDataSource = new WaterFlowDataSource(); + private itemWidthArray: number[] = []; + private itemHeightArray: number[] = []; + + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(this.getSize()) + this.itemHeightArray.push(this.getSize()) + } + } + + aboutToAppear() { + this.setItemSizeArray() + } + + build() { + Column({ space: 2 }) { + WaterFlow({ scroller:this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .id('UIComponentListandgridXommonOnscroll470') + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height(300) + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate = scrollState; + }) + Text('willscrollstate: '+ this.willscrollstate).margin({top:50}) + Text('didscrollstate: '+ this.didscrollstate).margin({top:70}) + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll500.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll500.ets new file mode 100644 index 0000000000000000000000000000000000000000..5281215074db6c89e4360a21a339870b988f8973 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll500.ets @@ -0,0 +1,91 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIComponentListandgridXommonOnscroll500 { + @State minSize: number = 80; + @State maxSize: number = 180; + @State fontSize: number = 24; + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F]; + scroller: Scroller = new Scroller(); + dataSource: WaterFlowDataSource = new WaterFlowDataSource(); + private itemWidthArray: number[] = []; + private itemHeightArray: number[] = []; + + // 计算FlowItem宽/高 + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(this.getSize()) + this.itemHeightArray.push(this.getSize()) + } + } + + aboutToAppear() { + this.setItemSizeArray() + } + + build() { + Column({ space: 2 }) { + WaterFlow({ scroller:this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .id('UIComponentListandgridXommonOnscroll500') + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height(300) + .enableScrollInteraction(false) + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate = scrollState; + }) + Button('Button') + .id('UIComponentListandgridXommonOnscroll500_button') + .height('5%') + .onClick(() => { + }) + Text('willscrollstate: '+ this.willscrollstate).margin({top:50}) + Text('didscrollstate: '+ this.didscrollstate).margin({top:70}) + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll510.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll510.ets new file mode 100644 index 0000000000000000000000000000000000000000..23a0577e6dc57d1640dc18e421404e16c96e6fbe --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll510.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. + */ +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIComponentListandgridXommonOnscroll510 { + @State minSize: number = 80; + @State maxSize: number = 180; + @State fontSize: number = 24; + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F]; + scroller: Scroller = new Scroller(); + dataSource: WaterFlowDataSource = new WaterFlowDataSource(); + private itemWidthArray: number[] = []; + private itemHeightArray: number[] = []; + + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(this.getSize()) + this.itemHeightArray.push(this.getSize()) + } + } + + aboutToAppear() { + this.setItemSizeArray() + } + + build() { + Column({ space: 2 }) { + WaterFlow({ scroller:this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height(300) + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate = scrollState; + }) + Button('Button') + .id('UIComponentListandgridXommonOnscroll510') + .height('5%') + .onClick(() => { + const yOffset: number = this.scroller.currentOffset().yOffset; + this.scroller.scrollTo({ xOffset: 0, yOffset: yOffset + 100, animation: true }) + }) + Text('willscrollstate: '+ this.willscrollstate).margin({top:50}) + Text('didscrollstate: '+ this.didscrollstate).margin({top:70}) + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll520.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll520.ets new file mode 100644 index 0000000000000000000000000000000000000000..e39e92e1e78a90571e17f76fefe007f19ebbdacf --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll520.ets @@ -0,0 +1,91 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIComponentListandgridXommonOnscroll520 { + @State minSize: number = 80; + @State maxSize: number = 180; + @State fontSize: number = 24; + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F]; + scroller: Scroller = new Scroller(); + dataSource: WaterFlowDataSource = new WaterFlowDataSource(); + private itemWidthArray: number[] = []; + private itemHeightArray: number[] = []; + + // 计算FlowItem宽/高 + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(this.getSize()) + this.itemHeightArray.push(this.getSize()) + } + } + + aboutToAppear() { + this.setItemSizeArray() + } + + build() { + Column({ space: 2 }) { + WaterFlow({ scroller:this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height(300) + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate = scrollState; + }) + Button('Button') + .id('UIComponentListandgridXommonOnscroll520') + .height('5%') + .onClick(() => { + const yOffset: number = this.scroller.currentOffset().yOffset; + this.scroller.scrollTo({ xOffset: 0, yOffset: yOffset + 100, animation: false }) + }) + Text('willscrollstate: '+ this.willscrollstate).margin({top:50}) + Text('didscrollstate: '+ this.didscrollstate).margin({top:70}) + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll530.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll530.ets new file mode 100644 index 0000000000000000000000000000000000000000..86445cef97c11aebb407487ea0ff89fd3b819940 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll530.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. + */ +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIComponentListandgridXommonOnscroll530 { + @State minSize: number = 80; + @State maxSize: number = 180; + @State fontSize: number = 24; + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F]; + scroller: Scroller = new Scroller(); + dataSource: WaterFlowDataSource = new WaterFlowDataSource(); + private itemWidthArray: number[] = []; + private itemHeightArray: number[] = []; + + // 计算FlowItem宽/高 + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(this.getSize()) + this.itemHeightArray.push(this.getSize()) + } + } + + aboutToAppear() { + this.setItemSizeArray() + } + + build() { + Column({ space: 2 }) { + WaterFlow({ scroller:this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height(300) + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate = scrollState; + }) + Button('Button') + .id('UIComponentListandgridXommonOnscroll530') + .height('5%') + .onClick(() => { + this.scroller.scrollToIndex(10,true,ScrollAlign.START); + }) + Text('willscrollstate: '+ this.willscrollstate).margin({top:50}) + Text('didscrollstate: '+ this.didscrollstate).margin({top:70}) + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll540.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll540.ets new file mode 100644 index 0000000000000000000000000000000000000000..04f92f50ab3ae31722165bf137552a97d77b11ae --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll540.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. + */ +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIComponentListandgridXommonOnscroll540 { + @State minSize: number = 80; + @State maxSize: number = 180; + @State fontSize: number = 24; + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F]; + scroller: Scroller = new Scroller(); + dataSource: WaterFlowDataSource = new WaterFlowDataSource(); + private itemWidthArray: number[] = []; + private itemHeightArray: number[] = []; + + // 计算FlowItem宽/高 + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(this.getSize()) + this.itemHeightArray.push(this.getSize()) + } + } + + aboutToAppear() { + this.setItemSizeArray() + } + + build() { + Column({ space: 2 }) { + WaterFlow({ scroller:this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height(300) + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate = scrollState; + }) + Button('Button') + .id('UIComponentListandgridXommonOnscroll540') + .height('5%') + .onClick(() => { + this.scroller.scrollToIndex(10,false,ScrollAlign.START); + }) + Text('willscrollstate: '+ this.willscrollstate).margin({top:50}) + Text('didscrollstate: '+ this.didscrollstate).margin({top:70}) + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll550.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll550.ets new file mode 100644 index 0000000000000000000000000000000000000000..62331361cc1c517d23f0d541d4cfe4f2685c139b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll550.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. + */ +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIComponentListandgridXommonOnscroll550 { + @State minSize: number = 80; + @State maxSize: number = 180; + @State fontSize: number = 24; + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F]; + scroller: Scroller = new Scroller(); + dataSource: WaterFlowDataSource = new WaterFlowDataSource(); + private itemWidthArray: number[] = []; + private itemHeightArray: number[] = []; + + // 计算FlowItem宽/高 + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(this.getSize()) + this.itemHeightArray.push(this.getSize()) + } + } + + aboutToAppear() { + this.setItemSizeArray() + } + + build() { + Column({ space: 2 }) { + WaterFlow({ scroller:this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height(300) + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate = scrollState; + }) + Button('Button') + .id('UIComponentListandgridXommonOnscroll550') + .height('5%') + .onClick(() => { + this.scroller.scrollBy(0,150); + }) + Text('willscrollstate: '+ this.willscrollstate).margin({top:50}) + Text('didscrollstate: '+ this.didscrollstate).margin({top:70}) + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll560.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll560.ets new file mode 100644 index 0000000000000000000000000000000000000000..34e2b8cc97ae50450c8e4ffae25c0fa9923f9675 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll560.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. + */ +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIComponentListandgridXommonOnscroll560 { + @State minSize: number = 80; + @State maxSize: number = 180; + @State fontSize: number = 24; + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F]; + scroller: Scroller = new Scroller(); + dataSource: WaterFlowDataSource = new WaterFlowDataSource(); + private itemWidthArray: number[] = []; + private itemHeightArray: number[] = []; + + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(this.getSize()) + this.itemHeightArray.push(this.getSize()) + } + } + + aboutToAppear() { + this.setItemSizeArray() + } + + build() { + Column({ space: 2 }) { + WaterFlow({ scroller:this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height(300) + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate = scrollState; + }) + Button('Button') + .id('UIComponentListandgridXommonOnscroll560') + .height('5%') + .onClick(() => { + this.scroller.scrollPage({ next: true }) + }) + Text('willscrollstate: '+ this.willscrollstate).margin({top:50}) + Text('didscrollstate: '+ this.didscrollstate).margin({top:70}) + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll570.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll570.ets new file mode 100644 index 0000000000000000000000000000000000000000..2d122075dfbbeb1a8f26db6f200271e5d1563758 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll570.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. + */ +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIComponentListandgridXommonOnscroll570 { + @State minSize: number = 80; + @State maxSize: number = 180; + @State fontSize: number = 24; + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F]; + scroller: Scroller = new Scroller(); + dataSource: WaterFlowDataSource = new WaterFlowDataSource(); + private itemWidthArray: number[] = []; + private itemHeightArray: number[] = []; + + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(this.getSize()) + this.itemHeightArray.push(this.getSize()) + } + } + + aboutToAppear() { + this.setItemSizeArray() + } + + build() { + Column({ space: 2 }) { + WaterFlow({ scroller:this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height(300) + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate = scrollState; + }) + Button('Button') + .id('UIComponentListandgridXommonOnscroll570') + .height('5%') + .onClick(() => { + this.scroller.scrollEdge(Edge.Bottom) + }) + Text('willscrollstate: '+ this.willscrollstate).margin({top:50}) + Text('didscrollstate: '+ this.didscrollstate).margin({top:70}) + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll590.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll590.ets new file mode 100644 index 0000000000000000000000000000000000000000..b3ddb3cf9a20cd9a92ead7a30e11814f656a3cd1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll590.ets @@ -0,0 +1,86 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIComponentListandgridXommonOnscroll590 { + @State minSize: number = 80; + @State maxSize: number = 180; + @State fontSize: number = 24; + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F]; + scroller: Scroller = new Scroller(); + dataSource: WaterFlowDataSource = new WaterFlowDataSource(); + private itemWidthArray: number[] = []; + private itemHeightArray: number[] = []; + + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(this.getSize()) + this.itemHeightArray.push(this.getSize()) + } + } + + aboutToAppear() { + this.setItemSizeArray() + } + + build() { + Column({ space: 2 }) { + WaterFlow({ scroller:this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .id('UIComponentListandgridXommonOnscroll590') + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height(300) + .edgeEffect(EdgeEffect.Spring) + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + this.dataSource.deleteItem(19); + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate = scrollState; + this.dataSource.deleteItem(18); + }) + Text('willscrollstate: '+ this.willscrollstate).margin({top:50}) + Text('didscrollstate: '+ this.didscrollstate).margin({top:70}) + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll60.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll60.ets new file mode 100644 index 0000000000000000000000000000000000000000..003e48f72f69704bf922490ffa7e8a811b7f95db --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll60.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 UIComponentListandgridXommonOnscroll60 { + @State arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13]; + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + @State lan:number = 2; + scroller: Scroller = new Scroller(); + + build() { + Column() { + List({scroller:this.scroller, space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%').height(100).fontSize(16) + .textAlign(TextAlign.Center).borderRadius(10).backgroundColor(0xFFFFFF) + } + }, (item: string) => item) + } + .id('UIComponentListandgridXommonOnscroll60') + .listDirection(Axis.Vertical) + .scrollBar(BarState.On) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .width('90%') + .height('80%') + .chainAnimation(true) + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Text('willscrollstate: '+ this.willscrollstate) + Text('didscrollstate: '+ this.didscrollstate) + } + .width('100%') + .height('100%') + .backgroundColor(0xDCDCDC) + .padding({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll600.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll600.ets new file mode 100644 index 0000000000000000000000000000000000000000..bfa983e40438d2506b8ee950e1f922d8e5e3bccb --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll600.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 { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIComponentListandgridXommonOnscroll600 { + @State minSize: number = 80; + @State maxSize: number = 180; + @State fontSize: number = 24; + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F]; + scroller: Scroller = new Scroller(); + dataSource: WaterFlowDataSource = new WaterFlowDataSource(); + private itemWidthArray: number[] = []; + private itemHeightArray: number[] = []; + + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(this.getSize()) + this.itemHeightArray.push(this.getSize()) + } + } + + aboutToAppear() { + this.setItemSizeArray() + } + + build() { + Column({ space: 2 }) { + WaterFlow({ scroller:this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .id('UIComponentListandgridXommonOnscroll600') + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height(300) + .edgeEffect(EdgeEffect.Spring) + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate = scrollState; + }) + Text('willscrollstate: '+ this.willscrollstate).margin({top:50}) + Text('didscrollstate: '+ this.didscrollstate).margin({top:70}) + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll70.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll70.ets new file mode 100644 index 0000000000000000000000000000000000000000..aadd959eb24073e21882ac2d1ddf0ccd7f103b61 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll70.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 UIComponentListandgridXommonOnscroll70 { + @State arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13]; + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + @State lan:number = 2; + scroller: Scroller = new Scroller(); + + build() { + Column() { + List({scroller:this.scroller, space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%').height(100).fontSize(16) + .textAlign(TextAlign.Center).borderRadius(10).backgroundColor(0xFFFFFF) + } + }, (item: string) => item) + } + .id('UIComponentListandgridXommonOnscroll70') + .listDirection(Axis.Vertical) + .scrollBar(BarState.On) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .width('90%') + .height('80%') + .lanes(this.lan) + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Text('willscrollstate: '+ this.willscrollstate) + Text('didscrollstate: '+ this.didscrollstate) + } + .width('100%') + .height('100%') + .backgroundColor(0xDCDCDC) + .padding({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll80.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll80.ets new file mode 100644 index 0000000000000000000000000000000000000000..92699964858d363a99c44884b62b3ff0e6d9382c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll80.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 UIComponentListandgridXommonOnscroll80 { + @State arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + scroller: Scroller = new Scroller(); + + build() { + Column() { + List({scroller:this.scroller, space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%').height(100).fontSize(16) + .textAlign(TextAlign.Center).borderRadius(10).backgroundColor(0xFFFFFF) + } + }, (item: string) => item) + } + .id('UIComponentListandgridXommonOnscroll80') + .listDirection(Axis.Vertical) + .scrollBar(BarState.On) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .width('90%') + .height('80%') + .enableScrollInteraction(false) + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Text('willscrollstate: '+ this.willscrollstate) + Text('didscrollstate: '+ this.didscrollstate) + } + .width('100%') + .height('100%') + .backgroundColor(0xDCDCDC) + .padding({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll90.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll90.ets new file mode 100644 index 0000000000000000000000000000000000000000..7a683b944e9edc0d200dc98aadae1afe926a9754 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll90.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 UIComponentListandgridXommonOnscroll90 { + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + scroller: Scroller = new Scroller(); + + build() { + Column() { + List({scroller:this.scroller, space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%').height(100).fontSize(16) + .textAlign(TextAlign.Center).borderRadius(10).backgroundColor(0xFFFFFF) + } + }, (item: string) => item) + } + .listDirection(Axis.Vertical) + .scrollBar(BarState.On) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .width('90%') + .height('80%') + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Text('willscrollstate: '+ this.willscrollstate) + Text('didscrollstate: '+ this.didscrollstate) + Button('Button') + .id('UIComponentListandgridXommonOnscroll90') + .height('5%') + .onClick(() => { + const yOffset: number = this.scroller.currentOffset().yOffset; + this.scroller.scrollTo({ xOffset: 0, yOffset: yOffset + 100, animation: { duration: 1000, curve: Curve.Ease, canOverScroll: true } }) + }) + } + .width('100%') + .height('100%') + .backgroundColor(0xDCDCDC) + .padding({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/WaterFlowDataSource.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/WaterFlowDataSource.ets new file mode 100644 index 0000000000000000000000000000000000000000..4e558f9a5defe259dd08942c83aade7e95b477ac --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/WaterFlowDataSource.ets @@ -0,0 +1,129 @@ +// WaterFlowDataSource.ets + +// 实现IDataSource接口的对象,用于瀑布流组件加载数据 +export class WaterFlowDataSource implements IDataSource { + private dataArray: number[] = [] + private listeners: DataChangeListener[] = [] + + constructor() { + for (let i = 0; i < 20; i++) { + this.dataArray.push(i) + } + } + + // 获取索引对应的数据 + public getData(index: number): number { + return this.dataArray[index] + } + + // 通知控制器数据重新加载 + notifyDataReload(): void { + this.listeners.forEach(listener => { + listener.onDataReloaded() + }) + } + + // 通知控制器数据增加 + notifyDataAdd(index: number): void { + this.listeners.forEach(listener => { + listener.onDataAdd(index) + }) + } + + // 通知控制器数据变化 + notifyDataChange(index: number): void { + this.listeners.forEach(listener => { + listener.onDataChange(index) + }) + } + + // 通知控制器数据删除 + notifyDataDelete(index: number): void { + this.listeners.forEach(listener => { + listener.onDataDelete(index) + }) + } + + // 通知控制器数据位置变化 + notifyDataMove(from: number, to: number): void { + this.listeners.forEach(listener => { + listener.onDataMove(from, to) + }) + } + + //通知控制器数据批量修改 + notifyDatasetChange(operations: DataOperation[]): void { + this.listeners.forEach(listener => { + listener.onDatasetChange(operations); + }) + } + + // 获取数据总数 + public totalCount(): number { + return this.dataArray.length + } + + // 注册改变数据的控制器 + registerDataChangeListener(listener: DataChangeListener): void { + if (this.listeners.indexOf(listener) < 0) { + this.listeners.push(listener) + } + } + + // 注销改变数据的控制器 + unregisterDataChangeListener(listener: DataChangeListener): void { + const pos = this.listeners.indexOf(listener) + if (pos >= 0) { + this.listeners.splice(pos, 1) + } + } + + // 增加数据 + public add1stItem(): void { + this.dataArray.splice(0, 0, this.dataArray.length) + this.notifyDataAdd(0) + } + + // 在数据尾部增加一个元素 + public addLastItem(): void { + this.dataArray.splice(this.dataArray.length, 0, this.dataArray.length) + this.notifyDataAdd(this.dataArray.length - 1) + } + + // 在指定索引位置增加一个元素 + public addItem(index: number): void { + this.dataArray.splice(index, 0, this.dataArray.length) + this.notifyDataAdd(index) + } + + // 删除第一个元素 + public delete1stItem(): void { + this.dataArray.splice(0, 1) + this.notifyDataDelete(0) + } + + // 删除第二个元素 + public delete2ndItem(): void { + this.dataArray.splice(1, 1) + this.notifyDataDelete(1) + } + + // 删除最后一个元素 + public deleteLastItem(): void { + this.dataArray.splice(-1, 1) + this.notifyDataDelete(this.dataArray.length) + } + + // 在指定索引位置删除一个元素 + public deleteItem(index: number): void { + this.dataArray.splice(index, 1) + this.notifyDataDelete(index) + } + + // 重新加载数据 + public reload(): void { + this.dataArray.splice(1, 1) + this.dataArray.splice(3, 2) + this.notifyDataReload() + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto230.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto230.ets new file mode 100644 index 0000000000000000000000000000000000000000..077e6064e37545c1e717a049d954948a921081bd --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto230.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 UIComponentListandgridXommonScrollto230 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0 ; + @State heigh :number = 300; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + 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) + } + .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('90%') + .backgroundColor(0xFAEEE0) + .height(this.heigh) + .onScrollIndex((first: number, last: number) => { + console.info(first.toString()) + console.info(last.toString()) + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + console.info(scrollOffset.toString()) + console.info(scrollState.toString()) + }) + Button('Button') + .id("UIComponentListandgridXommonScrollto230") + .onClick(() => { + this.scroller.scrollTo(({xOffset:600,yOffset:2000,animation:{duration:1000,curve:Curve.Ease,canOverScroll:true}})); + }) + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto370.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto370.ets new file mode 100644 index 0000000000000000000000000000000000000000..a22e9c9f81c8c048eaf07012d1ced6a8a6a2a344 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto370.ets @@ -0,0 +1,82 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Index.ets +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIComponentListandgridXommonScrollto370 { + @State minSize: number = 80; + @State maxSize: number = 180; + @State fontSize: number = 24; + @State heigh: number = 300; + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F]; + scroller: Scroller = new Scroller(); + dataSource: WaterFlowDataSource = new WaterFlowDataSource(); + private itemWidthArray: number[] = []; + private itemHeightArray: number[] = []; + + // 计算FlowItem宽/高 + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(this.getSize()) + this.itemHeightArray.push(this.getSize()) + } + } + + aboutToAppear() { + this.setItemSizeArray() + } + + build() { + Column({ space: 2 }) { + WaterFlow({ scroller:this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height(this.heigh) + .edgeEffect(EdgeEffect.Spring) + Button('Button') + .id("UIComponentListandgridXommonScrollto370") + .onClick(() => { + this.scroller.scrollTo(({xOffset:600,yOffset:2000,animation:{duration:1000,curve:Curve.Ease,canOverScroll:true}})); + }) + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto510.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto510.ets new file mode 100644 index 0000000000000000000000000000000000000000..670d14f51678a1bd62c3c9d62514e0460a0b1b2e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto510.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 UIComponentListandgridXommonScrollto510 { + scroller: Scroller = new Scroller(); + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + @State heigh: number = 300; + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + 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%') + } + .height(this.heigh) + .scrollable(ScrollDirection.Vertical) + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + .friction(0.6) + .edgeEffect(EdgeEffect.Spring) + Button('Button') + .id("UIComponentListandgridXommonScrollto510") + .onClick(() => { + this.scroller.scrollTo(({xOffset:600,yOffset:2000,animation:{duration:1000,curve:Curve.Ease,canOverScroll:true}})); + }) + .margin({ top: 210, left: 20 }) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto570.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto570.ets new file mode 100644 index 0000000000000000000000000000000000000000..83768853588bfa278e2d9e2811e0ac5094379486 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto570.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 UIComponentListandgridXommonScrollto570 { + @State listPosition: number = 0; + @State arr: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + private scrollerForScroll: Scroller = new Scroller() + private scrollerForList: Scroller = new Scroller() + + build() { + Flex() { + Scroll(this.scrollerForScroll) { + Column() { + 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) + } + .width("100%") + .height("50%") + .edgeEffect(EdgeEffect.Spring) + .onScroll((scrollOffset: number, scrollState: ScrollState) => { + this.arr.push(12); + }) + Button('Button') + .id("UIComponentListandgridXommonScrollto570") + .onClick(() => { + this.scrollerForList.scrollTo(({xOffset:600,yOffset:2000,animation:{duration:1000,curve:Curve.Ease,canOverScroll:true}})); + }) + } + } + .width("100%").height(300) + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding(20) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto580.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto580.ets new file mode 100644 index 0000000000000000000000000000000000000000..097abd4714dd22addfcbdb242461bfe17a3be595 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto580.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 UIComponentListandgridXommonScrollto580 { + @State listPosition: number = 0; + @State arr: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + private scrollerForScroll: Scroller = new Scroller() + private scrollerForList: Scroller = new Scroller() + + build() { + Flex() { + Scroll(this.scrollerForScroll) { + Column() { + 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) + } + .width("100%") + .height("50%") + .edgeEffect(EdgeEffect.Spring) + .onScrollIndex((firstIndex: number, lastIndex: number, centerIndex: number) => { + this.arr.push(11); + }) + Button('Button') + .id("UIComponentListandgridXommonScrollto580") + .onClick(() => { + this.scrollerForList.scrollTo(({xOffset:600,yOffset:2000,animation:{duration:1000,curve:Curve.Ease,canOverScroll:true}})); + }) + } + } + .width("100%").height(300) + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding(20) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto590.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto590.ets new file mode 100644 index 0000000000000000000000000000000000000000..8a8d606832f5b7d3678469795398a765246b911a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto590.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 UIComponentListandgridXommonScrollto590 { + scroller: Scroller = new Scroller(); + @State arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + 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%') + } + .height(300) + .scrollable(ScrollDirection.Vertical) + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + .friction(0.6) + .edgeEffect(EdgeEffect.Spring) + .onReachStart(() => {this.arr.push(10,11)}) + Button('Button') + .id("UIComponentListandgridXommonScrollto590") + .onClick(() => { + this.scroller.scrollTo(({xOffset:600,yOffset:2000,animation:{duration:1000,curve:Curve.Ease,canOverScroll:true}})); + }) + .margin({ top: 210, left: 20 }) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto600.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto600.ets new file mode 100644 index 0000000000000000000000000000000000000000..83c08ec471bfd280c07ed4169b7767a16a872077 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto600.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 UIComponentListandgridXommonScrollto600 { + scroller: Scroller = new Scroller(); + @State arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + 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%') + } + .height(300) + .scrollable(ScrollDirection.Vertical) + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + .friction(0.6) + .edgeEffect(EdgeEffect.Spring) + .onReachEnd(() => {this.arr.push(10,11)}) + Button('Button') + .id("UIComponentListandgridXommonScrollto600") + .onClick(() => { + this.scroller.scrollTo(({xOffset:600,yOffset:2000,animation:{duration:1000,curve:Curve.Ease,canOverScroll:true}})); + }) + .margin({ top: 210, left: 20 }) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto610.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto610.ets new file mode 100644 index 0000000000000000000000000000000000000000..337fda0d2caa5a417b09a41f59f172689ca981ab --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto610.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 UIComponentListandgridXommonScrollto610 { + scroller: Scroller = new Scroller(); + @State arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + 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%') + } + .height(300) + .scrollable(ScrollDirection.Vertical) + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + .friction(0.6) + .edgeEffect(EdgeEffect.Spring) + .onScrollFrameBegin((offset: number, state: ScrollState) => { + return { offsetRemain: offset } + }) + Button('Button') + .id("UIComponentListandgridXommonScrollto610") + .onClick(() => { + this.scroller.scrollTo(({xOffset:600,yOffset:2000,animation:{duration:1000,curve:Curve.Ease,canOverScroll:true}})); + }) + .margin({ top: 210, left: 20 }) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto620.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto620.ets new file mode 100644 index 0000000000000000000000000000000000000000..f467b5fca4ae283e762f47f07ef24fb742843e21 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto620.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 UIComponentListandgridXommonScrollto620 { + @State listPosition: number = 0; + @State arr: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + private scrollerForScroll: Scroller = new Scroller() + private scrollerForList: Scroller = new Scroller() + + build() { + Flex() { + Scroll(this.scrollerForScroll) { + Column() { + 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) + } + .width("100%") + .height("50%") + .edgeEffect(EdgeEffect.Spring) + .onScrollStart(() => { + this.arr.push(11); + }) + Button('Button') + .id("UIComponentListandgridXommonScrollto620") + .onClick(() => { + this.scrollerForList.scrollTo(({xOffset:600,yOffset:2000,animation:{duration:1000,curve:Curve.Ease,canOverScroll:true}})); + }) + } + } + .width("100%").height(300) + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding(20) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto630.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto630.ets new file mode 100644 index 0000000000000000000000000000000000000000..112f9786ca40bb48043156c918cb0cf8b37ea078 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto630.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 UIComponentListandgridXommonScrollto630 { + @State listPosition: number = 0; + @State arr: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + private scrollerForScroll: Scroller = new Scroller() + private scrollerForList: Scroller = new Scroller() + + build() { + Flex() { + Scroll(this.scrollerForScroll) { + Column() { + 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) + } + .width("100%") + .height("50%") + .edgeEffect(EdgeEffect.Spring) + .onScrollStop(() => { + this.arr.push(12); + }) + Button('Button') + .id("UIComponentListandgridXommonScrollto630") + .onClick(() => { + this.scrollerForList.scrollTo(({xOffset:600,yOffset:2000,animation:{duration:1000,curve:Curve.Ease,canOverScroll:true}})); + }) + } + } + .width("100%").height(300) + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding(20) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto640.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto640.ets new file mode 100644 index 0000000000000000000000000000000000000000..06ca86da3277c667145ec062f391da3178fc23bd --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto640.ets @@ -0,0 +1,81 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIComponentListandgridXommonScrollto640 { + @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[] = []; + + // 计算FlowItem宽/高 + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(this.getSize()) + this.itemHeightArray.push(this.getSize()) + } + } + + aboutToAppear() { + this.setItemSizeArray() + } + + build() { + Column({ space: 2 }) { + WaterFlow({ scroller:this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height(300) + .edgeEffect(EdgeEffect.Spring) + .onScroll((scrollOffset: number, scrollState: ScrollState) => {this.dataSource.deleteItem(20)}) + Button('Button') + .id("UIComponentListandgridXommonScrollto640") + .onClick(() => { + this.scroller.scrollTo(({xOffset:600,yOffset:2000,animation:{duration:1000,curve:Curve.Ease,canOverScroll:true}})); + }) + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto650.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto650.ets new file mode 100644 index 0000000000000000000000000000000000000000..1091e914444315cecfe4c2f0d97710e7769d4802 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto650.ets @@ -0,0 +1,81 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIComponentListandgridXommonScrollto650 { + @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[] = []; + + // 计算FlowItem宽/高 + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(this.getSize()) + this.itemHeightArray.push(this.getSize()) + } + } + + aboutToAppear() { + this.setItemSizeArray() + } + + build() { + Column({ space: 2 }) { + WaterFlow({ scroller:this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height(300) + .edgeEffect(EdgeEffect.Spring) + .onScrollIndex((firstIndex: number, lastIndex: number) => {this.dataSource.deleteItem(20)}) + Button('Button') + .id("UIComponentListandgridXommonScrollto650") + .onClick(() => { + this.scroller.scrollTo(({xOffset:600,yOffset:2000,animation:{duration:1000,curve:Curve.Ease,canOverScroll:true}})); + }) + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto660.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto660.ets new file mode 100644 index 0000000000000000000000000000000000000000..2ccfbe71715d39024befe5cc9af3ff9f18466ef9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto660.ets @@ -0,0 +1,82 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Index.ets +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIComponentListandgridXommonScrollto660 { + @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[] = []; + + // 计算FlowItem宽/高 + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(this.getSize()) + this.itemHeightArray.push(this.getSize()) + } + } + + aboutToAppear() { + this.setItemSizeArray() + } + + build() { + Column({ space: 2 }) { + WaterFlow({ scroller:this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height(300) + .edgeEffect(EdgeEffect.Spring) + .onReachStart(() => {this.dataSource.deleteItem(20)}) + Button('Button') + .id("UIComponentListandgridXommonScrollto660") + .onClick(() => { + this.scroller.scrollTo(({xOffset:600,yOffset:2000,animation:{duration:1000,curve:Curve.Ease,canOverScroll:true}})); + }) + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto670.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto670.ets new file mode 100644 index 0000000000000000000000000000000000000000..ff251e9d06cc67f12b9ee23fa2a9147dbad5c60d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto670.ets @@ -0,0 +1,82 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Index.ets +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIComponentListandgridXommonScrollto670 { + @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[] = []; + + // 计算FlowItem宽/高 + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(this.getSize()) + this.itemHeightArray.push(this.getSize()) + } + } + + aboutToAppear() { + this.setItemSizeArray() + } + + build() { + Column({ space: 2 }) { + WaterFlow({ scroller:this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height(300) + .edgeEffect(EdgeEffect.Spring) + .onReachEnd(() => {this.dataSource.deleteItem(20)}) + Button('Button') + .id("UIComponentListandgridXommonScrollto670") + .onClick(() => { + this.scroller.scrollTo(({xOffset:600,yOffset:2000,animation:{duration:1000,curve:Curve.Ease,canOverScroll:true}})); + }) + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto680.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto680.ets new file mode 100644 index 0000000000000000000000000000000000000000..d4b40d9b5e86ed86502697755251503493732cab --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto680.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 { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIComponentListandgridXommonScrollto680 { + @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[] = []; + + // 计算FlowItem宽/高 + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(this.getSize()) + this.itemHeightArray.push(this.getSize()) + } + } + + aboutToAppear() { + this.setItemSizeArray() + } + + build() { + Column({ space: 2 }) { + WaterFlow({ scroller:this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height(300) + .edgeEffect(EdgeEffect.Spring) + .onReachStart(() => {this.dataSource.deleteItem(20)}) + .onScrollFrameBegin((offset: number, state: ScrollState) => { + return { offsetRemain: offset } + }) + Button('Button') + .id("UIComponentListandgridXommonScrollto680") + .onClick(() => { + this.scroller.scrollTo(({xOffset:600,yOffset:2000,animation:{duration:1000,curve:Curve.Ease,canOverScroll:true}})); + }) + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto690.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto690.ets new file mode 100644 index 0000000000000000000000000000000000000000..2dfbc65f8e8ba1c7bef57860cd7bd27c768de2a8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto690.ets @@ -0,0 +1,81 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIComponentListandgridXommonScrollto690 { + @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[] = []; + + // 计算FlowItem宽/高 + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(this.getSize()) + this.itemHeightArray.push(this.getSize()) + } + } + + aboutToAppear() { + this.setItemSizeArray() + } + + build() { + Column({ space: 2 }) { + WaterFlow({ scroller:this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height(300) + .edgeEffect(EdgeEffect.Spring) + .onScrollStart(() => {this.dataSource.deleteItem(20)}) + Button('Button') + .id("UIComponentListandgridXommonScrollto690") + .onClick(() => { + this.scroller.scrollTo(({xOffset:600,yOffset:2000,animation:{duration:1000,curve:Curve.Ease,canOverScroll:true}})); + }) + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto700.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto700.ets new file mode 100644 index 0000000000000000000000000000000000000000..0ff49dbde14e5d4f5afed600a4d9d6c291acf37d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto700.ets @@ -0,0 +1,81 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIComponentListandgridXommonScrollto700 { + @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[] = []; + + // 计算FlowItem宽/高 + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(this.getSize()) + this.itemHeightArray.push(this.getSize()) + } + } + + aboutToAppear() { + this.setItemSizeArray() + } + + build() { + Column({ space: 2 }) { + WaterFlow({ scroller:this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height(300) + .edgeEffect(EdgeEffect.Spring) + .onScrollStop(() => {this.dataSource.deleteItem(20)}) + Button('Button') + .id("UIComponentListandgridXommonScrollto700") + .onClick(() => { + this.scroller.scrollTo(({xOffset:600,yOffset:2000,animation:{duration:1000,curve:Curve.Ease,canOverScroll:true}})); + }) + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto90.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto90.ets new file mode 100644 index 0000000000000000000000000000000000000000..6f71ac9192df203cba0e231a7a3940c38aedfdb5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto90.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 UIComponentListandgridXommonScrollto90 { + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + scroller: Scroller = new Scroller(); + @State heigh :number = 300; + + build() { + Column() { + List({scroller:this.scroller, space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%').height(100).fontSize(16) + .textAlign(TextAlign.Center).borderRadius(10).backgroundColor(0xFFFFFF) + } + }, (item: string) => item) + } + .scrollBar(BarState.On) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .width('90%') + .height(this.heigh) + Button('Button') + .id("UIComponentListandgridXommonScrollto90") + .onClick(() => { + this.scroller.scrollTo(({xOffset:600,yOffset:2000,animation:{duration:1000,curve:Curve.Ease,canOverScroll:true}})); + }) + } + .width('100%') + .height('100%') + .backgroundColor(0xDCDCDC) + .padding({ top: 5 }) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/WaterFlowDataSource.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/WaterFlowDataSource.ets new file mode 100644 index 0000000000000000000000000000000000000000..4e558f9a5defe259dd08942c83aade7e95b477ac --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/WaterFlowDataSource.ets @@ -0,0 +1,129 @@ +// WaterFlowDataSource.ets + +// 实现IDataSource接口的对象,用于瀑布流组件加载数据 +export class WaterFlowDataSource implements IDataSource { + private dataArray: number[] = [] + private listeners: DataChangeListener[] = [] + + constructor() { + for (let i = 0; i < 20; i++) { + this.dataArray.push(i) + } + } + + // 获取索引对应的数据 + public getData(index: number): number { + return this.dataArray[index] + } + + // 通知控制器数据重新加载 + notifyDataReload(): void { + this.listeners.forEach(listener => { + listener.onDataReloaded() + }) + } + + // 通知控制器数据增加 + notifyDataAdd(index: number): void { + this.listeners.forEach(listener => { + listener.onDataAdd(index) + }) + } + + // 通知控制器数据变化 + notifyDataChange(index: number): void { + this.listeners.forEach(listener => { + listener.onDataChange(index) + }) + } + + // 通知控制器数据删除 + notifyDataDelete(index: number): void { + this.listeners.forEach(listener => { + listener.onDataDelete(index) + }) + } + + // 通知控制器数据位置变化 + notifyDataMove(from: number, to: number): void { + this.listeners.forEach(listener => { + listener.onDataMove(from, to) + }) + } + + //通知控制器数据批量修改 + notifyDatasetChange(operations: DataOperation[]): void { + this.listeners.forEach(listener => { + listener.onDatasetChange(operations); + }) + } + + // 获取数据总数 + public totalCount(): number { + return this.dataArray.length + } + + // 注册改变数据的控制器 + registerDataChangeListener(listener: DataChangeListener): void { + if (this.listeners.indexOf(listener) < 0) { + this.listeners.push(listener) + } + } + + // 注销改变数据的控制器 + unregisterDataChangeListener(listener: DataChangeListener): void { + const pos = this.listeners.indexOf(listener) + if (pos >= 0) { + this.listeners.splice(pos, 1) + } + } + + // 增加数据 + public add1stItem(): void { + this.dataArray.splice(0, 0, this.dataArray.length) + this.notifyDataAdd(0) + } + + // 在数据尾部增加一个元素 + public addLastItem(): void { + this.dataArray.splice(this.dataArray.length, 0, this.dataArray.length) + this.notifyDataAdd(this.dataArray.length - 1) + } + + // 在指定索引位置增加一个元素 + public addItem(index: number): void { + this.dataArray.splice(index, 0, this.dataArray.length) + this.notifyDataAdd(index) + } + + // 删除第一个元素 + public delete1stItem(): void { + this.dataArray.splice(0, 1) + this.notifyDataDelete(0) + } + + // 删除第二个元素 + public delete2ndItem(): void { + this.dataArray.splice(1, 1) + this.notifyDataDelete(1) + } + + // 删除最后一个元素 + public deleteLastItem(): void { + this.dataArray.splice(-1, 1) + this.notifyDataDelete(this.dataArray.length) + } + + // 在指定索引位置删除一个元素 + public deleteItem(index: number): void { + this.dataArray.splice(index, 1) + this.notifyDataDelete(index) + } + + // 重新加载数据 + public reload(): void { + this.dataArray.splice(1, 1) + this.dataArray.splice(3, 2) + this.notifyDataReload() + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0050.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0050.ets new file mode 100644 index 0000000000000000000000000000000000000000..59006cf0d1db6e2a46fbbd86963cb4f64cd22444 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0050.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 UIComponentListandgridXommonSmooth0050 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + 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) + } + .columnsTemplate('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('100%') + .backgroundColor(0xFAEEE0) + .height(300) + .onScrollIndex((first: number, last: number) => { + console.info(first.toString()) + console.info(last.toString()) + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + console.info(scrollOffset.toString()) + console.info(scrollState.toString()) + }) + Button('next page') + .id('UIComponentListandgridXommonSmooth0050') + .onClick(() => { + this.scroller.scrollToIndex(-1, false); + }) + }.width('100%').margin({ top: 5 }) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0060.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0060.ets new file mode 100644 index 0000000000000000000000000000000000000000..b4a8562e23100dc9f10a80dfddf672879534ff6d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0060.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 UIComponentListandgridXommonSmooth0060 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + 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) + } + .columnsTemplate('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('100%') + .backgroundColor(0xFAEEE0) + .height(300) + .onScrollIndex((first: number, last: number) => { + console.info(first.toString()) + console.info(last.toString()) + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + console.info(scrollOffset.toString()) + console.info(scrollState.toString()) + }) + Button('next page') + .id('UIComponentListandgridXommonSmooth0060') + .onClick(() => { + this.scroller.scrollToIndex(0, false); + }) + }.width('100%').margin({ top: 5 }) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0070.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0070.ets new file mode 100644 index 0000000000000000000000000000000000000000..b45969455a38ab69a404fb65814af836cf730dcc --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0070.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 UIComponentListandgridXommonSmooth0070 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + 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) + } + .columnsTemplate('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('100%') + .backgroundColor(0xFAEEE0) + .height(300) + .onScrollIndex((first: number, last: number) => { + console.info(first.toString()) + console.info(last.toString()) + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + console.info(scrollOffset.toString()) + console.info(scrollState.toString()) + }) + Button('next page') + .id('UIComponentListandgridXommonSmooth0070') + .onClick(() => { + this.scroller.scrollToIndex(13, false); + }) + }.width('100%').margin({ top: 5 }) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0080.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0080.ets new file mode 100644 index 0000000000000000000000000000000000000000..4c928ea19e7534b0a3c6370b4be6ce05eba2adb7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0080.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 UIComponentListandgridXommonSmooth0080 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + 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) + } + .columnsTemplate('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('100%') + .backgroundColor(0xFAEEE0) + .height(300) + .onScrollIndex((first: number, last: number) => { + console.info(first.toString()) + console.info(last.toString()) + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + console.info(scrollOffset.toString()) + console.info(scrollState.toString()) + }) + Button('next page') + .id('UIComponentListandgridXommonSmooth0080') + .onClick(() => { + this.scroller.scrollToIndex(30, false); + }) + }.width('100%').margin({ top: 5 }) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0110.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0110.ets new file mode 100644 index 0000000000000000000000000000000000000000..5c8cbeb2fe2c6b35d4008be483168808261ceb56 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0110.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 UIComponentListandgridXommonSmooth0110 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + 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) + } + .columnsTemplate('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('100%') + .backgroundColor(0xFAEEE0) + .height(300) + .onScrollIndex((first: number, last: number) => { + console.info(first.toString()) + console.info(last.toString()) + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + console.info(scrollOffset.toString()) + console.info(scrollState.toString()) + }) + Button('next page') + .onClick(() => { + this.scroller.scrollToIndex(24, false); + }) + }.width('100%').margin({ top: 5 }) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0170.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0170.ets new file mode 100644 index 0000000000000000000000000000000000000000..e30c38799247909d9579cb4adfc5fbe0adc1d1f4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0170.ets @@ -0,0 +1,108 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT 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 { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIComponentListandgridXommonSmooth0170 { + @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[] = []; + + + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + setItemSizeArray() { + for (let i = 0; i < 100; 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({ scroller: this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image($r('app.media.icon')) + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .onAppear(() => { + if (item + 20 == this.dataSource.totalCount()) { + for (let i = 0; i < 100; i++) { + this.dataSource.addLastItem() + } + } + }) + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(10) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('80%') + .scrollBar(BarState.On) + .onScrollIndex((first: number, last: number) => { + console.info(first.toString()) + console.info(last.toString()) + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + console.info(scrollOffset.toString()) + console.info(scrollState.toString()) + }) + Button('next page') + .id('UIComponentListandgridXommonSmooth0170') + .onClick(() => { + this.scroller.scrollToIndex(-1, false,); + }) + } + + } + +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0180.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0180.ets new file mode 100644 index 0000000000000000000000000000000000000000..23249add98584f1a2e578cdeb3698f4b96725ec4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0180.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 { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIComponentListandgridXommonSmooth0180 { + @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[] = []; + + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize); + } + + setItemSizeArray() { + for (let i = 0; i < 100; 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({ scroller: this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image($r('app.media.icon')) + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .onAppear(() => { + if (item + 20 == this.dataSource.totalCount()) { + for (let i = 0; i < 100; i++) { + this.dataSource.addLastItem() + } + } + }) + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(10) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('80%') + .scrollBar(BarState.On) + .onScrollIndex((first: number, last: number) => { + console.info(first.toString()); + console.info(last.toString()); + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + console.info(scrollOffset.toString()); + console.info(scrollState.toString()); + }) + Button('next page') + .id('UIComponentListandgridXommonSmooth0180') + .onClick(() => { + this.scroller.scrollToIndex(0, false); + }) + } + + } + +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0190.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0190.ets new file mode 100644 index 0000000000000000000000000000000000000000..59e4f90b8118ae411ab95705ec290c1c5386499d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0190.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. + */ +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIComponentListandgridXommonSmooth0190 { + @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[] = []; + + // 计算FlowItem宽/高 + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize); + } + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 100; 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({ scroller: this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image($r('app.media.icon')) + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .onAppear(() => { + if (item + 20 == this.dataSource.totalCount()) { + for (let i = 0; i < 100; i++) { + this.dataSource.addLastItem() + } + } + }) + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(10) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('80%') + .scrollBar(BarState.On) + .onScrollIndex((first: number, last: number) => { + console.info(first.toString()) + console.info(last.toString()) + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + console.info(scrollOffset.toString()) + console.info(scrollState.toString()) + }) + Button('next page') + .id('UIComponentListandgridXommonSmooth0190') + .onClick(() => { + this.scroller.scrollToIndex(4, false,); + }) + } + + } + +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0200.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0200.ets new file mode 100644 index 0000000000000000000000000000000000000000..3a6217379af876dd39ee8764336c3d85f38672a6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0200.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. + */ +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIComponentListandgridXommonSmooth0200 { + @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[] = []; + + // 计算FlowItem宽/高 + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize); + } + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 100; 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({ scroller: this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image($r('app.media.icon')) + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .onAppear(() => { + if (item + 20 == this.dataSource.totalCount()) { + for (let i = 0; i < 100; i++) { + this.dataSource.addLastItem() + } + } + }) + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(10) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('80%') + .scrollBar(BarState.On) + .onScrollIndex((first: number, last: number) => { + console.info(first.toString()) + console.info(last.toString()) + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + console.info(scrollOffset.toString()) + console.info(scrollState.toString()) + }) + Button('next page') + .id('UIComponentListandgridXommonSmooth0200') + .onClick(() => { + this.scroller.scrollToIndex(100, false,); + }) + } + + } + +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/WaterFlowDataSource.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/WaterFlowDataSource.ets new file mode 100644 index 0000000000000000000000000000000000000000..60644b7d88fa8851f1a7695ded264907b0f41eff --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/WaterFlowDataSource.ets @@ -0,0 +1,129 @@ +// WaterFlowDataSource.ets + +// 实现IDataSource接口的对象,用于瀑布流组件加载数据 +export class WaterFlowDataSource implements IDataSource { + private dataArray: number[] = [] + private listeners: DataChangeListener[] = [] + + constructor() { + for (let i = 0; i < 100; i++) { + this.dataArray.push(i) + } + } + + // 获取索引对应的数据 + public getData(index: number): number { + return this.dataArray[index] + } + + // 通知控制器数据重新加载 + notifyDataReload(): void { + this.listeners.forEach(listener => { + listener.onDataReloaded() + }) + } + + // 通知控制器数据增加 + notifyDataAdd(index: number): void { + this.listeners.forEach(listener => { + listener.onDataAdd(index) + }) + } + + // 通知控制器数据变化 + notifyDataChange(index: number): void { + this.listeners.forEach(listener => { + listener.onDataChange(index) + }) + } + + // 通知控制器数据删除 + notifyDataDelete(index: number): void { + this.listeners.forEach(listener => { + listener.onDataDelete(index) + }) + } + + // 通知控制器数据位置变化 + notifyDataMove(from: number, to: number): void { + this.listeners.forEach(listener => { + listener.onDataMove(from, to) + }) + } + + //通知控制器数据批量修改 + notifyDatasetChange(operations: DataOperation[]): void { + this.listeners.forEach(listener => { + listener.onDatasetChange(operations); + }) + } + + // 获取数据总数 + public totalCount(): number { + return this.dataArray.length + } + + // 注册改变数据的控制器 + registerDataChangeListener(listener: DataChangeListener): void { + if (this.listeners.indexOf(listener) < 0) { + this.listeners.push(listener) + } + } + + // 注销改变数据的控制器 + unregisterDataChangeListener(listener: DataChangeListener): void { + const pos = this.listeners.indexOf(listener) + if (pos >= 0) { + this.listeners.splice(pos, 1) + } + } + + // 增加数据 + public add1stItem(): void { + this.dataArray.splice(0, 0, this.dataArray.length) + this.notifyDataAdd(0) + } + + // 在数据尾部增加一个元素 + public addLastItem(): void { + this.dataArray.splice(this.dataArray.length, 0, this.dataArray.length) + this.notifyDataAdd(this.dataArray.length - 1) + } + + // 在指定索引位置增加一个元素 + public addItem(index: number): void { + this.dataArray.splice(index, 0, this.dataArray.length) + this.notifyDataAdd(index) + } + + // 删除第一个元素 + public delete1stItem(): void { + this.dataArray.splice(0, 1) + this.notifyDataDelete(0) + } + + // 删除第二个元素 + public delete2ndItem(): void { + this.dataArray.splice(1, 1) + this.notifyDataDelete(1) + } + + // 删除最后一个元素 + public deleteLastItem(): void { + this.dataArray.splice(-1, 1) + this.notifyDataDelete(this.dataArray.length) + } + + // 在指定索引位置删除一个元素 + public deleteItem(index: number): void { + this.dataArray.splice(index, 1) + this.notifyDataDelete(index) + } + + // 重新加载数据 + public reload(): void { + this.dataArray.splice(1, 1) + this.dataArray.splice(3, 2) + this.notifyDataReload() + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier10.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier10.ets new file mode 100644 index 0000000000000000000000000000000000000000..182fab6eaebc9f17d3b5c68ab51a397fff163dcb --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier10.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. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier10 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢'] + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier10') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor(0xFFFAF0) + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(0xD2B48C) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .popupFont({ size: 30, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xCCCCCC) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier100.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier100.ets new file mode 100644 index 0000000000000000000000000000000000000000..9634ecf5565968b5332e0bf85a85d93ac3a09aa4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier100.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. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier100 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier100') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor(0xFFFAF0) + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(0xD2B48C) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .popupFont({ size: 30, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Right,0) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xCCCCCC) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1060.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1060.ets new file mode 100644 index 0000000000000000000000000000000000000000..2df6525166669363fff0833d970f722498450e3a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1060.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 UIComponentScrollAlphabetindexermodifier1060 { + scroller: Scroller = new Scroller() + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + 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('UIComponentScrollAlphabetindexermodifier1060') + .scrollable(ScrollDirection.Vertical) + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + .friction(0.6) + .edgeEffect(EdgeEffect.None) + .enablePaging(false) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1070.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1070.ets new file mode 100644 index 0000000000000000000000000000000000000000..113268940df24ea921a105280aa01e4fb6bb5c38 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1070.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 UIComponentScrollAlphabetindexermodifier1070 { + scroller: Scroller = new Scroller() + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + 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('UIComponentScrollAlphabetindexermodifier1070') + .scrollable(ScrollDirection.Vertical) + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + .friction(0.6) + .edgeEffect(EdgeEffect.None) + .enablePaging(true) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1120.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1120.ets new file mode 100644 index 0000000000000000000000000000000000000000..35844f71a48ddf25b8f09f9cbce6a9b7ce4a8241 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1120.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 UIComponentScrollAlphabetindexermodifier1120 { + scroller: Scroller = new Scroller() + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + 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('UIComponentScrollAlphabetindexermodifier1120') + .scrollable(ScrollDirection.Vertical) + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + .friction(-66) + .edgeEffect(EdgeEffect.None) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1130.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1130.ets new file mode 100644 index 0000000000000000000000000000000000000000..ccf8c4245f64a6c04908f4e503e43448f16d3c43 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1130.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 UIComponentScrollAlphabetindexermodifier1130 { + scroller: Scroller = new Scroller() + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + 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('UIComponentScrollAlphabetindexermodifier1130') + .scrollable(ScrollDirection.Vertical) + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + .friction(0) + .edgeEffect(EdgeEffect.None) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1140.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1140.ets new file mode 100644 index 0000000000000000000000000000000000000000..397282d339314bb5dd5c53066937fb239e114aec --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1140.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 UIComponentScrollAlphabetindexermodifier1140 { + scroller: Scroller = new Scroller() + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + 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('UIComponentScrollAlphabetindexermodifier1140') + .scrollable(ScrollDirection.Vertical) + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + .friction(1) + .edgeEffect(EdgeEffect.None) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1150.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1150.ets new file mode 100644 index 0000000000000000000000000000000000000000..029fcfc65cc4f6428df3e690b809ec0ecd2e4ca6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1150.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 UIComponentScrollAlphabetindexermodifier1150 { + scroller: Scroller = new Scroller() + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + 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('UIComponentScrollAlphabetindexermodifier1150') + .scrollable(ScrollDirection.Vertical) + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + .friction(100) + .edgeEffect(EdgeEffect.None) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1160.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1160.ets new file mode 100644 index 0000000000000000000000000000000000000000..b80baef4726f89b5c6cba54758b9dd3e429f6250 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1160.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 UIComponentScrollAlphabetindexermodifier1160 { + scroller: Scroller = new Scroller() + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + 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('UIComponentScrollAlphabetindexermodifier1160') + .scrollable(ScrollDirection.Vertical) + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + .friction(undefined) + .edgeEffect(EdgeEffect.None) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1550.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1550.ets new file mode 100644 index 0000000000000000000000000000000000000000..f85313e190aa8dd0a59f59ee451dab0f4f8c8274 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1550.ets @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { InputMethodListDialog } from '@ohos.inputMethodList'; + +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier1550 { + scroller: Scroller = new Scroller; + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] + build() { + Scroll(this.scroller) { + Column() { + ForEach(this.arr, (item: number) => { + Text(item.toString()) + .width('90%') + .height(200) + .backgroundColor(0xFFFFFF) + .borderWidth(1) + .borderColor(Color.Black) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + }, (item: string) => item) + }.width('100%').backgroundColor(0xDCDCDC) + } + .id('UIComponentScrollAlphabetindexermodifier1550') + .backgroundColor(Color.Yellow) + .height('100%') + .edgeEffect(EdgeEffect.Spring) + .scrollSnap({snapAlign:ScrollSnapAlign.CENTER, snapPagination:150}) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1560.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1560.ets new file mode 100644 index 0000000000000000000000000000000000000000..dbd763ed381693cf084519ac170efda75c2988ed --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1560.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 UIComponentScrollAlphabetindexermodifier1560 { + scroller: Scroller = new Scroller; + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] + build() { + Scroll(this.scroller) { + Column() { + ForEach(this.arr, (item: number) => { + Text(item.toString()) + .width('90%') + .height(200) + .backgroundColor(0xFFFFFF) + .borderWidth(1) + .borderColor(Color.Black) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + }, (item: string) => item) + }.width('100%').backgroundColor(0xDCDCDC) + } + .id('UIComponentScrollAlphabetindexermodifier1560') + .backgroundColor(Color.Yellow) + .height('100%') + .edgeEffect(EdgeEffect.Spring) + .scrollSnap({snapAlign:ScrollSnapAlign.NONE, snapPagination:[30,60,90,120],enableSnapToEnd:false }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1620.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1620.ets new file mode 100644 index 0000000000000000000000000000000000000000..d8f86bce0cd75016cf39590fd501d2ff719943c5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1620.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 UIComponentScrollAlphabetindexermodifier1620 { + scroller: Scroller = new Scroller; + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] + build() { + Scroll(this.scroller) { + Column() { + ForEach(this.arr, (item: number) => { + Text(item.toString()) + .width('90%') + .height(200) + .backgroundColor(0xFFFFFF) + .borderWidth(1) + .borderColor(Color.Black) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + }, (item: string) => item) + }.width('100%').backgroundColor(0xDCDCDC) + } + .id('UIComponentScrollAlphabetindexermodifier1620') + .backgroundColor(Color.Yellow) + .height('100%') + .edgeEffect(EdgeEffect.Spring) + .scrollSnap({snapAlign:ScrollSnapAlign.NONE, snapPagination:[30,60,90,120],enableSnapToEnd:true }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1630.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1630.ets new file mode 100644 index 0000000000000000000000000000000000000000..c7bc4d53c8aa34c659c8f16911103d134be436be --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1630.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 UIComponentScrollAlphabetindexermodifier1630 { + scroller: Scroller = new Scroller; + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] + build() { + Scroll(this.scroller) { + Column() { + ForEach(this.arr, (item: number) => { + Text(item.toString()) + .width('90%') + .height(200) + .backgroundColor(0xFFFFFF) + .borderWidth(1) + .borderColor(Color.Black) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + }, (item: string) => item) + }.width('100%').backgroundColor(0xDCDCDC) + } + .backgroundColor(Color.Yellow) + .height('100%') + .edgeEffect(EdgeEffect.Spring) + .scrollSnap({snapAlign:ScrollSnapAlign.NONE, snapPagination:[30,60,90,120],enableSnapToEnd:true }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1640.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1640.ets new file mode 100644 index 0000000000000000000000000000000000000000..ec7fec61dd3741e5760b38a8845ed7390cfa0fc6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1640.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 UIComponentScrollAlphabetindexermodifier1640 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier1640') + .autoCollapse(false) + .selectedColor(Color.Yellow) + .selectedColor(Color.Blue) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupItemBackgroundColor(undefined) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1650.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1650.ets new file mode 100644 index 0000000000000000000000000000000000000000..afc1da0004460d2853ceba8083a2bb1e5d187795 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1650.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. + */ +import { AlphabetIndexerModifier, GridModifier, ListModifier } from '@ohos.arkui.modifier'; +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier1650 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + @State modifier1: AlphabetIndexerModifier = new AlphabetIndexerModifier().selectedColor(Color.Yellow); + @State modifier2: AlphabetIndexerModifier = new AlphabetIndexerModifier().itemSize(-2); + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier1650') + .autoCollapse(false) + .selectedColor(Color.Yellow) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(-2) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupItemBackgroundColor(undefined) + .attributeModifier(this.modifier1) + .attributeModifier(this.modifier2) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier20.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier20.ets new file mode 100644 index 0000000000000000000000000000000000000000..9fd5d165e6f1c472596fe7eec242e131b7b314f6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier20.ets @@ -0,0 +1,121 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier20 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .id('A') + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .id('AlphabetIndexerSample'+item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier20') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor(0xFFFAF0) + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(0xD2B48C) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .popupFont({ size: 30, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,"1%") + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xCCCCCC) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier290.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier290.ets new file mode 100644 index 0000000000000000000000000000000000000000..0f70e2ccfe0acc3365fdeaccbd98c745852050bf --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier290.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. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier290 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier290') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor(0xFFFAF0) + .selectedBackgroundColor(0xCCCCCC) + .popupBackground('app.color.green') + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .popupFont({ size: 30, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xCCCCCC) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier30.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier30.ets new file mode 100644 index 0000000000000000000000000000000000000000..c1dcdddeb7a44be5376d514bbad50cade5f0e873 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier30.ets @@ -0,0 +1,121 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier30 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .id('A') + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .id('AlphabetIndexerSample'+item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier30') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor(0xFFFAF0) + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(0xD2B48C) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .popupFont({ size: 30, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,"10fp") + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xCCCCCC) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier300.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier300.ets new file mode 100644 index 0000000000000000000000000000000000000000..79c178ca95a1bb6e7bbcf51043f32c7fa9d0074e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier300.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. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier300 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier300') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor(0xFFFAF0) + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(-123) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .popupFont({ size: 30, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xCCCCCC) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier310.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier310.ets new file mode 100644 index 0000000000000000000000000000000000000000..43b3d4c6f1563e6394eb4703e081d5675e3998c9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier310.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. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier310 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier310') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor(0xFFFAF0) + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(0xaabbcc) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .popupFont({ size: 30, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xCCCCCC) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier320.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier320.ets new file mode 100644 index 0000000000000000000000000000000000000000..d7cd51265be5a69a945d9f55dbb793e55b01101a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier320.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. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier320 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier320') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor(0xFFFAF0) + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Yellow) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .popupFont({ size: 30, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xCCCCCC) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier330.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier330.ets new file mode 100644 index 0000000000000000000000000000000000000000..05386b00a5b1455b04a5e1e0f5a40a1b3bc08d62 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier330.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. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier330 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier330') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor(0xFFFAF0) + .selectedBackgroundColor(0xCCCCCC) + .popupBackground('rgb(255,100,255)') + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .popupFont({ size: 30, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xCCCCCC) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier340.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier340.ets new file mode 100644 index 0000000000000000000000000000000000000000..5e92f05e6da36df92efba8c47c9c73dc9b30e1ed --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier340.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 UIComponentScrollAlphabetindexermodifier340 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier340') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + // .popupColor($r("app.color.green")) + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xCCCCCC) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier350.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier350.ets new file mode 100644 index 0000000000000000000000000000000000000000..cc49e0226963ebcaa617a11f7908e24cc6afc59a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier350.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 UIComponentScrollAlphabetindexermodifier350 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier350') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor(-123) + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xCCCCCC) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier360.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier360.ets new file mode 100644 index 0000000000000000000000000000000000000000..f45f56753241c89c2b26cf6d7bb7fddbde3d289b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier360.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 UIComponentScrollAlphabetindexermodifier360 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier360') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor(0xaabbcc) + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xCCCCCC) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier370.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier370.ets new file mode 100644 index 0000000000000000000000000000000000000000..2d23cb009f162881d2ecd12174e703f986c2d492 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier370.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 UIComponentScrollAlphabetindexermodifier370 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier370') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor(Color.Yellow) + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xCCCCCC) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier380.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier380.ets new file mode 100644 index 0000000000000000000000000000000000000000..ce405aad76a1989351ea33b186ac1d75c5b833de --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier380.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 UIComponentScrollAlphabetindexermodifier380 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier380') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xCCCCCC) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier390.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier390.ets new file mode 100644 index 0000000000000000000000000000000000000000..c8efb83463bc57f1f10025943c49d8c15443220c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier390.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. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier390 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier390') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xCCCCCC) + .popupFont({size:-20,weight:400,family:'Harmonyos Sans',style: FontStyle.Normal}) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier40.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier40.ets new file mode 100644 index 0000000000000000000000000000000000000000..c43467877c199b17ccf7be5e950f318ade5a5180 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier40.ets @@ -0,0 +1,121 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier40 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .id('A') + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .id('AlphabetIndexerSample'+item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier40') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor(0xFFFAF0) + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(0xD2B48C) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .popupFont({ size: 30, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,"101px") + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xCCCCCC) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return [] ; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier400.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier400.ets new file mode 100644 index 0000000000000000000000000000000000000000..d6afed3464ba4a522f3df3af54b61a3d3c391e66 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier400.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. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier400 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier400') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xCCCCCC) + .popupFont({size:10,weight:-8,family:'Harmonyos Sans',style: FontStyle.Normal}) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier410.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier410.ets new file mode 100644 index 0000000000000000000000000000000000000000..393b6512e86665fd0a37b0c6e26799a4795700ab --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier410.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. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier410 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier410') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xCCCCCC) + .popupFont({size:10,weight:10,family:'Harmonyos Sans',style: FontStyle.Normal}) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier420.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier420.ets new file mode 100644 index 0000000000000000000000000000000000000000..50732ee127a77967df5a6d831abb32e10919b2e5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier420.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. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier420 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier420') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xCCCCCC) + .popupFont({size:10,weight:400,family:'Harmonyos Sans',style: FontStyle.Normal}) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier430.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier430.ets new file mode 100644 index 0000000000000000000000000000000000000000..96824166f05ff0c5301ed696b837bc85e52ede76 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier430.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. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier430 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier430') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xCCCCCC) + .popupFont({size:10,weight:500,family:'Harmonyos Sans',style: FontStyle.Normal}) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier440.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier440.ets new file mode 100644 index 0000000000000000000000000000000000000000..28ec7232cade891e848d8bfb8fb0c311aaac9f36 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier440.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. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier440 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier440') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xCCCCCC) + .popupFont({size:20,weight:400,family:'Harmonyos Sans',style: FontStyle.Normal}) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier450.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier450.ets new file mode 100644 index 0000000000000000000000000000000000000000..5feb8bd43d6e924d41cda8763d9b15d1138dc76b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier450.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. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier450 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier450') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xCCCCCC) + .popupFont({size:20,weight:400,family:'$r("app.string.button_font_sans")',style: FontStyle.Normal}) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier460.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier460.ets new file mode 100644 index 0000000000000000000000000000000000000000..e9633b09ccbc7f8f97161c0cef321ab756ea800b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier460.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. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier460 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier460') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .popupFont({size:20,weight:500,family:'$r("app.string.button_font_sans")',style: FontStyle.Normal}) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(Color.Red) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index) + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier470.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier470.ets new file mode 100644 index 0000000000000000000000000000000000000000..643bb23ee8196416cca17545711f64fae25794d9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier470.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. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier470 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier470') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .popupFont({size:20,weight:500,family:'$r("app.string.button_font_sans")',style: FontStyle.Normal}) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xffffff) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index) + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier480.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier480.ets new file mode 100644 index 0000000000000000000000000000000000000000..2a3f1cdbafbdea0eb75b95852b2e8c30a04bc998 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier480.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. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier480 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier480') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .popupFont({size:20,weight:500,family:'$r("app.string.button_font_sans")',style: FontStyle.Normal}) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + // .popupItemBackgroundColor($r("app.color.bule")) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index) + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier490.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier490.ets new file mode 100644 index 0000000000000000000000000000000000000000..4994330bd964355f3532b6f88540d771b9f70028 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier490.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. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier490 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier490') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .popupFont({size:20,weight:500,family:'$r("app.string.button_font_sans")',style: FontStyle.Normal}) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor('rgba(255,100,255,0.5)') + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier50.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier50.ets new file mode 100644 index 0000000000000000000000000000000000000000..d0c5591eac9eb6bf9a334eac605d3f491f383061 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier50.ets @@ -0,0 +1,121 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier50 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .id('A') + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .id('AlphabetIndexerSample'+item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier50') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor(0xFFFAF0) + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(0xD2B48C) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .popupFont({ size: 30, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,"10px") + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xCCCCCC) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier500.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier500.ets new file mode 100644 index 0000000000000000000000000000000000000000..786cd84c71b18ce1f9937ca0b911889913557805 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier500.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. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier500 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier500') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .popupFont({size:20,weight:500,family:'$r("app.string.button_font_sans")',style: FontStyle.Normal}) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(undefined) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier510.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier510.ets new file mode 100644 index 0000000000000000000000000000000000000000..37e68956cc7bf42e918468caaf097533228e397e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier510.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. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier510 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier510') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .popupFont({size:20,weight:500,family:'$r("app.string.button_font_sans")',style: FontStyle.Normal}) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({size:-20,weight:400,family:"Harmony0S Sans",style:FontStyle.Normal }) + .popupItemBackgroundColor(undefined) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier520.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier520.ets new file mode 100644 index 0000000000000000000000000000000000000000..7f05a1a8a55abff36cb2fe7cf6b68ae55d958be0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier520.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 UIComponentScrollAlphabetindexermodifier520 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier520') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({size:10,weight:-8,family:"Harmony0S Sans",style:FontStyle.Normal }) + .popupItemBackgroundColor(undefined) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier530.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier530.ets new file mode 100644 index 0000000000000000000000000000000000000000..3ffe7037173cdfb6a13a56de0fb80f05f5a406d2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier530.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 UIComponentScrollAlphabetindexermodifier530 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier530') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({size:10,weight:10,family:"Harmony0S Sans",style:FontStyle.Normal }) + .popupItemBackgroundColor(undefined) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier540.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier540.ets new file mode 100644 index 0000000000000000000000000000000000000000..3f340df56efada518f142b52d2ff909ef64267eb --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier540.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 UIComponentScrollAlphabetindexermodifier540 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier540') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({size:10,weight:400,family:"Harmony0S Sans",style:FontStyle.Normal }) + .popupItemBackgroundColor(undefined) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier550.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier550.ets new file mode 100644 index 0000000000000000000000000000000000000000..994f23052c907a2de0c1af8282a54bac11dd50ea --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier550.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 UIComponentScrollAlphabetindexermodifier550 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier550') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({size:10,weight:500,family:"Harmony0S Sans",style:FontStyle.Italic }) + .popupItemBackgroundColor(undefined) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier560.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier560.ets new file mode 100644 index 0000000000000000000000000000000000000000..1f0d26a7aa8fc56ebb4522526e5464943ed755dd --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier560.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 UIComponentScrollAlphabetindexermodifier560 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier560') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({size:20,weight:400,family:"Harmony0S Sans",style:FontStyle.Normal }) + .popupItemBackgroundColor(undefined) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier570.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier570.ets new file mode 100644 index 0000000000000000000000000000000000000000..dbaedd728168053c754df09b7463e19ae26b2008 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier570.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 UIComponentScrollAlphabetindexermodifier570 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier570') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + // .popupItemFont({size:20,weight:500,family:$r("app.string.button_font_sans"),style:FontStyle.Normal }) + .popupItemBackgroundColor(undefined) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier580.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier580.ets new file mode 100644 index 0000000000000000000000000000000000000000..c3dcbd812f106ef36384170381ccb56f0e2c0108 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier580.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 UIComponentScrollAlphabetindexermodifier580 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier580') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupPosition(undefined) + .popupItemBackgroundColor(undefined) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier590.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier590.ets new file mode 100644 index 0000000000000000000000000000000000000000..c09dbe69736c2f90e6833d8f8ec88a981f68d107 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier590.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 UIComponentScrollAlphabetindexermodifier590 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier590') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupPosition({ x:-30, y:-20 }) + .popupItemBackgroundColor(undefined) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier60.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier60.ets new file mode 100644 index 0000000000000000000000000000000000000000..e06f8e2a15a3e43c374dc5194a4a0ef8ed05033b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier60.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. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier60 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier60') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor(0xFFFAF0) + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(0xD2B48C) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .popupFont({ size: 30, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,0) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xCCCCCC) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier600.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier600.ets new file mode 100644 index 0000000000000000000000000000000000000000..18b9e52c61d1a4735d543dd81dc8b338023f34dc --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier600.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 UIComponentScrollAlphabetindexermodifier600 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier600') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupPosition({ x:-30, y:20 }) + .popupItemBackgroundColor(undefined) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier610.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier610.ets new file mode 100644 index 0000000000000000000000000000000000000000..faccb713c19b6fff86ab57d5e6b8b38883a2f648 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier610.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 UIComponentScrollAlphabetindexermodifier610 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier610') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupPosition({ x:30, y:-20 }) + .popupItemBackgroundColor(undefined) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier620.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier620.ets new file mode 100644 index 0000000000000000000000000000000000000000..28b3b2be37385714410a4a95d64b29e8ca7b88e5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier620.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 UIComponentScrollAlphabetindexermodifier620 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier620') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupPosition({ x:30, y:20 }) + .popupItemBackgroundColor(undefined) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier680.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier680.ets new file mode 100644 index 0000000000000000000000000000000000000000..12cb9f03c7269922f2b96608c0e2aebbecd4628c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier680.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 UIComponentScrollAlphabetindexermodifier680 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier680') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupUnselectedColor('$r("app.color.green“)') + .popupItemBackgroundColor(undefined) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier690.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier690.ets new file mode 100644 index 0000000000000000000000000000000000000000..20f835bb98033b01a568abf25858ffb098ebd7d2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier690.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 UIComponentScrollAlphabetindexermodifier690 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier690') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupUnselectedColor(-123) + .popupItemBackgroundColor(undefined) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier70.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier70.ets new file mode 100644 index 0000000000000000000000000000000000000000..0a09f75bd45bdc019e320ecbe94595a2f8e34913 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier70.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. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier70 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier70') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor(0xFFFAF0) + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(0xD2B48C) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .popupFont({ size: 30, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,-10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xCCCCCC) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier700.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier700.ets new file mode 100644 index 0000000000000000000000000000000000000000..edbffae9b7ad7c51508047b47ef8e152c75e0420 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier700.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 UIComponentScrollAlphabetindexermodifier700 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier700') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupUnselectedColor(0xaabbcc) + .popupItemBackgroundColor(undefined) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier710.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier710.ets new file mode 100644 index 0000000000000000000000000000000000000000..de671dc1b2fc7901bc9d669dc1b7f02999686af8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier710.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 UIComponentScrollAlphabetindexermodifier710 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier710') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupUnselectedColor(Color.Yellow) + .popupItemBackgroundColor(undefined) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier80.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier80.ets new file mode 100644 index 0000000000000000000000000000000000000000..5f6f81e609a1ae20d55e7866508d4fa9001e162d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier80.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. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier80 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier80') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor(0xFFFAF0) + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(0xD2B48C) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .popupFont({ size: 30, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,0) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xCCCCCC) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier90.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier90.ets new file mode 100644 index 0000000000000000000000000000000000000000..862cf2146c8da2ae4c8c6a439427a2891614899c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier90.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. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier90 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier90') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor(0xFFFAF0) + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(0xD2B48C) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .popupFont({ size: 30, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xCCCCCC) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier940.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier940.ets new file mode 100644 index 0000000000000000000000000000000000000000..17ef62d679d4e7e1c561b539d6d938181cbda0ac --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier940.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 UIComponentScrollAlphabetindexermodifier940 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier940') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(false) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(Color.Yellow) + .popupItemBackgroundColor(undefined) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier950.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier950.ets new file mode 100644 index 0000000000000000000000000000000000000000..5ad83cfe1c3cbf0e4eaaf8564356fa12ae4e2e2f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier950.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 UIComponentScrollAlphabetindexermodifier950 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier950') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(Color.Yellow) + .popupItemBackgroundColor(undefined) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier960.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier960.ets new file mode 100644 index 0000000000000000000000000000000000000000..8d3443b9c60471acd1ca5e54a38358117c0a3677 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier960.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 UIComponentScrollAlphabetindexermodifier960 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier960') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(undefined) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(Color.Yellow) + .popupItemBackgroundColor(undefined) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra10.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra10.ets new file mode 100644 index 0000000000000000000000000000000000000000..d1cbcd2d04bcd2b663a1f7d0a27b799867efe4da --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra10.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 { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIComponentScrollScrollExtra10 { + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]; + scroller: Scroller = new Scroller(); + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + List({ space: 20, scroller: this.scroller}) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text("item" + item ) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('80%') + .height(100) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .listDirection(Axis.Vertical) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + Button('Button') + .id('UIComponentScrollScrollExtra10') + .onClick(() => { + this.scroller.scrollToIndex(20,false,ScrollAlign.END,{ extraOffset: LengthMetrics.vp(20) }); + }) + }.width('100%').margin({ top: 5 }).height('80%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra100.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra100.ets new file mode 100644 index 0000000000000000000000000000000000000000..8099cf53467c46a2814e3777671a2d6a9ad8fcaf --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra100.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 { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIComponentScrollScrollExtra100 { + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]; + scroller: Scroller = new Scroller(); + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + List({ space: 20, scroller: this.scroller}) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text("item" + item ) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('80%') + .height(100) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .listDirection(Axis.Vertical) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .listDirection(Axis.Horizontal) + Button('Button') + .id('UIComponentScrollScrollExtra100') + .onClick(() => { + this.scroller.scrollToIndex(20,false,ScrollAlign.START,{ extraOffset: LengthMetrics.vp(20) }); + this.arr.unshift(this.arr[0]-1); + }) + + }.width('100%').margin({ top: 5 }).height('80%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra110.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra110.ets new file mode 100644 index 0000000000000000000000000000000000000000..6f12019e92dcfc876f3c66dede3c4d2e948707f0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra110.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 { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIComponentScrollScrollExtra110 { + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]; + scroller: Scroller = new Scroller(); + @State heightValue: number = 100; + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + List({ space: 20, scroller: this.scroller}) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text("item" + item ) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('80%') + .height(this.heightValue) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .listDirection(Axis.Vertical) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + Button('Button') + .id('UIComponentScrollScrollExtra110') + .onClick(() => { + this.scroller.scrollToIndex(20,false,ScrollAlign.START,{ extraOffset: LengthMetrics.vp(20) }); + this.heightValue = this.heightValue+10; + }) + + }.width('100%').margin({ top: 5 }).height('80%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra120.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra120.ets new file mode 100644 index 0000000000000000000000000000000000000000..09540a94febbbe255e29e00c4a2ae1c5cfa3e75f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra120.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 { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIComponentScrollScrollExtra120 { + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]; + scroller: Scroller = new Scroller(); + @State widthtValue: number = 100; + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + List({ space: 20, scroller: this.scroller}) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text("item" + item ) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width(this.widthtValue) + .height(100) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .listDirection(Axis.Vertical) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + Button('Button') + .id('UIComponentScrollScrollExtra120') + .onClick(() => { + this.scroller.scrollToIndex(20,false,ScrollAlign.START,{ extraOffset: LengthMetrics.vp(20) }); + this.widthtValue = this.widthtValue+10; + }) + + }.width('100%').margin({ top: 5 }).height('80%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra130.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra130.ets new file mode 100644 index 0000000000000000000000000000000000000000..e010710af5fbffc5d6b5b7c827fd847390cc2df3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra130.ets @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIComponentScrollScrollExtra130 { + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]; + scroller: Scroller = new Scroller(); + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + List({ space: 20, scroller: this.scroller}) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text("item" + item ) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('80%') + .height(100) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .listDirection(Axis.Vertical) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + Button('Button') + .id('UIComponentScrollScrollExtra130') + .onClick(() => { + this.scroller.scrollToIndex(20,true,ScrollAlign.START,{ extraOffset: LengthMetrics.vp(20) }); + }) + + }.width('100%').margin({ top: 5 }).height('80%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra140.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra140.ets new file mode 100644 index 0000000000000000000000000000000000000000..94fd6e25849064461cf762bf8f8e537ccc771396 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra140.ets @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIComponentScrollScrollExtra140 { + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]; + scroller: Scroller = new Scroller(); + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + List({ space: 20, scroller: this.scroller}) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text("item" + item ) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('80%') + .height(100) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .listDirection(Axis.Vertical) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + Button('Button') + .id('UIComponentScrollScrollExtra140') + .onClick(() => { + this.scroller.scrollToIndex(20,false,ScrollAlign.END,{ extraOffset: LengthMetrics.vp(20) }); + }) + + }.width('100%').margin({ top: 5 }).height('80%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra150.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra150.ets new file mode 100644 index 0000000000000000000000000000000000000000..a2021f70f493b045d187a63fbf77b591669ab771 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra150.ets @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIComponentScrollScrollExtra150 { + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]; + scroller: Scroller = new Scroller(); + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + List({ space: 20, scroller: this.scroller}) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text("item" + item ) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('80%') + .height(100) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .listDirection(Axis.Vertical) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + Button('Button') + .id('UIComponentScrollScrollExtra150') + .onClick(() => { + this.scroller.scrollToIndex(-1,false,ScrollAlign.END,{ extraOffset: LengthMetrics.vp(20) }); + }) + + }.width('100%').margin({ top: 5 }).height('80%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra160.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra160.ets new file mode 100644 index 0000000000000000000000000000000000000000..6870663c74f0de820795074f5f1693b30f9c853f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra160.ets @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIComponentScrollScrollExtra160 { + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]; + scroller: Scroller = new Scroller(); + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + List({ space: 20, scroller: this.scroller}) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text("item" + item ) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('80%') + .height(100) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .listDirection(Axis.Vertical) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + Button('Button') + .id('UIComponentScrollScrollExtra160') + .onClick(() => { + this.scroller.scrollToIndex(200,false,ScrollAlign.END,{ extraOffset: LengthMetrics.vp(20) }); + }) + + }.width('100%').margin({ top: 5 }).height('80%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra170.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra170.ets new file mode 100644 index 0000000000000000000000000000000000000000..57c707b5dae261a1ade577dc14355576437c7c33 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra170.ets @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIComponentScrollScrollExtra170 { + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]; + scroller: Scroller = new Scroller(); + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + List({ space: 20, scroller: this.scroller}) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text("item" + item ) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('80%') + .height(100) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .listDirection(Axis.Vertical) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + Button('Button') + .id('UIComponentScrollScrollExtra170') + .onClick(() => { + this.scroller.scrollToIndex(undefined,false,ScrollAlign.END,{ extraOffset: LengthMetrics.vp(20) }); + }) + + }.width('100%').margin({ top: 5 }).height('80%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra180.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra180.ets new file mode 100644 index 0000000000000000000000000000000000000000..4a8d204d215a2738af8e9ff89c1b73533407a82a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra180.ets @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIComponentScrollScrollExtra180 { + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]; + scroller: Scroller = new Scroller(); + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + List({ space: 20, scroller: this.scroller}) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text("item" + item ) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('80%') + .height(100) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .listDirection(Axis.Vertical) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + Button('Button') + .id('UIComponentScrollScrollExtra180') + .onClick(() => { + this.scroller.scrollToIndex(null,false,ScrollAlign.END,{ extraOffset: LengthMetrics.vp(20) }); + }) + + }.width('100%').margin({ top: 5 }).height('80%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra190.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra190.ets new file mode 100644 index 0000000000000000000000000000000000000000..9a1b94732cd7ae1be9e541689d67517f6c7ee1e7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra190.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 { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIComponentScrollScrollExtra190 { + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]; + scroller: Scroller = new Scroller(); + @State SpaceValue: number = 2; + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + List({ space: this.SpaceValue, scroller: this.scroller}) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text("item" + item ) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('80%') + .height(100) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .listDirection(Axis.Vertical) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + Button('Button') + .id('UIComponentScrollScrollExtra190') + .onClick(() => { + this.scroller.scrollToIndex(20,false,ScrollAlign.END,{ extraOffset: LengthMetrics.vp(20) }); + this.SpaceValue = this.SpaceValue + 10; + }) + + }.width('100%').margin({ top: 5 }).height('80%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra20.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra20.ets new file mode 100644 index 0000000000000000000000000000000000000000..e22fd790219ca2171c212ef19299efa4df75142e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra20.ets @@ -0,0 +1,85 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT 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' +class ListandgridListAnimation016_DataSource implements IDataSource { + private list: number[] = []; + + constructor(list: number[]) { + this.list = list; + } + + totalCount(): number { + return this.list.length; + } + + getData(index: number): number { + return this.list[index]; + } + + registerDataChangeListener(listener: DataChangeListener): void { + } + + unregisterDataChangeListener() { + } +} + +@Entry +@Component +struct UIComponentScrollScrollExtra20 { + @State arr: ListandgridListAnimation016_DataSource = new ListandgridListAnimation016_DataSource([]); + @State showList: number[] = []; + private scroller: Scroller = new Scroller(); + private isSmooth: boolean = true; + + aboutToAppear(): void { + let list: number[] = [] + for (let i = 1; i <= 30; i++) { + list.push(i); + } + this.arr = new ListandgridListAnimation016_DataSource(list); + } + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + List({ space: 20, scroller: this.scroller}) { + LazyForEach(this.arr, (item: number) => { + ListItem() { + Text("item" + item ) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('80%') + .height(100) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .listDirection(Axis.Vertical) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + Button('Button') + .id('UIComponentScrollScrollExtra20') + .onClick(() => { + this.scroller.scrollToIndex(20,false,ScrollAlign.END,{ extraOffset: LengthMetrics.vp(20) }); + }) + }.width('100%').margin({ top: 5 }).height('80%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra210.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra210.ets new file mode 100644 index 0000000000000000000000000000000000000000..918df61cf3c553b63ba0152dab531a71cb0d06af --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra210.ets @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIComponentScrollScrollExtra210 { + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]; + scroller: Scroller = new Scroller(); + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + List({ space: 20, scroller: this.scroller}) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text("item" + item ) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('80%') + .height(100) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .listDirection(Axis.Vertical) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + Button('Button') + .id('UIComponentScrollScrollExtra210') + .onClick(() => { + this.scroller.scrollToIndex(20,false,ScrollAlign.END,{ extraOffset: LengthMetrics.vp(-5) }); + }) + + }.width('100%').margin({ top: 5 }).height('80%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra220.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra220.ets new file mode 100644 index 0000000000000000000000000000000000000000..a849794b4864e9a027f71c4ba2d54605db8b9058 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra220.ets @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIComponentScrollScrollExtra220 { + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]; + scroller: Scroller = new Scroller(); + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + List({ space: 20, scroller: this.scroller}) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text("item" + item ) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('80%') + .height(100) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .listDirection(Axis.Vertical) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + Button('Button') + .id('UIComponentScrollScrollExtra220') + .onClick(() => { + this.scroller.scrollToIndex(20,false,ScrollAlign.END,{ extraOffset: LengthMetrics.vp(2000) }); + }) + + }.width('100%').margin({ top: 5 }).height('80%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra230.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra230.ets new file mode 100644 index 0000000000000000000000000000000000000000..328dad9ddf32aee1a745117c1e3ab1d1fe9beb46 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra230.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. + */ +import { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIComponentScrollScrollExtra230 { + @State numbers: string= ('1fr 1fr 1fr 1fr'); + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]; + scroller: Scroller = new Scroller(); + @State Position: number = 20; + @State widthValue: number = 100; + + onPageShow(): void { + this.scroller.scrollToIndex(20,false,ScrollAlign.START,{ extraOffset: LengthMetrics.vp(20) }); + } + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.arr, (item: number) => { + GridItem() { + Text("item" + item ) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width(this.widthValue) + .height(100) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .columnsTemplate(this.numbers) + .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('90%') + .backgroundColor(0xFAEEE0) + .height(300) + + Button('Button') + .id('UIComponentScrollScrollExtra230') + .onClick(() => { + this.numbers = ('1fr 1fr 1fr'); + }) + }.width('100%').margin({ top: 5 }).height('80%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra240.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra240.ets new file mode 100644 index 0000000000000000000000000000000000000000..0b7b11b929740f759df29a5b341e6f55d187c9b6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra240.ets @@ -0,0 +1,62 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIComponentScrollScrollExtra240 { + @State numbers: String[] = ['0', '1', '2', '3', '4','5',]; + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]; + scroller: Scroller = new Scroller(); + @State Position: number = 20; + @State layoutDirection : GridDirection = GridDirection.Row; + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.arr, (item: number) => { + GridItem() { + Text("item" + item ) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width(100) + .height(100) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .layoutDirection(this.layoutDirection) + .maxCount(30) + .minCount(10) + .cellLength(100) + .columnsGap(10) + .rowsGap(10) + + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + + Button('Button') + .id('UIComponentScrollScrollExtra240') + .onClick(() => { + this.scroller.scrollToIndex(10,false,ScrollAlign.START,{ extraOffset: LengthMetrics.vp(5) }); + this.layoutDirection = GridDirection.Column; + }) + }.width('100%').margin({ top: 5 }).height('80%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra250.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra250.ets new file mode 100644 index 0000000000000000000000000000000000000000..44f4b2577e5b951a4be5136d3f95b33c2e7f1bc9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra250.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. + */ +import { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIComponentScrollScrollExtra { + @State numbers: String[] = ['0', '1', '2', '3', '4','5',]; + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]; + scroller: Scroller = new Scroller(); + @State Position: number = 20; + @State widthValue: number = 100 + + onPageShow(): void { + this.scroller.scrollToIndex(20,false,ScrollAlign.START,{ extraOffset: LengthMetrics.vp(20) }); + } + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.arr, (item: number) => { + GridItem() { + Text("item" + item ) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width(this.widthValue) + .height(100) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .columnsTemplate('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('90%') + .backgroundColor(0xFAEEE0) + .height(300) + + Button('Button') + .id('UIComponentScrollScrollExtra250') + .onClick(() => { + this.arr.unshift(this.arr[0]-1); + }) + }.width('100%').margin({ top: 5 }).height('80%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra260.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra260.ets new file mode 100644 index 0000000000000000000000000000000000000000..10f593946fdaa161fb408c81530adf545b09cdb5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra260.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 { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIComponentScrollScrollExtra260 { + @State numbers: String[] = ['0', '1', '2', '3', '4','5',]; + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]; + scroller: Scroller = new Scroller(); + @State Position: number = 20; + @State heightValue: number = 100; + + onPageShow(): void { + this.scroller.scrollToIndex(20,false,ScrollAlign.START,{ extraOffset: LengthMetrics.vp(20) }); + } + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.arr, (item: number) => { + GridItem() { + Text("item" + item ) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(this.heightValue) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .columnsTemplate('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('90%') + .backgroundColor(0xFAEEE0) + .height(300) + + Button('next page') + .id('UIComponentScrollScrollExtra260') + .onClick(() => { + this.heightValue = this.heightValue + 10; + + }) + }.width('100%').margin({ top: 5 }).height('80%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra270.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra270.ets new file mode 100644 index 0000000000000000000000000000000000000000..2e30907cbc02cc95563f9057cd1d498277b36c9c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra270.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. + */ +import { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIComponentScrollScrollExtra0270 { + @State numbers: String[] = ['0', '1', '2', '3', '4','5',]; + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]; + scroller: Scroller = new Scroller(); + @State Position: number = 20; + @State widthValue: number = 100; + + onPageShow(): void { + this.scroller.scrollToIndex(20,false,ScrollAlign.START,{ extraOffset: LengthMetrics.vp(20) }); + } + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.arr, (item: number) => { + GridItem() { + Text("item" + item ) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width(this.widthValue) + .height(100) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .columnsTemplate('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('90%') + .backgroundColor(0xFAEEE0) + .height(300) + + Button('next page') + .id('UIComponentScrollScrollExtra270') + .onClick(() => { + this.widthValue = this.widthValue + 10; + }) + }.width('100%').margin({ top: 5 }).height('80%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra280.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra280.ets new file mode 100644 index 0000000000000000000000000000000000000000..66126ebd3eec209aeed6942b65b16e2bd520d47b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra280.ets @@ -0,0 +1,65 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + + +import { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIComponentScrollScrollExtra280 { + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]; + scroller: Scroller = new Scroller(); + onPageShow(): void { + this.scroller.scrollToIndex(20,false,ScrollAlign.CENTER); + } + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.arr, (item: number) => { + GridItem() { + Text("item" + item ) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('80%') + .height(100) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .columnsTemplate('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('90%') + .backgroundColor(0xFAEEE0) + .height(300) + + Button('Button') + .id('UIComponentScrollScrollExtra280') + .onClick(() => { + this.scroller.scrollToIndex(20,true,ScrollAlign.CENTER); + }) + }.width('100%').margin({ top: 5 }).height('80%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra290.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra290.ets new file mode 100644 index 0000000000000000000000000000000000000000..1d545dfe8cf5147221d0458c9528c45c337b9076 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra290.ets @@ -0,0 +1,62 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIComponentScrollScrollExtra290 { + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]; + scroller: Scroller = new Scroller(); + onPageShow(): void { + this.scroller.scrollToIndex(20,false,ScrollAlign.CENTER); + } + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.arr, (item: number) => { + GridItem() { + Text("item" + item ) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('80%') + .height(100) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .columnsTemplate('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('90%') + .backgroundColor(0xFAEEE0) + .height(300) + + Button('Button') + .id('UIComponentScrollScrollExtra290') + .onClick(() => { + this.scroller.scrollToIndex(20,false,ScrollAlign.END); + }) + }.width('100%').margin({ top: 5 }).height('80%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra30.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra30.ets new file mode 100644 index 0000000000000000000000000000000000000000..4538f95f9d1198f6ecab8a43512a527108486f9f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra30.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 { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIComponentScrollScrollExtra30 { + scroller: Scroller = new Scroller(); + private timeTable: TimeTable[] = [ + { + title: '星期一', + projects: ['语文', '数学', '英语'] + }, + { + title: '星期二', + projects: ['物理', '化学', '生物'] + }, + { + title: '星期三', + projects: ['历史', '地理', '政治'] + }, + { + title: '星期四', + projects: ['美术', '音乐', '体育'] + } + ] + + @Builder + itemHead(text: string) { + Text(text) + .fontSize(20) + .backgroundColor(0xAABBCC) + .width("100%") + .padding(10) + } + + @Builder + itemFoot(num: number) { + Text('共' + num + "节课") + .fontSize(16) + .backgroundColor(0xAABBCC) + .width("100%") + .padding(5) + } + + build() { + Column() { + List({ space: 20,scroller: this.scroller }) { + ForEach(this.timeTable, (item: TimeTable) => { + ListItemGroup({ header: this.itemHead(item.title), footer: this.itemFoot(item.projects.length) }) { + ForEach(item.projects, (project: string) => { + ListItem() { + Text(project) + .width("100%") + .height(100) + .fontSize(20) + .textAlign(TextAlign.Center) + .backgroundColor(0xFFFFFF) + } + }, (item: string) => item) + } + .divider({ strokeWidth: 1, color: Color.Blue }) + }) + } + .width('90%') + .sticky(StickyStyle.Header | StickyStyle.Footer) + .scrollBar(BarState.On) + Button('Button') + .id('UIComponentScrollScrollExtra30') + .onClick(() => { + this.scroller.scrollToIndex(2,false,ScrollAlign.END,{ extraOffset: LengthMetrics.vp(5) }); + + }) + }.width('100%').height('80%').backgroundColor(0xDCDCDC).padding({ top: 5 }) + } +} + +interface TimeTable { + title: string; + projects: string[]; +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra310.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra310.ets new file mode 100644 index 0000000000000000000000000000000000000000..c2b2aa821434f4d942dacb952a6faf42405277f9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra310.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. + */ + + + +import { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIComponentScrollScrollExtra310 { + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]; + scroller: Scroller = new Scroller(); + onPageShow(): void { + this.scroller.scrollToIndex(20,false,ScrollAlign.START,{ extraOffset: LengthMetrics.vp(20) }); + } + + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.arr, (item: number) => { + GridItem() { + Text("item" + item ) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('80%') + .height(100) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .columnsTemplate('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('90%') + .backgroundColor(0xFAEEE0) + .height(300) + + Button('Button') + .id('UIComponentScrollScrollExtra310') + .onClick(() => { + this.scroller.scrollToIndex(20,false,ScrollAlign.END,{ extraOffset: LengthMetrics.vp(-5) }); + }) + }.width('100%').margin({ top: 5 }).height('80%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra320.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra320.ets new file mode 100644 index 0000000000000000000000000000000000000000..fd85f6c99d45bf73c1434adbead9bcef20fe3844 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra320.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. + */ + + + +import { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIComponentScrollScrollExtra320 { + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]; + scroller: Scroller = new Scroller(); + onPageShow(): void { + this.scroller.scrollToIndex(20,false,ScrollAlign.START,{ extraOffset: LengthMetrics.vp(20) }); + } + + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.arr, (item: number) => { + GridItem() { + Text("item" + item ) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('80%') + .height(100) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .columnsTemplate('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('90%') + .backgroundColor(0xFAEEE0) + .height(300) + + Button('Button') + .id('UIComponentScrollScrollExtra320') + .onClick(() => { + this.scroller.scrollToIndex(20,false,ScrollAlign.END,{ extraOffset: LengthMetrics.vp(2000) }); + }) + }.width('100%').margin({ top: 5 }).height('80%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra330.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra330.ets new file mode 100644 index 0000000000000000000000000000000000000000..3aa98c9baeaa68d738431d362763ddb855c3608f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra330.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 { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIComponentScrollScrollExtra330 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + onPageShow(): void { + this.scroller.scrollToIndex(20,false,ScrollAlign.START,{ extraOffset: LengthMetrics.vp(20) }); + } + layoutOptions1: GridLayoutOptions = { + regularSize: [1, 1], + irregularIndexes: [0, 6], + } + + build() { + Column({ space: 5 }) { + Grid(this.scroller, this.layoutOptions1) { + ForEach(this.numbers, (day: string) => { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + }.selectable(false) + }, (day: string) => day) + }, (day: string) => day) + } + .columnsTemplate('1fr 1fr 1fr 1fr 1fr') + .columnsGap(10) + .rowsGap(10) + .multiSelectable(true) + .scrollBar(BarState.On) + .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/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra340.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra340.ets new file mode 100644 index 0000000000000000000000000000000000000000..3d77627ec2217dcec607d4e50e8dba9e07a5c846 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra340.ets @@ -0,0 +1,165 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT 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 { WaterFlowDataSource } from './WaterFlowDataSource' +import { LengthMetrics } from '@kit.ArkUI' +@Reusable +@Component +struct ReusableFlowItem { + @State item: number = 0; + + aboutToReuse(params: Record) { + this.item = params.item; + console.info('Reuse item:' + this.item); + }; + + aboutToAppear() { + console.info('new item:' + this.item); + }; + + build() { + Image('res/waterFlowTest(' + this.item % 5 + ').jpg') + .overlay('N' + this.item, { align: Alignment.Top }) + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } +}; + +@Entry +@Component +struct UIComponentScrollScrollExtra340 { + minSize: number = 80; + maxSize: number = 180; + fontSize: number = 24; + colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F]; + scroller: Scroller = new Scroller(); + dataSource: WaterFlowDataSource = new WaterFlowDataSource(); + dataCount: number = this.dataSource.totalCount(); + private itemHeightArray: number[] = []; + @State sections: WaterFlowSections = new WaterFlowSections(); + sectionMargin: Margin = { top: 10, left: 5, bottom: 10, right: 5 }; + oneColumnSection: SectionOptions = { + itemsCount: 4, + crossCount: 1, + columnsGap: '5vp', + rowsGap: 10, + margin: this.sectionMargin, + onGetItemMainSizeByIndex: (index: number) => { + return this.itemHeightArray[index % 100] + } + }; + twoColumnSection: SectionOptions = { + itemsCount: 2, + crossCount: 2, + onGetItemMainSizeByIndex: (index: number) => { + return 100 + } + }; + lastSection: SectionOptions = { + itemsCount: 20, + crossCount: 2, + onGetItemMainSizeByIndex: (index: number) => { + return this.itemHeightArray[index % 100] + } + }; + + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize); + }; + + setItemSizeArray() { + for (let i = 0; i < 100; i++) { + this.itemHeightArray.push(this.getSize()); + } + }; + + aboutToAppear() { + this.setItemSizeArray() + let sectionOptions: SectionOptions[] = [] + let count = 0 + let oneOrTwo = 0 + while (count < this.dataCount) { + if (this.dataCount - count < 20) { + this.lastSection.itemsCount = this.dataCount - count + sectionOptions.push(this.lastSection) + break; + } + if (oneOrTwo++ % 2 == 0) { + sectionOptions.push(this.oneColumnSection) + count += this.oneColumnSection.itemsCount + } else { + sectionOptions.push(this.twoColumnSection) + count += this.twoColumnSection.itemsCount + } + } + this.sections.splice(0, 0, sectionOptions) + } + + build() { + Column({ space: 2 }) { + Row() { + Button('splice') + .id('UIComponentScrollScrollExtra340') + .height('5%') + .onClick(() => { + let totalCount: number = this.dataSource.totalCount(); + let newSection: SectionOptions = { + itemsCount: totalCount, + crossCount: 2, + onGetItemMainSizeByIndex: (index: number) => { + return this.itemHeightArray[index % 100] + } + }; + let oldLength: number = this.sections.length(); + this.sections.splice(0, oldLength, [newSection]); + this.scroller.scrollToIndex(50,false,ScrollAlign.END,{ extraOffset: LengthMetrics.vp(5) }); + }) + .margin({ top: 10, left: 20 }) + }.margin({ bottom: 20 }) + + WaterFlow({ scroller: this.scroller, sections: this.sections }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + ReusableFlowItem({ item: item }) + } + .width('100%') + // 以onGetItemMainSizeByIndex为准 + .height(100) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate('1fr 1fr') + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('100%') + .layoutWeight(1) + .scrollBar(BarState.On) + .onScrollIndex((first: number, last: number) => { + if (last + 20 >= this.dataSource.totalCount()) { + for (let i = 0; i < 100; i++) { + this.dataSource.addLastItem() + } + const sections: Array = this.sections.values(); + let newSection: SectionOptions = sections[this.sections.length() - 1]; + newSection.itemsCount += 100; + this.sections.update(-1, newSection); + } + }) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra350.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra350.ets new file mode 100644 index 0000000000000000000000000000000000000000..416f363b5faffede5ac059d23a8bd73d3297664b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra350.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 { WaterFlowDataSource } from './WaterFlowDataSource' +import { LengthMetrics } from '@kit.ArkUI' + +@Entry +@Component +struct UIComponentScrollScrollExtra350 { + @State minSize: number = 80; + @State maxSize: number = 180; + @State colume: string = '1fr 1fr'; + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F]; + scroller: Scroller = new Scroller(); + dataSource: WaterFlowDataSource = new WaterFlowDataSource(); + private itemWidthArray: number[] = []; + private itemHeightArray: number[] = []; + + // 计算FlowItem宽/高 + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize); + } + + setItemSizeArray() { + for (let i = 0; i < 100; 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 }) { + Row() { + Button('splice') + .id('UIComponentScrollScrollExtra350') + .height('5%') + .onClick(() => { + this.scroller.scrollToIndex(20,false,ScrollAlign.END,{ extraOffset: LengthMetrics.vp(5) }); + this.colume = '1fr 1fr 1fr'; + }) + .margin({ top: 10, left: 20 }) + }.margin({ bottom: 20 }) + + WaterFlow({ scroller:this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + // 存在对应的jpg文件才会显示图片 + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate(this.colume) + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('90%') + .scrollBar(BarState.On) + .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 }; + }) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra360.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra360.ets new file mode 100644 index 0000000000000000000000000000000000000000..2d7bbcccc169fea8bcdb72d0dd9a7ddb69287f27 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra360.ets @@ -0,0 +1,115 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT 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 { WaterFlowDataSource } from './WaterFlowDataSource' +import { LengthMetrics } from '@kit.ArkUI' + +@Entry +@Component +struct UIComponentScrollScrollExtra360 { + @State minSize: number = 80; + @State maxSize: number = 180; + @State layoutdirection : FlexDirection = FlexDirection.Row; + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F]; + scroller: Scroller = new Scroller(); + dataSource: WaterFlowDataSource = new WaterFlowDataSource(); + private itemWidthArray: number[] = []; + private itemHeightArray: number[] = []; + + // 计算FlowItem宽/高 + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 100; 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({ scroller:this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate('1fr 1fr ') + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('90%') + .scrollBar(BarState.On) + .layoutDirection(this.layoutdirection) + .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 } + + }) + Row() { + Button('Button') + .height('5%') + .id('UIComponentScrollScrollExtra360') + .onClick(() => { + this.layoutdirection = FlexDirection.Column; + this.scroller.scrollToIndex(20,false,ScrollAlign.END,{ extraOffset: LengthMetrics.vp(5) }); + }) + .margin({ top: 10, left: 20 }) + }.margin({ bottom: 20 }) + + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra380.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra380.ets new file mode 100644 index 0000000000000000000000000000000000000000..5107e39629a8d2ed4d4fb286834333cd2e575fce --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra380.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. + */ +import { WaterFlowDataSource } from './WaterFlowDataSource' +import { LengthMetrics } from '@kit.ArkUI' + +@Entry +@Component +struct UIComponentScrollScrollExtra380 { + @State minSize: number = 80; + @State maxSize: number = 180; + @State heightValue: number = 200; + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F]; + scroller: Scroller = new Scroller(); + dataSource: WaterFlowDataSource = new WaterFlowDataSource(); + private itemWidthArray: number[] = []; + private itemHeightArray: number[] = []; + + // 计算FlowItem宽/高 + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize); + } + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 100; 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 }) { + Row() { + Button('splice') + .id('UIComponentScrollScrollExtra380') + .height('5%') + .onClick(() => { + this.scroller.scrollToIndex(20,false,ScrollAlign.END,{ extraOffset: LengthMetrics.vp(5) }); + this.heightValue = this.heightValue + 10; + }) + .margin({ top: 10, left: 20 }) + }.margin({ bottom: 20 }) + + WaterFlow({ scroller:this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + // 存在对应的jpg文件才会显示图片 + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.heightValue) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('90%') + .scrollBar(BarState.On) + .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 }; + }) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra390.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra390.ets new file mode 100644 index 0000000000000000000000000000000000000000..03bfd564aebc5164465f4d0a3f4c40f4c9dd1b29 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra390.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 { WaterFlowDataSource } from './WaterFlowDataSource' +import { LengthMetrics } from '@kit.ArkUI' + +@Entry +@Component +struct UIComponentScrollScrollExtra390 { + @State minSize: number = 80; + @State maxSize: number = 180; + @State widthValue: number = 200; + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F]; + scroller: Scroller = new Scroller(); + dataSource: WaterFlowDataSource = new WaterFlowDataSource(); + private itemWidthArray: number[] = []; + private itemHeightArray: number[] = []; + + // 计算FlowItem宽/高 + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize); + } + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 100; 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 }) { + Row() { + Button('splice') + .id('UIComponentScrollScrollExtra390') + .height('5%') + .onClick(() => { + this.scroller.scrollToIndex(20,false,ScrollAlign.END,{ extraOffset: LengthMetrics.vp(5) }); + this.widthValue = this.widthValue + 10; + }) + .margin({ top: 10, left: 20 }) + }.margin({ bottom: 20 }) + + WaterFlow({ scroller:this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width(this.widthValue) + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('90%') + .scrollBar(BarState.On) + .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 }; + }) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra40.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra40.ets new file mode 100644 index 0000000000000000000000000000000000000000..e1a9332459fe6353e95c660cfcc8970926818ff3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra40.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 { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIComponentScrollScrollExtra40 { + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]; + scroller: Scroller = new Scroller(); + @State widthtValue: number = 2; + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + List({ space: 20, scroller: this.scroller}) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text("item" + item ) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('80%') + .height(100) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .listDirection(Axis.Vertical) + .friction(0.6) + .divider({ strokeWidth: this.widthtValue, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + Button('Button') + .id('UIComponentScrollScrollExtra40') + .onClick(() => { + this.scroller.scrollToIndex(20,false,ScrollAlign.START,{ extraOffset: LengthMetrics.vp(20) }); + this.widthtValue = this.widthtValue + 2; + }) + + }.width('100%').margin({ top: 5 }).height('80%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra400.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra400.ets new file mode 100644 index 0000000000000000000000000000000000000000..528245862519fbd264f9ec782dc42451cab4b9bc --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra400.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 { WaterFlowDataSource } from './WaterFlowDataSource' +import { LengthMetrics } from '@kit.ArkUI' + +@Entry +@Component +struct UIComponentScrollScrollExtra400 { + @State minSize: number = 80; + @State maxSize: number = 180; + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F]; + scroller: Scroller = new Scroller(); + dataSource: WaterFlowDataSource = new WaterFlowDataSource(); + private itemWidthArray: number[] = []; + private itemHeightArray: number[] = []; + + // 计算FlowItem宽/高 + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 100; 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 }) { + Row() { + Button('splice') + .id('UIComponentScrollScrollExtra400') + .height('5%') + .onClick(() => { + this.scroller.scrollToIndex(20,true,ScrollAlign.END,{ extraOffset: LengthMetrics.vp(5) }); + }) + .margin({ top: 10, left: 20 }) + }.margin({ bottom: 20 }) + + WaterFlow({ scroller:this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('90%') + .scrollBar(BarState.On) + .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 }; + }) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra410.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra410.ets new file mode 100644 index 0000000000000000000000000000000000000000..0ebfbd435f54f1e29957edacfe6e01e799e622a0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra410.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 { WaterFlowDataSource } from './WaterFlowDataSource' +import { LengthMetrics } from '@kit.ArkUI' + +@Entry +@Component +struct UIComponentScrollScrollExtra410 { + @State minSize: number = 80; + @State maxSize: number = 180; + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F]; + scroller: Scroller = new Scroller(); + dataSource: WaterFlowDataSource = new WaterFlowDataSource(); + private itemWidthArray: number[] = []; + private itemHeightArray: number[] = []; + + // 计算FlowItem宽/高 + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 100; 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 }) { + Row() { + Button('splice') + .id('UIComponentScrollScrollExtra410') + .height('5%') + .onClick(() => { + this.scroller.scrollToIndex(20,false,ScrollAlign.START,{ extraOffset: LengthMetrics.vp(5) }); + }) + .margin({ top: 10, left: 20 }) + }.margin({ bottom: 20 }) + + WaterFlow({ scroller:this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('90%') + .scrollBar(BarState.On) + .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 }; + }) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra430.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra430.ets new file mode 100644 index 0000000000000000000000000000000000000000..4fabda13e3623bc6f007cdba5e12e9dbd8dac6a5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra430.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 { WaterFlowDataSource } from './WaterFlowDataSource' +import { LengthMetrics } from '@kit.ArkUI' + +@Entry +@Component +struct UIComponentScrollScrollExtra430 { + @State minSize: number = 80; + @State maxSize: number = 180; + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F]; + scroller: Scroller = new Scroller(); + dataSource: WaterFlowDataSource = new WaterFlowDataSource(); + private itemWidthArray: number[] = []; + private itemHeightArray: number[] = []; + + // 计算FlowItem宽/高 + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize); + } + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 100; 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 }) { + Row() { + Button('splice') + .id('UIComponentScrollScrollExtra430') + .height('5%') + .onClick(() => { + this.scroller.scrollToIndex(20,false,ScrollAlign.END,{ extraOffset: LengthMetrics.vp(-5) }); + }) + .margin({ top: 10, left: 20 }) + }.margin({ bottom: 20 }) + + WaterFlow({ scroller:this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('90%') + .scrollBar(BarState.On) + .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 } + }) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra440.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra440.ets new file mode 100644 index 0000000000000000000000000000000000000000..af1968a8305e076c9238387f839bc3c2158a83c5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra440.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 { WaterFlowDataSource } from './WaterFlowDataSource' +import { LengthMetrics } from '@kit.ArkUI' + +@Entry +@Component +struct UIComponentScrollScrollExtra440 { + @State minSize: number = 80; + @State maxSize: number = 180; + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F]; + scroller: Scroller = new Scroller(); + dataSource: WaterFlowDataSource = new WaterFlowDataSource(); + private itemWidthArray: number[] = []; + private itemHeightArray: number[] = []; + + // 计算FlowItem宽/高 + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize); + } + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 100; 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 }) { + Row() { + Button('splice') + .id('UIComponentScrollScrollExtra440') + .height('5%') + .onClick(() => { + this.scroller.scrollToIndex(20,false,ScrollAlign.END,{ extraOffset: LengthMetrics.vp(200) }); + }) + .margin({ top: 10, left: 20 }) + }.margin({ bottom: 20 }) + + WaterFlow({ scroller:this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('90%') + .scrollBar(BarState.On) + .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 }; + }) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra50.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra50.ets new file mode 100644 index 0000000000000000000000000000000000000000..7b71a1d538b47d11607f91ed83c4e067dd5cbc16 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra50.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 { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIComponentScrollScrollExtra50 { + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]; + scroller: Scroller = new Scroller(); + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.arr, (item: number) => { + GridItem() { + Text("item" + item ) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('80%') + .height(100) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .columnsTemplate('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('90%') + .backgroundColor(0xFAEEE0) + .height(300) + + Button('Button') + .id('UIComponentScrollScrollExtra50') + .onClick(() => { + this.scroller.scrollToIndex(20,false,ScrollAlign.START,{ extraOffset: LengthMetrics.vp(20) }); + }) + }.width('100%').margin({ top: 5 }).height('80%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra60.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra60.ets new file mode 100644 index 0000000000000000000000000000000000000000..b91ee255ee6146727b6ab90523bbcd25d98e34ef --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra60.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. + */ +import { WaterFlowDataSource } from './WaterFlowDataSource' +import { LengthMetrics } from '@kit.ArkUI' + +@Entry +@Component +struct UIComponentScrollScrollExtra60 { + @State minSize: number = 80; + @State maxSize: number = 180; + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F]; + scroller: Scroller = new Scroller(); + dataSource: WaterFlowDataSource = new WaterFlowDataSource(); + private itemWidthArray: number[] = []; + private itemHeightArray: number[] = []; + + // 计算FlowItem宽/高 + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize); + } + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 100; 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 }) { + Row() { + Button('splice') + .id('UIComponentScrollScrollExtra60') + .height('5%') + .onClick(() => { + this.scroller.scrollToIndex(20,false,ScrollAlign.END,{ extraOffset: LengthMetrics.vp(20) }); + }) + .margin({ top: 10, left: 20 }) + }.margin({ bottom: 20 }) + + WaterFlow({ scroller:this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + // 存在对应的jpg文件才会显示图片 + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('90%') + .scrollBar(BarState.On) + .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 }; + }) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra70.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra70.ets new file mode 100644 index 0000000000000000000000000000000000000000..9f07de94bab5f915cc9e6945aac7698b316376af --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra70.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. + */ +import { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIComponentScrollScrollExtra70 { + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]; + scroller: Scroller = new Scroller(); + @State LanestValue: number = 2; + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + List({ space: 20, scroller: this.scroller}) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text("item" + item ) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('80%') + .height(100) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .listDirection(Axis.Vertical) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .listDirection(Axis.Vertical) + .lanes(this.LanestValue) + Button('Button') + .id('UIComponentScrollScrollExtra70') + .onClick(() => { + this.scroller.scrollToIndex(20,false,ScrollAlign.START,{ extraOffset: LengthMetrics.vp(20) }); + this.LanestValue = this.LanestValue + 1; + }) + + }.width('100%').margin({ top: 5 }).height('80%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra80.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra80.ets new file mode 100644 index 0000000000000000000000000000000000000000..a77d58e362b887aabbc4ce42e9803aa0827bf14f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra80.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 { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIComponentScrollScrollExtra80 { + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]; + scroller: Scroller = new Scroller(); + @State listDirection: Axis = Axis.Vertical; + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + List({ space: 20, scroller: this.scroller}) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text("item" + item ) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('80%') + .height(100) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .listDirection(Axis.Vertical) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .listDirection(this.listDirection) + Button('Button') + .id('UIComponentScrollScrollExtra80') + .onClick(() => { + this.scroller.scrollToIndex(20,false,ScrollAlign.START,{ extraOffset: LengthMetrics.vp(20) }); + this.listDirection = Axis.Horizontal; + }) + + }.width('100%').margin({ top: 5 }).height('80%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra90.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra90.ets new file mode 100644 index 0000000000000000000000000000000000000000..6cac6ba6e7671cc7ddd1287c0788a7e16762f5fa --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra90.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 { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIComponentScrollScrollExtra90 { + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]; + scroller: Scroller = new Scroller(); + @State SpaceValue: number = 10; + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + List({ space: 20, scroller: this.scroller}) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text("item" + item ) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('80%') + .height(100) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .listDirection(Axis.Vertical) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .offset({x:0,y:this.SpaceValue}) + Button('Button') + .id('UIComponentScrollScrollExtra90') + .onClick(() => { + this.scroller.scrollToIndex(20,false,ScrollAlign.END,{ extraOffset: LengthMetrics.vp(20) }); + this.SpaceValue = this.SpaceValue +10 + + }) + }.width('100%').margin({ top: 5 }).height('80%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/WaterFlowDataSource.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/WaterFlowDataSource.ets new file mode 100644 index 0000000000000000000000000000000000000000..60644b7d88fa8851f1a7695ded264907b0f41eff --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/WaterFlowDataSource.ets @@ -0,0 +1,129 @@ +// WaterFlowDataSource.ets + +// 实现IDataSource接口的对象,用于瀑布流组件加载数据 +export class WaterFlowDataSource implements IDataSource { + private dataArray: number[] = [] + private listeners: DataChangeListener[] = [] + + constructor() { + for (let i = 0; i < 100; i++) { + this.dataArray.push(i) + } + } + + // 获取索引对应的数据 + public getData(index: number): number { + return this.dataArray[index] + } + + // 通知控制器数据重新加载 + notifyDataReload(): void { + this.listeners.forEach(listener => { + listener.onDataReloaded() + }) + } + + // 通知控制器数据增加 + notifyDataAdd(index: number): void { + this.listeners.forEach(listener => { + listener.onDataAdd(index) + }) + } + + // 通知控制器数据变化 + notifyDataChange(index: number): void { + this.listeners.forEach(listener => { + listener.onDataChange(index) + }) + } + + // 通知控制器数据删除 + notifyDataDelete(index: number): void { + this.listeners.forEach(listener => { + listener.onDataDelete(index) + }) + } + + // 通知控制器数据位置变化 + notifyDataMove(from: number, to: number): void { + this.listeners.forEach(listener => { + listener.onDataMove(from, to) + }) + } + + //通知控制器数据批量修改 + notifyDatasetChange(operations: DataOperation[]): void { + this.listeners.forEach(listener => { + listener.onDatasetChange(operations); + }) + } + + // 获取数据总数 + public totalCount(): number { + return this.dataArray.length + } + + // 注册改变数据的控制器 + registerDataChangeListener(listener: DataChangeListener): void { + if (this.listeners.indexOf(listener) < 0) { + this.listeners.push(listener) + } + } + + // 注销改变数据的控制器 + unregisterDataChangeListener(listener: DataChangeListener): void { + const pos = this.listeners.indexOf(listener) + if (pos >= 0) { + this.listeners.splice(pos, 1) + } + } + + // 增加数据 + public add1stItem(): void { + this.dataArray.splice(0, 0, this.dataArray.length) + this.notifyDataAdd(0) + } + + // 在数据尾部增加一个元素 + public addLastItem(): void { + this.dataArray.splice(this.dataArray.length, 0, this.dataArray.length) + this.notifyDataAdd(this.dataArray.length - 1) + } + + // 在指定索引位置增加一个元素 + public addItem(index: number): void { + this.dataArray.splice(index, 0, this.dataArray.length) + this.notifyDataAdd(index) + } + + // 删除第一个元素 + public delete1stItem(): void { + this.dataArray.splice(0, 1) + this.notifyDataDelete(0) + } + + // 删除第二个元素 + public delete2ndItem(): void { + this.dataArray.splice(1, 1) + this.notifyDataDelete(1) + } + + // 删除最后一个元素 + public deleteLastItem(): void { + this.dataArray.splice(-1, 1) + this.notifyDataDelete(this.dataArray.length) + } + + // 在指定索引位置删除一个元素 + public deleteItem(index: number): void { + this.dataArray.splice(index, 1) + this.notifyDataDelete(index) + } + + // 重新加载数据 + public reload(): void { + this.dataArray.splice(1, 1) + this.dataArray.splice(3, 2) + this.notifyDataReload() + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUisupportColor/UIComponentUisupportColor_0010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUisupportColor/UIComponentUisupportColor_0010.ets new file mode 100644 index 0000000000000000000000000000000000000000..f0e1408953c54cfd73730e641c4756ccf341c207 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUisupportColor/UIComponentUisupportColor_0010.ets @@ -0,0 +1,141 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentUisupportColor_0010 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayJ: string[] = ['嘉', '贾']; + private value: string[] = ['#', 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z']; + @State isNeedAutoCollapse: boolean = false; + @State theme: ThemeColorMode = ThemeColorMode.LIGHT; + @State indexerHeight: string = '75%'; + + build() { + + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayJ, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + + Column() { + Column() { + WithTheme({ colorMode: this.theme }) { + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .autoCollapse(this.isNeedAutoCollapse) + .height(this.indexerHeight) + .selectedColor(0xFFFFFF) + .popupColor(0xFFFAF0) + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(0xD2B48C) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .popupFont({ size: 30, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Right) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0x0000FF) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xCCCCCC) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!'); + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA; + } else if (this.value[index] == 'B') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'J') { + return this.arrayJ; + } else { + return []; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + } + .height('80%') + .justifyContent(FlexAlign.Center) + + Column() { + Button('Button') + .margin('5vp') + .id('UIComponentUisupportColor_0010') + .onClick(() => { + this.theme = ThemeColorMode.LIGHT; + }) + }.height('20%') + } + .width('50%') + .justifyContent(FlexAlign.Center) + } + + .width('100%') + .height('100%') + + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUisupportColor/UIComponentUisupportColor_0020.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUisupportColor/UIComponentUisupportColor_0020.ets new file mode 100644 index 0000000000000000000000000000000000000000..ea6b3f2c3aba69725d47cdd51d5ac26d13580262 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUisupportColor/UIComponentUisupportColor_0020.ets @@ -0,0 +1,141 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentUisupportColor_0020 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayJ: string[] = ['嘉', '贾']; + private value: string[] = ['#', 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z']; + @State isNeedAutoCollapse: boolean = false; + @State theme: ThemeColorMode = ThemeColorMode.LIGHT; + @State indexerHeight: string = '75%'; + + build() { + + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayJ, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + + Column() { + Column() { + WithTheme({ colorMode: this.theme }) { + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .autoCollapse(this.isNeedAutoCollapse) + .height(this.indexerHeight) + .selectedColor(0xFFFFFF) + .popupColor(0xFFFAF0) + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(0xD2B48C) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .popupFont({ size: 30, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Right) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0x0000FF) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xCCCCCC) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!'); + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA; + } else if (this.value[index] == 'B') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'J') { + return this.arrayJ; + } else { + return []; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + } + .height('80%') + .justifyContent(FlexAlign.Center) + + Column() { + Button('Button') + .margin('5vp') + .id('UIComponentUisupportColor_0020') + .onClick(() => { + this.theme = ThemeColorMode.DARK; + }) + }.height('20%') + } + .width('50%') + .justifyContent(FlexAlign.Center) + } + + .width('100%') + .height('100%') + + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUisupportColor/UIComponentUisupportColor_0040.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUisupportColor/UIComponentUisupportColor_0040.ets new file mode 100644 index 0000000000000000000000000000000000000000..79073fa782c27d8520844f0205380e146269ce4b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUisupportColor/UIComponentUisupportColor_0040.ets @@ -0,0 +1,141 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentUisupportColor_0040 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayJ: string[] = ['嘉', '贾']; + private value: string[] = ['#', 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z']; + @State isNeedAutoCollapse: boolean = false; + @State theme: ThemeColorMode = ThemeColorMode.DARK; + @State indexerHeight: string = '75%'; + + build() { + + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayJ, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + + Column() { + Column() { + WithTheme({ colorMode: this.theme }) { + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .autoCollapse(this.isNeedAutoCollapse) + .height(this.indexerHeight) + .selectedColor(0xFFFFFF) + .popupColor(0xFFFAF0) + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(0xD2B48C) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .popupFont({ size: 30, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Right) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0x0000FF) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xCCCCCC) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!'); + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA; + } else if (this.value[index] == 'B') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'J') { + return this.arrayJ; + } else { + return []; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + } + .height('80%') + .justifyContent(FlexAlign.Center) + + Column() { + Button('Button') + .margin('5vp') + .id('UIComponentUisupportColor_0040') + .onClick(() => { + this.theme = ThemeColorMode.DARK; + }) + }.height('20%') + } + .width('50%') + .justifyContent(FlexAlign.Center) + } + + .width('100%') + .height('100%') + + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentAlphabetindexerAttributeAutocollapse/UiComponentAlphabetindexerAttributeAutocollapse20.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentAlphabetindexerAttributeAutocollapse/UiComponentAlphabetindexerAttributeAutocollapse20.ets new file mode 100644 index 0000000000000000000000000000000000000000..6c3543c4bd1ee8062020703fcea17576444c31d6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentAlphabetindexerAttributeAutocollapse/UiComponentAlphabetindexerAttributeAutocollapse20.ets @@ -0,0 +1,80 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UiComponentAlphabetindexerAttributeAutocollapse20 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + @State value: string[] = ['#','A', 'B', 'C', 'D', 'E', 'F', 'G']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .autoCollapse(false) + .popupUnselectedColor(0xff0000) + .popupItemBackgroundColor(undefined) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + + } + .width('100%') + .height('100%') + Button('Button15') + .id('UiComponentAlphabetindexerAttributeAutocollapse20_1') + .onClick(() => { + this.value = ['#','A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M','N']; + }) + .margin({left:50}) + + Button('Button13') + .id('UiComponentAlphabetindexerAttributeAutocollapse20_2') + .onClick(() => { + this.value = ['#','A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L']; + }) + .margin({left:150}) + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentAlphabetindexerAttributeAutocollapse/UiComponentAlphabetindexerAttributeAutocollapse30.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentAlphabetindexerAttributeAutocollapse/UiComponentAlphabetindexerAttributeAutocollapse30.ets new file mode 100644 index 0000000000000000000000000000000000000000..b4067fd8e6011e3b1a26ee79e0a19136edb7ee88 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentAlphabetindexerAttributeAutocollapse/UiComponentAlphabetindexerAttributeAutocollapse30.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 UiComponentAlphabetindexerAttributeAutocollapse30 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + @State value: string[] = ['#','A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .autoCollapse(true) + .popupUnselectedColor(0xff0000) + .popupItemBackgroundColor(undefined) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + + } + .width('100%') + .height('100%') + Button('Button') + .id('UiComponentAlphabetindexerAttributeAutocollapse30') + .onClick(() => { + this.value = ['A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I']; + }) + .margin({left:50}) + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentAlphabetindexerAttributeAutocollapse/UiComponentAlphabetindexerAttributeAutocollapse40.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentAlphabetindexerAttributeAutocollapse/UiComponentAlphabetindexerAttributeAutocollapse40.ets new file mode 100644 index 0000000000000000000000000000000000000000..0fe161d38004cd0937b57144e33c3e27c0d77966 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentAlphabetindexerAttributeAutocollapse/UiComponentAlphabetindexerAttributeAutocollapse40.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 UiComponentAlphabetindexerAttributeAutocollapse40 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + @State value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .autoCollapse(true) + .popupUnselectedColor(0xff0000) + .popupItemBackgroundColor(undefined) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + + } + .width('100%') + .height('100%') + Button('Button') + .id('UiComponentAlphabetindexerAttributeAutocollapse40') + .onClick(() => { + this.value = [ '#','A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M']; + }) + .margin({left:50}) + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentAlphabetindexerAttributeAutocollapse/UiComponentAlphabetindexerAttributeAutocollapse50.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentAlphabetindexerAttributeAutocollapse/UiComponentAlphabetindexerAttributeAutocollapse50.ets new file mode 100644 index 0000000000000000000000000000000000000000..c16ea9c472e8950a96aabc4db9d6abf3c4e6979a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentAlphabetindexerAttributeAutocollapse/UiComponentAlphabetindexerAttributeAutocollapse50.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 UiComponentAlphabetindexerAttributeAutocollapse50 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + @State value: string[] = [ '#','A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .autoCollapse(true) + .popupUnselectedColor(0xff0000) + .popupItemBackgroundColor(undefined) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + + } + .width('100%') + .height('100%') + Button('Button') + .id('UiComponentAlphabetindexerAttributeAutocollapse50') + .onClick(() => { + this.value = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M']; + }) + .margin({left:50}) + } + } +} + 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 0bc35630a4cd284dfdd53b0a400c6c24d64a8f3d..ea87189f31afe76396d121914f74a0f0cb4207ba 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 @@ -1143,6 +1143,312 @@ "testability/pages/UIComponentScrollSwiperInterface/UIComponentScrollSwiperInterface2060", "testability/pages/UIComponentScrollSwiperInterface/UIComponentScrollSwiperInterface2110", "testability/pages/UIComponentScrollSwiperInterface/UIComponentScrollSwiperInterface2160", - "testability/pages/UIComponentScrollSwiperInterface/UIComponentScrollSwiperInterface2370" + "testability/pages/UIComponentScrollSwiperInterface/UIComponentScrollSwiperInterface2370", + "testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0240_486", + "testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0230_102", + "testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0250_798", + "testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0260_891", + "testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0270_291", + "testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0850_504", + "testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0840_624", + "testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0190_620", + "testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0200_308", + "testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0210_300", + "testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0470_052", + "testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0480_955", + "testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0300_345", + "testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0280_218", + "testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0270_110", + "testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0290_722", + "testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0420_773", + "testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0430_891", + "testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0440_612", + "testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0450_917", + "testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0130_440", + "testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0100_565", + "testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_090_321", + "testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0270_967", + "testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0280_006", + "testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0250_323", + "testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0240_264", + "testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0120_874", + "testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0460_322", + + "testability/pages/UIComponentUisupportColor/UIComponentUisupportColor_0010", + "testability/pages/UIComponentUisupportColor/UIComponentUisupportColor_0020", + "testability/pages/UIComponentUisupportColor/UIComponentUisupportColor_0040", + + "testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0050", + "testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0060", + "testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0070", + "testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0080", + "testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0170", + "testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0180", + "testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0190", + "testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0200", + + "testability/pages/UIComponentGridModifier/UIComponentGridModifier0130", + "testability/pages/UIComponentGridModifier/UIComponentGridModifier0140", + "testability/pages/UIComponentGridModifier/UIComponentGridModifier0150", + "testability/pages/UIComponentGridModifier/UIComponentGridModifier0160", + "testability/pages/UIComponentGridModifier/UIComponentGridModifier0170", + "testability/pages/UIComponentGridModifier/UIComponentGridModifier0180", + "testability/pages/UIComponentGridModifier/UIComponentGridModifier0190", + "testability/pages/UIComponentGridModifier/UIComponentGridModifier0200", + "testability/pages/UIComponentGridModifier/UIComponentGridModifier0230", + "testability/pages/UIComponentGridModifier/UIComponentGridModifier0410", + "testability/pages/UIComponentGridModifier/UIComponentGridModifier0450", + "testability/pages/UIComponentGridModifier/UIComponentGridModifier0460", + "testability/pages/UIComponentGridModifier/UIComponentGridModifier0470", + + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra10", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra20", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra30", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra40", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra60", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra70", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra80", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra90", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra100", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra50", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra110", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra120", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra130", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra140", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra150", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra160", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra170", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra180", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra190", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra210", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra220", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra230", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra240", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra250", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra260", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra270", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra280", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra290", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra310", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra320", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra340", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra350", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra360", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra380", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra390", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra330", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra400", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra410", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra430", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra440", + + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier10", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier20", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier30", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier40", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier60", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier70", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier80", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier90", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier100", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier50", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier300", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier310", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier320", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier330", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier290", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier340", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier350", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier360", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier370", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier380", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier390", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier400", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier410", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier420", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier430", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier440", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier450", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier460", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier470", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier480", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier490", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier500", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier510", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier520", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier530", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier540", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier550", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier560", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier570", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier580", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier590", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier600", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier610", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier620", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier680", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier690", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier700", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier710", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier940", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier950", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier960", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1060", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1070", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1120", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1130", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1140", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1150", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1160", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1550", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1560", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1620", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1640", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1650", + + "testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier40", + "testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier230", + "testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier470", + "testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier480", + "testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier520", + "testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier760", + "testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier810", + "testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier930", + "testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier980", + + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll30", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll40", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll50", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll60", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll70", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll90", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll100", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll130", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll140", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll150", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll160", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll170", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll190", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll200", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll230", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll240", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll250", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll260", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll280", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll270", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll290", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll300", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll320", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll330", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll360", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll370", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll380", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll390", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll400", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll420", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll430", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll460", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll470", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll480", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll490", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll500", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll520", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll530", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll560", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll570", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll580", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll590", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll600", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll620", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll630", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll660", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll670", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll710", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll740", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll750", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll700", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll770", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll780", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll790", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll830", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll840", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll850", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll860", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll870", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll880", + + "testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto90", + "testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto230", + "testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto370", + "testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto510", + "testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto570", + "testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto580", + "testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto590", + "testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto600", + "testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto610", + "testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto620", + "testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto630", + "testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto640", + "testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto650", + "testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto660", + "testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto670", + "testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto680", + "testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto690", + "testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto700", + + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll330", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll200", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll60", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll70", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll80", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll90", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll100", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll110", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll120", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll130", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll140", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll150", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll160", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll170", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll180", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll390", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll190", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll340", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll380", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll400", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll410", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll420", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll450", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll460", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll430", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll520", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll540", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll560", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll500", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll510", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll530", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll570", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll550", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll590", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll600", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll350", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll210", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll30", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll360", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll470", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll240", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll250", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll260", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll270", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll280", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll290", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll300", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll310", + + "testability/pages/UiComponentAlphabetindexerAttributeAutocollapse/UiComponentAlphabetindexerAttributeAutocollapse20", + "testability/pages/UiComponentAlphabetindexerAttributeAutocollapse/UiComponentAlphabetindexerAttributeAutocollapse30", + "testability/pages/UiComponentAlphabetindexerAttributeAutocollapse/UiComponentAlphabetindexerAttributeAutocollapse40", + "testability/pages/UiComponentAlphabetindexerAttributeAutocollapse/UiComponentAlphabetindexerAttributeAutocollapse50" + ] }