From 071820cf757348a74a38538a90d450d1b3045c37 Mon Sep 17 00:00:00 2001 From: lwx1121892 Date: Wed, 1 Feb 2023 16:12:56 +0800 Subject: [PATCH] =?UTF-8?q?<=E4=BF=AE=E6=94=B9=E6=B5=8B=E8=AF=95=E6=A1=86?= =?UTF-8?q?=E6=9E=B6>?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: lwx1121892 --- .../ets/MainAbility/pages/index/index.ets | 29 +++++-------------- .../main/ets/test/AVPlayerHlsFuncTest.test.js | 2 +- .../AVPlayerHttpCompatibilityTest.test.ets | 2 +- .../ets/test/AVPlayerHttpSeekTest.test.ets | 2 +- .../main/ets/test/AVPlayerLocalTest.test.js | 2 +- 5 files changed, 11 insertions(+), 26 deletions(-) diff --git a/multimedia/media/media_js_standard/avPlayer/entry/src/main/ets/MainAbility/pages/index/index.ets b/multimedia/media/media_js_standard/avPlayer/entry/src/main/ets/MainAbility/pages/index/index.ets index 2da1ed7b4..4ac93347d 100644 --- a/multimedia/media/media_js_standard/avPlayer/entry/src/main/ets/MainAbility/pages/index/index.ets +++ b/multimedia/media/media_js_standard/avPlayer/entry/src/main/ets/MainAbility/pages/index/index.ets @@ -12,11 +12,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import file from '@system.file'; -import { Core, ExpectExtend, InstrumentLog, ReportExtend } from "deccjsunit/index" +import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' +import { Hypium } from '@ohos/hypium' import testsuite from "../../../test/List.test.ets" -import featureAbility from "@ohos.ability.featureAbility" -import { UiDriver, BY } from '@ohos.uitest' var mXComponentController: XComponentController = new XComponentController() var surfaceId: any @@ -26,7 +24,7 @@ var surfaceId: any struct Index { aboutToAppear() { console.info("start run testcase!!!!"); -} + } build() { Flex() { XComponent({ @@ -41,23 +39,10 @@ struct Index { surfaceId = mXComponentController.getXComponentSurfaceId() globalThis.value = surfaceId console.info('CameraModuleTest: XComponent onLoad surfaceId: ' + globalThis.value) - const core = Core.getInstance() - const expectExtend = new ExpectExtend({ - 'id': 'extend' - }) - core.addService('expect', expectExtend) - const reportExtend = new ReportExtend(file) - - core.addService('report', reportExtend) - core.init() - core.subscribeEvent('task', reportExtend) - const configService = core.getDefaultService('config') - globalThis.abilityWant.parameters.timeout = 70000; - configService.setConfig(globalThis.abilityWant.parameters) - console.info('testsuite()---->') - testsuite() - core.execute() - console.info('core.execute()---->') + var abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() + var abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() + console.info('start run testcase!!!') + Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite) }) .width('1920px') .height('1080px') diff --git a/multimedia/media/media_js_standard/avPlayer/entry/src/main/ets/test/AVPlayerHlsFuncTest.test.js b/multimedia/media/media_js_standard/avPlayer/entry/src/main/ets/test/AVPlayerHlsFuncTest.test.js index 843c07d09..ca6cb1b7c 100644 --- a/multimedia/media/media_js_standard/avPlayer/entry/src/main/ets/test/AVPlayerHlsFuncTest.test.js +++ b/multimedia/media/media_js_standard/avPlayer/entry/src/main/ets/test/AVPlayerHlsFuncTest.test.js @@ -15,7 +15,7 @@ import media from '@ohos.multimedia.media' import * as mediaTestBase from '../../../../../../MediaTestBase'; import * as AVPlayerTestBase from '../../../../../../AVPlayerTestBase.js'; -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index'; +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; export default function AVPlayerHlsFuncTest() { describe('AVPlayerHlsFuncTest', function () { diff --git a/multimedia/media/media_js_standard/avPlayer/entry/src/main/ets/test/AVPlayerHttpCompatibilityTest.test.ets b/multimedia/media/media_js_standard/avPlayer/entry/src/main/ets/test/AVPlayerHttpCompatibilityTest.test.ets index a21579719..65d3b573c 100644 --- a/multimedia/media/media_js_standard/avPlayer/entry/src/main/ets/test/AVPlayerHttpCompatibilityTest.test.ets +++ b/multimedia/media/media_js_standard/avPlayer/entry/src/main/ets/test/AVPlayerHttpCompatibilityTest.test.ets @@ -15,7 +15,7 @@ import {testAVPlayerFun} from '../../../../../../AVPlayerTestBase.js'; import * as mediaTestBase from '../../../../../../MediaTestBase'; -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index'; +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; export default function AVPlayerHttpCompatibilityTest() { describe('AVPlayerHttpCompatibilityTest', function () { diff --git a/multimedia/media/media_js_standard/avPlayer/entry/src/main/ets/test/AVPlayerHttpSeekTest.test.ets b/multimedia/media/media_js_standard/avPlayer/entry/src/main/ets/test/AVPlayerHttpSeekTest.test.ets index 4ef610c57..6dbf9008a 100644 --- a/multimedia/media/media_js_standard/avPlayer/entry/src/main/ets/test/AVPlayerHttpSeekTest.test.ets +++ b/multimedia/media/media_js_standard/avPlayer/entry/src/main/ets/test/AVPlayerHttpSeekTest.test.ets @@ -15,7 +15,7 @@ import {testAVPlayerSeek} from '../../../../../../AVPlayerTestBase.js'; import * as mediaTestBase from '../../../../../../MediaTestBase'; -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index'; +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; export default function AVPlayerHttpSeekTest() { describe('AVPlayerHttpSeekTest', function () { diff --git a/multimedia/media/media_js_standard/avPlayer/entry/src/main/ets/test/AVPlayerLocalTest.test.js b/multimedia/media/media_js_standard/avPlayer/entry/src/main/ets/test/AVPlayerLocalTest.test.js index 3897a7dce..8ec9d5634 100644 --- a/multimedia/media/media_js_standard/avPlayer/entry/src/main/ets/test/AVPlayerLocalTest.test.js +++ b/multimedia/media/media_js_standard/avPlayer/entry/src/main/ets/test/AVPlayerLocalTest.test.js @@ -17,7 +17,7 @@ import * as mediaTestBase from '../../../../../../MediaTestBase'; import media from '@ohos.multimedia.media' import audio from '@ohos.multimedia.audio'; import { testAVPlayerFun, AV_PLAYER_STATE, setSource } from '../../../../../../AVPlayerTestBase.js'; -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index'; +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; export default function AVPlayerLocalTest() { describe('AVPlayerLocalTest', function () { -- GitLab