From f947e5721add12b84ed938e08f01227f7a14a912 Mon Sep 17 00:00:00 2001 From: PeterYinusa <53189696+PeterYinusa@users.noreply.github.com> Date: Thu, 21 Apr 2022 16:51:03 +0100 Subject: [PATCH] E2e test timeout (#14483) * e2e test timeout threshold * enable logging for single test * more logging * remove redundant step in test --- test/e2e/run-e2e-test.js | 6 +++++- test/e2e/tests/phishing-detection.spec.js | 1 - 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/test/e2e/run-e2e-test.js b/test/e2e/run-e2e-test.js index 0a8b5e37c..195ec41b6 100644 --- a/test/e2e/run-e2e-test.js +++ b/test/e2e/run-e2e-test.js @@ -69,15 +69,19 @@ async function main() { throw error; } + let testTimeoutInMilliseconds = 60 * 1000; + if (leaveRunning) { process.env.E2E_LEAVE_RUNNING = 'true'; + testTimeoutInMilliseconds = 0; } await retry({ retries }, async () => { await runInShell('yarn', [ 'mocha', '--no-config', - '--no-timeouts', + '--timeout', + testTimeoutInMilliseconds, e2eTestPath, ]); }); diff --git a/test/e2e/tests/phishing-detection.spec.js b/test/e2e/tests/phishing-detection.spec.js index 612125f6a..2b1450413 100644 --- a/test/e2e/tests/phishing-detection.spec.js +++ b/test/e2e/tests/phishing-detection.spec.js @@ -41,7 +41,6 @@ describe('Phishing Detection', function () { await driver.navigate(); await driver.fill('#password', 'correct horse battery staple'); await driver.press('#password', driver.Key.ENTER); - await driver.navigate(); await driver.openNewPage('http://example.com'); await driver.waitForSelector({ text: 'continuing at your own risk' }); const header = await driver.findElement('h1');