From 9f1d9ce4f599a11d455237d58067ea268f90a9f8 Mon Sep 17 00:00:00 2001 From: qinliwen Date: Wed, 12 Apr 2023 09:43:47 +0800 Subject: [PATCH] =?UTF-8?q?<=E5=88=A0=E9=99=A4=E5=86=97=E4=BD=99=E6=97=A0?= =?UTF-8?q?=E6=95=88=E7=94=A8=E4=BE=8B>?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: qinliwen --- .../main/js/test/AudioEventManagement.test.js | 265 ------------------ 1 file changed, 265 deletions(-) diff --git a/multimedia/audio/audio_js_standard/AudioEventManagement/src/main/js/test/AudioEventManagement.test.js b/multimedia/audio/audio_js_standard/AudioEventManagement/src/main/js/test/AudioEventManagement.test.js index cd8cf4e27..aff3aed03 100644 --- a/multimedia/audio/audio_js_standard/AudioEventManagement/src/main/js/test/AudioEventManagement.test.js +++ b/multimedia/audio/audio_js_standard/AudioEventManagement/src/main/js/test/AudioEventManagement.test.js @@ -440,271 +440,6 @@ describe('audioEventManagement', function () { }); }) - /** - *@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_SETDEVICEACTIVE_PR_DEACTIVATE_0100 - *@tc.name : setDeviceActive - SPEAKER - deactivate - Promise - *@tc.desc : Deactivate speaker - Promise - *@tc.size : MEDIUM - *@tc.type : Function - *@tc.level : Level 2 - */ - it('SUB_MULTIMEDIA_AUDIO_MANAGER_SETDEVICEACTIVE_PR_DEACTIVATE_0100', 2, async function (done) { - await audioManager.setDeviceActive(audio.ActiveDeviceType.SPEAKER, false).then(function () { - // Setting device active ENUM 2 = SPEAKER - console.info(`${TagFrmwk}: Device Test: Promise : setDeviceActive : SPEAKER: Deactivate`); - audioManager.isDeviceActive(audio.ActiveDeviceType.SPEAKER).then(function (value) { - if (value == false) { - console.info(`${TagFrmwk}: Device Test: Promise : isDeviceActive : SPEAKER: Deactivate : PASS : ${value}`); - expect(true).assertTrue(); - } - else { - console.info(`${TagFrmwk}: Device Test: Promise : isDeviceActive : SPEAKER: Deactivate : FAIL : ${value}`); - expect(false).assertTrue(); - } - }); - }).catch((err) => { - console.info(`${TagFrmwk}: Device Test: Promise : isDeviceActive : SPEAKER: Deactivate : FAIL : Error : ${err.message}`); - expect(false).assertTrue(); - }); - done(); - }) - - /** - *@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_SETDEVICEACTIVE_PR_DEACTIVATE_ENUM_0100 - *@tc.name : setDeviceActive - SPEAKER - deactivate - Promise - ENUM - *@tc.desc : Deactivate speaker - Promise - *@tc.size : MEDIUM - *@tc.type : Function - *@tc.level : Level 2 - */ - it('SUB_MULTIMEDIA_AUDIO_MANAGER_SETDEVICEACTIVE_PR_DEACTIVATE_ENUM_0100', 2, async function (done) { - await audioManager.setDeviceActive(2, true).then(function () { - console.info(`${TagFrmwk}: Device Test: Promise : setDeviceActive : SPEAKER: Active`); - }); - await audioManager.setDeviceActive(2, false).then(function () { - // Setting device active ENUM 2 = SPEAKER - console.info(`${TagFrmwk}: Device Test: Promise : setDeviceActive : SPEAKER: Deactivate`); - audioManager.isDeviceActive(2).then(function (value) { - if (value == false) { - console.info(`${TagFrmwk}: Device Test: Promise : isDeviceActive : SPEAKER: Deactivate : PASS : ${value}`); - expect(true).assertTrue(); - } - else { - console.info(`${TagFrmwk}: Device Test: Promise : isDeviceActive : SPEAKER: Deactivate : FAIL : ${value}`); - expect(false).assertTrue(); - } - }); - }).catch((err) => { - console.info(`${TagFrmwk}: Device Test: Promise : isDeviceActive : SPEAKER: Deactivate : FAIL : Error : ${err.message}`); - expect(false).assertTrue(); - }); - done(); - }) - - /** - *@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_SETDEVICEACTIVE_PR_ACTIVATE_0100 - *@tc.name : setDeviceActive - SPEAKER - Activate - Promise - *@tc.desc : Activate speaker - Promise - *@tc.size : MEDIUM - *@tc.type : Function - *@tc.level : Level 2 - */ - it('SUB_MULTIMEDIA_AUDIO_MANAGER_SETDEVICEACTIVE_PR_ACTIVATE_0100', 2, async function (done) { - await audioManager.setDeviceActive(audio.ActiveDeviceType.SPEAKER, true).then(function () { - console.info(`${TagFrmwk}: Device Test: Promise : setDeviceActive : SPEAKER: Activate`); - audioManager.isDeviceActive(audio.ActiveDeviceType.SPEAKER).then(function (value) { - if (value == true) { - console.info(`${TagFrmwk}: Device Test: Promise : isDeviceActive : SPEAKER: Activate : PASS : ${value}`); - expect(true).assertTrue(); - } - else { - console.info(`${TagFrmwk}: Device Test: Promise : isDeviceActive : SPEAKER: Activate : FAIL : ${value}`); - expect(false).assertTrue(); - } - }); - }).catch((err) => { - console.info(`${TagFrmwk}: Device Test: Promise : isDeviceActive : SPEAKER: Activate : FAIL :Error : ${err.message}`); - expect(false).assertTrue(); - }); - done(); - }) - - /** - *@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_SETDEVICEACTIVE_PR_ACTIVATE_ENUM_0100 - *@tc.name : setDeviceActive - SPEAKER - Activate - Promise - ENUM - *@tc.desc : Activate speaker - Promise - *@tc.size : MEDIUM - *@tc.type : Function - *@tc.level : Level 2 - */ - it('SUB_MULTIMEDIA_AUDIO_MANAGER_SETDEVICEACTIVE_PR_ACTIVATE_ENUM_0100', 2, async function (done) { - await audioManager.setDeviceActive(2, true).then(function () { - console.info(`${TagFrmwk}: Device Test: Promise : setDeviceActive : SPEAKER: Activate`); - audioManager.isDeviceActive(2).then(function (value) { - if (value == true) { - console.info(`${TagFrmwk}: Device Test: Promise : isDeviceActive : SPEAKER: Activate : PASS : ${value}`); - expect(true).assertTrue(); - } - else { - console.info(`${TagFrmwk}: Device Test: Promise : isDeviceActive : SPEAKER: Activate : FAIL : ${value}`); - expect(false).assertTrue(); - } - }); - }).catch((err) => { - console.info(`${TagFrmwk}: Device Test: Promise : isDeviceActive : SPEAKER: Activate : FAIL :Error : ${err.message}`); - expect(false).assertTrue(); - }); - done(); - }) - - /** - *@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_SETDEVICEACTIVE_CB_DEACTIVATE_0100 - *@tc.name : setDeviceActive - SPEAKER - deactivate - Callback - *@tc.desc : Deactivate speaker - Callback - *@tc.size : MEDIUM - *@tc.type : Function - *@tc.level : Level 2 - */ - it('SUB_MULTIMEDIA_AUDIO_MANAGER_SETDEVICEACTIVE_CB_DEACTIVATE_0100', 2, function (done) { - audioManager.setDeviceActive(audio.ActiveDeviceType.SPEAKER, false, (err) => { - if (err) { - console.error(`${TagFrmwk}: Device Test: Callback : setDeviceActive : SPEAKER: Deactivate: Error: ${err.message}`); - expect(false).assertTrue(); - } - else { - console.info(`${TagFrmwk}: Device Test: Callback : setDeviceActive : SPEAKER: Active`); - audioManager.isDeviceActive(audio.ActiveDeviceType.SPEAKER, (err, value) => { - if (err) { - console.error(`${TagFrmwk}: Device Test: Callback : isDeviceActive : SPEAKER: Deactivate: Error: ${err.message}`); - expect(false).assertTrue(); - } - else if (value == false) { - console.info(`${TagFrmwk}: Device Test: Callback : isDeviceActive : SPEAKER: Deactivate : PASS : ${value}`); - expect(true).assertTrue(); - } - else { - console.info(`${TagFrmwk}: Device Test: Callback : isDeviceActive : SPEAKER: Deactivate : FAIL : ${value}`); - expect(false).assertTrue(); - } - done(); - }); - } - done(); - }); - }) - - /** - *@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_SETDEVICEACTIVE_CB_DEACTIVATE_ENUM_0100 - *@tc.name : setDeviceActive - SPEAKER - deactivate - Callback - ENUM - *@tc.desc : Deactivate speaker - Callback - *@tc.size : MEDIUM - *@tc.type : Function - *@tc.level : Level 2 - */ - it('SUB_MULTIMEDIA_AUDIO_MANAGER_SETDEVICEACTIVE_CB_DEACTIVATE_ENUM_0100', 2, async function (done) { - await audioManager.setDeviceActive(2, true).then(function () { - console.info(`${TagFrmwk}: Device Test: Promise : setDeviceActive : SPEAKER : Active`); - }); - audioManager.setDeviceActive(2, false, (err) => { - if (err) { - console.error(`${TagFrmwk}: Device Test: Callback : setDeviceActive : SPEAKER: Deactivate: Error: ${err.message}`); - expect(false).assertTrue(); - } - else { - console.info(`${TagFrmwk}: Device Test: Callback : setDeviceActive : SPEAKER: Active`); - audioManager.isDeviceActive(2, (err, value) => { - if (err) { - console.error(`${TagFrmwk}: Device Test: Callback : isDeviceActive : SPEAKER: Deactivate: Error: ${err.message}`); - expect(false).assertTrue(); - } - else if (value == false) { - console.info(`${TagFrmwk}: Device Test: Callback : isDeviceActive : SPEAKER: Deactivate : PASS : ${value}`); - expect(true).assertTrue(); - } - else { - console.info(`${TagFrmwk}: Device Test: Callback : isDeviceActive : SPEAKER: Deactivate : FAIL : ${value}`); - expect(false).assertTrue(); - } - done(); - }); - } - done(); - }); - }) - - - /** - *@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_SETDEVICEACTIVE_CB_ACTIVATE_0100 - *@tc.name : setDeviceActive - SPEAKER - activate - Callback - *@tc.desc : Activate speaker - Callback - *@tc.size : MEDIUM - *@tc.type : Function - *@tc.level : Level 2 - */ - it('SUB_MULTIMEDIA_AUDIO_MANAGER_SETDEVICEACTIVE_CB_ACTIVATE_0100', 2, function (done) { - audioManager.setDeviceActive(audio.ActiveDeviceType.SPEAKER, true, (err) => { - if (err) { - console.error(`${TagFrmwk}: Device Test: Callback : setDeviceActive : SPEAKER: Active: Error: ${err.message}`); - expect(false).assertTrue(); - } - else { - console.info(`${TagFrmwk}: Device Test: Callback : setDeviceActive : SPEAKER: Active`); - audioManager.isDeviceActive(audio.ActiveDeviceType.SPEAKER, (err, value) => { - if (err) { - console.error(`${TagFrmwk}: Device Test: Callback : isDeviceActive : SPEAKER: Active: Error: ${err.message}`); - expect(false).assertTrue(); - } - else if (value == true) { - console.info(`${TagFrmwk}: Device Test: Callback : isDeviceActive : SPEAKER: Active : PASS : ${value}`); - expect(true).assertTrue(); - } - else { - console.info(`${TagFrmwk}: Device Test: Callback : isDeviceActive : SPEAKER: Active : FAIL : ${value}`); - expect(false).assertTrue(); - } - done(); - }); - } - done(); - }); - }) - - /** - *@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_SETDEVICEACTIVE_CB_ACTIVATE_ENUM_0100 - *@tc.name : setDeviceActive - SPEAKER - activate - Callback - ENUM - *@tc.desc : Activate speaker - Callback - *@tc.size : MEDIUM - *@tc.type : Function - *@tc.level : Level 2 - */ - it('SUB_MULTIMEDIA_AUDIO_MANAGER_SETDEVICEACTIVE_CB_ACTIVATE_ENUM_0100 ', 2, function (done) { - audioManager.setDeviceActive(2, true, (err) => { - if (err) { - console.error(`${TagFrmwk}: Device Test: Callback : setDeviceActive : SPEAKER: Active: Error: ${err.message}`); - expect(false).assertTrue(); - } - else { - console.info(`${TagFrmwk}: Device Test: Callback : setDeviceActive : SPEAKER: Active`); - audioManager.isDeviceActive(2, (err, value) => { - if (err) { - console.error(`${TagFrmwk}: Device Test: Callback : isDeviceActive : SPEAKER: Active: Error: ${err.message}`); - expect(false).assertTrue(); - } - else if (value == true) { - console.info(`${TagFrmwk}: Device Test: Callback : isDeviceActive : SPEAKER: Active : PASS : ${value}`); - expect(true).assertTrue(); - } - else { - console.info(`${TagFrmwk}: Device Test: Callback : isDeviceActive : SPEAKER: Active : FAIL : ${value}`); - expect(false).assertTrue(); - } - done(); - }); - } - done(); - }); - }) - /** *@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_DEVICECHANGETYPE_0100 *@tc.name : DeviceChangeType - CONNECT -- GitLab