From 1d737e419e003be938397228a2e3be676aac059a Mon Sep 17 00:00:00 2001 From: yanglifeng1217 Date: Sat, 1 Apr 2023 10:29:49 +0800 Subject: [PATCH] Signed-off-by: yanglifeng1217 --- .../test/PasteBoardSystemPasteBoard.test.ets | 25 +++++++++++-------- 1 file changed, 14 insertions(+), 11 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 cc1549d0a..63f3948ae 100644 --- a/distributeddatamgr/Pasteboardjsapitest/entry/src/main/ets/test/PasteBoardSystemPasteBoard.test.ets +++ b/distributeddatamgr/Pasteboardjsapitest/entry/src/main/ets/test/PasteBoardSystemPasteBoard.test.ets @@ -37,18 +37,21 @@ export default function pasteBoardSystemPasteBoardTest(){ */ it('SUB_PASTEBOARD_FUNCTION_ETS_CLEARDATA_CALLBACK_0100', 0, async function (done) { - 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("Clear the data in the system pasteBoard finished") - await systemPasteBoard.hasData().then((data) => { - console.info(`Succeeded in checking the PasteData. Data: ${data}`); - expect(data).assertEqual(false); - }) + console.info(TAG + "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") + await systemPasteBoard.hasData().then((data) => { + console.info(TAG + `Succeeded in checking the PasteData. Data: ${data}`); + expect(data).assertEqual(false); }) - }); + }) + done(); + console.info("SUB_PASTEBOARD_FUNCTION_ETS_CLEARDATA_CALLBACK_0100 end") + }) + /** -- GitLab