From d6be4bf53fb64454e9256ce67ea509c5d83b654a Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 26 Jun 2024 12:23:05 +0200 Subject: [PATCH] flaky --- .circleci/config.yml | 2 +- apps/remix-ide-e2e/src/tests/remixd.test.ts | 33 ++++++++++++++++++++- 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 42af97c095..8de65685f0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,7 +3,7 @@ version: 2.1 parameters: run_flaky_tests: type: boolean - default: false + default: true orbs: browser-tools: circleci/browser-tools@1.4.4 win: circleci/windows@5.0 diff --git a/apps/remix-ide-e2e/src/tests/remixd.test.ts b/apps/remix-ide-e2e/src/tests/remixd.test.ts index 604277ae6b..e34425b4a9 100644 --- a/apps/remix-ide-e2e/src/tests/remixd.test.ts +++ b/apps/remix-ide-e2e/src/tests/remixd.test.ts @@ -243,7 +243,14 @@ module.exports = { done() }) }) - } + }, + + 'Should install slither #group10 #flaky': function (browser: NightwatchBrowser) { + browser.perform(async (done) => { + await installSlither() + done() + }) + }, } function runTests(browser: NightwatchBrowser, done: any) { @@ -477,3 +484,27 @@ async function buildFoundryProject(): Promise { console.log(e) } } + +async function installSlither(): Promise { + console.log('installSlither', process.cwd()) + try { + const server = spawn('node', ['./dist/libs/remixd/src/scripts/installSlither.js'], { cwd: process.cwd(), shell: true, detached: true }) + return new Promise((resolve, reject) => { + server.stdout.on('data', function (data) { + console.log(data.toString()) + if ( + data.toString().includes("Slither is ready to use") + ) { + console.log('resolving') + resolve() + } + }) + server.stderr.on('err', function (data) { + console.log(data.toString()) + reject(data.toString()) + }) + }) + } catch (e) { + console.log(e) + } +}