From da1cd8f17d2a98ecd06a0ba6d1a8127c7c1d65d3 Mon Sep 17 00:00:00 2001 From: bunsenstraat Date: Fri, 29 Oct 2021 13:33:45 +0200 Subject: [PATCH] comments on the method --- apps/remix-ide-e2e/src/tests/plugin_api.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/apps/remix-ide-e2e/src/tests/plugin_api.ts b/apps/remix-ide-e2e/src/tests/plugin_api.ts index e04be05787..1a832ea945 100644 --- a/apps/remix-ide-e2e/src/tests/plugin_api.ts +++ b/apps/remix-ide-e2e/src/tests/plugin_api.ts @@ -91,6 +91,17 @@ const checkForAcceptAndRemember = async function (browser: NightwatchBrowser) { }) } +/** + * performs an action on the test local plugin calling a method on a plugin + * + * @param {NightwatchBrowser} browser + * @param {string} buttonText the button which needs to be clicked formatted as pluginname:methodname, ie 'fileManager:writeFile' + * @param {any} methodResult can be a string expected or an object. it is the result of the method called. strings are evaluated as part of the result, an object should be exactly the result + * @param {any} eventResult can be a string expected or an object. it is the event generated by the method called. strings are evaluated as part of the result, an object should be exactly the result + * @param {any} payload can be a string expected or an object. it is the payload passed to the call + * @return {Promise} + */ + const clickAndCheckLog = async (browser: NightwatchBrowser, buttonText: string, methodResult: any, eventResult: any, payload: any) => { if (payload) { await setPayload(browser, payload)