提交 d184ec6d 编写于 作者: W wangzx0705

modify acts testcase

Signed-off-by: Nwangzx0705 <wangzx0705@thundersoft.com>
上级 980f9f43
......@@ -290,7 +290,7 @@ export default function audioManagerTest() {
.catch((error) => {
if (error) {
console.log(`${TagFrmwk}:getSystemVolumeInDb : error ${error.message} ${error.code}`);
expect(Number(error.code)).assertEqual(env.UNSUPORTED_OPTION_6800104);
expect(Number(error.code)).assertEqual(env.INVALID_INPUT_PARAMETER_6800101);
done();
} else {
expect(false).assertTrue();
......@@ -431,17 +431,23 @@ export default function audioManagerTest() {
* @tc.level : Level 0
*/
it('SUB_MULTIMEDIA_AUDIO_VOLUME_GROUP_MANAGER_GETSYSTEMVOLUMEINDB_CALLBACK_1200', 0, async function (done) {
await audioVolumeGroupManager.getSystemVolumeInDb(3, audio.DeviceType.SPEAKER, (err, data) => {
if (err) {
console.log(`${TagFrmwk}getSystemVolumeInDb : error ${err.message} ${err.code}`);
expect(Number(err.code)).assertEqual(env.INVALID_INPUT_PARAMETER_6800101);
done();
} else {
console.log(`${TagFrmwk}: getSystemVolumeInDb : error ${err.message} ${err.code}`);
expect(false).assertTrue();
done();
}
});
try {
await audioVolumeGroupManager.getSystemVolumeInDb(3, audio.DeviceType.SPEAKER, (err, data) => {
if (err) {
console.log(`${TagFrmwk}getSystemVolumeInDb : error ${err.message} ${err.code}`);
expect(Number(err.code)).assertEqual(env.INVALID_INPUT_PARAMETER_6800101);
done();
} else {
console.log(`${TagFrmwk}: getSystemVolumeInDb : error ${err.message} ${err.code}`);
expect(false).assertTrue();
done();
}
});
} catch (error) {
console.log(`${TagFrmwk}:getSystemVolumeInDb error, check error code: ${error.code}`);
expect(Number(error.code)).assertEqual(env.INVALID_INPUT_PARAMETER_6800101);
done();
}
})
/**
......@@ -453,17 +459,23 @@ export default function audioManagerTest() {
* @tc.level : Level 0
*/
it('SUB_MULTIMEDIA_AUDIO_VOLUME_GROUP_MANAGER_GETSYSTEMVOLUMEINDB_CALLBACK_1300', 0, async function (done) {
await audioVolumeGroupManager.getSystemVolumeInDb(audio.AudioVolumeType.MEDIA, audio.DeviceType.SPEAKER, (err, data) => {
if (err) {
console.log(`${TagFrmwk} getSystemVolumeInDb : error ${err.message} ${err.code}`);
expect(Number(err.code)).assertEqual(env.INVALID_INPUT_PARAMETER_6800101);
done();
} else {
console.log(`${TagFrmwk} getSystemVolumeInDb : error ${err.message} ${err.code}`);
expect(false).assertTrue();
done();
}
});
try {
await audioVolumeGroupManager.getSystemVolumeInDb(audio.AudioVolumeType.MEDIA, audio.DeviceType.SPEAKER, (err, data) => {
if (err) {
console.log(`${TagFrmwk} getSystemVolumeInDb : error ${err.message} ${err.code}`);
expect(false).assertTrue();
done();
} else {
console.log(`${TagFrmwk} getSystemVolumeInDb : error ${err.message} ${err.code}`);
expect(false).assertTrue();
done();
}
});
} catch (error) {
console.log(`${TagFrmwk}:getSystemVolumeInDb error, check error code: ${error.code}`);
expect(Number(error.code)).assertEqual(env.INVALID_INPUT_PARAMETER_6800101);
done();
}
})
/**
......@@ -475,17 +487,23 @@ export default function audioManagerTest() {
* @tc.level : Level 0
*/
it('SUB_MULTIMEDIA_AUDIO_VOLUME_GROUP_MANAGER_GETSYSTEMVOLUMEINDB_CALLBACK_1400', 0, async function (done) {
await audioVolumeGroupManager.getSystemVolumeInDb(audio.AudioVolumeType.MEDIA, 3, (err, data) => {
if (err) {
console.log(`${TagFrmwk}:getSystemVolumeInDb : error ${err.message} ${err.code}`);
expect(Number(err.code)).assertEqual(env.INVALID_INPUT_PARAMETER_6800101);
done();
} else {
console.log(`${TagFrmwk}:getSystemVolumeInDb : error ${err.message} ${err.code}`);
expect(false).assertTrue();
done();
}
});
try {
await audioVolumeGroupManager.getSystemVolumeInDb(audio.AudioVolumeType.MEDIA, 3, (err, data) => {
if (err) {
console.log(`${TagFrmwk}:getSystemVolumeInDb error ${err.message} ${err.code}`);
expect(false).assertTrue();
done();
} else {
console.log(`${TagFrmwk}:getSystemVolumeInDb error ${err.message} ${err.code}`);
expect(false).assertTrue();
done();
}
});
} catch (error) {
console.log(`${TagFrmwk}:getSystemVolumeInDb error, check error code: ${error.code}`);
expect(Number(error.code)).assertEqual(env.INVALID_INPUT_PARAMETER_6800101);
done();
}
})
/**
......
......@@ -20,6 +20,7 @@
"type": "ShellKit",
"run-command": [
"power-shell wakeup",
"power-shell setmode 602",
"mkdir -p /data/app/el2/100/base/com.example.xts_test_case/haps/entry/files",
"chmod 777 -R /data/app/el2/100/base/com.example.xts_test_case/haps/entry"
],
......
......@@ -14,8 +14,6 @@
*/
//ts-nocheck
//public invalid
export const SAMPLING_RATE_44100 = 44100;
export const SAMPLING_RATE_48000 = 48000;
export const OUTPUT_NUMBER_0 = 0;
export const OUTPUT_NUMBER_1 = 1;
......
......@@ -14,14 +14,12 @@
*/
import getMax_MinStreamVolume from './GetMaxAndMinStreamVolume.test.ets'
import getUnderflowCount from './GetUnderflowCount.test.ets'
import get_setRendererSamplingRate from './GetAndSetRendererSamplingRate.test.ets'
import getCurrentOutputDevices from './GetCurrentOutputDevices.test.ets'
import on_off_outputDeviceChange from './OnOffOutputDeviceChange.test.ets'
export default function testsuite() {
getMax_MinStreamVolume();
getUnderflowCount();
get_setRendererSamplingRate();
getCurrentOutputDevices();
on_off_outputDeviceChange();
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册