diff --git a/multimedia/audio/audio_js_standard/AudioManagerEnhance/src/main/ets/test/AdjustSystemVolumeByStep.test.ets b/multimedia/audio/audio_js_standard/AudioManagerEnhance/src/main/ets/test/AdjustSystemVolumeByStep.test.ets index f65ed19da368662f0af37a996615ce22ebcc376c..c7ac2d79a49229e20fafaa1da949e50a1b81846c 100644 --- a/multimedia/audio/audio_js_standard/AudioManagerEnhance/src/main/ets/test/AdjustSystemVolumeByStep.test.ets +++ b/multimedia/audio/audio_js_standard/AudioManagerEnhance/src/main/ets/test/AdjustSystemVolumeByStep.test.ets @@ -15,6 +15,7 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; import audio from '@ohos.multimedia.audio'; import featureAbility from '@ohos.ability.featureAbility'; +import * as env from './Const.ets'; export default function audioManagerTest() { describe('adjustSystemVolumeByStep', function () { @@ -128,7 +129,7 @@ export default function audioManagerTest() { await audioVolumeGroupManager.adjustSystemVolumeByStep(audio.AudioVolumeType[index], VOLUME_ADJUST_DOWN).then((data) => { console.info(`####${index} adjustSystemVolumeByStep :SUCCESS ${data}`); }).catch((error) => { - if(index == 'ALL' && error.code == 6800104){ + if(index == 'ALL' && error.code == UNSUPORTED_OPTION_6800104){ console.log(`${TagFrmwk}: ####${index} adjustSystemVolumeByStep : error ${error.message} ${error.code}`); }else{ expect(false).assertTrue(); @@ -166,7 +167,7 @@ export default function audioManagerTest() { await audioVolumeGroupManager.adjustSystemVolumeByStep(audio.AudioVolumeType[index], VOLUME_ADJUST_UP).then((data) => { console.info(`####${index} adjustSystemVolumeByStep :SUCCESS ${data}`); }).catch((error) => { - if(index == 'ALL' && error.code == 6800104){ + if(index == 'ALL' && error.code == UNSUPORTED_OPTION_6800104){ console.log(`${TagFrmwk}: ####${index} adjustSystemVolumeByStep : data ${error.message} ${error.code}`); }else{ expect(false).assertTrue(); @@ -203,7 +204,7 @@ export default function audioManagerTest() { await audioVolumeGroupManager.adjustSystemVolumeByStep(AUDIO_VLOUME_TYPE_ERROR, VOLUME_ADJUST_DOWN).then((data) => { console.info(`####Unknown volume type, Set it to default MEDIA! adjustSystemVolumeByStep :SUCCESS ${data}`); }).catch((error) => { - if(error.code == 6800104){ + if(error.code == UNSUPORTED_OPTION_6800104){ console.log(`${TagFrmwk}: ####adjustSystemVolumeByStep : error ${error.message}, code ${error.code}`); }else{ console.log(`${TagFrmwk}: ####adjustSystemVolumeByStep : error ${error.message}, code ${error.code}`); @@ -242,7 +243,7 @@ export default function audioManagerTest() { await audioVolumeGroupManager.adjustSystemVolumeByStep(audio.AudioVolumeType.MEDIA, VOLUME_ADJUST_ERROR).then((data) => { console.info(`####adjustSystemVolumeByStep :SUCCESS ${data}`); }).catch((error) => { - if(error.code == 6800104){ + if(error.code == UNSUPORTED_OPTION_6800104){ console.info(`####adjustSystemVolumeByStep : ${error.message}, code ${error.code}`); expect(true).assertTrue(); done(); @@ -278,7 +279,7 @@ export default function audioManagerTest() { expect(false).assertTrue(); done(); }).catch((error) => { - if(error.code == 6800101){ + if(error.code == INVALID_INPUT_PARAMETER_6800101){ console.log(`${TagFrmwk}: ####adjustSystemVolumeByStep : error ${error.message}, code ${error.code}`); expect(true).assertTrue(); done(); @@ -310,7 +311,7 @@ export default function audioManagerTest() { expect(false).assertTrue(); done(); }).catch((error) => { - if(error.code == 6800101){ + if(error.code == INVALID_INPUT_PARAMETER_6800101){ console.log(`${TagFrmwk}: ####adjustSystemVolumeByStep : error ${error.message}, code ${error.code}`); expect(true).assertTrue(); done(); @@ -343,7 +344,7 @@ export default function audioManagerTest() { expect(false).assertTrue(); done(); }).catch((error) => { - if(error.code == 6800104){ + if(error.code == UNSUPORTED_OPTION_6800104){ console.log(`${TagFrmwk}: ####adjustSystemVolumeByStep : error ${error.message}, code ${error.code}`); expect(true).assertTrue(); done(); @@ -412,7 +413,7 @@ export default function audioManagerTest() { await audioVolumeGroupManager.adjustSystemVolumeByStep(audio.AudioVolumeType[index], VOLUME_ADJUST_UP).then((data) => { console.info(`####${index} adjustSystemVolumeByStep :SUCCESS ${data}`); }).catch((error) => { - if(index == 'ALL' && error.code == 6800104){ + if(index == 'ALL' && error.code == UNSUPORTED_OPTION_6800104){ console.info(`####${index} adjustSystemVolumeByStep: error ${error.message}, code ${error.code}`); expect(true).assertTrue(); done(); @@ -481,7 +482,7 @@ export default function audioManagerTest() { } done(); }catch (error){ - if(type == 'ALL' && error.code == 6800301){ + if(type == 'ALL' && error.code == UNSUPORTED_OPTION_6800104){ console.info(`####${type} adjustSystemVolumeByStep: error ${error.message}, code ${error.code}`); expect(true).assertTrue(); done(); @@ -604,7 +605,7 @@ export default function audioManagerTest() { console.info(`####${index} setVolume :volome ${Vol}`); await audioVolumeGroupManager.adjustSystemVolumeByStep(audio.AudioVolumeType[index], VOLUME_ADJUST_DOWN, (err,data) => { if(err){ - if(index == 'ALL' && err.code == 6800104){ + if(index == 'ALL' && err.code == UNSUPORTED_OPTION_6800104){ console.log(`${TagFrmwk}: ####${index} adjustSystemVolumeByStep : error ${err.message}, code ${err.code}`); }else{ console.log(`${TagFrmwk}: ####${index} adjustSystemVolumeByStep : error ${err.message}, code ${err.code}`); @@ -644,7 +645,7 @@ export default function audioManagerTest() { console.info(`####${index} setVolume :volome ${Vol}`); await audioVolumeGroupManager.adjustSystemVolumeByStep(audio.AudioVolumeType[index], VOLUME_ADJUST_UP, (err,data) => { if(err){ - if(index == 'ALL' && err.code == 6800104){ + if(index == 'ALL' && err.code == UNSUPORTED_OPTION_6800104){ console.log(`####${index} adjustSystemVolumeByStep : error ${err.message}, code ${err.code}`); }else{ console.log(`####${index} adjustSystemVolumeByStep : error ${err.message}, code ${err.code}`); @@ -682,7 +683,7 @@ export default function audioManagerTest() { await audioVolumeGroupManager.setVolume(audio.AudioVolumeType.MEDIA, vol_MEDIA); console.info(`####setVolume :volume ${vol_MEDIA}`); await audioVolumeGroupManager.adjustSystemVolumeByStep(AUDIO_VOLUME_TYPE_ERROR, VOLUME_ADJUST_UP, (err,data) => { - if(err.code == 6800104){ + if(err.code == UNSUPORTED_OPTION_6800104){ console.log(`${TagFrmwk}: ####adjustSystemVolumeByStep : error ${err.message}, code ${err.code}`); }else{ console.info(`####adjustSystemVolumeByStep :SUCCESS ${data}`); @@ -721,7 +722,7 @@ export default function audioManagerTest() { try { let VOLUME_ADJUST_TYPE_ERROR = 3; await audioVolumeGroupManager.adjustSystemVolumeByStep(audio.AudioVolumeType.MEDIA, VOLUME_ADJUST_TYPE_ERROR, (err,data) => { - if(err.code == 6800104){ + if(err.code == UNSUPORTED_OPTION_6800104){ console.log(`${TagFrmwk}: ####adjustSystemVolumeByStep : error ${err.message}, code ${err.code}`); expect(true).assertTrue(); done(); @@ -749,8 +750,7 @@ export default function audioManagerTest() { try { let AUDIO_VOLUME_TYPE_ERROR = '123'; await audioVolumeGroupManager.adjustSystemVolumeByStep(AUDIO_VOLUME_TYPE_ERROR, VOLUME_ADJUST_DOWN, (err,data) => { - if(err.code == 6800101){ - //error invalid parameter, code 6800101 + if(err.code == INVALID_INPUT_PARAMETER_6800101){ console.log(`${TagFrmwk}: ####adjustSystemVolumeByStep : error ${err.message}, code ${err.code}`); expect(true).assertTrue(); done(); @@ -816,7 +816,7 @@ export default function audioManagerTest() { expect(false).assertTrue(); done(); }).catch((error) => { - if(error.code == 6800101){ + if(error.code == INVALID_INPUT_PARAMETER_6800101){ console.log(`${TagFrmwk}: ####adjustSystemVolumeByStep : error ${error.message}, code ${error.code}`); expect(true).assertTrue(); done(); @@ -849,7 +849,7 @@ export default function audioManagerTest() { expect(true).assertTrue(); done(); }).catch((error) => { - if(error.code == 6800101){ + if(error.code == INVALID_INPUT_PARAMETER_6800101){ console.log(`${TagFrmwk}: ####adjustSystemVolumeByStep : error ${error.message}, code ${error.code}`); expect(true).assertTrue(); done(); @@ -884,7 +884,7 @@ export default function audioManagerTest() { console.info(`####${index} set max Volume :volome ${maxVol}`); await audioVolumeGroupManager.adjustSystemVolumeByStep(audio.AudioVolumeType[index], VOLUME_ADJUST_UP, (err,data) => { if(err){ - if(index == 'ALL' && err.code == 6800104){ + if(index == 'ALL' && err.code == UNSUPORTED_OPTION_6800104){ console.info(`####${index} adjustSystemVolumeByStep: error ${err.message}, code ${err.code}`); expect(true).assertTrue(); done(); @@ -910,7 +910,7 @@ export default function audioManagerTest() { } done(); }catch (error){ - if(type == 'ALL' && error.code == 6800104){ + if(type == 'ALL' && error.code == UNSUPORTED_OPTION_6800104){ console.info(`####${type} adjustSystemVolumeByStep: error ${error.message}, code ${error.code}`); expect(true).assertTrue(); done(); @@ -960,7 +960,7 @@ export default function audioManagerTest() { } done(); }catch (error){ - if(type == 'ALL' && error.code == 6800301){ + if(type == 'ALL' && error.code == UNSUPORTED_OPTION_6800104){ console.info(`####${type} adjustSystemVolumeByStep: error ${error.message}, code ${error.code}`); expect(true).assertTrue(); done(); diff --git a/multimedia/audio/audio_js_standard/AudioManagerEnhance/src/main/ets/test/AdjustVolumeByStep.test.ets b/multimedia/audio/audio_js_standard/AudioManagerEnhance/src/main/ets/test/AdjustVolumeByStep.test.ets index d9dbb0a6c513f671dfbe50d031249b36539a03d2..a98cff1894d99521a4216e41ac5801eef2edb663 100644 --- a/multimedia/audio/audio_js_standard/AudioManagerEnhance/src/main/ets/test/AdjustVolumeByStep.test.ets +++ b/multimedia/audio/audio_js_standard/AudioManagerEnhance/src/main/ets/test/AdjustVolumeByStep.test.ets @@ -16,6 +16,7 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; import audio from '@ohos.multimedia.audio'; import featureAbility from '@ohos.ability.featureAbility'; +import * as env from './Const.ets'; export default function audioManagerTest() { describe('adjustVolumeByStep', function () { @@ -158,7 +159,7 @@ export default function audioManagerTest() { await audioVolumeGroupManager.adjustVolumeByStep(VOLUME_ADJUST_ERROR).then((data) => { console.info(`####adjustVolumeByStep :SUCCESS ${data}`); }).catch((error) => { - if(error.code == 6800104){ + if(error.code == UNSUPORTED_OPTION_6800104){ console.log(`####adjustVolumeByStep : error.code ${error.code}, ${error.message}`); }else{ console.log(`${TagFrmwk}: ####adjustVolumeByStep : error.code ${error.code}, ${error.message}`); @@ -193,7 +194,7 @@ export default function audioManagerTest() { expect(false).assertTrue(); done(); }).catch((error) => { - if(error.code == 6800101){ + if(error.code == INVALID_INPUT_PARAMETER_6800101){ console.log(`${TagFrmwk}: ####adjustVolumeByStep : error ${error.code}, message ${error.message}`); expect(true).assertTrue(); done(); @@ -224,7 +225,7 @@ export default function audioManagerTest() { expect(true).assertTrue(); done(); }).catch((error) => { - if(error.code == 6800101){ + if(error.code == INVALID_INPUT_PARAMETER_6800101){ console.log(`${TagFrmwk}: ####adjustVolumeByStep : error ${error.code}, message ${error.message}`); expect(true).assertTrue(); done(); @@ -442,7 +443,7 @@ export default function audioManagerTest() { await audioVolumeGroupManager.setVolume(audio.AudioVolumeType.MEDIA, Vol); await audioVolumeGroupManager.adjustVolumeByStep(VOLUME_ADJUST_ERROR, (err,data) => { if (err) { - if(err.code == 6800104){ + if(err.code == UNSUPORTED_OPTION_6800104){ console.log(`####adjustVolumeByStep : error ${err.code}, message ${err.message}`); }else{ console.log(`####adjustVolumeByStep : error ${err.code}, message ${err.message}`); @@ -475,7 +476,7 @@ export default function audioManagerTest() { try { let VOLUME_ADJUST_ERROR = '123'; await audioVolumeGroupManager.adjustVolumeByStep(VOLUME_ADJUST_ERROR, (err,data) => { - if(err.code == 6800101){ + if(err.code == INVALID_INPUT_PARAMETER_6800101){ console.log(`${TagFrmwk}: ####adjustVolumeByStep : error ${err.code}, message ${err.message}`); expect(true).assertTrue(); done(); @@ -512,7 +513,7 @@ export default function audioManagerTest() { done(); } }).catch ((error)=>{ - if(error.code == 6800101){ + if(error.code == INVALID_INPUT_PARAMETER_6800101){ console.log(`${TagFrmwk}: ####adjustVolumeByStep : error ${error.code}, message ${error.message}`); expect(true).assertTrue(); done(); @@ -556,7 +557,7 @@ export default function audioManagerTest() { expect(curVol).assertEqual(maxVol); done(); }catch (error){ - if(error.code == 6800101){ + if(error.code == INVALID_INPUT_PARAMETER_6800101){ console.info(`####adjustVolumeByStep : error ${error.message} ${error.code}`); expect(true).assertTrue(); done(); @@ -596,7 +597,7 @@ export default function audioManagerTest() { expect(curVol).assertEqual(minVol); done(); }catch (error){ - if(error.code == 6800101){ + if(error.code == INVALID_INPUT_PARAMETER_6800101){ console.info(`####adjustVolumeByStep : error ${error.message} ${error.code}`); expect(true).assertTrue(); done(); diff --git a/multimedia/audio/audio_js_standard/AudioManagerEnhance/src/main/ets/test/GetDefaultVolume.test.ets b/multimedia/audio/audio_js_standard/AudioManagerEnhance/src/main/ets/test/GetDefaultVolume.test.ets index e6617b943cc56aa7aabc379bcc545d337f7aa7cf..94ae523102d58b8c25ab1d4bd9d04344442fece0 100644 --- a/multimedia/audio/audio_js_standard/AudioManagerEnhance/src/main/ets/test/GetDefaultVolume.test.ets +++ b/multimedia/audio/audio_js_standard/AudioManagerEnhance/src/main/ets/test/GetDefaultVolume.test.ets @@ -16,6 +16,7 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from import audio from '@ohos.multimedia.audio'; import featureAbility from '@ohos.ability.featureAbility'; import ArrayList from '@ohos.util.ArrayList'; +import * as env from './Const.ets'; export default function audioManagerTest() { describe('getDefaultVolume', function () { diff --git a/multimedia/audio/audio_js_standard/AudioManagerEnhance/src/main/ets/test/GetMax_Minvolume.test.ets b/multimedia/audio/audio_js_standard/AudioManagerEnhance/src/main/ets/test/GetMax_Minvolume.test.ets index 72abce3ff5b9993ffe44448f2825f73780fb6ebc..97ddfd7035037d16f7d9fb05fcdec25df9dc5cbd 100644 --- a/multimedia/audio/audio_js_standard/AudioManagerEnhance/src/main/ets/test/GetMax_Minvolume.test.ets +++ b/multimedia/audio/audio_js_standard/AudioManagerEnhance/src/main/ets/test/GetMax_Minvolume.test.ets @@ -16,6 +16,7 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from import audio from '@ohos.multimedia.audio'; import featureAbility from '@ohos.ability.featureAbility'; import ArrayList from '@ohos.util.ArrayList'; +import * as env from './Const.ets'; export default function audioManagerTest() { describe('getMax_Minvolume', function () { diff --git a/multimedia/audio/audio_js_standard/AudioManagerEnhance/src/main/ets/test/GetSystemVolumeInDb.test.ets b/multimedia/audio/audio_js_standard/AudioManagerEnhance/src/main/ets/test/GetSystemVolumeInDb.test.ets index 01dea0c27d0b90936cb151b77622cd93e68abd26..6244867ee69dec87c6daf2ed6e63ce6ed1b02143 100644 --- a/multimedia/audio/audio_js_standard/AudioManagerEnhance/src/main/ets/test/GetSystemVolumeInDb.test.ets +++ b/multimedia/audio/audio_js_standard/AudioManagerEnhance/src/main/ets/test/GetSystemVolumeInDb.test.ets @@ -16,6 +16,7 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from import audio from '@ohos.multimedia.audio'; import featureAbility from '@ohos.ability.featureAbility'; import ArrayList from '@ohos.util.ArrayList'; +import * as env from './Const.ets'; export default function audioManagerTest() { describe('getSystemVolumeInDb', function () { @@ -202,7 +203,7 @@ export default function audioManagerTest() { expect(false).assertTrue(); done(); }).catch((error) => { - if(error.code == 6800104){ + if(error.code == UNSUPORTED_OPTION_6800104){ console.log(`${TagFrmwk}: ####getSystemVolumeInDb : error ${error.message} ${error.code}`); expect(true).assertTrue(); done(); @@ -233,7 +234,7 @@ export default function audioManagerTest() { expect(false).assertTrue(); done(); }).catch((error) => { - if(error.code == 6800104){ + if(error.code == UNSUPORTED_OPTION_6800104){ console.log(`${TagFrmwk}: ####getSystemVolumeInDb : error ${error.message} ${error.code}`); expect(true).assertTrue(); done(); @@ -265,7 +266,7 @@ export default function audioManagerTest() { expect(false).assertTrue(); done(); }).catch((error) => { - if(error.code == 6800101){ + if(error.code == INVALID_INPUT_PARAMETER_6800101){ console.log(`${TagFrmwk}: ####getSystemVolumeInDb : error ${error.message} ${error.code}`); expect(true).assertTrue(); done(); @@ -322,7 +323,7 @@ export default function audioManagerTest() { expect(false).assertTrue(); done(); }).catch((error) => { - if(error.code == 6800101){ + if(error.code == INVALID_INPUT_PARAMETER_6800101){ console.log(`${TagFrmwk}: ####getSystemVolumeInDb : error ${error.message} ${error.code}`); expect(true).assertTrue(); done(); @@ -353,7 +354,7 @@ export default function audioManagerTest() { expect(false).assertTrue(); done(); }).catch((error) => { - if(error.code == 6800101){ + if(error.code == INVALID_INPUT_PARAMETER_6800101){ console.log(`${TagFrmwk}: ####getSystemVolumeInDb : error ${error.message} ${error.code}`); expect(true).assertTrue(); done(); @@ -655,7 +656,7 @@ export default function audioManagerTest() { it('SUB_MULTIMEDIA_AUDIO_VOLUME_GROUP_MANAGER_GETSYSTEMVOLUMEINDB_CALLBACK_0500', 0, async function (done) { try { await audioVolumeGroupManager.getSystemVolumeInDb(-1, 3, audio.DeviceType.SPEAKER, (err,data) => { - if(err.code == 6800104){ + if(err.code == UNSUPORTED_OPTION_6800104){ console.log(`${TagFrmwk}: ####getSystemVolumeInDb : error ${err.message} ${err.code}`); expect(true).assertTrue(); done(); @@ -683,7 +684,7 @@ export default function audioManagerTest() { it('SUB_MULTIMEDIA_AUDIO_VOLUME_GROUP_MANAGER_GETSYSTEMVOLUMEINDB_CALLBACK_0600', 0, async function (done) { try { await audioVolumeGroupManager.getSystemVolumeInDb(audio.AudioVolumeType.MEDIA, -1, audio.DeviceType.SPEAKER, (err,data) => { - if(err.code == 6800104){ + if(err.code == UNSUPORTED_OPTION_6800104){ console.log(`${TagFrmwk}: ####getSystemVolumeInDb : error ${err.message} ${err.code}`); expect(true).assertTrue(); done(); @@ -712,7 +713,7 @@ export default function audioManagerTest() { try { let maxVol = audioVolumeGroupManager.getMaxVolume(audio.AudioVolumeType.MEDIA); await audioVolumeGroupManager.getSystemVolumeInDb(audio.AudioVolumeType.MEDIA, maxVol+1, audio.DeviceType.SPEAKER, (err,data) => { - if(err.code == 6800101){ + if(err.code == INVALID_INPUT_PARAMETER_6800101){ console.log(`${TagFrmwk}: ####getSystemVolumeInDb : error ${err.message} ${err.code}`); expect(true).assertTrue(); done(); @@ -768,7 +769,7 @@ export default function audioManagerTest() { it('SUB_MULTIMEDIA_AUDIO_VOLUME_GROUP_MANAGER_GETSYSTEMVOLUMEINDB_CALLBACK_0900', 0, async function (done) { try { await audioVolumeGroupManager.getSystemVolumeInDb('123', 3, audio.DeviceType.SPEAKER, (err,data) => { - if(err.code == 6800101){ + if(err.code == INVALID_INPUT_PARAMETER_6800101){ console.log(`${TagFrmwk}: ####getSystemVolumeInDb : error ${err.message} ${err.code}`); expect(true).assertTrue(); done(); @@ -796,7 +797,7 @@ export default function audioManagerTest() { it('SUB_MULTIMEDIA_AUDIO_VOLUME_GROUP_MANAGER_GETSYSTEMVOLUMEINDB_CALLBACK_1000', 0, async function (done) { try { await audioVolumeGroupManager.getSystemVolumeInDb(audio.AudioVolumeType.MEDIA, '123', audio.DeviceType.SPEAKER, (err,data) => { - if(err.code == 6800101){ + if(err.code == INVALID_INPUT_PARAMETER_6800101){ console.log(`${TagFrmwk}: ####getSystemVolumeInDb : error ${err.message} ${err.code}`); expect(true).assertTrue(); done(); @@ -853,7 +854,7 @@ export default function audioManagerTest() { try { await audioVolumeGroupManager.getSystemVolumeInDb(3, audio.DeviceType.SPEAKER, (err,data) => { if(err) { - if (err.code == 6800101) { + if (err.code == INVALID_INPUT_PARAMETER_6800101) { console.log(`${TagFrmwk}: ####getSystemVolumeInDb : error ${err.message} ${err.code}`); expect(true).assertTrue(); done(); @@ -865,7 +866,7 @@ export default function audioManagerTest() { } }); }catch (error){ - if(error.code == 6800101){ + if(error.code == INVALID_INPUT_PARAMETER_6800101){ console.log(`${TagFrmwk}: ####getSystemVolumeInDb : error ${error.message} ${error.code}`); expect(true).assertTrue(); done(); @@ -889,7 +890,7 @@ export default function audioManagerTest() { try { await audioVolumeGroupManager.getSystemVolumeInDb(audio.AudioVolumeType.MEDIA, audio.DeviceType.SPEAKER, (err,data) => { if(err){ - if(err.code == 6800101){ + if(err.code == INVALID_INPUT_PARAMETER_6800101){ console.log(`${TagFrmwk}: ####getSystemVolumeInDb : error ${err.message} ${err.code}`); expect(true).assertTrue(); done(); @@ -901,7 +902,7 @@ export default function audioManagerTest() { } }); }catch (error){ - if(error.code == 6800101){ + if(error.code == INVALID_INPUT_PARAMETER_6800101){ console.log(`${TagFrmwk}: ####getSystemVolumeInDb : error ${error.message} ${error.code}`); expect(true).assertTrue(); done(); @@ -925,7 +926,7 @@ export default function audioManagerTest() { try { await audioVolumeGroupManager.getSystemVolumeInDb(audio.AudioVolumeType.MEDIA, 3, (err,data) => { if(err){ - if(err.code == 6800101){ + if(err.code == INVALID_INPUT_PARAMETER_6800101){ console.log(`${TagFrmwk}: ####getSystemVolumeInDb : error ${err.message} ${err.code}`); expect(true).assertTrue(); done(); @@ -937,7 +938,7 @@ export default function audioManagerTest() { } }); }catch (error){ - if(error.code == 6800101){ + if(error.code == INVALID_INPUT_PARAMETER_6800101){ console.log(`${TagFrmwk}: ####getSystemVolumeInDb : error ${error.message} ${error.code}`); expect(true).assertTrue(); done(); diff --git a/multimedia/audio/audio_js_standard/AudioManagerEnhance/src/main/ets/test/IsVolumeUnadjustable.test.ets b/multimedia/audio/audio_js_standard/AudioManagerEnhance/src/main/ets/test/IsVolumeUnadjustable.test.ets index 780acdbb3c6eb27f0fbf925f2386706d403edd1c..d1076740412c8aabb8756c2e937da26ba8ffd2fc 100644 --- a/multimedia/audio/audio_js_standard/AudioManagerEnhance/src/main/ets/test/IsVolumeUnadjustable.test.ets +++ b/multimedia/audio/audio_js_standard/AudioManagerEnhance/src/main/ets/test/IsVolumeUnadjustable.test.ets @@ -15,6 +15,7 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; import audio from '@ohos.multimedia.audio'; import featureAbility from '@ohos.ability.featureAbility'; +import * as env from './Const.ets'; export default function audioManagerTest() { describe('isVolumeUnadjustable', function () {