1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 19:26:13 +02:00
metamask-extension/patches/selenium-webdriver+4.0.0-alpha.7.patch
Mark Stacey f7c37cab51
Enable Chrome E2E logs (#11295)
Chrome logs are now enabled for E2E tests when the 'ENABLE_CHROME_LOGS'
environment variable is set to anything other than `false`.

This was helpful to me in debugging Chrome crashes on CI, the ones with
the error "unknown error: DevToolsActivePort file doesn't exist". This
was the only way to discover the cause of the error. It's also useful
for discovering console errors from the background process or from the
UI.

It's disabled by default because it makes the test output quite noisy
and difficult to read.
2021-06-15 15:18:21 -02:30

20 lines
646 B
Diff

diff --git a/node_modules/selenium-webdriver/chromium.js b/node_modules/selenium-webdriver/chromium.js
index d828ce5..87176f4 100644
--- a/node_modules/selenium-webdriver/chromium.js
+++ b/node_modules/selenium-webdriver/chromium.js
@@ -197,6 +197,14 @@ class ServiceBuilder extends remote.DriverService.Builder {
return this.addArguments('--log-path=' + path);
}
+ /**
+ * Enables Chrome logging.
+ * @returns {!ServiceBuilder} A self reference.
+ */
+ enableChromeLogging() {
+ return this.addArguments('--enable-chrome-logs');
+ }
+
/**
* Enables verbose logging.
* @return {!ServiceBuilder} A self reference.