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 0000000000000000000000000000000000000000..27381713b8b3e985eb867c7f537ee53d7c79534e --- /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/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 0000000000000000000000000000000000000000..dae0598d8c7d15b98497434c5346c54d58381f85 --- /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/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 0000000000000000000000000000000000000000..7474731d62730472991aa469b7d05e0587db1454 --- /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 0000000000000000000000000000000000000000..5572f332db26745c217ebd145295f95f1a961d30 --- /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 0000000000000000000000000000000000000000..64dbc0aa0bf36f292ceb50aa512776726698d03d --- /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 0000000000000000000000000000000000000000..44427b8c3d24ffaab64b2d0de992d3be02a25f4e --- /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 0000000000000000000000000000000000000000..3540efd392c23c439b88d7caa2461a289f0c9033 --- /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 0000000000000000000000000000000000000000..6bc8218f65afb85ff84e21f14d99557de8d1e9bd --- /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 0000000000000000000000000000000000000000..1c8352a5ce725d56b86296e7b7479aaf92e24bf8 --- /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 0000000000000000000000000000000000000000..c48c271ddbc6962def1abcf2c8269dc1884c8f0d --- /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 0000000000000000000000000000000000000000..a4de742551a9f14d941faf186c86af5f0c322abe --- /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 0000000000000000000000000000000000000000..3334a85eeec8288ec0524abb62cb54a6f532d01b --- /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 0000000000000000000000000000000000000000..1c68580e8cab7225b2678848a942c6a8aa2d83ed --- /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 0000000000000000000000000000000000000000..91510953b4825eb7f7d16a4e26c6a5209cf76d53 --- /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 0000000000000000000000000000000000000000..08361320d77fa1f871e5acdd1a1633c058d16256 --- /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 0000000000000000000000000000000000000000..b4c173510314b08f7e29557e0e83d67a452f8177 --- /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 0000000000000000000000000000000000000000..8a7bc5016298d2508555fd06f6ea1b8c2ce3b6ac --- /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 0000000000000000000000000000000000000000..0eef7323eea4081b65167ea7eeb505936c085774 --- /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 0000000000000000000000000000000000000000..60803f86336361424130f51ba6f01e2325cf3406 --- /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 0000000000000000000000000000000000000000..8ac93678e6015cae37efa5b4cce9e12e110c2367 --- /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 imageBorder18 { + @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 0000000000000000000000000000000000000000..b806489ec6787d397e427b28d86d3f8eaf990ac7 --- /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 0000000000000000000000000000000000000000..8ef67393d1fa8018a67ea7c634b537549367a4e9 --- /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 0000000000000000000000000000000000000000..286b54a32e6d64a9e8b72aa5c9738ada8bc32fd6 --- /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 0000000000000000000000000000000000000000..e0cf5bec593f740a70f6fd9d34e259c80c897fea --- /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 0000000000000000000000000000000000000000..609802b7db85d44ddcae9bea1242922c89887de0 --- /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 0000000000000000000000000000000000000000..90cea4737f05ce18889ebf9b5c1bebd33df0506d --- /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 0000000000000000000000000000000000000000..29f0e226409fdf74c6d768372ddc9db0cdff9f65 --- /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%') + } +} 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 0000000000000000000000000000000000000000..32eab4b424d7a6c21643665e95cae480471e662b --- /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 0000000000000000000000000000000000000000..c92752ed912cfcb38d8585bea5a752e9abf68801 --- /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 0000000000000000000000000000000000000000..3b9e1b47bf4cc59e5af8ec8f288e6f785d46c99f --- /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 0000000000000000000000000000000000000000..6e8dac53e0a6dcb707cf4f52398314cab3ef76bd --- /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 0000000000000000000000000000000000000000..91af6b58b2d4915dd1fa01378686fa3c7678dfba --- /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 0000000000000000000000000000000000000000..a3acb8d2e71e1a2f3ee1d05e3901643be4e05af6 --- /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 0000000000000000000000000000000000000000..527ce2406eed62c29ca2f9d43c861ad759979666 --- /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 0000000000000000000000000000000000000000..a9acce89b259b4923028f2e5996a9e57230b3de1 --- /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 0000000000000000000000000000000000000000..1ef9d87ec67c94ad0bdc6143c70a74268a77ca83 --- /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 0000000000000000000000000000000000000000..d847a0189abc7306f356d2dea7d7d732133a6f20 --- /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 0000000000000000000000000000000000000000..6605b9a200c23eaf36871dddc009b8d7308ea87f --- /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%') + } +} 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 0000000000000000000000000000000000000000..c8485772255083535c1b55e55d64a5387020ebb9 --- /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 0000000000000000000000000000000000000000..a86b4e53c3c9eb4ca756818ededd83bfbc608d79 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageReset/imageReset18.ets @@ -0,0 +1,131 @@ +/** + * 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 { + @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 0000000000000000000000000000000000000000..26048d50310359591b475261dd89617ea15a813b --- /dev/null +++ b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageReset/imageReset19.ets @@ -0,0 +1,146 @@ +/** + * 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 { + @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 0000000000000000000000000000000000000000..d6c2b7df15a134be65ccbef8679bb47a36486d2b --- /dev/null +++ b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageReset/imageReset20.ets @@ -0,0 +1,146 @@ +/** + * 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 { + @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 0000000000000000000000000000000000000000..171da9aad26e28f0917d112cc34a56f0a924185e --- /dev/null +++ b/sample/ui_compare/uiCompareTest_01/entry/src/ohosTest/ets/testability/pages/image_svg_animate/imageReset/imageReset21.ets @@ -0,0 +1,146 @@ +/** + * 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 { + @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 0000000000000000000000000000000000000000..59888bf9101b8b142892b210500fdce9a2182322 --- /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) + } +}