From 7640bc029c958dacb4067c0e14f50e908bfcc64c Mon Sep 17 00:00:00 2001 From: Kazuhito Yokoi Date: Tue, 14 Jan 2020 17:24:16 +0900 Subject: [PATCH] Add handling to remove unused file and directories in UI testing --- test/editor/editor_helper.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/editor/editor_helper.js b/test/editor/editor_helper.js index 81e3a54f5..73177c2ca 100644 --- a/test/editor/editor_helper.js +++ b/test/editor/editor_helper.js @@ -57,6 +57,9 @@ function cleanup(flowFile) { deleteFile(homeDir + "/." + flowFile + ".backup"); deleteFile(homeDir + "/" + credentialFile); deleteFile(homeDir + "/." + credentialFile + ".backup"); + deleteFile(homeDir + "/package.json"); + deleteFile(homeDir + "/lib/flows"); + deleteFile(homeDir + "/lib"); } function deleteFile(flowFile) { @@ -66,7 +69,7 @@ function deleteFile(flowFile) { fs.unlinkSync(flowFile); } } catch (e) {} -}; +} module.exports = { startServer: function() { @@ -104,7 +107,7 @@ module.exports = { }); }); browser.url(url); - browser.waitForExist(".red-ui-palette-node[data-palette-type='inject']") + browser.waitForExist(".red-ui-palette-node[data-palette-type='inject']"); } catch (err) { console.log(err); throw err;