From a2bce07b7301ae9922d0d4b9236fb10b974727f7 Mon Sep 17 00:00:00 2001 From: dongwei Date: Tue, 19 Aug 2025 15:34:34 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E6=8F=90=E4=BA=A4ImageResetTest=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E7=94=A8=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: dongwei --- .../image_svg_animate/ImgaeReset.test.ets | 523 ++++++++++++++++++ .../imageReset/imageReset17.ets | 322 +++++++++++ .../imageReset/imageReset18.ets | 116 ++++ .../imageReset/imageReset19.ets | 131 +++++ .../imageReset/imageReset20.ets | 131 +++++ .../imageReset/imageReset21.ets | 131 +++++ .../imageReset/imageReset22.ets | 82 +++ 7 files changed, 1436 insertions(+) create mode 100644 sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/test/image_svg_animate/ImgaeReset.test.ets create mode 100644 sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageReset/imageReset17.ets create mode 100644 sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageReset/imageReset18.ets create mode 100644 sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageReset/imageReset19.ets create mode 100644 sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageReset/imageReset20.ets create mode 100644 sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageReset/imageReset21.ets create mode 100644 sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageReset/imageReset22.ets diff --git a/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/test/image_svg_animate/ImgaeReset.test.ets b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/test/image_svg_animate/ImgaeReset.test.ets new file mode 100644 index 00000000..dae0598d --- /dev/null +++ b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/test/image_svg_animate/ImgaeReset.test.ets @@ -0,0 +1,523 @@ +/** + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect, Level } from '@ohos/hypium' +import Settings from '../model/Settings' +import windowSnap from '../model/snapShot' +import Logger from '../model/Logger' +import Utils from '../model/Utils' +import { Driver, ON, Component } from '@kit.TestKit'; +import { BusinessError } from '@kit.BasicServicesKit' + +export default function ImageResetTest () { + + describe('ImageResetTest', () => { + afterEach(async (done: Function) => { + if (Settings.windowClass == undefined) { + return + } + + Settings.windowClass.destroyWindow((err:BusinessError) => { + 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_MEDIA_IMAGE_RESET_0010 + * @tc.name : Image with url + * @tc.type : Function + * @tc.size : MediumTest + * @tc.level : 3 + */ + it('SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0010', Level.LEVEL3, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0010 start.`); + Settings.createWindow("testability/pages/image_svg_animate/imageReset/imageReset01") + let driver:Driver = Driver.create(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0010 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0012 + * @tc.name : Image reset + * @tc.type : Function + * @tc.size : MediumTest + * @tc.level : 3 + */ + it('SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0012', Level.LEVEL3, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0012 start.`); + Settings.createWindow("testability/pages/image_svg_animate/imageReset/imageReset02") + let driver:Driver = Driver.create(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0012 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0013 + * @tc.name : Image reset + * @tc.type : Function + * @tc.size : MediumTest + * @tc.level : 3 + */ + it('SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0013', Level.LEVEL3, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0013 start.`); + Settings.createWindow("testability/pages/image_svg_animate/imageReset/imageReset03") + let driver:Driver = Driver.create(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0013 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0014 + * @tc.name : Image reset + * @tc.type : Function + * @tc.size : MediumTest + * @tc.level : 3 + */ + it('SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0014', Level.LEVEL3, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0014 start.`); + Settings.createWindow("testability/pages/image_svg_animate/imageReset/imageReset04") + let driver:Driver = Driver.create(); + let button: Component = await driver.waitForComponent(ON.id('imageReset04'), 1000); + await button.click(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0014 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0015 + * @tc.name : Image reset + * @tc.type : Function + * @tc.size : MediumTest + * @tc.level : 3 + */ + it('SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0015', Level.LEVEL3, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0015 start.`); + Settings.createWindow("testability/pages/image_svg_animate/imageReset/imageReset05") + let driver:Driver = Driver.create(); + let button1: Component = await driver.waitForComponent(ON.id('imageReset05_01'), 1000); + await button1.click(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + let button2: Component = await driver.waitForComponent(ON.id('imageReset05_02'), 1000); + await button2.click(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0015 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0016 + * @tc.name : Image reset + * @tc.type : Function + * @tc.size : MediumTest + * @tc.level : 3 + */ + it('SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0016', Level.LEVEL3, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0016 start.`); + Settings.createWindow("testability/pages/image_svg_animate/imageReset/imageReset06") + let driver:Driver = Driver.create(); + let button: Component = await driver.waitForComponent(ON.id('imageReset06'), 1000); + await button.click(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0016 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0017 + * @tc.name : Image reset + * @tc.type : Function + * @tc.size : MediumTest + * @tc.level : 3 + */ + it('SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0017', Level.LEVEL3, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0017 start.`); + Settings.createWindow("testability/pages/image_svg_animate/imageReset/imageReset07") + let driver:Driver = Driver.create(); + let button: Component = await driver.waitForComponent(ON.id('imageReset07'), 1000); + await button.click(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0017 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0018 + * @tc.name : Image reset + * @tc.type : Function + * @tc.size : MediumTest + * @tc.level : 3 + */ + it('SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0018', Level.LEVEL3, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0018 start.`); + Settings.createWindow("testability/pages/image_svg_animate/imageReset/imageReset08") + let driver:Driver = Driver.create(); + let button: Component = await driver.waitForComponent(ON.id('imageReset08'), 1000); + await button.click(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0018 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0019 + * @tc.name : Image reset + * @tc.type : Function + * @tc.size : MediumTest + * @tc.level : 3 + */ + it('SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0019', Level.LEVEL3, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0019 start.`); + Settings.createWindow("testability/pages/image_svg_animate/imageReset/imageReset09") + let driver:Driver = Driver.create(); + let button: Component = await driver.waitForComponent(ON.id('imageReset09'), 1000); + await button.click(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0019 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0020 + * @tc.name : Image reset + * @tc.type : Function + * @tc.size : MediumTest + * @tc.level : 3 + */ + it('SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0020', Level.LEVEL3, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0020 start.`); + Settings.createWindow("testability/pages/image_svg_animate/imageReset/imageReset10") + let driver:Driver = Driver.create(); + let button1: Component = await driver.waitForComponent(ON.id('imageReset10_01'), 1000); + await button1.click(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + let button2: Component = await driver.waitForComponent(ON.id('imageReset10_02'), 1000); + await button2.click(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0020 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0021 + * @tc.name : Image reset + * @tc.type : Function + * @tc.size : MediumTest + * @tc.level : 3 + */ + it('SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0021', Level.LEVEL3, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0021 start.`); + Settings.createWindow("testability/pages/image_svg_animate/imageReset/imageReset11") + let driver:Driver = Driver.create(); + let button1: Component = await driver.waitForComponent(ON.id('imageReset11_01'), 1000); + await button1.click(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + let button2: Component = await driver.waitForComponent(ON.id('imageReset11_02'), 1000); + await button2.click(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0021 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0022 + * @tc.name : Image reset + * @tc.type : Function + * @tc.size : MediumTest + * @tc.level : 3 + */ + it('SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0022', Level.LEVEL3, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0022 start.`); + Settings.createWindow("testability/pages/image_svg_animate/imageReset/imageReset12") + let driver:Driver = Driver.create(); + let button: Component = await driver.waitForComponent(ON.id('imageReset12'), 1000); + await button.click(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0022 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0023 + * @tc.name : Image reset + * @tc.type : Function + * @tc.size : MediumTest + * @tc.level : 3 + */ + it('SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0023', Level.LEVEL3, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0023 start.`); + Settings.createWindow("testability/pages/image_svg_animate/imageReset/imageReset13") + let driver:Driver = Driver.create(); + let button1: Component = await driver.waitForComponent(ON.id('imageReset13_01'), 1000); + await button1.click(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + let button2: Component = await driver.waitForComponent(ON.id('imageReset13_02'), 1000); + await button2.click(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0023 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0024 + * @tc.name : Image reset + * @tc.type : Function + * @tc.size : MediumTest + * @tc.level : 3 + */ + it('SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0024', Level.LEVEL3, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0024 start.`); + Settings.createWindow("testability/pages/image_svg_animate/imageReset/imageReset14") + let driver:Driver = Driver.create(); + let button1: Component = await driver.waitForComponent(ON.id('imageReset14_01'), 1000); + await button1.click(); + await driver.waitForIdle(500,2000); + let button2: Component = await driver.waitForComponent(ON.id('imageReset14_02'), 1000); + await button2.click(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0024 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0025 + * @tc.name : Image reset + * @tc.type : Function + * @tc.size : MediumTest + * @tc.level : 3 + */ + it('SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0025', Level.LEVEL3, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0025 start.`); + Settings.createWindow("testability/pages/image_svg_animate/imageReset/imageReset15") + let driver:Driver = Driver.create(); + let button: Component = await driver.waitForComponent(ON.id('imageReset15_01'), 1000); + await button.click(); + await driver.waitForIdle(500,2000); + let button1: Component = await driver.waitForComponent(ON.id('imageReset15_02'), 1000); + await button1.click(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + let button2: Component = await driver.waitForComponent(ON.id('imageReset15_03'), 1000); + await button2.click(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0025 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0026 + * @tc.name : Image reset + * @tc.type : Function + * @tc.size : MediumTest + * @tc.level : 3 + */ + it('SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0026', Level.LEVEL3, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0026 start.`); + Settings.createWindow("testability/pages/image_svg_animate/imageReset/imageReset16") + let driver:Driver = Driver.create(); + let button: Component = await driver.waitForComponent(ON.id('imageReset16'), 1000); + await button.click(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0026 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0027 + * @tc.name : Image reset + * @tc.type : Function + * @tc.size : MediumTest + * @tc.level : 3 + */ + it('SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0027', Level.LEVEL3, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0027 start.`); + Settings.createWindow("testability/pages/image_svg_animate/imageReset/imageReset17") + let driver:Driver = Driver.create(); + let button1: Component = await driver.waitForComponent(ON.id('imageReset17_01'), 1000); + await button1.click(); + await driver.waitForIdle(500,2000); + let button2: Component = await driver.waitForComponent(ON.id('imageReset17_02'), 1000); + await button2.click(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0027 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0028 + * @tc.name : Image reset + * @tc.type : Function + * @tc.size : MediumTest + * @tc.level : 3 + */ + it('SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0028', Level.LEVEL3, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0028 start.`); + Settings.createWindow("testability/pages/image_svg_animate/imageReset/imageReset18") + let driver:Driver = Driver.create(); + let button: Component = await driver.waitForComponent(ON.id('imageReset18'), 1000); + await button.click(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0028 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0029 + * @tc.name : Image reset + * @tc.type : Function + * @tc.size : MediumTest + * @tc.level : 3 + */ + it('SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0029', Level.LEVEL3, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0029 start.`); + Settings.createWindow("testability/pages/image_svg_animate/imageReset/imageReset19") + let driver:Driver = Driver.create(); + let button1: Component = await driver.waitForComponent(ON.id('imageReset19_01'), 1000); + await button1.click(); + await driver.waitForIdle(500,2000); + let button2: Component = await driver.waitForComponent(ON.id('imageReset19_02'), 1000); + await button2.click(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0029 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0030 + * @tc.name : Image reset + * @tc.type : Function + * @tc.size : MediumTest + * @tc.level : 3 + */ + it('SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0030', Level.LEVEL3, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0030 start.`); + Settings.createWindow("testability/pages/image_svg_animate/imageReset/imageReset20") + let driver:Driver = Driver.create(); + let button1: Component = await driver.waitForComponent(ON.id('imageReset20_01'), 1000); + await button1.click(); + await driver.waitForIdle(500,2000); + let button2: Component = await driver.waitForComponent(ON.id('imageReset20_02'), 1000); + await button2.click(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0030 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0031 + * @tc.name : Image reset + * @tc.type : Function + * @tc.size : MediumTest + * @tc.level : 3 + */ + it('SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0031', Level.LEVEL3, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0031 start.`); + Settings.createWindow("testability/pages/image_svg_animate/imageReset/imageReset21") + let driver:Driver = Driver.create(); + let button1: Component = await driver.waitForComponent(ON.id('imageReset21_01'), 1000); + await button1.click(); + await driver.waitForIdle(500,2000); + let button2: Component = await driver.waitForComponent(ON.id('imageReset21_02'), 1000); + await button2.click(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0031 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0032 + * @tc.name : Image reset + * @tc.type : Function + * @tc.size : MediumTest + * @tc.level : 3 + */ + it('SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0032', Level.LEVEL3, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0032 start.`); + Settings.createWindow("testability/pages/image_svg_animate/imageReset/imageReset22") + let driver:Driver = Driver.create(); + let button1: Component = await driver.waitForComponent(ON.id('imageReset22'), 1000); + await button1.click(); + await driver.waitForIdle(500,2000); + let button2: Component = await driver.waitForComponent(ON.id('imageReset22_longClick'), 1000); + await button2.longClick(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_RESET_0032 finish.`); + done() + }) + }) +} diff --git a/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageReset/imageReset17.ets b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageReset/imageReset17.ets new file mode 100644 index 00000000..c8485772 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageReset/imageReset17.ets @@ -0,0 +1,322 @@ +/** + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct imageReset17 { + @State info1:string = 'loading~~'; + @State info2:string = 'loading~~'; + @State info3:string = 'loading~~'; + @State info4:string = 'loading~~'; + @State info5:string = 'loading~~'; + @State info6:string = 'loading~~'; + @State testArg1:ImageFit = ImageFit.Cover; + @State testArg2:ImageFit = ImageFit.Contain; + @State testArg3:ImageFit = ImageFit.Auto; + @State testArg4:ImageFit = ImageFit.Fill; + @State testArg5:ImageFit = ImageFit.ScaleDown; + @State testArg6:ImageFit = ImageFit.None; + @State imageSrcIndex: number = 0; + @State imageSrcList: (ResourceStr | ImageContent)[] = [$r('app.media.icon'), ImageContent.EMPTY]; + + build() { + Column() { + Button('Empty') + .id("imageReset17_01") + .height(40) + .fontSize(18) + .fontColor(Color.Black) + .width('70%') + .border({ width: 1 }) + .fontWeight(300) + .margin(10) + .onClick(() => { + this.imageSrcIndex = 1 + }) + + Button('传入图片') + .id("imageReset17_02") + .height(40) + .fontSize(18) + .fontColor(Color.Black) + .width('70%') + .border({ width: 1 }) + .fontWeight(300) + .margin(10) + .onClick(() => { + this.imageSrcIndex = 0 + }) + + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center }) { + Text('image test ImageFit') + .height(40) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width('70%') + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin(10) + + Row(){ + Column(){ + Text('objectFit: ' + this.testArg1) + .height(30) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width('80%') + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin(6) + + Text(this.info1) + .height(30) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width('80%') + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin(6) + + Image(this.imageSrcList[this.imageSrcIndex]) + .width(80) + .height(80) + .borderRadius(20) + .margin(15) + .objectFit(this.testArg1) + .onComplete((event)=>{ + if(event) { + this.info1 = 'loading success' + } + }) + } + .width('45%') + .height('100%') + .margin({right:20}) + + Column(){ + Text('objectFit: ' + this.testArg2) + .height(30) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width('80%') + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin(6) + + Text(this.info2) + .height(30) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width('80%') + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin(6) + + Image(this.imageSrcList[this.imageSrcIndex]) + .width(80) + .height(80) + .borderRadius(20) + .margin(15) + .objectFit(this.testArg2) + .onComplete((event)=>{ + if(event) { + this.info2 = 'loading success' + } + }) + } + .width('45%') + .height('100%') + } + .width('100%') + .height('25%') + + Row(){ + Column(){ + Text('objectFit: ' + this.testArg3) + .height(30) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width('80%') + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin(6) + + Text(this.info3) + .height(30) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width('80%') + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin(6) + + Image(this.imageSrcList[this.imageSrcIndex]) + .width(80) + .height(80) + .borderRadius(20) + .margin(15) + .objectFit(this.testArg3) + .onComplete((event)=>{ + if(event) { + this.info3 = 'loading success' + } + }) + } + .width('45%') + .height('100%') + .margin({right:20}) + + Column(){ + Text('objectFit: ' + this.testArg4) + .height(30) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width('80%') + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin(6) + + Text(this.info4) + .height(30) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width('80%') + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin(6) + + Image(this.imageSrcList[this.imageSrcIndex]) + .width(80) + .height(80) + .borderRadius(20) + .margin(15) + .objectFit(this.testArg4) + .onComplete((event)=>{ + if(event) { + this.info4 = 'loading success' + } + }) + } + .width('45%') + .height('100%') + } + .width('100%') + .height('32%') + + Row(){ + Column(){ + Text('objectFit: ' + this.testArg5) + .height(45) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width('80%') + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin(6) + + Text(this.info3) + .height(30) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width('80%') + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin(6) + + Image(this.imageSrcList[this.imageSrcIndex]) + .width(80) + .height(80) + .borderRadius(20) + .margin(15) + .objectFit(this.testArg5) + .onComplete((event)=>{ + if(event) { + this.info3 = 'loading success' + } + }) + } + .width('45%') + .height('100%') + .margin({right:20}) + + Column(){ + Text('objectFit: ' + this.testArg6) + .height(30) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width('80%') + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin(6) + + Text(this.info4) + .height(30) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width('80%') + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin(6) + + Image(this.imageSrcList[this.imageSrcIndex]) + .width(80) + .height(80) + .borderRadius(20) + .margin(15) + .objectFit(this.testArg6) + .onComplete((event)=>{ + if(event) { + this.info4 = 'loading success' + } + }) + } + .width('45%') + .height('100%') + } + .width('100%') + .height('32%') + }.width('100%') + .height('80%') + } + .height('100%') + .width('98%') + } +} diff --git a/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageReset/imageReset18.ets b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageReset/imageReset18.ets new file mode 100644 index 00000000..7e23e948 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageReset/imageReset18.ets @@ -0,0 +1,116 @@ +@Entry +@Component +struct imageReset18 { + @State info1:string = 'loading~~'; + @State info2:string = 'loading~~'; + @State info3:string = 'loading~~'; + @State info4:string = 'loading~~'; + @State testArg1:ImageRepeat = ImageRepeat.X; + @State testArg2:ImageRepeat = ImageRepeat.Y; + @State testArg3:ImageRepeat = ImageRepeat.XY; + @State testArg4:ImageRepeat = ImageRepeat.NoRepeat; + @State imageSrcIndex: number = 0; + @State imageSrcList: (ResourceStr | ImageContent)[] = [$r('app.media.icon'), ImageContent.EMPTY]; + + build() { + Column() { + Text('image test objectRepeat') + .height(40) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width(200) + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin(10) + + Text('objectRepeat: ' + this.testArg1) + .height(30) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width(150) + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin({top:20, bottom:10}) + + Image(this.imageSrcList[this.imageSrcIndex]) + .height(60) + .width(160) + .objectFit(ImageFit.Contain) + .borderWidth(1) + .objectRepeat(this.testArg1) + + Text('objectRepeat: ' + this.testArg2) + .height(30) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width(150) + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin({top:20, bottom:10}) + + Image(this.imageSrcList[this.imageSrcIndex]) + .height(160) + .width(60) + .objectFit(ImageFit.Contain) + .borderWidth(1) + .objectRepeat(this.testArg2) + + Text('objectRepeat: ' + this.testArg3) + .height(30) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width(150) + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin({top:20, bottom:10}) + + Image(this.imageSrcList[this.imageSrcIndex]) + .height(60) + .width(160) + .objectFit(ImageFit.Contain) + .borderWidth(1) + .objectRepeat(this.testArg3) + + Text('objectRepeat: ' + this.testArg4) + .height(30) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width(150) + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin({top:20, bottom:10}) + + Image(this.imageSrcList[this.imageSrcIndex]) + .height(60) + .width(160) + .objectFit(ImageFit.Contain) + .borderWidth(1) + .objectRepeat(this.testArg4) + + Button('Empty') + .id("imageReset18") + .height(40) + .fontSize(18) + .fontColor(Color.Black) + .width(100) + .border({ width: 1 }) + .fontWeight(300) + .margin(10) + .onClick(() => { + this.imageSrcIndex = 1 + }) + } + .height('100%') + .width('100%') + } +} diff --git a/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageReset/imageReset19.ets b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageReset/imageReset19.ets new file mode 100644 index 00000000..86da3625 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageReset/imageReset19.ets @@ -0,0 +1,131 @@ +@Entry +@Component +struct imageReset19 { + @State info1:string = 'loading~~'; + @State info2:string = 'loading~~'; + @State info3:string = 'loading~~'; + @State info4:string = 'loading~~'; + @State testArg1:ImageRepeat = ImageRepeat.X; + @State testArg2:ImageRepeat = ImageRepeat.Y; + @State testArg3:ImageRepeat = ImageRepeat.XY; + @State testArg4:ImageRepeat = ImageRepeat.NoRepeat; + @State imageSrcIndex: number = 0; + @State imageSrcList: (ResourceStr | ImageContent)[] = [$r('app.media.icon'), ImageContent.EMPTY]; + + build() { + Column() { + Text('image test objectRepeat') + .height(40) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width(200) + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin(10) + + Text('objectRepeat: ' + this.testArg1) + .height(30) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width(150) + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin({top:20, bottom:10}) + + Image(this.imageSrcList[this.imageSrcIndex]) + .height(60) + .width(160) + .objectFit(ImageFit.Contain) + .borderWidth(1) + .objectRepeat(this.testArg1) + + Text('objectRepeat: ' + this.testArg2) + .height(30) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width(150) + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin({top:20, bottom:10}) + + Image(this.imageSrcList[this.imageSrcIndex]) + .height(160) + .width(60) + .objectFit(ImageFit.Contain) + .borderWidth(1) + .objectRepeat(this.testArg2) + + Text('objectRepeat: ' + this.testArg3) + .height(30) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width(150) + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin({top:20, bottom:10}) + + Image(this.imageSrcList[this.imageSrcIndex]) + .height(60) + .width(160) + .objectFit(ImageFit.Contain) + .borderWidth(1) + .objectRepeat(this.testArg3) + + Text('objectRepeat: ' + this.testArg4) + .height(30) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width(150) + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin({top:20, bottom:10}) + + Image(this.imageSrcList[this.imageSrcIndex]) + .height(60) + .width(160) + .objectFit(ImageFit.Contain) + .borderWidth(1) + .objectRepeat(this.testArg4) + + Row(){ + Button('Empty') + .id("imageReset19_01") + .height(40) + .fontSize(18) + .fontColor(Color.Black) + .width(100) + .border({ width: 1 }) + .fontWeight(300) + .margin({right:30}) + .onClick(() => { + this.imageSrcIndex = 1 + }) + + Button('传入图片') + .id("imageReset19_02") + .height(40) + .fontSize(18) + .fontColor(Color.Black) + .width(130) + .border({ width: 1 }) + .fontWeight(300) + .margin(10) + .onClick(() => { + this.imageSrcIndex = 1 + }) + } + } + .height('100%') + .width('100%') + } +} diff --git a/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageReset/imageReset20.ets b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageReset/imageReset20.ets new file mode 100644 index 00000000..791f4c4b --- /dev/null +++ b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageReset/imageReset20.ets @@ -0,0 +1,131 @@ +@Entry +@Component +struct imageReset20 { + @State info1:string = 'loading~~'; + @State info2:string = 'loading~~'; + @State info3:string = 'loading~~'; + @State info4:string = 'loading~~'; + @State testArg1:ImageInterpolation = ImageInterpolation.None; + @State testArg2:ImageInterpolation = ImageInterpolation.High; + @State testArg3:ImageInterpolation = ImageInterpolation.Medium; + @State testArg4:ImageInterpolation = ImageInterpolation.Low; + @State imageSrcIndex: number = 0; + @State imageSrcList: (ResourceStr | ImageContent)[] = [$r('app.media.icon'), ImageContent.EMPTY]; + + build() { + Column() { + Text('image test interpolation') + .height(40) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width(200) + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin(10) + + Text('interpolation: ' + this.testArg1) + .height(30) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width(150) + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin({top:20, bottom:10}) + + Image(this.imageSrcList[this.imageSrcIndex]) + .height(60) + .width(160) + .objectFit(ImageFit.Contain) + .borderWidth(1) + .interpolation(this.testArg1) + + Text('interpolation: ' + this.testArg2) + .height(30) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width(150) + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin({top:20, bottom:10}) + + Image(this.imageSrcList[this.imageSrcIndex]) + .height(160) + .width(60) + .objectFit(ImageFit.Contain) + .borderWidth(1) + .interpolation(this.testArg2) + + Text('interpolation: ' + this.testArg3) + .height(30) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width(150) + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin({top:20, bottom:10}) + + Image(this.imageSrcList[this.imageSrcIndex]) + .height(60) + .width(160) + .objectFit(ImageFit.Contain) + .borderWidth(1) + .interpolation(this.testArg3) + + Text('interpolation: ' + this.testArg4) + .height(30) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width(150) + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin({top:20, bottom:10}) + + Image(this.imageSrcList[this.imageSrcIndex]) + .height(60) + .width(160) + .objectFit(ImageFit.Contain) + .borderWidth(1) + .interpolation(this.testArg4) + + Row(){ + Button('Empty') + .id("imageReset20_01") + .height(40) + .fontSize(18) + .fontColor(Color.Black) + .width(100) + .border({ width: 1 }) + .fontWeight(300) + .margin({right:30}) + .onClick(() => { + this.imageSrcIndex = 1 + }) + + Button('传入图片') + .id("imageReset20_02") + .height(40) + .fontSize(18) + .fontColor(Color.Black) + .width(130) + .border({ width: 1 }) + .fontWeight(300) + .margin(10) + .onClick(() => { + this.imageSrcIndex = 1 + }) + } + } + .height('100%') + .width('100%') + } +} diff --git a/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageReset/imageReset21.ets b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageReset/imageReset21.ets new file mode 100644 index 00000000..45ba10ce --- /dev/null +++ b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageReset/imageReset21.ets @@ -0,0 +1,131 @@ +@Entry +@Component +struct imageReset21 { + @State info1:string = 'loading~~'; + @State info2:string = 'loading~~'; + @State info3:string = 'loading~~'; + @State info4:string = 'loading~~'; + @State testArg1:ImageInterpolation = ImageInterpolation.None; + @State testArg2:ImageInterpolation = ImageInterpolation.High; + @State testArg3:ImageInterpolation = ImageInterpolation.Medium; + @State testArg4:ImageInterpolation = ImageInterpolation.Low; + @State imageSrcIndex: number = 0; + @State imageSrcList: (ResourceStr | ImageContent)[] = [$r('app.media.icon'), ImageContent.EMPTY]; + + build() { + Column() { + Text('image test interpolation') + .height(40) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width(200) + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin(10) + + Text('interpolation: ' + this.testArg1) + .height(30) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width(150) + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin({top:20, bottom:10}) + + Image(this.imageSrcList[this.imageSrcIndex]) + .height(70) + .width(70) + .objectFit(ImageFit.Contain) + .borderWidth(1) + .interpolation(this.testArg1) + + Text('interpolation: ' + this.testArg2) + .height(30) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width(150) + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin({top:20, bottom:10}) + + Image(this.imageSrcList[this.imageSrcIndex]) + .height(160) + .width(60) + .objectFit(ImageFit.Contain) + .borderWidth(1) + .interpolation(this.testArg2) + + Text('interpolation: ' + this.testArg3) + .height(30) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width(150) + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin({top:20, bottom:10}) + + Image(this.imageSrcList[this.imageSrcIndex]) + .height(60) + .width(160) + .objectFit(ImageFit.Contain) + .borderWidth(1) + .interpolation(this.testArg3) + + Text('interpolation: ' + this.testArg4) + .height(30) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width(150) + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin({top:20, bottom:10}) + + Image(this.imageSrcList[this.imageSrcIndex]) + .height(60) + .width(160) + .objectFit(ImageFit.Contain) + .borderWidth(1) + .interpolation(this.testArg4) + + Row(){ + Button('Empty') + .id("imageReset21_01") + .height(40) + .fontSize(18) + .fontColor(Color.Black) + .width(100) + .border({ width: 1 }) + .fontWeight(300) + .margin({right:30}) + .onClick(() => { + this.imageSrcIndex = 1 + }) + + Button('传入图片') + .id("imageReset21_02") + .height(40) + .fontSize(18) + .fontColor(Color.Black) + .width(130) + .border({ width: 1 }) + .fontWeight(300) + .margin(10) + .onClick(() => { + this.imageSrcIndex = 1 + }) + } + } + .height('100%') + .width('100%') + } +} diff --git a/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageReset/imageReset22.ets b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageReset/imageReset22.ets new file mode 100644 index 00000000..59888bf9 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageReset/imageReset22.ets @@ -0,0 +1,82 @@ +/** + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct imageReset22 { + @State imageSrcIndex: number = 0; + @State imageSrcList: (ResourceStr | ImageContent)[] = [$r('app.media.icon'), ImageContent.EMPTY]; + @State info:string = 'loading~~'; + + build() { + Column({ space: 10 }) { + Text('image test reset') + .height(40) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width('70%') + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin(10) + + Text(this.info) + .height(30) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width('70%') + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin(6) + + Column(){ + Image(this.imageSrcList[this.imageSrcIndex]) + .id('imageReset22_longClick') + .width(104) + .height(104) + .margin(20) + .padding(5) + .copyOption(CopyOptions.InApp) + .backgroundColor(Color.Pink) + .onComplete((event)=>{ + if(event) { + this.info = 'loading success' + } + }) + } + .width(150) + .height(150) + .borderWidth(2) + .backgroundColor('#fff') + + Button('EMPTY') + .id("imageReset22") + .height(60) + .fontSize(18) + .fontColor(Color.Black) + .width('70%') + .border({ width: 1 }) + .fontWeight(300) + .margin(10) + .onClick(() => { + this.imageSrcIndex = 1 + }) + }.width('100%') + .padding(20) + } +} -- Gitee From c6c9993f18438d3e0a30b01494d2353953efa579 Mon Sep 17 00:00:00 2001 From: dongwei Date: Tue, 19 Aug 2025 15:52:42 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E6=8F=90=E4=BA=A4imageBorder=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E7=94=A8=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: dongwei --- .../imageBorder/imageBorder01.ets | 87 +++++++++++++++++++ .../imageBorder/imageBorder02.ets | 87 +++++++++++++++++++ .../imageBorder/imageBorder03.ets | 87 +++++++++++++++++++ .../imageBorder/imageBorder04.ets | 54 ++++++++++++ .../imageBorder/imageBorder05.ets | 55 ++++++++++++ .../imageBorder/imageBorder06.ets | 55 ++++++++++++ .../imageBorder/imageBorder07.ets | 65 ++++++++++++++ .../imageBorder/imageBorder08.ets | 61 +++++++++++++ .../imageBorder/imageBorder09.ets | 63 ++++++++++++++ .../imageBorder/imageBorder10.ets | 63 ++++++++++++++ .../imageBorder/imageBorder11.ets | 63 ++++++++++++++ .../imageBorder/imageBorder12.ets | 63 ++++++++++++++ .../imageBorder/imageBorder13.ets | 63 ++++++++++++++ .../imageBorder/imageBorder14.ets | 62 +++++++++++++ .../imageBorder/imageBorder15.ets | 66 ++++++++++++++ .../imageBorder/imageBorder16.ets | 66 ++++++++++++++ .../imageBorder/imageBorder17.ets | 66 ++++++++++++++ .../imageBorder/imageBorder18.ets | 66 ++++++++++++++ .../imageBorder/imageBorder19.ets | 66 ++++++++++++++ .../imageBorder/imageBorder20.ets | 66 ++++++++++++++ .../imageBorder/imageBorder21.ets | 67 ++++++++++++++ .../imageBorder/imageBorder22.ets | 67 ++++++++++++++ .../imageBorder/imageBorder23.ets | 67 ++++++++++++++ .../imageBorder/imageBorder24.ets | 65 ++++++++++++++ .../imageBorder/imageBorder25.ets | 65 ++++++++++++++ 25 files changed, 1655 insertions(+) create mode 100644 sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder01.ets create mode 100644 sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder02.ets create mode 100644 sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder03.ets create mode 100644 sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder04.ets create mode 100644 sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder05.ets create mode 100644 sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder06.ets create mode 100644 sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder07.ets create mode 100644 sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder08.ets create mode 100644 sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder09.ets create mode 100644 sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder10.ets create mode 100644 sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder11.ets create mode 100644 sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder12.ets create mode 100644 sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder13.ets create mode 100644 sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder14.ets create mode 100644 sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder15.ets create mode 100644 sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder16.ets create mode 100644 sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder17.ets create mode 100644 sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder18.ets create mode 100644 sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder19.ets create mode 100644 sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder20.ets create mode 100644 sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder21.ets create mode 100644 sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder22.ets create mode 100644 sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder23.ets create mode 100644 sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder24.ets create mode 100644 sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder25.ets diff --git a/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder01.ets b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder01.ets new file mode 100644 index 00000000..7474731d --- /dev/null +++ b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder01.ets @@ -0,0 +1,87 @@ +/** + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct imageBorder01 { + @State info1:string = 'loading~~'; + @State info2:string = 'loading~~'; + + build() { + Column() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center }) { + Text(this.info1) + .height(40) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width(170) + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin(6) + + Text(this.info2) + .height(40) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width(170) + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin(6) + + Image('https://foruda.gitee.com/images/1753255402677959741/499f5538_10080759.png') + .borderWidth(1) + .objectFit(ImageFit.Contain) + .margin(15) + .width(150) + .height(150) + .borderRadius(10) + .onComplete((event) => { + if (event) { + console.log('onComplete:event.loadingStatus ' + event.loadingStatus) + console.log('onComplete:event.contentWidth ' + event.contentWidth) + console.log('onComplete:event.contentHeight ' + event.contentHeight) + console.log('onComplete:event.contentOffsetX ' + event.contentOffsetX) + console.log('onComplete:event.contentOffsetY ' + event.contentOffsetY) + this.info1 = 'loading success' + } + }) + + Image('https://foruda.gitee.com/images/1753255402677959741/499f5538_10080759.png') + .borderWidth(1) + .objectFit(ImageFit.Contain) + .margin(15) + .width(114) + .height(114) + .borderRadius(150) + .onComplete((event) => { + if (event) { + console.log('onComplete:event.loadingStatus ' + event.loadingStatus) + console.log('onComplete:event.contentWidth ' + event.contentWidth) + console.log('onComplete:event.contentHeight ' + event.contentHeight) + console.log('onComplete:event.contentOffsetX ' + event.contentOffsetX) + console.log('onComplete:event.contentOffsetY ' + event.contentOffsetY) + this.info2 = 'loading success' + } + }) + } + } + .height('100%') + .width('90%') + } +} diff --git a/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder02.ets b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder02.ets new file mode 100644 index 00000000..5572f332 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder02.ets @@ -0,0 +1,87 @@ +/** + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct imageBorder02 { + @State info1:string = 'loading~~'; + @State info2:string = 'loading~~'; + + build() { + Column() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center }) { + Text(this.info1) + .height(40) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width(170) + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin(6) + + Text(this.info2) + .height(40) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width(170) + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin(6) + + Image('https://foruda.gitee.com/images/1753255402677959741/499f5538_10080759.png') + .borderWidth(1) + .objectFit(ImageFit.Contain) + .margin(15) + .width(150) + .height(150) + .borderRadius(10) + .onComplete((event) => { + if (event) { + console.log('onComplete:event.loadingStatus ' + event.loadingStatus) + console.log('onComplete:event.contentWidth ' + event.contentWidth) + console.log('onComplete:event.contentHeight ' + event.contentHeight) + console.log('onComplete:event.contentOffsetX ' + event.contentOffsetX) + console.log('onComplete:event.contentOffsetY ' + event.contentOffsetY) + this.info1 = 'loading success' + } + }) + + Image('https://foruda.gitee.com/images/1753255402677959741/499f5538_10080759.png') + .borderWidth(1) + .objectFit(ImageFit.Contain) + .margin(15) + .width(150) + .height(150) + .borderRadius(100) + .onComplete((event) => { + if (event) { + console.log('onComplete:event.loadingStatus ' + event.loadingStatus) + console.log('onComplete:event.contentWidth ' + event.contentWidth) + console.log('onComplete:event.contentHeight ' + event.contentHeight) + console.log('onComplete:event.contentOffsetX ' + event.contentOffsetX) + console.log('onComplete:event.contentOffsetY ' + event.contentOffsetY) + this.info2 = 'loading success' + } + }) + } + } + .height('100%') + .width('90%') + } +} diff --git a/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder03.ets b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder03.ets new file mode 100644 index 00000000..64dbc0aa --- /dev/null +++ b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder03.ets @@ -0,0 +1,87 @@ +/** + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct imageBorder03 { + @State info1:string = 'loading~~'; + @State info2:string = 'loading~~'; + + build() { + Column() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center }) { + Text(this.info1) + .height(40) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width(170) + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin(6) + + Text(this.info2) + .height(40) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width(170) + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin(6) + + Image('https://foruda.gitee.com/images/1753255402677959741/499f5538_10080759.png') + .borderWidth(1) + .objectFit(ImageFit.Contain) + .margin(15) + .width(70) + .height(70) + .borderRadius(10) + .onComplete((event) => { + if (event) { + console.log('onComplete:event.loadingStatus ' + event.loadingStatus) + console.log('onComplete:event.contentWidth ' + event.contentWidth) + console.log('onComplete:event.contentHeight ' + event.contentHeight) + console.log('onComplete:event.contentOffsetX ' + event.contentOffsetX) + console.log('onComplete:event.contentOffsetY ' + event.contentOffsetY) + this.info1 = 'loading success' + } + }) + + Image('https://foruda.gitee.com/images/1753255402677959741/499f5538_10080759.png') + .borderWidth(1) + .objectFit(ImageFit.Contain) + .margin(15) + .width(70) + .height(70) + .borderRadius(100) + .onComplete((event) => { + if (event) { + console.log('onComplete:event.loadingStatus ' + event.loadingStatus) + console.log('onComplete:event.contentWidth ' + event.contentWidth) + console.log('onComplete:event.contentHeight ' + event.contentHeight) + console.log('onComplete:event.contentOffsetX ' + event.contentOffsetX) + console.log('onComplete:event.contentOffsetY ' + event.contentOffsetY) + this.info2 = 'loading success' + } + }) + } + } + .height('100%') + .width('90%') + } +} diff --git a/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder04.ets b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder04.ets new file mode 100644 index 00000000..44427b8c --- /dev/null +++ b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder04.ets @@ -0,0 +1,54 @@ +/** + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct imageBorder04 { + @State info:string = 'loading~~'; + + build() { + Column() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center }) { + Text(this.info) + .height(40) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width(170) + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin(6) + + Image('https://foruda.gitee.com/images/1753255402677959741/499f5538_10080759.png') + .width(150) + .borderWidth(1) + .margin(15) + .onComplete((event) => { + if (event) { + console.log('onComplete:event.loadingStatus ' + event.loadingStatus) + console.log('onComplete:event.contentWidth ' + event.contentWidth) + console.log('onComplete:event.contentHeight ' + event.contentHeight) + console.log('onComplete:event.contentOffsetX ' + event.contentOffsetX) + console.log('onComplete:event.contentOffsetY ' + event.contentOffsetY) + this.info = 'loading success' + } + }) + } + } + .height('100%') + .width('90%') + } +} diff --git a/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder05.ets b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder05.ets new file mode 100644 index 00000000..3540efd3 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder05.ets @@ -0,0 +1,55 @@ +/** + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct imageBorder05 { + @State info:string = 'loading~~'; + + build() { + Column() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center }) { + Text(this.info) + .height(40) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width(170) + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin(6) + + Image('https://foruda.gitee.com/images/1753255402677959741/499f5538_10080759.png') + .width(150) + .borderRadius(20) + .borderWidth(1) + .margin(15) + .onComplete((event) => { + if (event) { + console.log('onComplete:event.loadingStatus ' + event.loadingStatus) + console.log('onComplete:event.contentWidth ' + event.contentWidth) + console.log('onComplete:event.contentHeight ' + event.contentHeight) + console.log('onComplete:event.contentOffsetX ' + event.contentOffsetX) + console.log('onComplete:event.contentOffsetY ' + event.contentOffsetY) + this.info = 'loading success' + } + }) + } + } + .height('100%') + .width('90%') + } +} diff --git a/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder06.ets b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder06.ets new file mode 100644 index 00000000..6bc8218f --- /dev/null +++ b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder06.ets @@ -0,0 +1,55 @@ +/** + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct imageBorder06 { + @State info:string = 'loading~~'; + + build() { + Column() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center }) { + Text(this.info) + .height(40) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width(170) + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin(6) + + Image('https://docs.openharmony.cn/doc_v5.1_1753224319/zh-cn/application-dev/reference/apis-arkui/arkui-ts/figures/zh-cn_image_view2.png') + .width(150) + .borderRadius(20) + .borderWidth(1) + .margin(15) + .onComplete((event) => { + if (event) { + console.log('onComplete:event.loadingStatus ' + event.loadingStatus) + console.log('onComplete:event.contentWidth ' + event.contentWidth) + console.log('onComplete:event.contentHeight ' + event.contentHeight) + console.log('onComplete:event.contentOffsetX ' + event.contentOffsetX) + console.log('onComplete:event.contentOffsetY ' + event.contentOffsetY) + this.info = 'loading success' + } + }) + } + } + .height('100%') + .width('90%') + } +} diff --git a/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder07.ets b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder07.ets new file mode 100644 index 00000000..1c8352a5 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder07.ets @@ -0,0 +1,65 @@ +/** + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct imageBorder07 { + @State info:string = 'loading~~'; + + build() { + Column() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center }) { + Text(this.info) + .height(40) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width(170) + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin(6) + + Image('https://foruda.gitee.com/images/1753255402677959741/499f5538_10080759.png') + .width(150) + .borderRadius(20) + .margin(15) + .borderImage({ + source: { + angle: 90, + direction: GradientDirection.Left, + colors: [[0xAEE1E1, 0.0], [0xD3E0DC, 0.3], [0xFCD1D1, 1.0]] + }, + slice: { top: 10, bottom: 10, left: 10, right: 10 }, + width: { top: "10px", bottom: "10px", left: "10px", right: "10px" }, + repeat: RepeatMode.Stretch, + fill: false + }) + .onComplete((event) => { + if (event) { + console.log('onComplete:event.loadingStatus ' + event.loadingStatus) + console.log('onComplete:event.contentWidth ' + event.contentWidth) + console.log('onComplete:event.contentHeight ' + event.contentHeight) + console.log('onComplete:event.contentOffsetX ' + event.contentOffsetX) + console.log('onComplete:event.contentOffsetY ' + event.contentOffsetY) + this.info = 'loading success' + } + }) + } + } + .height('100%') + .width('90%') + } +} diff --git a/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder08.ets b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder08.ets new file mode 100644 index 00000000..c48c271d --- /dev/null +++ b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder08.ets @@ -0,0 +1,61 @@ +/** + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct imageBorder08 { + @State info:string = 'loading~~'; + + build() { + Column() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center }) { + Text(this.info) + .height(40) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width(170) + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin(6) + + Image('https://foruda.gitee.com/images/1753255402677959741/499f5538_10080759.png') + .width(150) + .borderRadius(20) + .margin(15) + .borderImage({ + source: $r('app.media.icon'), + slice: { top: 10, bottom: 10, left: 10, right: 10 }, + width: { top: "20px", bottom: "20px", left: "20px", right: "20px" }, + repeat: RepeatMode.Stretch, + fill: false + }) + .onComplete((event) => { + if (event) { + console.log('onComplete:event.loadingStatus ' + event.loadingStatus) + console.log('onComplete:event.contentWidth ' + event.contentWidth) + console.log('onComplete:event.contentHeight ' + event.contentHeight) + console.log('onComplete:event.contentOffsetX ' + event.contentOffsetX) + console.log('onComplete:event.contentOffsetY ' + event.contentOffsetY) + this.info = 'loading success' + } + }) + } + } + .height('100%') + .width('90%') + } +} diff --git a/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder09.ets b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder09.ets new file mode 100644 index 00000000..a4de7425 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder09.ets @@ -0,0 +1,63 @@ +/** + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct imageBorder09 { + @State info:string = 'loading~~'; + + build() { + Column() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center }) { + Text(this.info) + .height(40) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width(170) + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin(6) + + Image('https://foruda.gitee.com/images/1753255402677959741/499f5538_10080759.png') + .width(150) + .borderRadius(20) + .margin(15) + .borderImage({ + source: { + angle: 90, + direction: GradientDirection.Left, + colors: [[0xAEE1E1, 0.0], [0xD3E0DC, 0.3], [0xFCD1D1, 1.0]] + }, + slice: -50, + width: { top: "20px", bottom: "20px", left: "20px", right: "20px" }, + }) + .onComplete((event) => { + if (event) { + console.log('onComplete:event.loadingStatus ' + event.loadingStatus) + console.log('onComplete:event.contentWidth ' + event.contentWidth) + console.log('onComplete:event.contentHeight ' + event.contentHeight) + console.log('onComplete:event.contentOffsetX ' + event.contentOffsetX) + console.log('onComplete:event.contentOffsetY ' + event.contentOffsetY) + this.info = 'loading success' + } + }) + } + } + .height('100%') + .width('90%') + } +} diff --git a/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder10.ets b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder10.ets new file mode 100644 index 00000000..3334a85e --- /dev/null +++ b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder10.ets @@ -0,0 +1,63 @@ +/** + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct imageBorder10 { + @State info:string = 'loading~~'; + + build() { + Column() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center }) { + Text(this.info) + .height(40) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width(170) + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin(6) + + Image('https://foruda.gitee.com/images/1753255402677959741/499f5538_10080759.png') + .width(150) + .borderRadius(20) + .margin(15) + .borderImage({ + source: { + angle: 90, + direction: GradientDirection.Left, + colors: [[0xAEE1E1, 0.0], [0xD3E0DC, 0.3], [0xFCD1D1, 1.0]] + }, + slice: 70, + width: 30, + }) + .onComplete((event) => { + if (event) { + console.log('onComplete:event.loadingStatus ' + event.loadingStatus) + console.log('onComplete:event.contentWidth ' + event.contentWidth) + console.log('onComplete:event.contentHeight ' + event.contentHeight) + console.log('onComplete:event.contentOffsetX ' + event.contentOffsetX) + console.log('onComplete:event.contentOffsetY ' + event.contentOffsetY) + this.info = 'loading success' + } + }) + } + } + .height('100%') + .width('90%') + } +} diff --git a/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder11.ets b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder11.ets new file mode 100644 index 00000000..1c68580e --- /dev/null +++ b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder11.ets @@ -0,0 +1,63 @@ +/** + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct imageBorder11 { + @State info:string = 'loading~~'; + + build() { + Column() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center }) { + Text(this.info) + .height(40) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width(170) + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin(6) + + Image('https://foruda.gitee.com/images/1753255402677959741/499f5538_10080759.png') + .width(150) + .borderRadius(20) + .margin(15) + .borderImage({ + source: { + angle: 90, + direction: GradientDirection.Left, + colors: [[0xAEE1E1, 0.0], [0xD3E0DC, 0.3], [0xFCD1D1, 1.0]] + }, + slice: { top:30 }, + width: 30, + }) + .onComplete((event) => { + if (event) { + console.log('onComplete:event.loadingStatus ' + event.loadingStatus) + console.log('onComplete:event.contentWidth ' + event.contentWidth) + console.log('onComplete:event.contentHeight ' + event.contentHeight) + console.log('onComplete:event.contentOffsetX ' + event.contentOffsetX) + console.log('onComplete:event.contentOffsetY ' + event.contentOffsetY) + this.info = 'loading success' + } + }) + } + } + .height('100%') + .width('90%') + } +} diff --git a/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder12.ets b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder12.ets new file mode 100644 index 00000000..91510953 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder12.ets @@ -0,0 +1,63 @@ +/** + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct imageBorder12 { + @State info:string = 'loading~~'; + + build() { + Column() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center }) { + Text(this.info) + .height(40) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width(170) + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin(6) + + Image('https://foruda.gitee.com/images/1753255402677959741/499f5538_10080759.png') + .width(150) + .borderRadius(20) + .margin(15) + .borderImage({ + source: { + angle: 90, + direction: GradientDirection.Left, + colors: [[0xAEE1E1, 0.0], [0xD3E0DC, 0.3], [0xFCD1D1, 1.0]] + }, + slice: { bottom:30 }, + width: 30, + }) + .onComplete((event) => { + if (event) { + console.log('onComplete:event.loadingStatus ' + event.loadingStatus) + console.log('onComplete:event.contentWidth ' + event.contentWidth) + console.log('onComplete:event.contentHeight ' + event.contentHeight) + console.log('onComplete:event.contentOffsetX ' + event.contentOffsetX) + console.log('onComplete:event.contentOffsetY ' + event.contentOffsetY) + this.info = 'loading success' + } + }) + } + } + .height('100%') + .width('90%') + } +} diff --git a/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder13.ets b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder13.ets new file mode 100644 index 00000000..08361320 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder13.ets @@ -0,0 +1,63 @@ +/** + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct imageBorder13 { + @State info:string = 'loading~~'; + + build() { + Column() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center }) { + Text(this.info) + .height(40) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width(170) + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin(6) + + Image('https://foruda.gitee.com/images/1753255402677959741/499f5538_10080759.png') + .width(150) + .borderRadius(20) + .margin(15) + .borderImage({ + source: { + angle: 90, + direction: GradientDirection.Left, + colors: [[0xAEE1E1, 0.0], [0xD3E0DC, 0.3], [0xFCD1D1, 1.0]] + }, + slice: { left:30 }, + width: 30, + }) + .onComplete((event) => { + if (event) { + console.log('onComplete:event.loadingStatus ' + event.loadingStatus) + console.log('onComplete:event.contentWidth ' + event.contentWidth) + console.log('onComplete:event.contentHeight ' + event.contentHeight) + console.log('onComplete:event.contentOffsetX ' + event.contentOffsetX) + console.log('onComplete:event.contentOffsetY ' + event.contentOffsetY) + this.info = 'loading success' + } + }) + } + } + .height('100%') + .width('90%') + } +} diff --git a/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder14.ets b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder14.ets new file mode 100644 index 00000000..b4c17351 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder14.ets @@ -0,0 +1,62 @@ +/** + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct imageBorder14 { + @State info:string = 'loading~~'; + + build() { + Column() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center }) { + Text(this.info) + .height(40) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width(170) + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin(6) + Image('https://foruda.gitee.com/images/1753255402677959741/499f5538_10080759.png') + .width(150) + .borderRadius(20) + .margin(15) + .borderImage({ + source: { + angle: 90, + direction: GradientDirection.Left, + colors: [[0xAEE1E1, 0.0], [0xD3E0DC, 0.3], [0xFCD1D1, 1.0]] + }, + slice: { right:30 }, + width: 30, + }) + .onComplete((event) => { + if (event) { + console.log('onComplete:event.loadingStatus ' + event.loadingStatus) + console.log('onComplete:event.contentWidth ' + event.contentWidth) + console.log('onComplete:event.contentHeight ' + event.contentHeight) + console.log('onComplete:event.contentOffsetX ' + event.contentOffsetX) + console.log('onComplete:event.contentOffsetY ' + event.contentOffsetY) + this.info = 'loading success' + } + }) + } + } + .height('100%') + .width('90%') + } +} diff --git a/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder15.ets b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder15.ets new file mode 100644 index 00000000..8a7bc501 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder15.ets @@ -0,0 +1,66 @@ +/** + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct imageBorder15 { + @State info:string = 'loading~~'; + + build() { + Column() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center }) { + Text(this.info) + .height(40) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width(170) + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin(6) + + Image('https://foruda.gitee.com/images/1753255402677959741/499f5538_10080759.png') + .width(150) + .borderRadius(20) + .margin(15) + .borderImage({ + source: { + angle: 90, + direction: GradientDirection.Left, + colors: [[0xAEE1E1, 0.0], [0xD3E0DC, 0.3], [0xFCD1D1, 1.0]] + }, + slice: { + top:30, + bottom:30 + }, + width: 30, + }) + .onComplete((event) => { + if (event) { + console.log('onComplete:event.loadingStatus ' + event.loadingStatus) + console.log('onComplete:event.contentWidth ' + event.contentWidth) + console.log('onComplete:event.contentHeight ' + event.contentHeight) + console.log('onComplete:event.contentOffsetX ' + event.contentOffsetX) + console.log('onComplete:event.contentOffsetY ' + event.contentOffsetY) + this.info = 'loading success' + } + }) + } + } + .height('100%') + .width('90%') + } +} diff --git a/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder16.ets b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder16.ets new file mode 100644 index 00000000..0eef7323 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder16.ets @@ -0,0 +1,66 @@ +/** + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct imageBorder16 { + @State info:string = 'loading~~'; + + build() { + Column() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center }) { + Text(this.info) + .height(40) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width(170) + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin(6) + + Image('https://foruda.gitee.com/images/1753255402677959741/499f5538_10080759.png') + .width(150) + .borderRadius(20) + .margin(15) + .borderImage({ + source: { + angle: 90, + direction: GradientDirection.Left, + colors: [[0xAEE1E1, 0.0], [0xD3E0DC, 0.3], [0xFCD1D1, 1.0]] + }, + slice: { + top:30, + left:30 + }, + width: 30, + }) + .onComplete((event) => { + if (event) { + console.log('onComplete:event.loadingStatus ' + event.loadingStatus) + console.log('onComplete:event.contentWidth ' + event.contentWidth) + console.log('onComplete:event.contentHeight ' + event.contentHeight) + console.log('onComplete:event.contentOffsetX ' + event.contentOffsetX) + console.log('onComplete:event.contentOffsetY ' + event.contentOffsetY) + this.info = 'loading success' + } + }) + } + } + .height('100%') + .width('90%') + } +} diff --git a/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder17.ets b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder17.ets new file mode 100644 index 00000000..60803f86 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder17.ets @@ -0,0 +1,66 @@ +/** + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct imageBorder17 { + @State info:string = 'loading~~'; + + build() { + Column() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center }) { + Text(this.info) + .height(40) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width(170) + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin(6) + + Image('https://foruda.gitee.com/images/1753255402677959741/499f5538_10080759.png') + .width(150) + .borderRadius(20) + .margin(15) + .borderImage({ + source: { + angle: 90, + direction: GradientDirection.Left, + colors: [[0xAEE1E1, 0.0], [0xD3E0DC, 0.3], [0xFCD1D1, 1.0]] + }, + slice: { + top:30, + right:30 + }, + width: 30, + }) + .onComplete((event) => { + if (event) { + console.log('onComplete:event.loadingStatus ' + event.loadingStatus) + console.log('onComplete:event.contentWidth ' + event.contentWidth) + console.log('onComplete:event.contentHeight ' + event.contentHeight) + console.log('onComplete:event.contentOffsetX ' + event.contentOffsetX) + console.log('onComplete:event.contentOffsetY ' + event.contentOffsetY) + this.info = 'loading success' + } + }) + } + } + .height('100%') + .width('90%') + } +} diff --git a/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder18.ets b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder18.ets new file mode 100644 index 00000000..050b3671 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder18.ets @@ -0,0 +1,66 @@ +/** + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct imageBorder17 { + @State info:string = 'loading~~'; + + build() { + Column() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center }) { + Text(this.info) + .height(40) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width(170) + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin(6) + + Image('https://foruda.gitee.com/images/1753255402677959741/499f5538_10080759.png') + .width(150) + .borderRadius(20) + .margin(15) + .borderImage({ + source: { + angle: 90, + direction: GradientDirection.Left, + colors: [[0xAEE1E1, 0.0], [0xD3E0DC, 0.3], [0xFCD1D1, 1.0]] + }, + slice: { + bottom:30, + left:30 + }, + width: 30, + }) + .onComplete((event) => { + if (event) { + console.log('onComplete:event.loadingStatus ' + event.loadingStatus) + console.log('onComplete:event.contentWidth ' + event.contentWidth) + console.log('onComplete:event.contentHeight ' + event.contentHeight) + console.log('onComplete:event.contentOffsetX ' + event.contentOffsetX) + console.log('onComplete:event.contentOffsetY ' + event.contentOffsetY) + this.info = 'loading success' + } + }) + } + } + .height('100%') + .width('90%') + } +} diff --git a/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder19.ets b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder19.ets new file mode 100644 index 00000000..b806489e --- /dev/null +++ b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder19.ets @@ -0,0 +1,66 @@ +/** + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct imageBorder19 { + @State info:string = 'loading~~'; + + build() { + Column() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center }) { + Text(this.info) + .height(40) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width(170) + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin(6) + + Image('https://foruda.gitee.com/images/1753255402677959741/499f5538_10080759.png') + .width(150) + .borderRadius(20) + .margin(15) + .borderImage({ + source: { + angle: 90, + direction: GradientDirection.Left, + colors: [[0xAEE1E1, 0.0], [0xD3E0DC, 0.3], [0xFCD1D1, 1.0]] + }, + slice: { + bottom:30, + right:30 + }, + width: 30, + }) + .onComplete((event) => { + if (event) { + console.log('onComplete:event.loadingStatus ' + event.loadingStatus) + console.log('onComplete:event.contentWidth ' + event.contentWidth) + console.log('onComplete:event.contentHeight ' + event.contentHeight) + console.log('onComplete:event.contentOffsetX ' + event.contentOffsetX) + console.log('onComplete:event.contentOffsetY ' + event.contentOffsetY) + this.info = 'loading success' + } + }) + } + } + .height('100%') + .width('90%') + } +} diff --git a/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder20.ets b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder20.ets new file mode 100644 index 00000000..8ef67393 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder20.ets @@ -0,0 +1,66 @@ +/** + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct imageBorder20 { + @State info:string = 'loading~~'; + + build() { + Column() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center }) { + Text(this.info) + .height(40) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width(170) + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin(6) + + Image('https://foruda.gitee.com/images/1753255402677959741/499f5538_10080759.png') + .width(150) + .borderRadius(20) + .margin(15) + .borderImage({ + source: { + angle: 90, + direction: GradientDirection.Left, + colors: [[0xAEE1E1, 0.0], [0xD3E0DC, 0.3], [0xFCD1D1, 1.0]] + }, + slice: { + left:30, + right:30 + }, + width: 30, + }) + .onComplete((event) => { + if (event) { + console.log('onComplete:event.loadingStatus ' + event.loadingStatus) + console.log('onComplete:event.contentWidth ' + event.contentWidth) + console.log('onComplete:event.contentHeight ' + event.contentHeight) + console.log('onComplete:event.contentOffsetX ' + event.contentOffsetX) + console.log('onComplete:event.contentOffsetY ' + event.contentOffsetY) + this.info = 'loading success' + } + }) + } + } + .height('100%') + .width('90%') + } +} diff --git a/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder21.ets b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder21.ets new file mode 100644 index 00000000..286b54a3 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder21.ets @@ -0,0 +1,67 @@ +/** + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct imageBorder21 { + @State info:string = 'loading~~'; + + build() { + Column() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center }) { + Text(this.info) + .height(40) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width(170) + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin(6) + + Image('https://foruda.gitee.com/images/1753255402677959741/499f5538_10080759.png') + .width(150) + .borderRadius(20) + .margin(15) + .borderImage({ + source: { + angle: 90, + direction: GradientDirection.Left, + colors: [[0xAEE1E1, 0.0], [0xD3E0DC, 0.3], [0xFCD1D1, 1.0]] + }, + slice: { + top:30, + bottom:30, + left:30 + }, + width: 30, + }) + .onComplete((event) => { + if (event) { + console.log('onComplete:event.loadingStatus ' + event.loadingStatus) + console.log('onComplete:event.contentWidth ' + event.contentWidth) + console.log('onComplete:event.contentHeight ' + event.contentHeight) + console.log('onComplete:event.contentOffsetX ' + event.contentOffsetX) + console.log('onComplete:event.contentOffsetY ' + event.contentOffsetY) + this.info = 'loading success' + } + }) + } + } + .height('100%') + .width('90%') + } +} diff --git a/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder22.ets b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder22.ets new file mode 100644 index 00000000..e0cf5bec --- /dev/null +++ b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder22.ets @@ -0,0 +1,67 @@ +/** + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct imageBorder22 { + @State info:string = 'loading~~'; + + build() { + Column() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center }) { + Text(this.info) + .height(40) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width(170) + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin(6) + + Image('https://foruda.gitee.com/images/1753255402677959741/499f5538_10080759.png') + .width(150) + .borderRadius(20) + .margin(15) + .borderImage({ + source: { + angle: 90, + direction: GradientDirection.Left, + colors: [[0xAEE1E1, 0.0], [0xD3E0DC, 0.3], [0xFCD1D1, 1.0]] + }, + slice: { + top:30, + bottom:30, + right:30 + }, + width: 30, + }) + .onComplete((event) => { + if (event) { + console.log('onComplete:event.loadingStatus ' + event.loadingStatus) + console.log('onComplete:event.contentWidth ' + event.contentWidth) + console.log('onComplete:event.contentHeight ' + event.contentHeight) + console.log('onComplete:event.contentOffsetX ' + event.contentOffsetX) + console.log('onComplete:event.contentOffsetY ' + event.contentOffsetY) + this.info = 'loading success' + } + }) + } + } + .height('100%') + .width('90%') + } +} diff --git a/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder23.ets b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder23.ets new file mode 100644 index 00000000..609802b7 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder23.ets @@ -0,0 +1,67 @@ +/** + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct imageBorder23 { + @State info:string = 'loading~~'; + + build() { + Column() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center }) { + Text(this.info) + .height(40) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width(170) + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin(6) + + Image('https://foruda.gitee.com/images/1753255402677959741/499f5538_10080759.png') + .width(150) + .borderRadius(20) + .margin(15) + .borderImage({ + source: { + angle: 90, + direction: GradientDirection.Left, + colors: [[0xAEE1E1, 0.0], [0xD3E0DC, 0.3], [0xFCD1D1, 1.0]] + }, + slice: { + bottom:30, + left:30, + right:30 + }, + width: 30, + }) + .onComplete((event) => { + if (event) { + console.log('onComplete:event.loadingStatus ' + event.loadingStatus) + console.log('onComplete:event.contentWidth ' + event.contentWidth) + console.log('onComplete:event.contentHeight ' + event.contentHeight) + console.log('onComplete:event.contentOffsetX ' + event.contentOffsetX) + console.log('onComplete:event.contentOffsetY ' + event.contentOffsetY) + this.info = 'loading success' + } + }) + } + } + .height('100%') + .width('90%') + } +} diff --git a/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder24.ets b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder24.ets new file mode 100644 index 00000000..90cea473 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder24.ets @@ -0,0 +1,65 @@ +/** + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { LengthMetrics } from '@kit.ArkUI' + +@Entry +@Component +struct imageBorder24 { + @State info:string = 'loading~~'; + + build() { + Column() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center }) { + Text(this.info) + .height(40) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width(170) + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin(6) + + Image('https://foruda.gitee.com/images/1753255402677959741/499f5538_10080759.png') + .width(150) + .borderRadius(20) + .margin(15) + .borderImage({ + source: { + angle: 90, + direction: GradientDirection.Left, + colors: [[0xAEE1E1, 0.0], [0xD3E0DC, 0.3], [0xFCD1D1, 1.0]] + }, + slice: { top: LengthMetrics.vp(30) }, + width: 30, + }) + .onComplete((event) => { + if (event) { + console.log('onComplete:event.loadingStatus ' + event.loadingStatus) + console.log('onComplete:event.contentWidth ' + event.contentWidth) + console.log('onComplete:event.contentHeight ' + event.contentHeight) + console.log('onComplete:event.contentOffsetX ' + event.contentOffsetX) + console.log('onComplete:event.contentOffsetY ' + event.contentOffsetY) + this.info = 'loading success' + } + }) + } + } + .height('100%') + .width('90%') + } +} diff --git a/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder25.ets b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder25.ets new file mode 100644 index 00000000..29f0e226 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder25.ets @@ -0,0 +1,65 @@ +/** + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { LengthMetrics } from '@kit.ArkUI' + +@Entry +@Component +struct imageBorder25 { + @State info:string = 'loading~~'; + + build() { + Column() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center }) { + Text(this.info) + .height(40) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width(170) + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin(6) + + Image('https://foruda.gitee.com/images/1753255402677959741/499f5538_10080759.png') + .width(150) + .borderRadius(20) + .margin(15) + .borderImage({ + source: { + angle: 90, + direction: GradientDirection.Left, + colors: [[0xAEE1E1, 0.0], [0xD3E0DC, 0.3], [0xFCD1D1, 1.0]] + }, + slice: { bottom: LengthMetrics.vp(30) }, + width: 30, + }) + .onComplete((event) => { + if (event) { + console.log('onComplete:event.loadingStatus ' + event.loadingStatus) + console.log('onComplete:event.contentWidth ' + event.contentWidth) + console.log('onComplete:event.contentHeight ' + event.contentHeight) + console.log('onComplete:event.contentOffsetX ' + event.contentOffsetX) + console.log('onComplete:event.contentOffsetY ' + event.contentOffsetY) + this.info = 'loading success' + } + }) + } + } + .height('100%') + .width('90%') + } +} -- Gitee From 30d6aefd727d19562814ad2c83d7d74958de3b4a Mon Sep 17 00:00:00 2001 From: dongwei Date: Tue, 19 Aug 2025 15:55:22 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E6=8F=90=E4=BA=A4imageBorder=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E7=94=A8=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: dongwei --- .../image_svg_animate/ImgaeBorder.test.ets | 691 ++++++++++++++++++ .../imageBorder/imageBorder26.ets | 65 ++ .../imageBorder/imageBorder27.ets | 65 ++ .../imageBorder/imageBorder28.ets | 68 ++ .../imageBorder/imageBorder29.ets | 67 ++ .../imageBorder/imageBorder30.ets | 68 ++ .../imageBorder/imageBorder31.ets | 68 ++ .../imageBorder/imageBorder32.ets | 68 ++ .../imageBorder/imageBorder33.ets | 68 ++ .../imageBorder/imageBorder34.ets | 69 ++ .../imageBorder/imageBorder35.ets | 69 ++ .../imageBorder/imageBorder36.ets | 69 ++ 12 files changed, 1435 insertions(+) create mode 100644 sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/test/image_svg_animate/ImgaeBorder.test.ets create mode 100644 sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder26.ets create mode 100644 sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder27.ets create mode 100644 sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder28.ets create mode 100644 sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder29.ets create mode 100644 sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder30.ets create mode 100644 sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder31.ets create mode 100644 sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder32.ets create mode 100644 sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder33.ets create mode 100644 sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder34.ets create mode 100644 sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder35.ets create mode 100644 sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder36.ets diff --git a/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/test/image_svg_animate/ImgaeBorder.test.ets b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/test/image_svg_animate/ImgaeBorder.test.ets new file mode 100644 index 00000000..27381713 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/test/image_svg_animate/ImgaeBorder.test.ets @@ -0,0 +1,691 @@ +/** + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect, Level } from '@ohos/hypium' +import Settings from '../model/Settings' +import windowSnap from '../model/snapShot' +import Logger from '../model/Logger' +import Utils from '../model/Utils' +import { Driver, ON, Component } from '@kit.TestKit'; +import { BusinessError } from '@kit.BasicServicesKit' + +export default function ImageBorderTest () { + + describe('ImageBorderTest', () => { + afterEach(async (done: Function) => { + if (Settings.windowClass == undefined) { + return + } + + Settings.windowClass.destroyWindow((err:BusinessError) => { + 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_MEDIA_IMAGE_BORDER_0011 + * @tc.name : Image with url + * @tc.type : Function + * @tc.size : MediumTest + * @tc.level : 3 + */ + it('SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDER_0011', Level.LEVEL3, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDER_0011 start.`); + Settings.createWindow("testability/pages/image_svg_animate/imageBorder/imageBorder01") + let driver:Driver = Driver.create(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDER_0011 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDER_0012 + * @tc.name : Image with url + * @tc.type : Function + * @tc.size : MediumTest + * @tc.level : 3 + */ + it('SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDER_0012', Level.LEVEL3, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDER_0012 start.`); + Settings.createWindow("testability/pages/image_svg_animate/imageBorder/imageBorder02") + let driver:Driver = Driver.create(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDER_0012 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDER_0013 + * @tc.name : Image with url + * @tc.type : Function + * @tc.size : MediumTest + * @tc.level : 3 + */ + it('SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDER_0013', Level.LEVEL3, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDER_0013 start.`); + Settings.createWindow("testability/pages/image_svg_animate/imageBorder/imageBorder03") + let driver:Driver = Driver.create(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDER_0013 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDER_0014 + * @tc.name : Image with url + * @tc.type : Function + * @tc.size : MediumTest + * @tc.level : 3 + */ + it('SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDER_0014', Level.LEVEL3, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDER_0014 start.`); + Settings.createWindow("testability/pages/image_svg_animate/imageBorder/imageBorder04") + let driver:Driver = Driver.create(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDER_0014 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDER_0015 + * @tc.name : Image with url + * @tc.type : Function + * @tc.size : MediumTest + * @tc.level : 3 + */ + it('SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDER_0015', Level.LEVEL3, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDER_0015 start.`); + Settings.createWindow("testability/pages/image_svg_animate/imageBorder/imageBorder05") + let driver:Driver = Driver.create(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDER_0015 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDER_0016 + * @tc.name : Image with url + * @tc.type : Function + * @tc.size : MediumTest + * @tc.level : 3 + */ + it('SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDER_0016', Level.LEVEL3, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDER_0016 start.`); + Settings.createWindow("testability/pages/image_svg_animate/imageBorder/imageBorder06") + let driver:Driver = Driver.create(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDER_0016 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0010 + * @tc.name : Image with url + * @tc.type : Function + * @tc.size : MediumTest + * @tc.level : 3 + */ + it('SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0010', Level.LEVEL3, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0010 start.`); + Settings.createWindow("testability/pages/image_svg_animate/imageBorder/imageBorder07") + let driver:Driver = Driver.create(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0010 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0011 + * @tc.name : Image with url + * @tc.type : Function + * @tc.size : MediumTest + * @tc.level : 3 + */ + it('SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0011', Level.LEVEL3, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0011 start.`); + Settings.createWindow("testability/pages/image_svg_animate/imageBorder/imageBorder08") + let driver:Driver = Driver.create(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0011 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0012 + * @tc.name : Image with url + * @tc.type : Function + * @tc.size : MediumTest + * @tc.level : 3 + */ + it('SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0012', Level.LEVEL3, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0012 start.`); + Settings.createWindow("testability/pages/image_svg_animate/imageBorder/imageBorder09") + let driver:Driver = Driver.create(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0012 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0013 + * @tc.name : Image with url + * @tc.type : Function + * @tc.size : MediumTest + * @tc.level : 3 + */ + it('SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0013', Level.LEVEL3, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0013 start.`); + Settings.createWindow("testability/pages/image_svg_animate/imageBorder/imageBorder10") + let driver:Driver = Driver.create(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0013 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0014 + * @tc.name : Image with url + * @tc.type : Function + * @tc.size : MediumTest + * @tc.level : 3 + */ + it('SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0014', Level.LEVEL3, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0014 start.`); + Settings.createWindow("testability/pages/image_svg_animate/imageBorder/imageBorder11") + let driver:Driver = Driver.create(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0014 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0015 + * @tc.name : Image with url + * @tc.type : Function + * @tc.size : MediumTest + * @tc.level : 3 + */ + it('SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0015', Level.LEVEL3, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0015 start.`); + Settings.createWindow("testability/pages/image_svg_animate/imageBorder/imageBorder12") + let driver:Driver = Driver.create(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0015 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0016 + * @tc.name : Image with url + * @tc.type : Function + * @tc.size : MediumTest + * @tc.level : 3 + */ + it('SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0016', Level.LEVEL3, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0016 start.`); + Settings.createWindow("testability/pages/image_svg_animate/imageBorder/imageBorder13") + let driver:Driver = Driver.create(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0016 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0017 + * @tc.name : Image with url + * @tc.type : Function + * @tc.size : MediumTest + * @tc.level : 3 + */ + it('SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0017', Level.LEVEL3, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0017 start.`); + Settings.createWindow("testability/pages/image_svg_animate/imageBorder/imageBorder14") + let driver:Driver = Driver.create(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0017 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0018 + * @tc.name : Image border rendering 0018 + * @tc.type : Function + * @tc.size : MediumTest + * @tc.level : 3 + */ + it('SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0018', Level.LEVEL3, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0018 start.`); + Settings.createWindow("testability/pages/image_svg_animate/imageBorder/imageBorder15") + let driver:Driver = Driver.create(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0018 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0019 + * @tc.name : Image border rendering 0019 + * @tc.type : Function + * @tc.size : MediumTest + * @tc.level : 3 + */ + it('SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0019', Level.LEVEL3, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0019 start.`); + Settings.createWindow("testability/pages/image_svg_animate/imageBorder/imageBorder16") + let driver:Driver = Driver.create(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0019 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0020 + * @tc.name : Image border rendering 0020 + * @tc.type : Function + * @tc.size : MediumTest + * @tc.level : 3 + */ + it('SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0020', Level.LEVEL3, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0020 start.`); + Settings.createWindow("testability/pages/image_svg_animate/imageBorder/imageBorder17") + let driver:Driver = Driver.create(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0020 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0021 + * @tc.name : Image border rendering 0021 + * @tc.type : Function + * @tc.size : MediumTest + * @tc.level : 3 + */ + it('SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0021', Level.LEVEL3, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0021 start.`); + Settings.createWindow("testability/pages/image_svg_animate/imageBorder/imageBorder18") + let driver:Driver = Driver.create(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0021 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0022 + * @tc.name : Image border rendering 0022 + * @tc.type : Function + * @tc.size : MediumTest + * @tc.level : 3 + */ + it('SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0022', Level.LEVEL3, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0022 start.`); + Settings.createWindow("testability/pages/image_svg_animate/imageBorder/imageBorder19") + let driver:Driver = Driver.create(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0022 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0023 + * @tc.name : Image border rendering 0023 + * @tc.type : Function + * @tc.size : MediumTest + * @tc.level : 3 + */ + it('SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0023', Level.LEVEL3, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0023 start.`); + Settings.createWindow("testability/pages/image_svg_animate/imageBorder/imageBorder20") + let driver:Driver = Driver.create(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0023 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0024 + * @tc.name : Image border rendering 0024 + * @tc.type : Function + * @tc.size : MediumTest + * @tc.level : 3 + */ + it('SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0024', Level.LEVEL3, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0024 start.`); + Settings.createWindow("testability/pages/image_svg_animate/imageBorder/imageBorder21") + let driver:Driver = Driver.create(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0024 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0025 + * @tc.name : Image border rendering 0025 + * @tc.type : Function + * @tc.size : MediumTest + * @tc.level : 3 + */ + it('SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0025', Level.LEVEL3, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0025 start.`); + Settings.createWindow("testability/pages/image_svg_animate/imageBorder/imageBorder22") + let driver:Driver = Driver.create(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0025 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0026 + * @tc.name : Image border rendering 0026 + * @tc.type : Function + * @tc.size : MediumTest + * @tc.level : 3 + */ + it('SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0026', Level.LEVEL3, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0026 start.`); + Settings.createWindow("testability/pages/image_svg_animate/imageBorder/imageBorder23") + let driver:Driver = Driver.create(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0026 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0027 + * @tc.name : Image border rendering 0027 + * @tc.type : Function + * @tc.size : MediumTest + * @tc.level : 3 + */ + it('SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0027', Level.LEVEL3, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0027 start.`); + Settings.createWindow("testability/pages/image_svg_animate/imageBorder/imageBorder24") + let driver:Driver = Driver.create(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0027 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0028 + * @tc.name : Image border rendering 0028 + * @tc.type : Function + * @tc.size : MediumTest + * @tc.level : 3 + */ + it('SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0028', Level.LEVEL3, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0028 start.`); + Settings.createWindow("testability/pages/image_svg_animate/imageBorder/imageBorder25") + let driver:Driver = Driver.create(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0028 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0029 + * @tc.name : Image border rendering 0029 + * @tc.type : Function + * @tc.size : MediumTest + * @tc.level : 3 + */ + it('SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0029', Level.LEVEL3, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0029 start.`); + Settings.createWindow("testability/pages/image_svg_animate/imageBorder/imageBorder26") + let driver:Driver = Driver.create(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0029 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0030 + * @tc.name : Image border rendering 0030 + * @tc.type : Function + * @tc.size : MediumTest + * @tc.level : 3 + */ + it('SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0030', Level.LEVEL3, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0030 start.`); + Settings.createWindow("testability/pages/image_svg_animate/imageBorder/imageBorder27") + let driver:Driver = Driver.create(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0030 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0031 + * @tc.name : Image border rendering 0031 + * @tc.type : Function + * @tc.size : MediumTest + * @tc.level : 3 + */ + it('SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0031', Level.LEVEL3, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0031 start.`); + Settings.createWindow("testability/pages/image_svg_animate/imageBorder/imageBorder28") + let driver:Driver = Driver.create(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0031 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0032 + * @tc.name : Image border rendering 0032 + * @tc.type : Function + * @tc.size : MediumTest + * @tc.level : 3 + */ + it('SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0032', Level.LEVEL3, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0032 start.`); + Settings.createWindow("testability/pages/image_svg_animate/imageBorder/imageBorder29") + let driver:Driver = Driver.create(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0032 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0033 + * @tc.name : Image border rendering 0033 + * @tc.type : Function + * @tc.size : MediumTest + * @tc.level : 3 + */ + it('SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0033', Level.LEVEL3, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0033 start.`); + Settings.createWindow("testability/pages/image_svg_animate/imageBorder/imageBorder30") + let driver:Driver = Driver.create(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0033 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0034 + * @tc.name : Image border rendering 0034 + * @tc.type : Function + * @tc.size : MediumTest + * @tc.level : 3 + */ + it('SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0034', Level.LEVEL3, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0034 start.`); + Settings.createWindow("testability/pages/image_svg_animate/imageBorder/imageBorder31") + let driver:Driver = Driver.create(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0034 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0035 + * @tc.name : Image border rendering 0035 + * @tc.type : Function + * @tc.size : MediumTest + * @tc.level : 3 + */ + it('SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0035', Level.LEVEL3, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0035 start.`); + Settings.createWindow("testability/pages/image_svg_animate/imageBorder/imageBorder32") + let driver:Driver = Driver.create(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0035 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0036 + * @tc.name : Image border rendering 0036 + * @tc.type : Function + * @tc.size : MediumTest + * @tc.level : 3 + */ + it('SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0036', Level.LEVEL3, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0036 start.`); + Settings.createWindow("testability/pages/image_svg_animate/imageBorder/imageBorder33") + let driver:Driver = Driver.create(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0036 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0037 + * @tc.name : Image border rendering 0037 + * @tc.type : Function + * @tc.size : MediumTest + * @tc.level : 3 + */ + it('SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0037', Level.LEVEL3, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0037 start.`); + Settings.createWindow("testability/pages/image_svg_animate/imageBorder/imageBorder34") + let driver:Driver = Driver.create(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0037 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0038 + * @tc.name : Image border rendering 0038 + * @tc.type : Function + * @tc.size : MediumTest + * @tc.level : 3 + */ + it('SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0038', Level.LEVEL3, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0038 start.`); + Settings.createWindow("testability/pages/image_svg_animate/imageBorder/imageBorder35") + let driver:Driver = Driver.create(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0038 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0039 + * @tc.name : Image border rendering 0039 + * @tc.type : Function + * @tc.size : MediumTest + * @tc.level : 3 + */ + it('SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0039', Level.LEVEL3, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0039 start.`); + Settings.createWindow("testability/pages/image_svg_animate/imageBorder/imageBorder36") + let driver:Driver = Driver.create(); + await driver.waitForIdle(500,2000); + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_MEDIA_IMAGE_BORDERIMAGE_0039 finish.`); + done() + }) + }) +} diff --git a/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder26.ets b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder26.ets new file mode 100644 index 00000000..32eab4b4 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder26.ets @@ -0,0 +1,65 @@ +/** + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { LengthMetrics } from '@kit.ArkUI'; + +@Entry +@Component +struct imageBorder26 { + @State info:string = 'loading~~'; + + build() { + Column() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center }) { + Text(this.info) + .height(40) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width(170) + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin(6) + + Image('https://foruda.gitee.com/images/1753255402677959741/499f5538_10080759.png') + .width(150) + .borderRadius(20) + .margin(15) + .borderImage({ + source: { + angle: 90, + direction: GradientDirection.Left, + colors: [[0xAEE1E1, 0.0], [0xD3E0DC, 0.3], [0xFCD1D1, 1.0]] + }, + slice: { start: LengthMetrics.vp(30) }, + width: 30, + }) + .onComplete((event) => { + if (event) { + console.log('onComplete:event.loadingStatus ' + event.loadingStatus) + console.log('onComplete:event.contentWidth ' + event.contentWidth) + console.log('onComplete:event.contentHeight ' + event.contentHeight) + console.log('onComplete:event.contentOffsetX ' + event.contentOffsetX) + console.log('onComplete:event.contentOffsetY ' + event.contentOffsetY) + this.info = 'loading success' + } + }) + } + } + .height('100%') + .width('90%') + } +} diff --git a/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder27.ets b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder27.ets new file mode 100644 index 00000000..c92752ed --- /dev/null +++ b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder27.ets @@ -0,0 +1,65 @@ +/** + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { LengthMetrics } from '@kit.ArkUI'; + +@Entry +@Component +struct imageBorder27 { + @State info:string = 'loading~~'; + + build() { + Column() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center }) { + Text(this.info) + .height(40) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width(170) + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin(6) + + Image('https://foruda.gitee.com/images/1753255402677959741/499f5538_10080759.png') + .width(150) + .borderRadius(20) + .margin(15) + .borderImage({ + source: { + angle: 90, + direction: GradientDirection.Left, + colors: [[0xAEE1E1, 0.0], [0xD3E0DC, 0.3], [0xFCD1D1, 1.0]] + }, + slice: { end: LengthMetrics.vp(30) }, + width: 30, + }) + .onComplete((event) => { + if (event) { + console.log('onComplete:event.loadingStatus ' + event.loadingStatus) + console.log('onComplete:event.contentWidth ' + event.contentWidth) + console.log('onComplete:event.contentHeight ' + event.contentHeight) + console.log('onComplete:event.contentOffsetX ' + event.contentOffsetX) + console.log('onComplete:event.contentOffsetY ' + event.contentOffsetY) + this.info = 'loading success' + } + }) + } + } + .height('100%') + .width('90%') + } +} diff --git a/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder28.ets b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder28.ets new file mode 100644 index 00000000..3b9e1b47 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder28.ets @@ -0,0 +1,68 @@ +/** + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { LengthMetrics } from '@kit.ArkUI'; + +@Entry +@Component +struct imageBorder28 { + @State info:string = 'loading~~'; + + build() { + Column() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center }) { + Text(this.info) + .height(40) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width(170) + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin(6) + + Image('https://foruda.gitee.com/images/1753255402677959741/499f5538_10080759.png') + .width(150) + .borderRadius(20) + .margin(15) + .borderImage({ + source: { + angle: 90, + direction: GradientDirection.Left, + colors: [[0xAEE1E1, 0.0], [0xD3E0DC, 0.3], [0xFCD1D1, 1.0]] + }, + slice: { + top: LengthMetrics.vp(30), + bottom: LengthMetrics.vp(30) + }, + width: 30, + }) + .onComplete((event) => { + if (event) { + console.log('onComplete:event.loadingStatus ' + event.loadingStatus) + console.log('onComplete:event.contentWidth ' + event.contentWidth) + console.log('onComplete:event.contentHeight ' + event.contentHeight) + console.log('onComplete:event.contentOffsetX ' + event.contentOffsetX) + console.log('onComplete:event.contentOffsetY ' + event.contentOffsetY) + this.info = 'loading success' + } + }) + } + } + .height('100%') + .width('90%') + } +} diff --git a/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder29.ets b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder29.ets new file mode 100644 index 00000000..6e8dac53 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder29.ets @@ -0,0 +1,67 @@ +/** + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { LengthMetrics } from '@kit.ArkUI' + +@Entry +@Component +struct imageBorder29 { + @State info:string = 'loading~~'; + + build() { + Column() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center }) { + Text(this.info) + .height(40) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width(170) + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin(6) + + Image('https://foruda.gitee.com/images/1753255402677959741/499f5538_10080759.png') + .width(150) + .borderRadius(20) + .margin(15) + .borderImage({ + source: { + angle: 90, + direction: GradientDirection.Left, + colors: [[0xAEE1E1, 0.0], [0xD3E0DC, 0.3], [0xFCD1D1, 1.0]] + }, + slice: { + top: LengthMetrics.vp(30), + start: LengthMetrics.vp(30) + }, + width: 30, + }) + .onComplete((event) => { + if (event) { + console.log('onComplete:event.loadingStatus ' + event.loadingStatus) + console.log('onComplete:event.contentWidth ' + event.contentWidth) + console.log('onComplete:event.contentHeight ' + event.contentHeight) + console.log('onComplete:event.contentOffsetX ' + event.contentOffsetX) + console.log('onComplete:event.contentOffsetY ' + event.contentOffsetY) + this.info = 'loading success' + } + }) + } + } + .height('100%') + .width('90%') + } +} diff --git a/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder30.ets b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder30.ets new file mode 100644 index 00000000..91af6b58 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder30.ets @@ -0,0 +1,68 @@ +/** + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { LengthMetrics } from '@kit.ArkUI'; + +@Entry +@Component +struct imageBorder30 { + @State info:string = 'loading~~'; + + build() { + Column() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center }) { + Text(this.info) + .height(40) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width(170) + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin(6) + + Image('https://foruda.gitee.com/images/1753255402677959741/499f5538_10080759.png') + .width(150) + .borderRadius(20) + .margin(15) + .borderImage({ + source: { + angle: 90, + direction: GradientDirection.Left, + colors: [[0xAEE1E1, 0.0], [0xD3E0DC, 0.3], [0xFCD1D1, 1.0]] + }, + slice: { + top: LengthMetrics.vp(30), + end: LengthMetrics.vp(30) + }, + width: 30, + }) + .onComplete((event) => { + if (event) { + console.log('onComplete:event.loadingStatus ' + event.loadingStatus) + console.log('onComplete:event.contentWidth ' + event.contentWidth) + console.log('onComplete:event.contentHeight ' + event.contentHeight) + console.log('onComplete:event.contentOffsetX ' + event.contentOffsetX) + console.log('onComplete:event.contentOffsetY ' + event.contentOffsetY) + this.info = 'loading success' + } + }) + } + } + .height('100%') + .width('90%') + } +} diff --git a/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder31.ets b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder31.ets new file mode 100644 index 00000000..a3acb8d2 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder31.ets @@ -0,0 +1,68 @@ +/** + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { LengthMetrics } from '@kit.ArkUI'; + +@Entry +@Component +struct imageBorder31 { + @State info:string = 'loading~~'; + + build() { + Column() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center }) { + Text(this.info) + .height(40) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width(170) + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin(6) + + Image('https://foruda.gitee.com/images/1753255402677959741/499f5538_10080759.png') + .width(150) + .borderRadius(20) + .margin(15) + .borderImage({ + source: { + angle: 90, + direction: GradientDirection.Left, + colors: [[0xAEE1E1, 0.0], [0xD3E0DC, 0.3], [0xFCD1D1, 1.0]] + }, + slice: { + bottom: LengthMetrics.vp(30), + start: LengthMetrics.vp(30) + }, + width: 30, + }) + .onComplete((event) => { + if (event) { + console.log('onComplete:event.loadingStatus ' + event.loadingStatus) + console.log('onComplete:event.contentWidth ' + event.contentWidth) + console.log('onComplete:event.contentHeight ' + event.contentHeight) + console.log('onComplete:event.contentOffsetX ' + event.contentOffsetX) + console.log('onComplete:event.contentOffsetY ' + event.contentOffsetY) + this.info = 'loading success' + } + }) + } + } + .height('100%') + .width('90%') + } +} diff --git a/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder32.ets b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder32.ets new file mode 100644 index 00000000..527ce240 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder32.ets @@ -0,0 +1,68 @@ +/** + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { LengthMetrics } from '@kit.ArkUI'; + +@Entry +@Component +struct imageBorder32 { + @State info:string = 'loading~~'; + + build() { + Column() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center }) { + Text(this.info) + .height(40) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width(170) + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin(6) + + Image('https://foruda.gitee.com/images/1753255402677959741/499f5538_10080759.png') + .width(150) + .borderRadius(20) + .margin(15) + .borderImage({ + source: { + angle: 90, + direction: GradientDirection.Left, + colors: [[0xAEE1E1, 0.0], [0xD3E0DC, 0.3], [0xFCD1D1, 1.0]] + }, + slice: { + bottom: LengthMetrics.vp(30), + end: LengthMetrics.vp(30) + }, + width: 30, + }) + .onComplete((event) => { + if (event) { + console.log('onComplete:event.loadingStatus ' + event.loadingStatus) + console.log('onComplete:event.contentWidth ' + event.contentWidth) + console.log('onComplete:event.contentHeight ' + event.contentHeight) + console.log('onComplete:event.contentOffsetX ' + event.contentOffsetX) + console.log('onComplete:event.contentOffsetY ' + event.contentOffsetY) + this.info = 'loading success' + } + }) + } + } + .height('100%') + .width('90%') + } +} diff --git a/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder33.ets b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder33.ets new file mode 100644 index 00000000..a9acce89 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder33.ets @@ -0,0 +1,68 @@ +/** + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { LengthMetrics } from '@kit.ArkUI'; + +@Entry +@Component +struct imageBorder33 { + @State info:string = 'loading~~'; + + build() { + Column() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center }) { + Text(this.info) + .height(40) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width(170) + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin(6) + + Image('https://foruda.gitee.com/images/1753255402677959741/499f5538_10080759.png') + .width(150) + .borderRadius(20) + .margin(15) + .borderImage({ + source: { + angle: 90, + direction: GradientDirection.Left, + colors: [[0xAEE1E1, 0.0], [0xD3E0DC, 0.3], [0xFCD1D1, 1.0]] + }, + slice: { + start: LengthMetrics.vp(30), + end: LengthMetrics.vp(30) + }, + width: 30, + }) + .onComplete((event) => { + if (event) { + console.log('onComplete:event.loadingStatus ' + event.loadingStatus) + console.log('onComplete:event.contentWidth ' + event.contentWidth) + console.log('onComplete:event.contentHeight ' + event.contentHeight) + console.log('onComplete:event.contentOffsetX ' + event.contentOffsetX) + console.log('onComplete:event.contentOffsetY ' + event.contentOffsetY) + this.info = 'loading success' + } + }) + } + } + .height('100%') + .width('90%') + } +} diff --git a/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder34.ets b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder34.ets new file mode 100644 index 00000000..1ef9d87e --- /dev/null +++ b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder34.ets @@ -0,0 +1,69 @@ +/** + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { LengthMetrics } from '@kit.ArkUI'; + +@Entry +@Component +struct imageBorder34 { + @State info:string = 'loading~~'; + + build() { + Column() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center }) { + Text(this.info) + .height(40) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width(170) + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin(6) + + Image('https://foruda.gitee.com/images/1753255402677959741/499f5538_10080759.png') + .width(150) + .borderRadius(20) + .margin(15) + .borderImage({ + source: { + angle: 90, + direction: GradientDirection.Left, + colors: [[0xAEE1E1, 0.0], [0xD3E0DC, 0.3], [0xFCD1D1, 1.0]] + }, + slice: { + top: LengthMetrics.vp(30), + bottom: LengthMetrics.vp(30), + start: LengthMetrics.vp(30) + }, + width: 30, + }) + .onComplete((event) => { + if (event) { + console.log('onComplete:event.loadingStatus ' + event.loadingStatus) + console.log('onComplete:event.contentWidth ' + event.contentWidth) + console.log('onComplete:event.contentHeight ' + event.contentHeight) + console.log('onComplete:event.contentOffsetX ' + event.contentOffsetX) + console.log('onComplete:event.contentOffsetY ' + event.contentOffsetY) + this.info = 'loading success' + } + }) + } + } + .height('100%') + .width('90%') + } +} diff --git a/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder35.ets b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder35.ets new file mode 100644 index 00000000..d847a018 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder35.ets @@ -0,0 +1,69 @@ +/** + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { LengthMetrics } from '@kit.ArkUI'; + +@Entry +@Component +struct imageBorder35 { + @State info:string = 'loading~~'; + + build() { + Column() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center }) { + Text(this.info) + .height(40) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width(170) + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin(6) + + Image('https://foruda.gitee.com/images/1753255402677959741/499f5538_10080759.png') + .width(150) + .borderRadius(20) + .margin(15) + .borderImage({ + source: { + angle: 90, + direction: GradientDirection.Left, + colors: [[0xAEE1E1, 0.0], [0xD3E0DC, 0.3], [0xFCD1D1, 1.0]] + }, + slice: { + top: LengthMetrics.vp(30), + bottom: LengthMetrics.vp(30), + end: LengthMetrics.vp(30) + }, + width: 30, + }) + .onComplete((event) => { + if (event) { + console.log('onComplete:event.loadingStatus ' + event.loadingStatus) + console.log('onComplete:event.contentWidth ' + event.contentWidth) + console.log('onComplete:event.contentHeight ' + event.contentHeight) + console.log('onComplete:event.contentOffsetX ' + event.contentOffsetX) + console.log('onComplete:event.contentOffsetY ' + event.contentOffsetY) + this.info = 'loading success' + } + }) + } + } + .height('100%') + .width('90%') + } +} diff --git a/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder36.ets b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder36.ets new file mode 100644 index 00000000..6605b9a2 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder36.ets @@ -0,0 +1,69 @@ +/** + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { LengthMetrics } from '@kit.ArkUI'; + +@Entry +@Component +struct imageBorder36 { + @State info:string = 'loading~~'; + + build() { + Column() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center }) { + Text(this.info) + .height(40) + .fontSize(15) + .textAlign(TextAlign.Center) + .fontColor(Color.Black) + .width(170) + .border({ width: 1 }) + .lineHeight(20) + .fontWeight(300) + .margin(6) + + Image('https://foruda.gitee.com/images/1753255402677959741/499f5538_10080759.png') + .width(150) + .borderRadius(20) + .margin(15) + .borderImage({ + source: { + angle: 90, + direction: GradientDirection.Left, + colors: [[0xAEE1E1, 0.0], [0xD3E0DC, 0.3], [0xFCD1D1, 1.0]] + }, + slice: { + bottom: LengthMetrics.vp(30), + start: LengthMetrics.vp(30), + end: LengthMetrics.vp(30) + }, + width: 30, + }) + .onComplete((event) => { + if (event) { + console.log('onComplete:event.loadingStatus ' + event.loadingStatus) + console.log('onComplete:event.contentWidth ' + event.contentWidth) + console.log('onComplete:event.contentHeight ' + event.contentHeight) + console.log('onComplete:event.contentOffsetX ' + event.contentOffsetX) + console.log('onComplete:event.contentOffsetY ' + event.contentOffsetY) + this.info = 'loading success' + } + }) + } + } + .height('100%') + .width('90%') + } +} -- Gitee From 6fb96cc7805f6efcbcad13755362cca24ea07875 Mon Sep 17 00:00:00 2001 From: dongwei Date: Tue, 19 Aug 2025 16:07:40 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E7=BC=96=E8=AF=91=E6=8A=A5=E9=94=99?= =?UTF-8?q?=E8=A7=A3=E5=86=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: dongwei --- .../pages/image_svg_animate/imageBorder/imageBorder18.ets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder18.ets b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder18.ets index 050b3671..8ac93678 100644 --- a/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder18.ets +++ b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageBorder/imageBorder18.ets @@ -15,7 +15,7 @@ @Entry @Component -struct imageBorder17 { +struct imageBorder18 { @State info:string = 'loading~~'; build() { -- Gitee From c6fa6f5814dcc0b37006376a6c23b771c87b5e6e Mon Sep 17 00:00:00 2001 From: dongwei Date: Wed, 20 Aug 2025 14:57:07 +0800 Subject: [PATCH 5/5] code check Signed-off-by: dongwei --- .../image_svg_animate/imageReset/imageReset18.ets | 15 +++++++++++++++ .../image_svg_animate/imageReset/imageReset19.ets | 15 +++++++++++++++ .../image_svg_animate/imageReset/imageReset20.ets | 15 +++++++++++++++ .../image_svg_animate/imageReset/imageReset21.ets | 15 +++++++++++++++ 4 files changed, 60 insertions(+) diff --git a/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageReset/imageReset18.ets b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageReset/imageReset18.ets index 7e23e948..a86b4e53 100644 --- a/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageReset/imageReset18.ets +++ b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageReset/imageReset18.ets @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + @Entry @Component struct imageReset18 { diff --git a/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageReset/imageReset19.ets b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageReset/imageReset19.ets index 86da3625..26048d50 100644 --- a/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageReset/imageReset19.ets +++ b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageReset/imageReset19.ets @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + @Entry @Component struct imageReset19 { diff --git a/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageReset/imageReset20.ets b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageReset/imageReset20.ets index 791f4c4b..d6c2b7df 100644 --- a/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageReset/imageReset20.ets +++ b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageReset/imageReset20.ets @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + @Entry @Component struct imageReset20 { diff --git a/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageReset/imageReset21.ets b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageReset/imageReset21.ets index 45ba10ce..171da9aa 100644 --- a/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageReset/imageReset21.ets +++ b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageReset/imageReset21.ets @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2025 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + @Entry @Component struct imageReset21 { -- Gitee