From 1dc3b83ceac022ab2e35ea2ff6a048014d5fc8d5 Mon Sep 17 00:00:00 2001 From: yanglifeng1217 Date: Sat, 1 Apr 2023 11:03:40 +0800 Subject: [PATCH] Signed-off-by: yanglifeng1217 --- .../ets/test/PasteBoardSystemPasteBoard.test.ets | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/distributeddatamgr/Pasteboardjsapitest/entry/src/main/ets/test/PasteBoardSystemPasteBoard.test.ets b/distributeddatamgr/Pasteboardjsapitest/entry/src/main/ets/test/PasteBoardSystemPasteBoard.test.ets index 63f3948ae..0c3862d60 100644 --- a/distributeddatamgr/Pasteboardjsapitest/entry/src/main/ets/test/PasteBoardSystemPasteBoard.test.ets +++ b/distributeddatamgr/Pasteboardjsapitest/entry/src/main/ets/test/PasteBoardSystemPasteBoard.test.ets @@ -35,25 +35,22 @@ export default function pasteBoardSystemPasteBoardTest(){ * @tc.type : Function * @tc.level : Level 2 */ - it('SUB_PASTEBOARD_FUNCTION_ETS_CLEARDATA_CALLBACK_0100', 0, async function (done) { - console.info(TAG + "SUB_PASTEBOARD_FUNCTION_ETS_CLEARDATA_CALLBACK_0100 start") + console.info("SUB_PASTEBOARD_FUNCTION_ETS_CLEARDATA_CALLBACK_0100 start") let pasteData = pasteboard.createData('string', ARRAY_BUFFER); let systemPasteBoard = pasteboard.getSystemPasteboard(); await systemPasteBoard.setData(pasteData) await systemPasteBoard.clearData(async (err, data) => { - console.info(TAG + "Clear the data in the system pasteBoard finished") + console.info("Clear the data in the system pasteBoard finished") await systemPasteBoard.hasData().then((data) => { - console.info(TAG + `Succeeded in checking the PasteData. Data: ${data}`); + console.info(`Succeeded in checking the PasteData. Data: ${data}`); expect(data).assertEqual(false); + done(); + console.info("SUB_PASTEBOARD_FUNCTION_ETS_CLEARDATA_CALLBACK_0100 end") }) }) - done(); - console.info("SUB_PASTEBOARD_FUNCTION_ETS_CLEARDATA_CALLBACK_0100 end") }) - - /** * @tc.number SUB_PASTEBOARD_FUNCTION_ETS_CLEARDATA_CALLBACK_0200 * @tc.name clearData -- GitLab