From ec46748dfa4a5bcc2081e5d53842559cd3a5633a Mon Sep 17 00:00:00 2001 From: yanglifeng1217 Date: Sat, 1 Apr 2023 10:20:34 +0800 Subject: [PATCH] Signed-off-by: yanglifeng1217 --- .../test/PasteBoardSystemPasteBoard.test.ets | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 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 815ff4494..e2727f302 100644 --- a/distributeddatamgr/Pasteboardjsapitest/entry/src/main/ets/test/PasteBoardSystemPasteBoard.test.ets +++ b/distributeddatamgr/Pasteboardjsapitest/entry/src/main/ets/test/PasteBoardSystemPasteBoard.test.ets @@ -35,20 +35,19 @@ 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("SUB_PASTEBOARD_FUNCTION_ETS_CLEARDATA_CALLBACK_0100 start") + 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(); + 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) => { - expect(data).assertEqual(false); + 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); + }) }) - done(); - console.info("SUB_PASTEBOARD_FUNCTION_ETS_CLEARDATA_CALLBACK_0100 end") - }) + }); /** * @tc.number SUB_PASTEBOARD_FUNCTION_ETS_CLEARDATA_CALLBACK_0200 -- GitLab