提交 d184ec6d 编写于 作者: W wangzx0705

modify acts testcase

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