From be749ead8ecd9362f840e39d86b1e8c33624fbb1 Mon Sep 17 00:00:00 2001 From: karan Date: Tue, 27 Oct 2020 11:38:47 -0700 Subject: [PATCH 01/26] update electron dep --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index e3e6aeb14ec..0051dd69fd7 100644 --- a/package.json +++ b/package.json @@ -162,7 +162,7 @@ "axe-core": "4.0.2", "axios": "^0.20.0", "classnames": "^2.2.6", - "electron": "8.4.1", + "electron": "10.1.4", "electron-log": "^4.2.4", "electron-updater": "^4.3.5", "idb-keyval": "^3.2.0", diff --git a/yarn.lock b/yarn.lock index b5a6b79423d..44aa0c37688 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5314,10 +5314,10 @@ electron-updater@^4.3.5: lodash.isequal "^4.5.0" semver "^7.3.2" -electron@8.4.1: - version "8.4.1" - resolved "https://registry.yarnpkg.com/electron/-/electron-8.4.1.tgz#124d6c65d02a644b389f498d549f2411a0a94c27" - integrity sha512-2UK0dUlkwoUAxRDS9VHm3M/zKW+Vm71b1mqSfHx+L7VEfTjiO1Vt2l+kGFg0sUpa/CVMtSCqaeZucrNN6VQwwA== +electron@10.1.4: + version "10.1.4" + resolved "https://registry.yarnpkg.com/electron/-/electron-10.1.4.tgz#5462c5fac5b4728691042d0f62133ea2c133e6fd" + integrity sha512-5wiiGsif8jd1lS3Qhe9j8oQvUMnoWCvqBwYzzn+BGXGDq8aN8oTdM+j/2NY35Ktt3JrJdjKWcu9b7pDo8kNjbw== dependencies: "@electron/get" "^1.0.1" "@types/node" "^12.0.12" From b3e5088d1b3e476b3bdb6024beb6dc5862129fd4 Mon Sep 17 00:00:00 2001 From: karan Date: Tue, 27 Oct 2020 13:12:32 -0700 Subject: [PATCH 02/26] electron10, spectron broken, issue spectron@720 --- package.json | 4 +- .../electron/common/create-application.ts | 2 + .../tests/automated-checks-view.test.ts | 4 +- yarn.lock | 653 ++++++++++++++---- 4 files changed, 513 insertions(+), 150 deletions(-) diff --git a/package.json b/package.json index 4cfa4eb42de..35d55e522c6 100644 --- a/package.json +++ b/package.json @@ -143,7 +143,7 @@ "serve-static": "^1.13.2", "simple-git": "^2.21.0", "source-map-loader": "^1.1.1", - "spectron": "^10.0.1", + "spectron": "12.0.0", "terser-webpack-plugin": "^4.2.3", "ts-jest": "^26.4.3", "ts-loader": "^8.0.7", @@ -162,7 +162,7 @@ "axe-core": "4.0.2", "axios": "^0.20.0", "classnames": "^2.2.6", - "electron": "10.1.4", + "electron": "10.1.5", "electron-log": "^4.2.4", "electron-updater": "^4.3.5", "idb-keyval": "^3.2.0", diff --git a/src/tests/electron/common/create-application.ts b/src/tests/electron/common/create-application.ts index dcdff2971c2..6eaa55bce1d 100644 --- a/src/tests/electron/common/create-application.ts +++ b/src/tests/electron/common/create-application.ts @@ -43,6 +43,8 @@ export async function createAppController( connectionRetryCount: DEFAULT_APP_CONNECT_RETRIES, connectionRetryTimeout: DEFAULT_APP_CONNECT_TIMEOUT_MS, ...overrideSpectronOptions, + chromeDriverLogPath: `C:/Users/karansin/chromedriverlogs.txt`, + webdriverLogPath: `C:/Users/karansin/logs`, }); await app.start(); return new AppController(app); diff --git a/src/tests/electron/tests/automated-checks-view.test.ts b/src/tests/electron/tests/automated-checks-view.test.ts index 69a723b3a7b..07af8503e81 100644 --- a/src/tests/electron/tests/automated-checks-view.test.ts +++ b/src/tests/electron/tests/automated-checks-view.test.ts @@ -42,7 +42,7 @@ describe('AutomatedChecksView', () => { it('should use the expected window title', async () => { expect(await app.getTitle()).toBe('Accessibility Insights for Android - Automated checks'); }); - + /* it('displays automated checks results collapsed by default', async () => { automatedChecksView.waitForRuleGroupCount(3); @@ -206,5 +206,5 @@ describe('AutomatedChecksView', () => { expect(boxStyle.width).toBeCloseTo(expectedHighlightBoxStyles[index].width); expect(boxStyle.height).toBeCloseTo(expectedHighlightBoxStyles[index].height); }); - } + }*/ }); diff --git a/yarn.lock b/yarn.lock index dc04c164e18..ebb8b383129 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1889,6 +1889,11 @@ resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea" integrity sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ== +"@sindresorhus/is@^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-4.0.0.tgz#2ff674e9611b45b528896d820d3d7a812de2f0e4" + integrity sha512-FyD2meJpDPjyNQejSjvnhpgI/azsQkA4lGbuu5BQZfjvJ9cbRZXzeWL2HceCekW4lixO9JPesIIQkSoLjeJHNQ== + "@sinonjs/commons@^1.7.0": version "1.7.0" resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.7.0.tgz#f90ffc52a2e519f018b13b6c4da03cbff36ebed6" @@ -1910,6 +1915,13 @@ dependencies: defer-to-connect "^1.0.1" +"@szmarczak/http-timer@^4.0.5": + version "4.0.5" + resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-4.0.5.tgz#bfbd50211e9dfa51ba07da58a14cdfd333205152" + integrity sha512-PyRA9sm1Yayuj5OIoJ1hGt2YISX45w9WcFbh6ddT0Z/0yaFxOtGLInr4jUfU1EAFVs0Yfyfev4RNwBlUaHdlDQ== + dependencies: + defer-to-connect "^2.0.0" + "@tootallnate/once@1": version "1.0.0" resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.0.0.tgz#9c13c2574c92d4503b005feca8f2e16cc1611506" @@ -1920,6 +1932,11 @@ resolved "https://registry.yarnpkg.com/@types/applicationinsights-js/-/applicationinsights-js-1.0.9.tgz#791581118068517ecd0bc29fd4590239a577a489" integrity sha512-tf2BBQFIRgaoxkii5Ys4Q2nvhPQ2PFt9FfgDc+xL7+XPi3s4ScqzRuAn8FRBCglnyzVvwEznOtdfqGREzUOkCw== +"@types/atob@^2.1.2": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@types/atob/-/atob-2.1.2.tgz#157eb0cc46264a8c55f2273a836c7a1a644fb820" + integrity sha512-8GAYQ1jDRUQkSpHzJUqXwAkYFOxuWAOGLhIR4aPd/Y/yL12Q/9m7LsKpHKlfKdNE/362Hc9wPI1Yh6opDfxVJg== + "@types/babel__core@^7.0.0": version "7.1.9" resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.9.tgz#77e59d438522a6fb898fa43dc3455c6e72f3963d" @@ -1964,6 +1981,16 @@ dependencies: "@babel/types" "^7.3.0" +"@types/cacheable-request@^6.0.1": + version "6.0.1" + resolved "https://registry.yarnpkg.com/@types/cacheable-request/-/cacheable-request-6.0.1.tgz#5d22f3dded1fd3a84c0bbeb5039a7419c2c91976" + integrity sha512-ykFq2zmBGOCbpIXtoVbz4SKY5QriWPh3AjyU4G74RYbtt5yOc5OfaY75ftjg7mikMOla1CTGpX3lLbuJh8DTrQ== + dependencies: + "@types/http-cache-semantics" "*" + "@types/keyv" "*" + "@types/node" "*" + "@types/responselike" "*" + "@types/cheerio@*": version "0.22.14" resolved "https://registry.yarnpkg.com/@types/cheerio/-/cheerio-0.22.14.tgz#d150889891e7db892c6a0b16bd5583cc70b3fc44" @@ -2041,6 +2068,13 @@ dependencies: "@types/node" "*" +"@types/fs-extra@^9.0.2": + version "9.0.2" + resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-9.0.2.tgz#e1e1b578c48e8d08ae7fc36e552b94c6f4621609" + integrity sha512-jp0RI6xfZpi5JL8v7WQwpBEQTq63RqW2kxwTZt+m27LcJqQdPVU1yGnT1ZI4EtCDynQQJtIGyQahkiCGCS7e+A== + dependencies: + "@types/node" "*" + "@types/glob@^7.1.1": version "7.1.1" resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.1.tgz#aa59a1c6e3fbc421e07ccd31a944c30eba521575" @@ -2067,6 +2101,11 @@ resolved "https://registry.yarnpkg.com/@types/history/-/history-4.7.3.tgz#856c99cdc1551d22c22b18b5402719affec9839a" integrity sha512-cS5owqtwzLN5kY+l+KgKdRJ/Cee8tlmQoGQuIE9tWnSmS3JMKzmxo2HIAk2wODMifGwO20d62xZQLYz+RLfXmw== +"@types/http-cache-semantics@*": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@types/http-cache-semantics/-/http-cache-semantics-4.0.0.tgz#9140779736aa2655635ee756e2467d787cfe8a2a" + integrity sha512-c3Xy026kOF7QOTn00hbIllV1dLR9hG9NkSrLQgCVs8NF6sBU+VGWjD3wLPhmh1TYAc7ugCFsvHYMN4VcBN1U1A== + "@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1": version "2.0.1" resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz#42995b446db9a48a11a07ec083499a860e9138ff" @@ -2121,7 +2160,21 @@ resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.6.tgz#f4c7ec43e81b319a9815115031709f26987891f0" integrity sha512-3c+yGKvVP5Y9TYBEibGNR+kLtijnj7mYrXRg+WpFb2X9xm04g/DXYkfg4hmzJQosc9snFNUPkbYIhu+KAm6jJw== -"@types/lodash@^4.14.162": +"@types/keyv@*": + version "3.1.1" + resolved "https://registry.yarnpkg.com/@types/keyv/-/keyv-3.1.1.tgz#e45a45324fca9dab716ab1230ee249c9fb52cfa7" + integrity sha512-MPtoySlAZQ37VoLaPcTHCu1RWJ4llDkULYZIzOYxlhxBqYPB0RsRlmMU0R6tahtFe27mIdkHV+551ZWV4PLmVw== + dependencies: + "@types/node" "*" + +"@types/lodash.merge@^4.6.6": + version "4.6.6" + resolved "https://registry.yarnpkg.com/@types/lodash.merge/-/lodash.merge-4.6.6.tgz#b84b403c1d31bc42d51772d1cd5557fa008cd3d6" + integrity sha512-IB90krzMf7YpfgP3u/EvZEdXVvm4e3gJbUvh5ieuI+o+XqiNEt6fCzqNRaiLlPVScLI59RxIGZMQ3+Ko/DJ8vQ== + dependencies: + "@types/lodash" "*" + +"@types/lodash@*", "@types/lodash@^4.14.162": version "4.14.162" resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.162.tgz#65d78c397e0d883f44afbf1f7ba9867022411470" integrity sha512-alvcho1kRUnnD1Gcl4J+hK0eencvzq9rmzvFPRmP5rPHx9VVsJj6bKLTATPVf9ktgv4ujzh7T+XWKp+jhuODig== @@ -2183,6 +2236,13 @@ resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.3.tgz#2ab0d5da2e5815f94b0b9d4b95d1e5f243ab2ca7" integrity sha512-KfRL3PuHmqQLOG+2tGpRO26Ctg+Cq1E01D2DMriKEATHgWLfeNDmq9e29Q9WIky0dQ3NPkd1mzYH8Lm936Z9qw== +"@types/puppeteer@^3.0.1": + version "3.0.2" + resolved "https://registry.yarnpkg.com/@types/puppeteer/-/puppeteer-3.0.2.tgz#20085220593b560c7332b6d46aecaf81ae263540" + integrity sha512-JRuHPSbHZBadOxxFwpyZPeRlpPTTeMbQneMdpFd8LXdyNfFSiX950CGewdm69g/ipzEAXAmMyFF1WOWJOL/nKw== + dependencies: + "@types/node" "*" + "@types/q@^1.5.4": version "1.5.4" resolved "https://registry.yarnpkg.com/@types/q/-/q-1.5.4.tgz#15925414e0ad2cd765bfef58842f7e26a7accb24" @@ -2246,6 +2306,13 @@ "@types/prop-types" "*" csstype "^3.0.2" +"@types/responselike@*", "@types/responselike@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@types/responselike/-/responselike-1.0.0.tgz#251f4fe7d154d2bad125abe1b429b23afd262e29" + integrity sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA== + dependencies: + "@types/node" "*" + "@types/semver@^7.3.1": version "7.3.1" resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.1.tgz#7a9a5d595b6d873f338c867dcef64df289468cfa" @@ -2281,13 +2348,6 @@ resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-8.3.0.tgz#215c231dff736d5ba92410e6d602050cce7e273f" integrity sha512-eQ9qFW/fhfGJF8WKHGEHZEyVWfZxrT+6CLIJGBcZPfxUh/+BnEj+UCGYMlr9qZuX/2AltsvwrGqp0LhEW8D0zQ== -"@types/webdriverio@^4.8.0": - version "4.13.3" - resolved "https://registry.yarnpkg.com/@types/webdriverio/-/webdriverio-4.13.3.tgz#c1571c4e62724135c0b11e7d7e36b07af5168856" - integrity sha512-AfSQM1xTO9Ax+u9uSQPDuw69DQ0qA2RMoKHn86jCgWNcwKVUjGMSP4sfSl3JOfcZN8X/gWvn7znVPp2/g9zcJA== - dependencies: - "@types/node" "*" - "@types/yargs-parser@*": version "13.1.0" resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-13.1.0.tgz#c563aa192f39350a1d18da36c5a8da382bbd8228" @@ -2487,6 +2547,44 @@ prop-types "^15.7.2" tslib "^1.10.0" +"@wdio/config@6.6.3": + version "6.6.3" + resolved "https://registry.yarnpkg.com/@wdio/config/-/config-6.6.3.tgz#035012ea0d1d02eb72bd181e857e893713ad9ade" + integrity sha512-zJjPpjJu05els9A2ZzOVMAYccaHSXmmqQ2h+ftelXmFgO4mYDlKufx0HaCZDdn+O0SCG0ASqv+u1KNuqmNhjDw== + dependencies: + "@wdio/logger" "6.6.0" + deepmerge "^4.0.0" + glob "^7.1.2" + +"@wdio/logger@6.6.0": + version "6.6.0" + resolved "https://registry.yarnpkg.com/@wdio/logger/-/logger-6.6.0.tgz#69375d6cf373ee8e7db7cd05085e6a325fccfdf7" + integrity sha512-BAvXcnlWdQC93MLWObetpcjHUEGR8niW2mH2KAwLPQhXwJkKxXjhlMKH/DmUn5uQ4/S7iySLlMq9EEEg9KuCwA== + dependencies: + chalk "^4.0.0" + loglevel "^1.6.0" + loglevel-plugin-prefix "^0.8.4" + strip-ansi "^6.0.0" + +"@wdio/protocols@6.6.0": + version "6.6.0" + resolved "https://registry.yarnpkg.com/@wdio/protocols/-/protocols-6.6.0.tgz#3a5fcc7bc15b8138e6e523836984f0746530e6e1" + integrity sha512-0wWSZTB4sBzr9HG3hT9a0jaO+xPhz+eFdE/qMLvM8b1yPOOgHieGPSoTXPjkBaks0CZpqeimbT4myYoim2JK1w== + +"@wdio/repl@6.7.0": + version "6.7.0" + resolved "https://registry.yarnpkg.com/@wdio/repl/-/repl-6.7.0.tgz#1688910a4a1b70befaa69a272c67ddd414380cfe" + integrity sha512-Dykvn/cKbn6HN+jXqeQmokpXv+WH80KruFN3pj9q4QHfPpmRpp724XG5FCjPSTA5lrGZ27BHi5nhMyXm8SCk8g== + dependencies: + "@wdio/utils" "6.7.0" + +"@wdio/utils@6.7.0": + version "6.7.0" + resolved "https://registry.yarnpkg.com/@wdio/utils/-/utils-6.7.0.tgz#2106584ea075d2625ebc32a37f77839fceeac861" + integrity sha512-YhbExE89Ya5d1XIh4QIOuU1UjG30fB7iiFGgldu9ZfdUusIgjTwL4vMHhK30e+5+jdqzV6jMkTAf5a6OvH+02g== + dependencies: + "@wdio/logger" "6.6.0" + "@webassemblyjs/ast@1.9.0": version "1.9.0" resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.9.0.tgz#bd850604b4042459a5a41cd7d338cbed695ed964" @@ -2733,6 +2831,11 @@ agent-base@4, agent-base@^4.3.0: dependencies: es6-promisify "^5.0.0" +agent-base@5: + version "5.1.1" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-5.1.1.tgz#e8fb3f242959db44d63be665db7a8e739537a32c" + integrity sha512-TMeqbNl2fMW0nMjTEPOwe3J/PRFP4vqeoNuQMG0HlMrtm5QxKqdvAkZ1pRBQ/ulIyDD5Yq0nJ7YbdD8ey0TO3g== + agent-base@6: version "6.0.0" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.0.tgz#5d0101f19bbfaed39980b22ae866de153b93f09a" @@ -3046,6 +3149,19 @@ archiver@^4.0.1: tar-stream "^2.1.2" zip-stream "^3.0.1" +archiver@^5.0.0: + version "5.0.2" + resolved "https://registry.yarnpkg.com/archiver/-/archiver-5.0.2.tgz#b2c435823499b1f46eb07aa18e7bcb332f6ca3fc" + integrity sha512-Tq3yV/T4wxBsD2Wign8W9VQKhaUxzzRmjEiSoOK0SLqPgDP/N1TKdYyBeIEu56T4I9iO4fKTTR0mN9NWkBA0sg== + dependencies: + archiver-utils "^2.1.0" + async "^3.2.0" + buffer-crc32 "^0.2.1" + readable-stream "^3.6.0" + readdir-glob "^1.0.0" + tar-stream "^2.1.4" + zip-stream "^4.0.0" + archiver@~2.1.0: version "2.1.1" resolved "https://registry.yarnpkg.com/archiver/-/archiver-2.1.1.tgz#ff662b4a78201494a3ee544d3a33fe7496509ebc" @@ -3282,6 +3398,11 @@ async@^3.1.0: resolved "https://registry.yarnpkg.com/async/-/async-3.1.0.tgz#42b3b12ae1b74927b5217d8c0016baaf62463772" integrity sha512-4vx/aaY6j/j3Lw3fbCHNWP0pPaTCew3F6F3hYyl/tHs/ndmV1q7NW9T5yuJ2XAGwdQrP+6Wu20x06U4APo/iQQ== +async@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/async/-/async-3.2.0.tgz#b3a2685c5ebb641d3de02d161002c60fc9f85720" + integrity sha512-TR2mEZFVOj2pLStYxLht7TyfuRzaydfpxr3k9RpHIzMgw7A64dzsdqCxH1WJyQdoe8T10nDXd9wnEigmiuHIZw== + async@~1.5.2: version "1.5.2" resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" @@ -3313,7 +3434,7 @@ atob-lite@^2.0.0: resolved "https://registry.yarnpkg.com/atob-lite/-/atob-lite-2.0.0.tgz#0fef5ad46f1bd7a8502c65727f0367d5ee43d696" integrity sha1-D+9a1G8b16hQLGVyfwNn1e5D1pY= -atob@^2.1.1: +atob@^2.1.1, atob@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== @@ -3439,7 +3560,7 @@ base64-arraybuffer-es6@0.5.0: resolved "https://registry.yarnpkg.com/base64-arraybuffer-es6/-/base64-arraybuffer-es6-0.5.0.tgz#27877d01148bcfb3919c17ecf64ea163d9bdba62" integrity sha512-UCIPaDJrNNj5jG2ZL+nzJ7czvZV/ZYX6LaIRgfVU1k1edJOQg7dkbiSKzwHkNp6aHEHER/PhlFBrMYnlvJJQEw== -base64-js@^1.0.2, base64-js@^1.2.3: +base64-js@^1.0.2, base64-js@^1.2.3, base64-js@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.1.tgz#58ece8cb75dd07e71ed08c736abc5fac4dbf8df1" integrity sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g== @@ -3502,7 +3623,7 @@ bl@^1.0.0: readable-stream "^2.3.5" safe-buffer "^5.1.1" -bl@^4.0.1: +bl@^4.0.1, bl@^4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/bl/-/bl-4.0.3.tgz#12d6287adc29080e22a705e5764b2a9522cdc489" integrity sha512-fs4G6/Hu4/EE+F75J8DuN/0IpQqNjAdC7aEQv7Qt8MHGUH7Ckv2MwTEEeN9QehD0pfIDkMI1bkHYkKy7xHyKIg== @@ -3804,6 +3925,14 @@ buffer@^5.2.0, buffer@^5.5.0: base64-js "^1.0.2" ieee754 "^1.1.4" +buffer@^5.2.1: + version "5.6.1" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.6.1.tgz#b99419405f4290a7a1f20b51037cee9f1fbd7f6a" + integrity sha512-2z15UUHpS9/3tk9mY/q+Rl3rydOi7yMp5XWNQnRvoz+mJwiv8brqYwp9a+nOCtma6dwuEIxljD8W3ysVBZ05Vg== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.1.13" + builder-util-runtime@8.7.2: version "8.7.2" resolved "https://registry.yarnpkg.com/builder-util-runtime/-/builder-util-runtime-8.7.2.tgz#d93afc71428a12789b437e13850e1fa7da956d72" @@ -3942,6 +4071,11 @@ cache-base@^1.0.1: union-value "^1.0.0" unset-value "^1.0.0" +cacheable-lookup@^5.0.3: + version "5.0.3" + resolved "https://registry.yarnpkg.com/cacheable-lookup/-/cacheable-lookup-5.0.3.tgz#049fdc59dffdd4fc285e8f4f82936591bd59fec3" + integrity sha512-W+JBqF9SWe18A72XFzN/V/CULFzPm7sBXzzR6ekkE+3tLG72wFZrBiBZhrZuDoYexop4PHJVdFAKb/Nj9+tm9w== + cacheable-request@^6.0.0: version "6.1.0" resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-6.1.0.tgz#20ffb8bd162ba4be11e9567d823db651052ca912" @@ -3955,6 +4089,19 @@ cacheable-request@^6.0.0: normalize-url "^4.1.0" responselike "^1.0.2" +cacheable-request@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-7.0.1.tgz#062031c2856232782ed694a257fa35da93942a58" + integrity sha512-lt0mJ6YAnsrBErpTMWeu5kl/tg9xMAWjavYTN6VQXM1A/teBITuNcccXsCxF0tDQQJf9DfAaX5O4e0zp0KlfZw== + dependencies: + clone-response "^1.0.2" + get-stream "^5.1.0" + http-cache-semantics "^4.0.0" + keyv "^4.0.0" + lowercase-keys "^2.0.0" + normalize-url "^4.1.0" + responselike "^2.0.0" + call-me-maybe@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/call-me-maybe/-/call-me-maybe-1.0.1.tgz#26d208ea89e37b5cbde60250a15f031c16a4d66b" @@ -4164,6 +4311,18 @@ chownr@^2.0.0: resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece" integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ== +chrome-launcher@^0.13.1: + version "0.13.4" + resolved "https://registry.yarnpkg.com/chrome-launcher/-/chrome-launcher-0.13.4.tgz#4c7d81333c98282899c4e38256da23e00ed32f73" + integrity sha512-nnzXiDbGKjDSK6t2I+35OAPBy5Pw/39bgkb/ZAFwMhwJbdYBp6aH+vW28ZgtjdU890Q7D+3wN/tB8N66q5Gi2A== + dependencies: + "@types/node" "*" + escape-string-regexp "^1.0.5" + is-wsl "^2.2.0" + lighthouse-logger "^1.0.0" + mkdirp "^0.5.3" + rimraf "^3.0.2" + chrome-trace-event@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.2.tgz#234090ee97c7d4ad1a2c4beae27505deffc608a4" @@ -4417,6 +4576,16 @@ compress-commons@^3.0.0: normalize-path "^3.0.0" readable-stream "^2.3.7" +compress-commons@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/compress-commons/-/compress-commons-4.0.1.tgz#c5fa908a791a0c71329fba211d73cd2a32005ea8" + integrity sha512-xZm9o6iikekkI0GnXCmAl3LQGZj5TBDj0zLowsqi7tJtEa3FMGSEcHcqrSJIrOAk1UG/NBbDn/F1q+MG/p/EsA== + dependencies: + buffer-crc32 "^0.2.13" + crc32-stream "^4.0.0" + normalize-path "^3.0.0" + readable-stream "^3.6.0" + concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" @@ -4687,6 +4856,14 @@ crc32-stream@^3.0.1: crc "^3.4.4" readable-stream "^3.4.0" +crc32-stream@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/crc32-stream/-/crc32-stream-4.0.0.tgz#05b7ca047d831e98c215538666f372b756d91893" + integrity sha512-tyMw2IeUX6t9jhgXI6um0eKfWq4EIDpfv5m7GX4Jzp7eVelQ360xd8EPXJhp2mHwLQIkqlnMLjzqSZI3a+0wRw== + dependencies: + crc "^3.4.4" + readable-stream "^3.4.0" + crc@^3.4.4: version "3.8.0" resolved "https://registry.yarnpkg.com/crc/-/crc-3.8.0.tgz#ad60269c2c856f8c299e2c4cc0de4556914056c6" @@ -4859,7 +5036,7 @@ css-selector-tokenizer@^0.7.0: fastparse "^1.1.1" regexpu-core "^1.0.0" -css-value@~0.0.1: +css-value@^0.0.1, css-value@~0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/css-value/-/css-value-0.0.1.tgz#5efd6c2eea5ea1fd6b6ac57ec0427b18452424ea" integrity sha1-Xv1sLupeof1rasV+wEJ7GEUkJOo= @@ -4951,7 +5128,7 @@ dateformat@^3.0.0, dateformat@~3.0.3: resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae" integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q== -debug@2.6.9, debug@^2.1.3, debug@^2.2.0, debug@^2.3.3, debug@^2.6.9: +debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8, debug@^2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== @@ -4972,7 +5149,7 @@ debug@4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.0: dependencies: ms "2.1.2" -debug@^3.0.0, debug@^3.1.0, debug@^3.1.1, debug@^3.2.6: +debug@^3.1.0, debug@^3.1.1, debug@^3.2.6: version "3.2.6" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== @@ -5021,6 +5198,13 @@ decompress-response@^3.3.0: dependencies: mimic-response "^1.0.0" +decompress-response@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-6.0.0.tgz#ca387612ddb7e104bd16d85aab00d5ecf09c66fc" + integrity sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ== + dependencies: + mimic-response "^3.1.0" + dedent@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" @@ -5036,7 +5220,7 @@ deep-is@^0.1.3, deep-is@~0.1.3: resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= -deepmerge@^4.2.2: +deepmerge@^4.0.0, deepmerge@^4.2.2: version "4.2.2" resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955" integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg== @@ -5058,6 +5242,11 @@ defer-to-connect@^1.0.1: resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-1.1.0.tgz#b41bd7efa8508cef13f8456975f7a278c72833fd" integrity sha512-WE2sZoctWm/v4smfCAdjYbrfS55JiMRdlY9ZubFhsYbteCK9+BvAx4YV7nPjYM6ZnX5BcoVKwfmyx9sIFTgQMQ== +defer-to-connect@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-2.0.0.tgz#83d6b199db041593ac84d781b5222308ccf4c2c1" + integrity sha512-bYL2d05vOSf1JEZNx5vSAtPuBMkX8K9EUutg7zlKvTqKXHt7RhWJFbmd7qakVuf13i+IkGmp6FwSsONOf6VYIg== + define-properties@^1.1.2, define-properties@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" @@ -5150,6 +5339,26 @@ dev-null@^0.1.1: resolved "https://registry.yarnpkg.com/dev-null/-/dev-null-0.1.1.tgz#5a205ce3c2b2ef77b6238d6ba179eb74c6a0e818" integrity sha1-WiBc48Ky73e2I41roXnrdMag6Bg= +devtools-protocol@0.0.809251: + version "0.0.809251" + resolved "https://registry.yarnpkg.com/devtools-protocol/-/devtools-protocol-0.0.809251.tgz#300b3366be107d5c46114ecb85274173e3999518" + integrity sha512-pf+2OY6ghMDPjKkzSWxHMq+McD+9Ojmq5XVRYpv/kPd9sTMQxzEt21592a31API8qRjro0iYYOc3ag46qF/1FA== + +devtools@6.7.0: + version "6.7.0" + resolved "https://registry.yarnpkg.com/devtools/-/devtools-6.7.0.tgz#e5b9ecd30eb731d33ff9bd49d78d67e22f1c53a5" + integrity sha512-RkmIy2tX+XS0HM/6XGDmBHCv92jSbNKBdRcmwxHHBqYuSuVxYhLlhNwNjjA+2LZHe92xnaxW5+oGH27wyPs8Ew== + dependencies: + "@wdio/config" "6.6.3" + "@wdio/logger" "6.6.0" + "@wdio/protocols" "6.6.0" + "@wdio/utils" "6.7.0" + chrome-launcher "^0.13.1" + edge-paths "^2.1.0" + puppeteer-core "^5.1.0" + ua-parser-js "^0.7.21" + uuid "^8.0.0" + dezalgo@^1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/dezalgo/-/dezalgo-1.0.3.tgz#7f742de066fc748bc8db820569dddce49bf0d456" @@ -5353,6 +5562,11 @@ ecc-jsbn@~0.1.1: jsbn "~0.1.0" safer-buffer "^2.1.0" +edge-paths@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/edge-paths/-/edge-paths-2.1.0.tgz#f273f3a0fe022422048bb78f83eb61aca29977ef" + integrity sha512-ZpIN1Vm5hlo9dkkST/1s8QqPNne2uwk3Plf6HcVUhnpfal0WnDRLdNj/wdQo3xRc+wnN3C25wPpPlV2E6aOunQ== + ee-first@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" @@ -5390,28 +5604,13 @@ electron-builder@^22.9.1: update-notifier "^4.1.1" yargs "^16.0.3" -electron-chromedriver@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/electron-chromedriver/-/electron-chromedriver-8.0.0.tgz#16f6124d481e9312cc18abc16495ddc2d61f8264" - integrity sha512-d0210ExhkGOwYLXFZHQR6LISZ8UbMqXWLwjTe8Cdh44XlO4z4+6DWQfM0p7aB2Qak/An6tN732Yl98wN1ylZww== - dependencies: - electron-download "^4.1.1" - extract-zip "^1.6.7" - -electron-download@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/electron-download/-/electron-download-4.1.1.tgz#02e69556705cc456e520f9e035556ed5a015ebe8" - integrity sha512-FjEWG9Jb/ppK/2zToP+U5dds114fM1ZOJqMAR4aXXL5CvyPE9fiqBK/9YcwC9poIFQTEJk/EM/zyRwziziRZrg== +electron-chromedriver@^10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/electron-chromedriver/-/electron-chromedriver-10.0.0.tgz#cea6ee9f2d67f794b7439074fd70060109a7ff56" + integrity sha512-6jvMnQNHsIFTnvSn8kYQk8dRXFjqtp7E4QVIP4Cc6xR7SM8QI0/EmAqfuysd8CGJOpa8wFkEYxCT2dbHGp3bDw== dependencies: - debug "^3.0.0" - env-paths "^1.0.0" - fs-extra "^4.0.1" - minimist "^1.2.0" - nugget "^2.0.1" - path-exists "^3.0.0" - rc "^1.2.1" - semver "^5.4.1" - sumchecker "^2.0.2" + "@electron/get" "^1.12.2" + extract-zip "^2.0.0" electron-log@^4.2.4: version "4.2.4" @@ -5445,10 +5644,10 @@ electron-updater@^4.3.5: lodash.isequal "^4.5.0" semver "^7.3.2" -electron@10.1.4: - version "10.1.4" - resolved "https://registry.yarnpkg.com/electron/-/electron-10.1.4.tgz#5462c5fac5b4728691042d0f62133ea2c133e6fd" - integrity sha512-5wiiGsif8jd1lS3Qhe9j8oQvUMnoWCvqBwYzzn+BGXGDq8aN8oTdM+j/2NY35Ktt3JrJdjKWcu9b7pDo8kNjbw== +electron@10.1.5: + version "10.1.5" + resolved "https://registry.yarnpkg.com/electron/-/electron-10.1.5.tgz#f2b161310f627063e73fbac44efcb35dece83a90" + integrity sha512-fys/KnEfJq05TtMij+lFvLuKkuVH030CHYx03iZrW5DNNLwjE6cW3pysJ420lB0FRSfPjTHBMu2eVCf5TG71zQ== dependencies: "@electron/get" "^1.0.1" "@types/node" "^12.0.12" @@ -5541,11 +5740,6 @@ entities@^2.0.0: resolved "https://registry.yarnpkg.com/entities/-/entities-2.0.0.tgz#68d6084cab1b079767540d80e56a39b423e4abf4" integrity sha512-D9f7V0JSRwIxlRI2mjMqufDrRDnx8p+eEOz7aUM9SuvF8gsBzra0/6tbjl1m8eQHrZlYj6PxqE00hZ1SAIKPLw== -env-paths@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-1.0.0.tgz#4168133b42bb05c38a35b1ae4397c8298ab369e0" - integrity sha1-QWgTO0K7BcOKNbGuQ5fIKYqzaeA= - env-paths@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.0.tgz#cdca557dc009152917d6166e2febe1f039685e43" @@ -6137,7 +6331,7 @@ extglob@^2.0.4: snapdragon "^0.8.1" to-regex "^3.0.1" -extract-zip@^1.0.3, extract-zip@^1.6.7: +extract-zip@^1.0.3: version "1.7.0" resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-1.7.0.tgz#556cc3ae9df7f452c493a0cfb51cc30277940927" integrity sha512-xoh5G1W/PB0/27lXgMQyIhP5DSY/LhoCsOyZgb+6iMmRtCwVBo55uKaMoEYrDCKQhWvqEip5ZPKAc6eFNyf/MA== @@ -6147,7 +6341,7 @@ extract-zip@^1.0.3, extract-zip@^1.6.7: mkdirp "^0.5.4" yauzl "^2.10.0" -extract-zip@^2.0.1: +extract-zip@^2.0.0, extract-zip@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-2.0.1.tgz#663dca56fe46df890d5f131ef4a06d22bb8ba13a" integrity sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg== @@ -6176,6 +6370,11 @@ fake-indexeddb@^3.1.2: realistic-structured-clone "^2.0.1" setimmediate "^1.0.5" +fast-deep-equal@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" + integrity sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk= + fast-deep-equal@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz#545145077c501491e33b15ec408c294376e94ae4" @@ -6541,15 +6740,6 @@ fs-constants@^1.0.0: resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== -fs-extra@^4.0.1: - version "4.0.3" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94" - integrity sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg== - dependencies: - graceful-fs "^4.1.2" - jsonfile "^4.0.0" - universalify "^0.1.0" - fs-extra@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" @@ -6714,6 +6904,11 @@ get-port@^4.2.0: resolved "https://registry.yarnpkg.com/get-port/-/get-port-4.2.0.tgz#e37368b1e863b7629c43c5a323625f95cf24b119" integrity sha512-/b3jarXkH8KJoOMQc3uVGHASwGLPq3gSFJ7tgJm2diza+bydJPTGOibin2steecKeOylE8oY2JERlVWkAJO6yw== +get-port@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/get-port/-/get-port-5.1.1.tgz#0469ed07563479de6efb986baf053dcd7d4e3193" + integrity sha512-g/Q1aTSDOxFpchXC4i8ZWvxA1lnPqx/JHqcpIw0/LX9T8x/GBbi6YnlN5nhaKIFkT8oFsscUKgDJYxfwfS6QsQ== + get-stdin@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" @@ -6998,6 +7193,23 @@ globule@^1.0.0: lodash "~4.17.10" minimatch "~3.0.2" +got@^11.0.2: + version "11.8.0" + resolved "https://registry.yarnpkg.com/got/-/got-11.8.0.tgz#be0920c3586b07fd94add3b5b27cb28f49e6545f" + integrity sha512-k9noyoIIY9EejuhaBNLyZ31D5328LeqnyPNXJQb2XlJZcKakLqN5m6O/ikhq/0lw56kUYS54fVm+D1x57YC9oQ== + dependencies: + "@sindresorhus/is" "^4.0.0" + "@szmarczak/http-timer" "^4.0.5" + "@types/cacheable-request" "^6.0.1" + "@types/responselike" "^1.0.0" + cacheable-lookup "^5.0.3" + cacheable-request "^7.0.1" + decompress-response "^6.0.0" + http2-wrapper "^1.0.0-beta.5.2" + lowercase-keys "^2.0.0" + p-cancelable "^2.0.0" + responselike "^2.0.0" + got@^6.7.1: version "6.7.1" resolved "https://registry.yarnpkg.com/got/-/got-6.7.1.tgz#240cd05785a9a18e561dc1b44b41c763ef1e8db0" @@ -7453,6 +7665,14 @@ http-signature@~1.2.0: jsprim "^1.2.2" sshpk "^1.7.0" +http2-wrapper@^1.0.0-beta.5.2: + version "1.0.0-beta.5.2" + resolved "https://registry.yarnpkg.com/http2-wrapper/-/http2-wrapper-1.0.0-beta.5.2.tgz#8b923deb90144aea65cf834b016a340fc98556f3" + integrity sha512-xYz9goEyBnC8XwXDTuC/MZ6t+MrKVQZOk4s7+PaDkwIsQd8IwqvM+0M6bA/2lvG8GHXcPdf+MejTUeO2LCPCeQ== + dependencies: + quick-lru "^5.1.1" + resolve-alpn "^1.0.0" + https-browserify@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" @@ -7466,6 +7686,14 @@ https-proxy-agent@^2.2.3: agent-base "^4.3.0" debug "^3.1.0" +https-proxy-agent@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-4.0.0.tgz#702b71fb5520a132a66de1f67541d9e62154d82b" + integrity sha512-zoDhWrkR3of1l9QAL8/scJZyLu8j/gBkcwcaQOZh7Gyh/+uJQzGVETdgT30akuwkpL8HTRfssqI3BZuV18teDg== + dependencies: + agent-base "5" + debug "4" + https-proxy-agent@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz#e2a90542abb68a762e0a0850f6c9edadfd8506b2" @@ -7522,7 +7750,7 @@ identity-obj-proxy@^3.0.0: dependencies: harmony-reflect "^1.4.6" -ieee754@^1.1.4: +ieee754@^1.1.13, ieee754@^1.1.4: version "1.1.13" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84" integrity sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg== @@ -8929,6 +9157,11 @@ json-buffer@3.0.0: resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898" integrity sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg= +json-buffer@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" + integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== + json-parse-better-errors@^1.0.0, json-parse-better-errors@^1.0.1, json-parse-better-errors@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" @@ -9019,6 +9252,13 @@ keyv@^3.0.0: dependencies: json-buffer "3.0.0" +keyv@^4.0.0: + version "4.0.3" + resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.0.3.tgz#4f3aa98de254803cafcd2896734108daa35e4254" + integrity sha512-zdGa2TOpSZPq5mU6iowDARnMBZgtCqJ11dJROFi6tg6kTn4nuUdU09lFyLFSaHrWqpIJ+EBq4E8/Dc0Vx5vLdA== + dependencies: + json-buffer "3.0.1" + kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0, kind-of@^4.0.0, kind-of@^5.0.0, kind-of@^6.0.0, kind-of@^6.0.2, kind-of@^6.0.3: version "6.0.3" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" @@ -9137,6 +9377,14 @@ liftoff@~2.5.0: rechoir "^0.6.2" resolve "^1.1.7" +lighthouse-logger@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/lighthouse-logger/-/lighthouse-logger-1.2.0.tgz#b76d56935e9c137e86a04741f6bb9b2776e886ca" + integrity sha512-wzUvdIeJZhRsG6gpZfmSCfysaxNEr43i+QT+Hie94wvHDKFLi4n7C2GqZ4sTC+PH5b5iktmXJvU87rWvhP3lHw== + dependencies: + debug "^2.6.8" + marky "^1.2.0" + line-column@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/line-column/-/line-column-1.0.2.tgz#d25af2936b6f4849172b312e4792d1d987bc34a2" @@ -9304,6 +9552,11 @@ lodash.ismatch@^4.4.0: resolved "https://registry.yarnpkg.com/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz#756cb5150ca3ba6f11085a78849645f188f85f37" integrity sha1-dWy1FQyjum8RCFp4hJZF8Yj4Xzc= +lodash.isobject@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/lodash.isobject/-/lodash.isobject-3.0.2.tgz#3c8fb8d5b5bf4bf90ae06e14f2a530a4ed935e1d" + integrity sha1-PI+41bW/S/kK4G4U8qUwpO2TXh0= + lodash.isplainobject@^4.0.6: version "4.0.6" resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb" @@ -9314,6 +9567,11 @@ lodash.memoize@4.x: resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" integrity sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4= +lodash.merge@^4.6.1: + version "4.6.2" + resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" + integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== + lodash.set@^4.3.2: version "4.3.2" resolved "https://registry.yarnpkg.com/lodash.set/-/lodash.set-4.3.2.tgz#d8757b1da807dde24816b0d6a84bea1a76230b23" @@ -9349,11 +9607,26 @@ lodash.uniq@^4.5.0: resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= +lodash.zip@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.zip/-/lodash.zip-4.2.0.tgz#ec6662e4896408ed4ab6c542a3990b72cc080020" + integrity sha1-7GZi5IlkCO1KtsVCo5kLcswIACA= + lodash@^4.0.0, lodash@^4.15.0, lodash@^4.17.10, lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.4, lodash@^4.2.1, lodash@^4.3.0, lodash@^4.8.0, lodash@~4.17.10, lodash@~4.17.19, lodash@~4.17.20: version "4.17.20" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52" integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA== +loglevel-plugin-prefix@^0.8.4: + version "0.8.4" + resolved "https://registry.yarnpkg.com/loglevel-plugin-prefix/-/loglevel-plugin-prefix-0.8.4.tgz#2fe0e05f1a820317d98d8c123e634c1bd84ff644" + integrity sha512-WpG9CcFAOjz/FtNht+QJeGpvVl/cdR6P0z6OcXSkr8wFJOsV2GRj2j10JLfjuA4aYkcKCNIEqRGCyTife9R8/g== + +loglevel@^1.6.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.7.0.tgz#728166855a740d59d38db01cf46f042caa041bb0" + integrity sha512-i2sY04nal5jDcagM3FMfG++T69GEEM8CYuOfeOIvmXzOIcwE9a/CJPR0MFM97pYMj/u10lzz7/zd7+qwhrBTqQ== + loose-envify@^1.1.0, loose-envify@^1.2.0, loose-envify@^1.3.1, loose-envify@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" @@ -9503,6 +9776,11 @@ map-visit@^1.0.0: dependencies: object-visit "^1.0.0" +marky@^1.2.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/marky/-/marky-1.2.1.tgz#a3fcf82ffd357756b8b8affec9fdbf3a30dc1b02" + integrity sha512-md9k+Gxa3qLH6sUKpeC2CNkJK/Ld+bEz5X96nYwloqphQE0CKCVEKco/6jxEZixinqNdz5RFi/KaCyfbMDMAXQ== + matcher@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/matcher/-/matcher-2.1.0.tgz#64e1041c15b993e23b786f93320a7474bf833c28" @@ -9552,7 +9830,7 @@ memorystream@^0.3.1: resolved "https://registry.yarnpkg.com/memorystream/-/memorystream-0.3.1.tgz#86d7090b30ce455d63fbae12dda51a47ddcaf9b2" integrity sha1-htcJCzDORV1j+64S3aUaR93K+bI= -meow@^3.1.0, meow@^3.3.0, meow@^3.7.0: +meow@^3.3.0, meow@^3.7.0: version "3.7.0" resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb" integrity sha1-cstmi0JSKCkKu/qFaJJYcwioAfs= @@ -9692,6 +9970,11 @@ mimic-response@^1.0.0, mimic-response@^1.0.1: resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b" integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ== +mimic-response@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-3.1.0.tgz#2d1d59af9c1b129815accc2c46a022a5ce1fa3c9" + integrity sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ== + min-document@^2.19.0: version "2.19.0" resolved "https://registry.yarnpkg.com/min-document/-/min-document-2.19.0.tgz#7bd282e3f5842ed295bb748cdd9f1ffa2c824685" @@ -9755,7 +10038,7 @@ minimist-options@^3.0.1: arrify "^1.0.1" is-plain-obj "^1.1.0" -minimist@^1.1.0, minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0, minimist@^1.2.3, minimist@^1.2.5, minimist@~0.0.1: +minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0, minimist@^1.2.3, minimist@^1.2.5, minimist@~0.0.1: version "1.2.5" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== @@ -9840,6 +10123,11 @@ mjpeg-server@^0.3.0: resolved "https://registry.yarnpkg.com/mjpeg-server/-/mjpeg-server-0.3.0.tgz#af1de13f75642708ba6ec170dfac408bdc5d9737" integrity sha1-rx3hP3VkJwi6bsFw36xAi9xdlzc= +mkdirp-classic@^0.5.2: + version "0.5.3" + resolved "https://registry.yarnpkg.com/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz#fa10c9115cc6d8865be221ba47ee9bed78601113" + integrity sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A== + mkdirp-promise@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/mkdirp-promise/-/mkdirp-promise-5.0.1.tgz#e9b8f68e552c68a9c1713b84883f7a1dd039b8a1" @@ -10332,19 +10620,6 @@ nth-check@~1.0.1: dependencies: boolbase "~1.0.0" -nugget@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/nugget/-/nugget-2.0.1.tgz#201095a487e1ad36081b3432fa3cada4f8d071b0" - integrity sha1-IBCVpIfhrTYIGzQy+jytpPjQcbA= - dependencies: - debug "^2.1.3" - minimist "^1.1.0" - pretty-bytes "^1.0.2" - progress-stream "^1.1.0" - request "^2.45.0" - single-line-log "^1.1.2" - throttleit "0.0.2" - number-is-nan@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" @@ -10402,11 +10677,6 @@ object-keys@^1.0.11, object-keys@^1.0.12, object-keys@^1.1.1: resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== -object-keys@~0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-0.4.0.tgz#28a6aae7428dd2c3a92f3d95f21335dd204e0336" - integrity sha1-KKaq50KN0sOpLz2V8hM13SBOAzY= - object-visit@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" @@ -10619,6 +10889,11 @@ p-cancelable@^1.0.0: resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-1.1.0.tgz#d078d15a3af409220c886f1d9a0ca2e441ab26cc" integrity sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw== +p-cancelable@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-2.0.0.tgz#4a3740f5bdaf5ed5d7c3e34882c6fb5d6b266a6e" + integrity sha512-wvPXDmbMmu2ksjkB4Z3nZWTSkJEb9lqVdMaCKpZUGJG9TMiNp9XcbG3fn9fPKjem04fJMJnXoyFPk2FmgiaiNg== + p-each-series@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/p-each-series/-/p-each-series-2.1.0.tgz#961c8dd3f195ea96c747e636b262b800a6b1af48" @@ -11356,14 +11631,6 @@ prettier@^2.1.2: resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.1.2.tgz#3050700dae2e4c8b67c4c3f666cdb8af405e1ce5" integrity sha512-16c7K+x4qVlJg9rEbXl7HEGmQyZlG4R9AgP+oHKRMsMsuk8s+ATStlf1NpDqyBI1HpVyfjLOeMhH2LvuNvV5Vg== -pretty-bytes@^1.0.2: - version "1.0.4" - resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-1.0.4.tgz#0a22e8210609ad35542f8c8d5d2159aff0751c84" - integrity sha1-CiLoIQYJrTVUL4yNXSFZr/B1HIQ= - dependencies: - get-stdin "^4.0.1" - meow "^3.1.0" - pretty-format@^24.9.0: version "24.9.0" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-24.9.0.tgz#12fac31b37019a4eea3c11aa9a959eb7628aa7c9" @@ -11399,15 +11666,7 @@ process@~0.5.1: resolved "https://registry.yarnpkg.com/process/-/process-0.5.2.tgz#1638d8a8e34c2f440a91db95ab9aeb677fc185cf" integrity sha1-FjjYqONML0QKkduVq5rrZ3/Bhc8= -progress-stream@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/progress-stream/-/progress-stream-1.2.0.tgz#2cd3cfea33ba3a89c9c121ec3347abe9ab125f77" - integrity sha1-LNPP6jO6OonJwSHsM0er6asSX3c= - dependencies: - speedometer "~0.1.2" - through2 "~0.2.3" - -progress@^2.0.0, progress@^2.0.3: +progress@^2.0.0, progress@^2.0.1, progress@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== @@ -11492,7 +11751,7 @@ proxy-addr@~2.0.5: forwarded "~0.1.2" ipaddr.js "1.9.0" -proxy-from-env@^1.1.0: +proxy-from-env@^1.0.0, proxy-from-env@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== @@ -11571,6 +11830,24 @@ pupa@^2.0.1: dependencies: escape-goat "^2.0.0" +puppeteer-core@^5.1.0: + version "5.4.1" + resolved "https://registry.yarnpkg.com/puppeteer-core/-/puppeteer-core-5.4.1.tgz#68b85c1aae2dcde8e41df1d12aad8852768a88bd" + integrity sha512-JfPCQgLvyBlpwQTbdnEwCEvD2KiRB2Hv+J1YCwz9o0PxlTqVSuzSQ4XeLhPmy6fZpBFynyQ+r4FSn6RUywawqA== + dependencies: + debug "^4.1.0" + devtools-protocol "0.0.809251" + extract-zip "^2.0.0" + https-proxy-agent "^4.0.0" + node-fetch "^2.6.1" + pkg-dir "^4.2.0" + progress "^2.0.1" + proxy-from-env "^1.0.0" + rimraf "^3.0.2" + tar-fs "^2.0.0" + unbzip2-stream "^1.3.3" + ws "^7.2.3" + q@1.5.1, q@^1.5.1, q@~1.5.0: version "1.5.1" resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" @@ -11611,6 +11888,11 @@ quick-lru@^4.0.1: resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-4.0.1.tgz#5b8878f113a58217848c6482026c73e1ba57727f" integrity sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g== +quick-lru@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-5.1.1.tgz#366493e6b3e42a3a6885e2e99d18f80fb7a8c932" + integrity sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA== + raf-schd@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/raf-schd/-/raf-schd-4.0.2.tgz#bd44c708188f2e84c810bf55fcea9231bcaed8a0" @@ -11679,7 +11961,7 @@ raw-loader@~0.5.1: resolved "https://registry.yarnpkg.com/raw-loader/-/raw-loader-0.5.1.tgz#0c3d0beaed8a01c966d9787bf778281252a979aa" integrity sha1-DD0L6u2KAclm2Xh793goElKpeao= -rc@^1.0.1, rc@^1.1.6, rc@^1.2.1, rc@^1.2.7, rc@^1.2.8: +rc@^1.0.1, rc@^1.1.6, rc@^1.2.7, rc@^1.2.8: version "1.2.8" resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== @@ -11934,7 +12216,7 @@ read@1, read@~1.0.1: string_decoder "^1.1.1" util-deprecate "^1.0.1" -readable-stream@^1.0.31, readable-stream@~1.1.9: +readable-stream@^1.0.31: version "1.1.14" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" integrity sha1-fPTFTvZI44EwhMY23SB54WbAgdk= @@ -11957,6 +12239,13 @@ readable-stream@^2.1.4, readable-stream@^2.3.7: string_decoder "~1.1.1" util-deprecate "~1.0.1" +readdir-glob@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/readdir-glob/-/readdir-glob-1.1.1.tgz#f0e10bb7bf7bfa7e0add8baffdc54c3f7dbee6c4" + integrity sha512-91/k1EzZwDx6HbERR+zucygRFfiPl2zkIYZtv3Jjr6Mn7SkKcVct8aVO+sSRiGMc6fLf72du3d92/uY63YPdEA== + dependencies: + minimatch "^3.0.4" + readdir-scoped-modules@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/readdir-scoped-modules/-/readdir-scoped-modules-1.1.0.tgz#8d45407b4f870a0dcaebc0e28670d18e74514309" @@ -12173,7 +12462,7 @@ request-promise-native@^1.0.8: stealthy-require "^1.1.1" tough-cookie "^2.3.3" -request@^2.45.0, request@^2.83.0, request@^2.87.0, request@^2.88.0: +request@^2.83.0, request@^2.87.0, request@^2.88.0: version "2.88.0" resolved "https://registry.yarnpkg.com/request/-/request-2.88.0.tgz#9c2fca4f7d35b592efe57c7f0a55e81052124fef" integrity sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg== @@ -12245,6 +12534,11 @@ resize-observer-polyfill@^1.5.1: resolved "https://registry.yarnpkg.com/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz#0e9020dd3d21024458d4ebd27e23e40269810464" integrity sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg== +resolve-alpn@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/resolve-alpn/-/resolve-alpn-1.0.0.tgz#745ad60b3d6aff4b4a48e01b8c0bdc70959e0e8c" + integrity sha512-rTuiIEqFmGxne4IovivKSDzld2lWW9QCjqv80SYjPgf+gS35eaCAjaP54CCwGAwBtnCsvNLYtqxe1Nw+i6JEmA== + resolve-cwd@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-2.0.0.tgz#00a9f7387556e27038eae232caa372a6a59b665a" @@ -12307,6 +12601,20 @@ responselike@^1.0.2: dependencies: lowercase-keys "^1.0.0" +responselike@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/responselike/-/responselike-2.0.0.tgz#26391bcc3174f750f9a79eacc40a12a5c42d7723" + integrity sha512-xH48u3FTB9VsZw7R+vvgaKeLKzT6jOogbQhEe/jewwnZgzPcnyWui2Av6JpoYZF/91uueC+lqhWqeURw5/qhCw== + dependencies: + lowercase-keys "^2.0.0" + +resq@^1.9.1: + version "1.9.2" + resolved "https://registry.yarnpkg.com/resq/-/resq-1.9.2.tgz#f674b061b22b415225edb4d0b20c33a85f949fc1" + integrity sha512-Y+fprJ9wQY64gh+vJRNatiG61G+9XD5jJe4kI/Rqw6gmOa5ihZvgrxZVydqyM96xj75jwaRCPVYPU3RwsEk6ug== + dependencies: + fast-deep-equal "^2.0.1" + restore-cursor@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" @@ -12340,6 +12648,11 @@ rgb2hex@^0.1.9: resolved "https://registry.yarnpkg.com/rgb2hex/-/rgb2hex-0.1.10.tgz#4fdd432665273e2d5900434940ceba0a04c8a8a8" integrity sha512-vKz+kzolWbL3rke/xeTE2+6vHmZnNxGyDnaVW4OckntAIcc7DcZzWkQSfxMDwqHS8vhgySnIFyBUH7lIk6PxvQ== +rgb2hex@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/rgb2hex/-/rgb2hex-0.2.0.tgz#801b4887127181d1e691f610df2cecdb77330265" + integrity sha512-cHdNTwmTMPu/TpP1bJfdApd6MbD+Kzi4GNnM6h35mdFChhQPSi9cAI8J7DMn5kQDKX8NuBaQXAyo360Oa7tOEA== + rimraf@2, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@^2.6.3: version "2.7.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" @@ -12649,6 +12962,13 @@ serialize-error@^5.0.0: dependencies: type-fest "^0.8.0" +serialize-error@^7.0.0: + version "7.0.1" + resolved "https://registry.yarnpkg.com/serialize-error/-/serialize-error-7.0.1.tgz#f1360b0447f61ffb483ec4157c737fab7d778e18" + integrity sha512-8I8TjW5KMOKsZQTvoxjuSIa7foAwPWGOts+6o7sgjz41/qMD9VQHEDxi6PBvK2l0MXUmqZyNpUK+T2tQaaElvw== + dependencies: + type-fest "^0.13.1" + serialize-javascript@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-2.1.2.tgz#ecec53b0e0317bdc95ef76ab7074b7384785fa61" @@ -12767,13 +13087,6 @@ simple-git@^2.21.0: "@kwsites/promise-deferred" "^1.1.1" debug "^4.1.1" -single-line-log@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/single-line-log/-/single-line-log-1.1.2.tgz#c2f83f273a3e1a16edb0995661da0ed5ef033364" - integrity sha1-wvg/Jzo+GhbtsJlWYdoO1e8DM2Q= - dependencies: - string-width "^1.0.1" - sisteransi@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.4.tgz#386713f1ef688c7c0304dc4c0632898941cad2e3" @@ -12950,22 +13263,16 @@ spdx-license-ids@^3.0.0: resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz#3694b5804567a458d3c8045842a6358632f62654" integrity sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q== -spectron@^10.0.1: - version "10.0.1" - resolved "https://registry.yarnpkg.com/spectron/-/spectron-10.0.1.tgz#d89fdd3c9625c7dbb5d1f047fda7cb922eda0125" - integrity sha512-eMAOr7ovYf+e6+DhkoxVWAMRfZvLJMjtZKwWYkL56fv3Ij6rxhYLjOxybKj0phgMYZ7o2cX5zu2NoyiUM756CA== +spectron@12.0.0: + version "12.0.0" + resolved "https://registry.yarnpkg.com/spectron/-/spectron-12.0.0.tgz#8a3454a1366cdb82fbb6be75be0104915b607340" + integrity sha512-ZyDFS7I+4dWa/YXSQ/trbC4s1Rd0Ks5oi4MQ6XSJHULPasJhx5q2bM93Ae7BNUvwrGrbhjk7O6f14JwqJimLyA== dependencies: - "@types/webdriverio" "^4.8.0" dev-null "^0.1.1" - electron-chromedriver "^8.0.0" + electron-chromedriver "^10.0.0" request "^2.87.0" split "^1.0.0" - webdriverio "^4.13.0" - -speedometer@~0.1.2: - version "0.1.4" - resolved "https://registry.yarnpkg.com/speedometer/-/speedometer-0.1.4.tgz#9876dbd2a169d3115402d48e6ea6329c8816a50d" - integrity sha1-mHbb0qFp0xFUAtSObqYynIgWpQ0= + webdriverio "^6.1.20" split-string@^3.0.1, split-string@^3.0.2: version "3.1.0" @@ -13357,13 +13664,6 @@ stubs@^3.0.0: resolved "https://registry.yarnpkg.com/stubs/-/stubs-3.0.0.tgz#e8d2ba1fa9c90570303c030b6900f7d5f89abe5b" integrity sha1-6NK6H6nJBXAwPAMLaQD31fiavls= -sumchecker@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/sumchecker/-/sumchecker-2.0.2.tgz#0f42c10e5d05da5d42eea3e56c3399a37d6c5b3e" - integrity sha1-D0LBDl0F2l1C7qPlbDOZo31sWz4= - dependencies: - debug "^2.2.0" - sumchecker@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/sumchecker/-/sumchecker-3.0.1.tgz#6377e996795abb0b6d348e9b3e1dfb24345a8e42" @@ -13442,6 +13742,16 @@ tapable@^1.0.0, tapable@^1.1.3: resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== +tar-fs@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-2.1.0.tgz#d1cdd121ab465ee0eb9ccde2d35049d3f3daf0d5" + integrity sha512-9uW5iDvrIMCVpvasdFHW0wJPez0K4JnMZtsuIeDI7HyMGJNxmDZDOCQROr7lXyS+iL/QMpj07qcjGYTSdRFXUg== + dependencies: + chownr "^1.1.1" + mkdirp-classic "^0.5.2" + pump "^3.0.0" + tar-stream "^2.0.0" + tar-stream@^1.5.0: version "1.6.2" resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-1.6.2.tgz#8ea55dab37972253d9a9af90fdcd559ae435c555" @@ -13455,6 +13765,17 @@ tar-stream@^1.5.0: to-buffer "^1.1.1" xtend "^4.0.0" +tar-stream@^2.0.0, tar-stream@^2.1.4: + version "2.1.4" + resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.1.4.tgz#c4fb1a11eb0da29b893a5b25476397ba2d053bfa" + integrity sha512-o3pS2zlG4gxr67GmFYBLlq+dM8gyRGUOvsrHclSkvtVtQbjV0s/+ZE8OpICbaj8clrX3tjeHngYGP7rweaBnuw== + dependencies: + bl "^4.0.3" + end-of-stream "^1.4.1" + fs-constants "^1.0.0" + inherits "^2.0.3" + readable-stream "^3.1.1" + tar-stream@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.1.2.tgz#6d5ef1a7e5783a95ff70b69b97455a5968dc1325" @@ -13653,11 +13974,6 @@ throat@^5.0.0: resolved "https://registry.yarnpkg.com/throat/-/throat-5.0.0.tgz#c5199235803aad18754a667d659b5e72ce16764b" integrity sha512-fcwX4mndzpLQKBS1DVYhGAcYaYt7vsHNIvQV+WXMvnow5cgjPphq5CaayLaGsjRdSCKZFNGt7/GYAuXaNOiYCA== -throttleit@0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/throttleit/-/throttleit-0.0.2.tgz#cfedf88e60c00dd9697b61fdd2a8343a9b680eaf" - integrity sha1-z+34jmDADdlpe2H90qg0OptoDq8= - throttleit@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/throttleit/-/throttleit-1.0.0.tgz#9e785836daf46743145a5984b6268d828528ac6c" @@ -13679,15 +13995,7 @@ through2@^3.0.0: inherits "^2.0.4" readable-stream "2 || 3" -through2@~0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/through2/-/through2-0.2.3.tgz#eb3284da4ea311b6cc8ace3653748a52abf25a3f" - integrity sha1-6zKE2k6jEbbMis42U3SKUqvyWj8= - dependencies: - readable-stream "~1.1.9" - xtend "~2.1.1" - -through@2, "through@>=2.2.7 <3", through@^2.3.4, through@^2.3.6, through@~2.3.4: +through@2, "through@>=2.2.7 <3", through@^2.3.4, through@^2.3.6, through@^2.3.8, through@~2.3.4: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= @@ -14066,7 +14374,7 @@ typical@^5.0.0, typical@^5.2.0: resolved "https://registry.yarnpkg.com/typical/-/typical-5.2.0.tgz#4daaac4f2b5315460804f0acf6cb69c52bb93066" integrity sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg== -ua-parser-js@^0.7.22: +ua-parser-js@^0.7.21, ua-parser-js@^0.7.22: version "0.7.22" resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.22.tgz#960df60a5f911ea8f1c818f3747b99c6e177eae3" integrity sha512-YUxzMjJ5T71w6a8WWVcMGM6YWOTX27rCoIQgLXiWaxqXSx9D7DNjiGWn1aJIRSQ5qr0xuhra77bSIh6voR/46Q== @@ -14091,6 +14399,14 @@ umask@^1.1.0: resolved "https://registry.yarnpkg.com/umask/-/umask-1.1.0.tgz#f29cebf01df517912bb58ff9c4e50fde8e33320d" integrity sha1-8pzr8B31F5ErtY/5xOUP3o4zMg0= +unbzip2-stream@^1.3.3: + version "1.4.3" + resolved "https://registry.yarnpkg.com/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz#b0da04c4371311df771cdc215e87f2130991ace7" + integrity sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg== + dependencies: + buffer "^5.2.1" + through "^2.3.8" + unc-path-regex@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa" @@ -14463,6 +14779,19 @@ wdio-dot-reporter@~0.0.8: resolved "https://registry.yarnpkg.com/wdio-dot-reporter/-/wdio-dot-reporter-0.0.10.tgz#facfb7c9c5984149951f59cbc3cd0752101cf0e0" integrity sha512-A0TCk2JdZEn3M1DSG9YYbNRcGdx/YRw19lTiRpgwzH4qqWkO/oRDZRmi3Snn4L2j54KKTfPalBhlOtc8fojVgg== +webdriver@6.7.0: + version "6.7.0" + resolved "https://registry.yarnpkg.com/webdriver/-/webdriver-6.7.0.tgz#6b2f76119379a948b3cc81baeb8cd271355debd5" + integrity sha512-2eq2ZEx91o+AFETK+sjY/oUzzjGVKal9X7GCMGivEF5GRtmAQBfkSQkqAG3Z4t78JZyhhClemoAChCNGV2naOQ== + dependencies: + "@types/lodash.merge" "^4.6.6" + "@wdio/config" "6.6.3" + "@wdio/logger" "6.6.0" + "@wdio/protocols" "6.6.0" + "@wdio/utils" "6.7.0" + got "^11.0.2" + lodash.merge "^4.6.1" + webdriverio@^4.13.0: version "4.14.4" resolved "https://registry.yarnpkg.com/webdriverio/-/webdriverio-4.14.4.tgz#f7a94e9a6530819796088f42b009833d83de0386" @@ -14491,6 +14820,36 @@ webdriverio@^4.13.0: wdio-dot-reporter "~0.0.8" wgxpath "~1.0.0" +webdriverio@^6.1.20: + version "6.7.0" + resolved "https://registry.yarnpkg.com/webdriverio/-/webdriverio-6.7.0.tgz#41001775608b83a93172d43b3f61dc298daf8869" + integrity sha512-B9jmtHEa8Di/db/MxIIf7kD5uopbgtUdKzgYRIt4Wq6edAOfq9rwV7Jz8yJfD7dJdAOD4GQGXEkFLmxEqPqMZQ== + dependencies: + "@types/atob" "^2.1.2" + "@types/fs-extra" "^9.0.2" + "@types/puppeteer" "^3.0.1" + "@wdio/config" "6.6.3" + "@wdio/logger" "6.6.0" + "@wdio/repl" "6.7.0" + "@wdio/utils" "6.7.0" + archiver "^5.0.0" + atob "^2.1.2" + css-value "^0.0.1" + devtools "6.7.0" + fs-extra "^9.0.1" + get-port "^5.1.1" + grapheme-splitter "^1.0.2" + lodash.clonedeep "^4.5.0" + lodash.isobject "^3.0.2" + lodash.isplainobject "^4.0.6" + lodash.zip "^4.2.0" + minimatch "^3.0.4" + puppeteer-core "^5.1.0" + resq "^1.9.1" + rgb2hex "^0.2.0" + serialize-error "^7.0.0" + webdriver "6.7.0" + webextension-polyfill-ts@^0.20.0: version "0.20.0" resolved "https://registry.yarnpkg.com/webextension-polyfill-ts/-/webextension-polyfill-ts-0.20.0.tgz#1f83bf745492a9eb394f0e18fa229e0a9e8c645d" @@ -14871,13 +15230,6 @@ xtend@^4.0.0, xtend@~4.0.1: resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== -xtend@~2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-2.1.2.tgz#6efecc2a4dad8e6962c4901b337ce7ba87b5d28b" - integrity sha1-bv7MKk2tjmlixJAbM3znuoe10os= - dependencies: - object-keys "~0.4.0" - y18n@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" @@ -14959,3 +15311,12 @@ zip-stream@^3.0.1: archiver-utils "^2.1.0" compress-commons "^3.0.0" readable-stream "^3.6.0" + +zip-stream@^4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/zip-stream/-/zip-stream-4.0.2.tgz#3a20f1bd7729c2b59fd4efa04df5eb7a5a217d2e" + integrity sha512-TGxB2g+1ur6MHkvM644DuZr8Uzyz0k0OYWtS3YlpfWBEmK4woaC2t3+pozEL3dBfIPmpgmClR5B2QRcMgGt22g== + dependencies: + archiver-utils "^2.1.0" + compress-commons "^4.0.0" + readable-stream "^3.6.0" From fa1bb5170d72f4381c11bd8b9189bcb3fbd607e4 Mon Sep 17 00:00:00 2001 From: karan Date: Tue, 27 Oct 2020 17:52:51 -0700 Subject: [PATCH 03/26] unit test updates --- src/electron/main/main.ts | 2 +- .../common/scan-for-accessibility-issues.ts | 7 +- .../common/view-controllers/app-controller.ts | 29 ++++--- .../automated-checks-view-controller.ts | 2 +- .../view-controllers/spectron-async-client.ts | 81 +++++++++++++++---- .../view-controllers/view-controller.ts | 14 ++-- .../tests/automated-checks-view.test.ts | 13 ++- 7 files changed, 98 insertions(+), 50 deletions(-) diff --git a/src/electron/main/main.ts b/src/electron/main/main.ts index f7c22b2077d..929d127114d 100644 --- a/src/electron/main/main.ts +++ b/src/electron/main/main.ts @@ -37,7 +37,7 @@ const electronAutoUpdateCheck = new AutoUpdaterClient(autoUpdater); const createWindow = () => { mainWindow = new BrowserWindow({ show: false, - webPreferences: { nodeIntegration: true }, + webPreferences: { nodeIntegration: true, enableRemoteModule: true }, titleBarStyle: 'hidden', width: mainWindowConfig.defaultWidth, height: mainWindowConfig.defaultHeight, diff --git a/src/tests/electron/common/scan-for-accessibility-issues.ts b/src/tests/electron/common/scan-for-accessibility-issues.ts index dd8acf9b03c..e82b33e7964 100644 --- a/src/tests/electron/common/scan-for-accessibility-issues.ts +++ b/src/tests/electron/common/scan-for-accessibility-issues.ts @@ -39,7 +39,7 @@ async function runAxeScan( }, }; - const executeOutput = await spectronClient.executeAsync( + const axeResults = await spectronClient.executeAsync( (options, selectorInEvaluate, done) => { const elementContext = selectorInEvaluate === null ? document : { include: [selectorInEvaluate] }; @@ -55,11 +55,6 @@ async function runAxeScan( selector, ); - // This is how webdriverio indicates success - expect(executeOutput).toHaveProperty('status', 0); - - const axeResults = executeOutput.value; - return prettyPrintAxeViolations(axeResults); } diff --git a/src/tests/electron/common/view-controllers/app-controller.ts b/src/tests/electron/common/view-controllers/app-controller.ts index 31e7a5152a7..0638c732134 100644 --- a/src/tests/electron/common/view-controllers/app-controller.ts +++ b/src/tests/electron/common/view-controllers/app-controller.ts @@ -4,7 +4,10 @@ import { AndroidSetupStepId } from 'electron/platform/android/setup/android-setu import { Application } from 'spectron'; import { AndroidSetupViewController } from 'tests/electron/common/view-controllers/android-setup-view-controller'; import { DeviceConnectionDialogController } from 'tests/electron/common/view-controllers/device-connection-dialog-controller'; -import { SpectronAsyncClient } from 'tests/electron/common/view-controllers/spectron-async-client'; +import { + getSpectronAsyncClient, + SpectronAsyncClient, +} from 'tests/electron/common/view-controllers/spectron-async-client'; import { DEFAULT_WAIT_FOR_ELEMENT_TO_BE_VISIBLE_TIMEOUT_MS } from 'tests/electron/setup/timeouts'; import { AutomatedChecksViewController } from './automated-checks-view-controller'; @@ -12,7 +15,7 @@ export class AppController { public client: SpectronAsyncClient; constructor(public app: Application) { - this.client = app.client as any; + this.client = getSpectronAsyncClient(app.client, app.browserWindow); } public async stop(): Promise { @@ -71,13 +74,15 @@ export class AppController { await this.client.waitUntil( async () => { - const classes = await this.client.getAttribute('body', 'class'); + const classes = await this.client.getAttribute('body', 'class'); return expectedHighContrastMode === classes.includes(highContrastThemeClass); }, - DEFAULT_WAIT_FOR_ELEMENT_TO_BE_VISIBLE_TIMEOUT_MS, - `was expecting body element ${ - expectedHighContrastMode ? 'with' : 'without' - } class high-contrast-theme`, + { + timeout: DEFAULT_WAIT_FOR_ELEMENT_TO_BE_VISIBLE_TIMEOUT_MS, + timeoutMsg: `was expecting body element ${ + expectedHighContrastMode ? 'with' : 'without' + } class high-contrast-theme`, + }, ); } @@ -102,14 +107,14 @@ export class AppController { ): Promise { await this.client.waitUntil( async () => { - const executeOutput = await this.client.executeAsync((prop, done) => { + return await this.client.executeAsync((prop, done) => { done((window as any)[prop] != null); }, propertyName); - - return executeOutput.status === 0 && executeOutput.value === true; }, - DEFAULT_WAIT_FOR_ELEMENT_TO_BE_VISIBLE_TIMEOUT_MS, - `was expecting window.${propertyName} to be defined`, + { + timeout: DEFAULT_WAIT_FOR_ELEMENT_TO_BE_VISIBLE_TIMEOUT_MS, + timeoutMsg: `was expecting window.${propertyName} to be defined`, + }, ); } } diff --git a/src/tests/electron/common/view-controllers/automated-checks-view-controller.ts b/src/tests/electron/common/view-controllers/automated-checks-view-controller.ts index 1402d3d969d..dcd08c0c56b 100644 --- a/src/tests/electron/common/view-controllers/automated-checks-view-controller.ts +++ b/src/tests/electron/common/view-controllers/automated-checks-view-controller.ts @@ -48,7 +48,7 @@ export class AutomatedChecksViewController extends ViewController { public async setToggleState(toggleSelector: string, newState: boolean): Promise { await this.waitForSelector(toggleSelector); - const oldState = await this.client.getAttribute(toggleSelector, 'aria-checked'); + const oldState = await this.client.getAttribute(toggleSelector, 'aria-checked'); const oldStateBool = oldState.toLowerCase() === 'true'; if (oldStateBool !== newState) { diff --git a/src/tests/electron/common/view-controllers/spectron-async-client.ts b/src/tests/electron/common/view-controllers/spectron-async-client.ts index e0ea3e7704b..2084cf2f352 100644 --- a/src/tests/electron/common/view-controllers/spectron-async-client.ts +++ b/src/tests/electron/common/view-controllers/spectron-async-client.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { SpectronWindow } from 'spectron'; +import { SpectronClient, SpectronWindow } from 'spectron'; import * as WebDriverIO from 'webdriverio'; // spectron 10.0.1 includes @types/webdriverio, whose absence @@ -11,29 +11,80 @@ import * as WebDriverIO from 'webdriverio'; // @types/webdriver has been superceded by improved types // in webdriverio 5 directly, but Spectron has not consumed them +export function getSpectronAsyncClient(client: SpectronClient, browserWindow: SpectronWindow) { + const typedAsyncClient: SpectronAsyncClient = { + browserWindow, + $: (selector: string) => client.$(selector), + $$: (selector: string) => client.$$(selector), + click: async (selector?: string) => { + const element = await client.$(selector); + return await element.click(); + }, + execute: (script: string | ((...args: any[]) => void), ...args: any[]) => + client.execute(script, ...args), + executeAsync: (script: string | ((...args: any[]) => void), ...args: any[]) => + client.executeAsync(script, ...args), + getAttribute: async (selector: string, attributeName: string) => { + const element = await client.$(selector); + return await element.getAttribute(attributeName); + }, + getText: async (selector: string) => { + const element = await client.$(selector); + return await element.getText(); + }, + isEnabled: async (selector: string) => { + const element = await client.$(selector); + return await element.isEnabled(); + }, + keys: (keys: string) => client.keys(keys), + pause: (milliseconds: number) => client.pause(milliseconds), + waitForEnabled: async (selector: string, milliseconds?: number, reverse?: boolean) => { + const element = await client.$(selector); + return await element.waitForEnabled({ + timeout: milliseconds, + reverse, + }); + }, + waitForExist: async ( + selector: string, + milliseconds?: number, + reverse?: boolean, + timeoutMsg?: string, + ) => { + const element = await client.$(selector); + return await element.waitForExist({ + timeout: milliseconds, + reverse, + timeoutMsg, + }); + }, + waitUntil: (condition: () => Promise, options?: WebDriverIO.WaitUntilOptions) => + client.waitUntil(condition, options), + }; + return typedAsyncClient as SpectronAsyncClient; +} + export interface SpectronAsyncClient { - // https://github.com/electron-userland/spectron/blob/cd733c4bc6b28eb5a1041ed79eef5563e75432ae/lib/api.js#L311 + $(selector: string): Promise; + $$(selector: string): Promise; browserWindow: SpectronWindow; - - $(selector: string): Promise>; - $$(selector: string): Promise[]>; click(selector?: string): Promise; - executeAsync(script: string | ((...args: any[]) => void), ...args: any[]): Promise; execute(script: string | ((...args: any[]) => void), ...args: any[]): Promise; - getAttribute

(selector: string, attributeName: string): Promise

; + executeAsync(script: string | ((...args: any[]) => void), ...args: any[]): Promise; + getAttribute(selector: string, attributeName: string): Promise; getText(selector?: string): Promise; isEnabled(selector?: string): Promise; keys(keys: string): Promise; pause(milliseconds: number): Promise; waitForEnabled(selector: string, milliseconds?: number, reverse?: boolean): Promise; - waitForExist(selector: string, milliseconds?: number, reverse?: boolean): Promise; - waitUntil( - condition: () => - | boolean - | Promise - | (WebDriverIO.Client> & WebDriverIO.RawResult), - timeout?: number, + waitForExist( + selector: string, + milliseconds?: number, + reverse?: boolean, timeoutMsg?: string, - interval?: number, + ): Promise; + waitUntil( + condition: () => Promise, + options?: WebDriverIO.WaitUntilOptions, ): Promise; } diff --git a/src/tests/electron/common/view-controllers/view-controller.ts b/src/tests/electron/common/view-controllers/view-controller.ts index 1d2bf1380c3..bb80d9163a4 100644 --- a/src/tests/electron/common/view-controllers/view-controller.ts +++ b/src/tests/electron/common/view-controllers/view-controller.ts @@ -29,8 +29,10 @@ export abstract class ViewController { async () => { return (await this.client.$$(selector)).length === expectedNumber; }, - timeout, - `expected to find ${expectedNumber} matches for selector ${selector} within ${timeout}ms`, + { + timeout, + timeoutMsg: `expected to find ${expectedNumber} matches for selector ${selector} within ${timeout}ms`, + }, ); }); } @@ -40,12 +42,10 @@ export abstract class ViewController { timeout: number = DEFAULT_WAIT_FOR_ELEMENT_TO_BE_VISIBLE_TIMEOUT_MS, ): Promise { await this.screenshotOnError(async () => - this.client.waitUntil( - async () => { - const selected = await this.client.$(selector); - return selected.value === null; - }, + this.client.waitForExist( + selector, timeout, + true, `was expecting element by selector ${selector} to disappear`, ), ); diff --git a/src/tests/electron/tests/automated-checks-view.test.ts b/src/tests/electron/tests/automated-checks-view.test.ts index 07af8503e81..1298968898d 100644 --- a/src/tests/electron/tests/automated-checks-view.test.ts +++ b/src/tests/electron/tests/automated-checks-view.test.ts @@ -42,7 +42,7 @@ describe('AutomatedChecksView', () => { it('should use the expected window title', async () => { expect(await app.getTitle()).toBe('Accessibility Insights for Android - Automated checks'); }); - /* + it('displays automated checks results collapsed by default', async () => { automatedChecksView.waitForRuleGroupCount(3); @@ -150,7 +150,7 @@ describe('AutomatedChecksView', () => { const expectedScreenshotImage = 'data:image/png;base64,' + axeRuleResultExample.axeContext.screenshot; - const actualScreenshotImage = await automatedChecksView.client.getAttribute( + const actualScreenshotImage = await automatedChecksView.client.getAttribute( ScreenshotViewSelectors.screenshotImage, 'src', ); @@ -160,11 +160,8 @@ describe('AutomatedChecksView', () => { it('ScreenshotView renders expected number/size of highlight boxes in expected positions', async () => { await automatedChecksView.waitForScreenshotViewVisible(); - const styles = await automatedChecksView.client.getAttribute( - ScreenshotViewSelectors.highlightBox, - 'style', - ); - + const boxes = await automatedChecksView.client.$$(ScreenshotViewSelectors.highlightBox); + const styles = await Promise.all(boxes.map(async b => await b.getAttribute('style'))); const actualHighlightBoxStyles = styles.map(extractPositionStyles); verifyHighlightBoxStyles(actualHighlightBoxStyles, [ { width: 10.7407, height: 6.04167, top: 3.28125, left: 89.2593 }, @@ -206,5 +203,5 @@ describe('AutomatedChecksView', () => { expect(boxStyle.width).toBeCloseTo(expectedHighlightBoxStyles[index].width); expect(boxStyle.height).toBeCloseTo(expectedHighlightBoxStyles[index].height); }); - }*/ + } }); From d705b7400d131ae08040ddaf8cfce07f0277009d Mon Sep 17 00:00:00 2001 From: karan Date: Tue, 27 Oct 2020 17:54:38 -0700 Subject: [PATCH 04/26] update asset number --- pipeline/scripts/download-electron-mirror.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipeline/scripts/download-electron-mirror.js b/pipeline/scripts/download-electron-mirror.js index 389b3d774a6..c0747cc3866 100644 --- a/pipeline/scripts/download-electron-mirror.js +++ b/pipeline/scripts/download-electron-mirror.js @@ -27,7 +27,7 @@ if ( process.exit(1); } -const assetNumber = '5424028'; +const assetNumber = '6179765'; const downloadMirrors = async () => { await downloadElectronArtifact('electron', 'node_modules/electron/dist'); From 3f13dc30b0645693fe97a565d3c017f67af59002 Mon Sep 17 00:00:00 2001 From: karan Date: Tue, 27 Oct 2020 18:07:32 -0700 Subject: [PATCH 05/26] some cleaning --- src/tests/electron/common/create-application.ts | 2 -- .../electron/common/view-controllers/spectron-async-client.ts | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/tests/electron/common/create-application.ts b/src/tests/electron/common/create-application.ts index 6eaa55bce1d..dcdff2971c2 100644 --- a/src/tests/electron/common/create-application.ts +++ b/src/tests/electron/common/create-application.ts @@ -43,8 +43,6 @@ export async function createAppController( connectionRetryCount: DEFAULT_APP_CONNECT_RETRIES, connectionRetryTimeout: DEFAULT_APP_CONNECT_TIMEOUT_MS, ...overrideSpectronOptions, - chromeDriverLogPath: `C:/Users/karansin/chromedriverlogs.txt`, - webdriverLogPath: `C:/Users/karansin/logs`, }); await app.start(); return new AppController(app); diff --git a/src/tests/electron/common/view-controllers/spectron-async-client.ts b/src/tests/electron/common/view-controllers/spectron-async-client.ts index 2084cf2f352..d5917a29a33 100644 --- a/src/tests/electron/common/view-controllers/spectron-async-client.ts +++ b/src/tests/electron/common/view-controllers/spectron-async-client.ts @@ -65,12 +65,12 @@ export function getSpectronAsyncClient(client: SpectronClient, browserWindow: Sp } export interface SpectronAsyncClient { + browserWindow: SpectronWindow; $(selector: string): Promise; $$(selector: string): Promise; - browserWindow: SpectronWindow; click(selector?: string): Promise; - execute(script: string | ((...args: any[]) => void), ...args: any[]): Promise; executeAsync(script: string | ((...args: any[]) => void), ...args: any[]): Promise; + execute(script: string | ((...args: any[]) => void), ...args: any[]): Promise; getAttribute(selector: string, attributeName: string): Promise; getText(selector?: string): Promise; isEnabled(selector?: string): Promise; From faafcfef252af6e9ad33871de73e19464e77140f Mon Sep 17 00:00:00 2001 From: karan Date: Wed, 28 Oct 2020 09:56:44 -0700 Subject: [PATCH 06/26] remove errant spacing introduced by manual merge --- yarn.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yarn.lock b/yarn.lock index 97a498ad798..4471d3d5414 100644 --- a/yarn.lock +++ b/yarn.lock @@ -14836,7 +14836,7 @@ webdriverio@^6.1.20: rgb2hex "^0.2.0" serialize-error "^7.0.0" webdriver "6.7.0" - + webextension-polyfill-ts@^0.21.0: version "0.21.0" resolved "https://registry.yarnpkg.com/webextension-polyfill-ts/-/webextension-polyfill-ts-0.21.0.tgz#de07984177b585d12e7189abfab9fb1e3fbfa048" From d030231b3f19936586dde2365b84537bf111c955 Mon Sep 17 00:00:00 2001 From: karan Date: Wed, 28 Oct 2020 10:07:12 -0700 Subject: [PATCH 07/26] add caret --- package.json | 2 +- yarn.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 7c052c2b162..c5785a6e3e5 100644 --- a/package.json +++ b/package.json @@ -143,7 +143,7 @@ "serve-static": "^1.13.2", "simple-git": "^2.21.0", "source-map-loader": "^1.1.1", - "spectron": "12.0.0", + "spectron": "^12.0.0", "terser-webpack-plugin": "^4.2.3", "ts-jest": "^26.4.3", "ts-loader": "^8.0.7", diff --git a/yarn.lock b/yarn.lock index 4471d3d5414..75e901862c7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -13250,7 +13250,7 @@ spdx-license-ids@^3.0.0: resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz#3694b5804567a458d3c8045842a6358632f62654" integrity sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q== -spectron@12.0.0: +spectron@^12.0.0: version "12.0.0" resolved "https://registry.yarnpkg.com/spectron/-/spectron-12.0.0.tgz#8a3454a1366cdb82fbb6be75be0104915b607340" integrity sha512-ZyDFS7I+4dWa/YXSQ/trbC4s1Rd0Ks5oi4MQ6XSJHULPasJhx5q2bM93Ae7BNUvwrGrbhjk7O6f14JwqJimLyA== From e14509436ec8164d8ae9511869a26976150da393 Mon Sep 17 00:00:00 2001 From: karan Date: Wed, 28 Oct 2020 11:04:30 -0700 Subject: [PATCH 08/26] make selctor required param --- .../electron/common/view-controllers/spectron-async-client.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tests/electron/common/view-controllers/spectron-async-client.ts b/src/tests/electron/common/view-controllers/spectron-async-client.ts index d5917a29a33..87d2b2a9e8b 100644 --- a/src/tests/electron/common/view-controllers/spectron-async-client.ts +++ b/src/tests/electron/common/view-controllers/spectron-async-client.ts @@ -16,7 +16,7 @@ export function getSpectronAsyncClient(client: SpectronClient, browserWindow: Sp browserWindow, $: (selector: string) => client.$(selector), $$: (selector: string) => client.$$(selector), - click: async (selector?: string) => { + click: async (selector: string) => { const element = await client.$(selector); return await element.click(); }, @@ -68,7 +68,7 @@ export interface SpectronAsyncClient { browserWindow: SpectronWindow; $(selector: string): Promise; $$(selector: string): Promise; - click(selector?: string): Promise; + click(selector: string): Promise; executeAsync(script: string | ((...args: any[]) => void), ...args: any[]): Promise; execute(script: string | ((...args: any[]) => void), ...args: any[]): Promise; getAttribute(selector: string, attributeName: string): Promise; From aa176b0f3980fbc0be6b62e18529b55298ab34ab Mon Sep 17 00:00:00 2001 From: karan Date: Wed, 28 Oct 2020 11:12:37 -0700 Subject: [PATCH 09/26] update comment --- .../view-controllers/spectron-async-client.ts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/tests/electron/common/view-controllers/spectron-async-client.ts b/src/tests/electron/common/view-controllers/spectron-async-client.ts index 87d2b2a9e8b..bca995a98e5 100644 --- a/src/tests/electron/common/view-controllers/spectron-async-client.ts +++ b/src/tests/electron/common/view-controllers/spectron-async-client.ts @@ -4,12 +4,11 @@ import { SpectronClient, SpectronWindow } from 'spectron'; import * as WebDriverIO from 'webdriverio'; -// spectron 10.0.1 includes @types/webdriverio, whose absence -// we worked around when initially consuming spectron. -// @types/webdriver lacks promises, so this file adds -// promise-based signatures that our e2e code can rely on. -// @types/webdriver has been superceded by improved types -// in webdriverio 5 directly, but Spectron has not consumed them +// This file worked around incorrect or missing spectron/webdriverio +// typings in the past. These types are improved in spectron 12.0.0, +// so this file is now just a single place to update the usages. We +// can remove this extra layer by updating individual end-to-end +// tests/controllers to consume SpectronClient directly. export function getSpectronAsyncClient(client: SpectronClient, browserWindow: SpectronWindow) { const typedAsyncClient: SpectronAsyncClient = { @@ -61,7 +60,7 @@ export function getSpectronAsyncClient(client: SpectronClient, browserWindow: Sp waitUntil: (condition: () => Promise, options?: WebDriverIO.WaitUntilOptions) => client.waitUntil(condition, options), }; - return typedAsyncClient as SpectronAsyncClient; + return typedAsyncClient; } export interface SpectronAsyncClient { From e22646453f507e744355b4406a0b43a5281b4e7e Mon Sep 17 00:00:00 2001 From: karan Date: Thu, 29 Oct 2020 10:21:56 -0700 Subject: [PATCH 10/26] merge --- .../tests/automated-checks-view.test.ts | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/tests/electron/tests/automated-checks-view.test.ts b/src/tests/electron/tests/automated-checks-view.test.ts index 86bd5ceb2f6..914448f80db 100644 --- a/src/tests/electron/tests/automated-checks-view.test.ts +++ b/src/tests/electron/tests/automated-checks-view.test.ts @@ -15,7 +15,8 @@ import { AutomatedChecksViewController } from 'tests/electron/common/view-contro import { commonAdbConfigs, setupMockAdb } from 'tests/miscellaneous/mock-adb/setup-mock-adb'; import { testResourceServerConfig } from '../setup/test-resource-server-config'; import { androidTestConfigs } from 'electron/platform/android/test-configs/android-test-configs'; -import { RawResult } from 'webdriverio'; +import { Element } from 'webdriverio'; +import { resultItem } from 'office-ui-fabric-react/lib/components/FloatingPicker/PeoplePicker/PeoplePicker.scss'; describe('AutomatedChecksView', () => { let app: AppController; @@ -39,7 +40,7 @@ describe('AutomatedChecksView', () => { await app.stop(); } }); - + /* it('should use the expected window title', async () => { expect(await app.getTitle()).toBe('Accessibility Insights for Android - Automated checks'); }); @@ -204,11 +205,9 @@ describe('AutomatedChecksView', () => { expect(boxStyle.width).toBeCloseTo(expectedHighlightBoxStyles[index].width); expect(boxStyle.height).toBeCloseTo(expectedHighlightBoxStyles[index].height); }); - } + }*/ - const setupWindowForCommandBarReflowTest = async ( - narrowFactor: number, - ): Promise> => { + const setupWindowForCommandBarReflowTest = async (narrowFactor: number): Promise => { await app.setFeatureFlag(UnifiedFeatureFlags.leftNavBar, true); const width = narrowModeThresholds.collapseCommandBarThreshold - narrowFactor; @@ -223,12 +222,12 @@ describe('AutomatedChecksView', () => { it('command bar reflows when narrow mode threshold is crossed', async () => { const result = await setupWindowForCommandBarReflowTest(2); - expect(result.value).not.toBeNull(); + expect(await result.isExisting()).toBe(true); }); it('command bar does not reflow when narrow mode threshold is not crossed', async () => { const result = await setupWindowForCommandBarReflowTest(0); - expect(result.value).toBeNull(); + expect(await result.isExisting()).toBe(false); }); const waitForFluentLeftNavToDisappear = async (): Promise => { @@ -241,7 +240,7 @@ describe('AutomatedChecksView', () => { const result = await automatedChecksView.client.$( AutomatedChecksViewSelectors.fluentLeftNav, ); - expect(result.state).toBe('failure'); + expect(await result.isExisting()).toBe(false); }; it('hamburger button click opens and closes left nav', async () => { From ee025b42fe54f48410639505fc8cf8a459933c83 Mon Sep 17 00:00:00 2001 From: karan Date: Thu, 29 Oct 2020 10:23:02 -0700 Subject: [PATCH 11/26] remove comment --- src/tests/electron/tests/automated-checks-view.test.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/tests/electron/tests/automated-checks-view.test.ts b/src/tests/electron/tests/automated-checks-view.test.ts index 914448f80db..7b6b1d97e44 100644 --- a/src/tests/electron/tests/automated-checks-view.test.ts +++ b/src/tests/electron/tests/automated-checks-view.test.ts @@ -16,7 +16,6 @@ import { commonAdbConfigs, setupMockAdb } from 'tests/miscellaneous/mock-adb/set import { testResourceServerConfig } from '../setup/test-resource-server-config'; import { androidTestConfigs } from 'electron/platform/android/test-configs/android-test-configs'; import { Element } from 'webdriverio'; -import { resultItem } from 'office-ui-fabric-react/lib/components/FloatingPicker/PeoplePicker/PeoplePicker.scss'; describe('AutomatedChecksView', () => { let app: AppController; @@ -40,7 +39,7 @@ describe('AutomatedChecksView', () => { await app.stop(); } }); - /* + it('should use the expected window title', async () => { expect(await app.getTitle()).toBe('Accessibility Insights for Android - Automated checks'); }); @@ -205,7 +204,7 @@ describe('AutomatedChecksView', () => { expect(boxStyle.width).toBeCloseTo(expectedHighlightBoxStyles[index].width); expect(boxStyle.height).toBeCloseTo(expectedHighlightBoxStyles[index].height); }); - }*/ + } const setupWindowForCommandBarReflowTest = async (narrowFactor: number): Promise => { await app.setFeatureFlag(UnifiedFeatureFlags.leftNavBar, true); From 7d77ff1b63007ed7c4dbe8c8c970c7077395f9f2 Mon Sep 17 00:00:00 2001 From: karan Date: Thu, 29 Oct 2020 14:34:07 -0700 Subject: [PATCH 12/26] double timeout on waitforselectortodisappear to allow for implicit timeout in jsonwp findelement call set by spectron --- src/tests/electron/common/view-controllers/view-controller.ts | 2 +- src/tests/electron/tests/automated-checks-view.test.ts | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/tests/electron/common/view-controllers/view-controller.ts b/src/tests/electron/common/view-controllers/view-controller.ts index bb80d9163a4..02c39967a10 100644 --- a/src/tests/electron/common/view-controllers/view-controller.ts +++ b/src/tests/electron/common/view-controllers/view-controller.ts @@ -39,7 +39,7 @@ export abstract class ViewController { public async waitForSelectorToDisappear( selector: string, - timeout: number = DEFAULT_WAIT_FOR_ELEMENT_TO_BE_VISIBLE_TIMEOUT_MS, + timeout: number = DEFAULT_WAIT_FOR_ELEMENT_TO_BE_VISIBLE_TIMEOUT_MS * 2, ): Promise { await this.screenshotOnError(async () => this.client.waitForExist( diff --git a/src/tests/electron/tests/automated-checks-view.test.ts b/src/tests/electron/tests/automated-checks-view.test.ts index 7b6b1d97e44..1bbe9748741 100644 --- a/src/tests/electron/tests/automated-checks-view.test.ts +++ b/src/tests/electron/tests/automated-checks-view.test.ts @@ -214,8 +214,6 @@ describe('AutomatedChecksView', () => { app.client.browserWindow.restore(); app.client.browserWindow.setSize(width, height); - // Note: the following call returns a different type of object than is specified - // by the typescript return type when the element is found return automatedChecksView.client.$(AutomatedChecksViewSelectors.leftNavHamburgerButton); }; From 1e6aef427b738d858cc93290a84aecc64ebe84be Mon Sep 17 00:00:00 2001 From: karan Date: Fri, 30 Oct 2020 17:20:43 -0700 Subject: [PATCH 13/26] Add same webPreferences to codec test app that we add in main application to allow spectron to work --- src/tests/miscellaneous/codecs/codecs-test.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/tests/miscellaneous/codecs/codecs-test.js b/src/tests/miscellaneous/codecs/codecs-test.js index c0bee349be6..3ff3840f322 100644 --- a/src/tests/miscellaneous/codecs/codecs-test.js +++ b/src/tests/miscellaneous/codecs/codecs-test.js @@ -3,6 +3,11 @@ const { app, BrowserWindow } = require('electron'); app.whenReady().then(() => { - const win = new BrowserWindow(); + const win = new BrowserWindow({ + webPreferences: { + nodeIntegration: true, + enableRemoteModule: true, + }, + }); win.loadFile('codecs.html'); }); From 874f32d6269da1d2853b94426874112e6643fb8e Mon Sep 17 00:00:00 2001 From: karan Date: Mon, 2 Nov 2020 11:23:01 -0800 Subject: [PATCH 14/26] omit CG for test builds --- .../build-unsigned-release-packages.yaml | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/pipeline/unified/build-unsigned-release-packages.yaml b/pipeline/unified/build-unsigned-release-packages.yaml index 8f7bc1c83f1..22932411e1d 100644 --- a/pipeline/unified/build-unsigned-release-packages.yaml +++ b/pipeline/unified/build-unsigned-release-packages.yaml @@ -24,20 +24,20 @@ steps: - template: ./download-electron-mirror.yaml - - task: ComponentGovernanceComponentDetection@0 - displayName: 'dependency detection (Component Governance)' - inputs: - detectorsFilter: Yarn - ignoreDirectories: 'drop,dist,extension,node_modules' - verbosity: Normal - timeoutInMinutes: 5 - - - task: msospo.ospo-extension.8d7f9abb-6896-461d-9e25-4f74ed65ddb2.notice@0 - displayName: 'generate NOTICE.html file' - inputs: - outputfile: '$(System.DefaultWorkingDirectory)/src/NOTICE.html' - outputformat: html - timeoutInMinutes: 5 + #- task: ComponentGovernanceComponentDetection@0 + # displayName: 'dependency detection (Component Governance)' + # inputs: + # detectorsFilter: Yarn + # ignoreDirectories: 'drop,dist,extension,node_modules' + # verbosity: Normal + # timeoutInMinutes: 5 + + #- task: msospo.ospo-extension.8d7f9abb-6896-461d-9e25-4f74ed65ddb2.notice@0 + # displayName: 'generate NOTICE.html file' + # inputs: + # outputfile: '$(System.DefaultWorkingDirectory)/src/NOTICE.html' + # outputformat: html + # timeoutInMinutes: 5 - template: ./unified-e2e-test-interactive.yaml From 1440f0f507283f55bb1b6cc7064c5f820b4835f6 Mon Sep 17 00:00:00 2001 From: karan Date: Mon, 2 Nov 2020 12:17:52 -0800 Subject: [PATCH 15/26] manually port changes from #3591 --- .../view-controllers/spectron-async-client.ts | 20 +++++--- .../tests/automated-checks-view.test.ts | 48 ++++++++----------- 2 files changed, 35 insertions(+), 33 deletions(-) diff --git a/src/tests/electron/common/view-controllers/spectron-async-client.ts b/src/tests/electron/common/view-controllers/spectron-async-client.ts index bca995a98e5..e1a267cbae1 100644 --- a/src/tests/electron/common/view-controllers/spectron-async-client.ts +++ b/src/tests/electron/common/view-controllers/spectron-async-client.ts @@ -5,14 +5,22 @@ import { SpectronClient, SpectronWindow } from 'spectron'; import * as WebDriverIO from 'webdriverio'; // This file worked around incorrect or missing spectron/webdriverio -// typings in the past. These types are improved in spectron 12.0.0, -// so this file is now just a single place to update the usages. We -// can remove this extra layer by updating individual end-to-end -// tests/controllers to consume SpectronClient directly. +// typings in the past. The webdriverio (SpectronClient) typings are +// improved in spectron 12.0.0, so parts of this file are now just a +// single place to update the usages. We can remove this extra layer +// by updating individual end-to-end tests/controllers to consume +// SpectronClient directly. SpectronAsyncWindow adds async signatures +// to the SpectronWindow type to address github issue spectron@343. + +export interface SpectronAsyncWindow { + restore(): Promise; + setSize(width: number, height: number): Promise; + capturePage(): Promise; // bytes in PNG format +} export function getSpectronAsyncClient(client: SpectronClient, browserWindow: SpectronWindow) { const typedAsyncClient: SpectronAsyncClient = { - browserWindow, + browserWindow: (browserWindow as unknown) as SpectronAsyncWindow, $: (selector: string) => client.$(selector), $$: (selector: string) => client.$$(selector), click: async (selector: string) => { @@ -64,7 +72,7 @@ export function getSpectronAsyncClient(client: SpectronClient, browserWindow: Sp } export interface SpectronAsyncClient { - browserWindow: SpectronWindow; + browserWindow: SpectronAsyncWindow; $(selector: string): Promise; $$(selector: string): Promise; click(selector: string): Promise; diff --git a/src/tests/electron/tests/automated-checks-view.test.ts b/src/tests/electron/tests/automated-checks-view.test.ts index 1bbe9748741..0abbb889aac 100644 --- a/src/tests/electron/tests/automated-checks-view.test.ts +++ b/src/tests/electron/tests/automated-checks-view.test.ts @@ -15,7 +15,6 @@ import { AutomatedChecksViewController } from 'tests/electron/common/view-contro import { commonAdbConfigs, setupMockAdb } from 'tests/miscellaneous/mock-adb/setup-mock-adb'; import { testResourceServerConfig } from '../setup/test-resource-server-config'; import { androidTestConfigs } from 'electron/platform/android/test-configs/android-test-configs'; -import { Element } from 'webdriverio'; describe('AutomatedChecksView', () => { let app: AppController; @@ -151,6 +150,7 @@ describe('AutomatedChecksView', () => { const expectedScreenshotImage = 'data:image/png;base64,' + axeRuleResultExample.axeContext.screenshot; + await automatedChecksView.waitForSelector(ScreenshotViewSelectors.screenshotImage); const actualScreenshotImage = await automatedChecksView.client.getAttribute( ScreenshotViewSelectors.screenshotImage, 'src', @@ -159,7 +159,7 @@ describe('AutomatedChecksView', () => { }); it('ScreenshotView renders expected number/size of highlight boxes in expected positions', async () => { - await automatedChecksView.waitForScreenshotViewVisible(); + await automatedChecksView.waitForSelector(ScreenshotViewSelectors.highlightBox); const boxes = await automatedChecksView.client.$$(ScreenshotViewSelectors.highlightBox); const styles = await Promise.all(boxes.map(async b => await b.getAttribute('style'))); @@ -206,43 +206,39 @@ describe('AutomatedChecksView', () => { }); } - const setupWindowForCommandBarReflowTest = async (narrowFactor: number): Promise => { + const setupWindowForCommandBarReflowTest = async (mode: 'narrow' | 'wide'): Promise => { await app.setFeatureFlag(UnifiedFeatureFlags.leftNavBar, true); - const width = narrowModeThresholds.collapseCommandBarThreshold - narrowFactor; - - app.client.browserWindow.restore(); - app.client.browserWindow.setSize(width, height); + const width = + mode === 'narrow' + ? narrowModeThresholds.collapseCommandBarThreshold - 2 + : narrowModeThresholds.collapseCommandBarThreshold; - return automatedChecksView.client.$(AutomatedChecksViewSelectors.leftNavHamburgerButton); + await app.client.browserWindow.restore(); + await app.client.browserWindow.setSize(width, height); }; it('command bar reflows when narrow mode threshold is crossed', async () => { - const result = await setupWindowForCommandBarReflowTest(2); - expect(await result.isExisting()).toBe(true); - }); + await setupWindowForCommandBarReflowTest('narrow'); + await automatedChecksView.waitForSelector( + AutomatedChecksViewSelectors.leftNavHamburgerButton, + ); - it('command bar does not reflow when narrow mode threshold is not crossed', async () => { - const result = await setupWindowForCommandBarReflowTest(0); - expect(await result.isExisting()).toBe(false); + await setupWindowForCommandBarReflowTest('wide'); + await automatedChecksView.waitForSelectorToDisappear( + AutomatedChecksViewSelectors.leftNavHamburgerButton, + ); }); const waitForFluentLeftNavToDisappear = async (): Promise => { - return automatedChecksView.waitForSelectorToDisappear( + await automatedChecksView.waitForSelectorToDisappear( AutomatedChecksViewSelectors.fluentLeftNav, ); }; - const expectFluentLeftNavNotToBeRendered = async (): Promise => { - const result = await automatedChecksView.client.$( - AutomatedChecksViewSelectors.fluentLeftNav, - ); - expect(await result.isExisting()).toBe(false); - }; - it('hamburger button click opens and closes left nav', async () => { - await setupWindowForCommandBarReflowTest(2); - await expectFluentLeftNavNotToBeRendered(); + await setupWindowForCommandBarReflowTest('narrow'); + await waitForFluentLeftNavToDisappear(); await automatedChecksView.client.click(AutomatedChecksViewSelectors.leftNavHamburgerButton); await automatedChecksView.waitForSelector(AutomatedChecksViewSelectors.fluentLeftNav); @@ -250,17 +246,15 @@ describe('AutomatedChecksView', () => { const selector = `${AutomatedChecksViewSelectors.fluentLeftNav} ${AutomatedChecksViewSelectors.leftNavHamburgerButton}`; await automatedChecksView.client.click(selector); await waitForFluentLeftNavToDisappear(); - await expectFluentLeftNavNotToBeRendered(); }); it('left nav closes when item is selected', async () => { - await setupWindowForCommandBarReflowTest(2); + await setupWindowForCommandBarReflowTest('narrow'); await automatedChecksView.client.click(AutomatedChecksViewSelectors.leftNavHamburgerButton); await automatedChecksView.waitForSelector(AutomatedChecksViewSelectors.fluentLeftNav); const selector = `${AutomatedChecksViewSelectors.fluentLeftNav} a`; await automatedChecksView.client.click(selector); await waitForFluentLeftNavToDisappear(); - await expectFluentLeftNavNotToBeRendered(); }); }); From fdb4bdf6b71f92a5ee4dccfc501142fef666ae07 Mon Sep 17 00:00:00 2001 From: karan Date: Mon, 2 Nov 2020 14:10:46 -0800 Subject: [PATCH 16/26] Revert "manually port changes from #3591" This reverts commit 1440f0f507283f55bb1b6cc7064c5f820b4835f6. --- .../view-controllers/spectron-async-client.ts | 20 +++----- .../tests/automated-checks-view.test.ts | 48 +++++++++++-------- 2 files changed, 33 insertions(+), 35 deletions(-) diff --git a/src/tests/electron/common/view-controllers/spectron-async-client.ts b/src/tests/electron/common/view-controllers/spectron-async-client.ts index e1a267cbae1..bca995a98e5 100644 --- a/src/tests/electron/common/view-controllers/spectron-async-client.ts +++ b/src/tests/electron/common/view-controllers/spectron-async-client.ts @@ -5,22 +5,14 @@ import { SpectronClient, SpectronWindow } from 'spectron'; import * as WebDriverIO from 'webdriverio'; // This file worked around incorrect or missing spectron/webdriverio -// typings in the past. The webdriverio (SpectronClient) typings are -// improved in spectron 12.0.0, so parts of this file are now just a -// single place to update the usages. We can remove this extra layer -// by updating individual end-to-end tests/controllers to consume -// SpectronClient directly. SpectronAsyncWindow adds async signatures -// to the SpectronWindow type to address github issue spectron@343. - -export interface SpectronAsyncWindow { - restore(): Promise; - setSize(width: number, height: number): Promise; - capturePage(): Promise; // bytes in PNG format -} +// typings in the past. These types are improved in spectron 12.0.0, +// so this file is now just a single place to update the usages. We +// can remove this extra layer by updating individual end-to-end +// tests/controllers to consume SpectronClient directly. export function getSpectronAsyncClient(client: SpectronClient, browserWindow: SpectronWindow) { const typedAsyncClient: SpectronAsyncClient = { - browserWindow: (browserWindow as unknown) as SpectronAsyncWindow, + browserWindow, $: (selector: string) => client.$(selector), $$: (selector: string) => client.$$(selector), click: async (selector: string) => { @@ -72,7 +64,7 @@ export function getSpectronAsyncClient(client: SpectronClient, browserWindow: Sp } export interface SpectronAsyncClient { - browserWindow: SpectronAsyncWindow; + browserWindow: SpectronWindow; $(selector: string): Promise; $$(selector: string): Promise; click(selector: string): Promise; diff --git a/src/tests/electron/tests/automated-checks-view.test.ts b/src/tests/electron/tests/automated-checks-view.test.ts index 0abbb889aac..1bbe9748741 100644 --- a/src/tests/electron/tests/automated-checks-view.test.ts +++ b/src/tests/electron/tests/automated-checks-view.test.ts @@ -15,6 +15,7 @@ import { AutomatedChecksViewController } from 'tests/electron/common/view-contro import { commonAdbConfigs, setupMockAdb } from 'tests/miscellaneous/mock-adb/setup-mock-adb'; import { testResourceServerConfig } from '../setup/test-resource-server-config'; import { androidTestConfigs } from 'electron/platform/android/test-configs/android-test-configs'; +import { Element } from 'webdriverio'; describe('AutomatedChecksView', () => { let app: AppController; @@ -150,7 +151,6 @@ describe('AutomatedChecksView', () => { const expectedScreenshotImage = 'data:image/png;base64,' + axeRuleResultExample.axeContext.screenshot; - await automatedChecksView.waitForSelector(ScreenshotViewSelectors.screenshotImage); const actualScreenshotImage = await automatedChecksView.client.getAttribute( ScreenshotViewSelectors.screenshotImage, 'src', @@ -159,7 +159,7 @@ describe('AutomatedChecksView', () => { }); it('ScreenshotView renders expected number/size of highlight boxes in expected positions', async () => { - await automatedChecksView.waitForSelector(ScreenshotViewSelectors.highlightBox); + await automatedChecksView.waitForScreenshotViewVisible(); const boxes = await automatedChecksView.client.$$(ScreenshotViewSelectors.highlightBox); const styles = await Promise.all(boxes.map(async b => await b.getAttribute('style'))); @@ -206,39 +206,43 @@ describe('AutomatedChecksView', () => { }); } - const setupWindowForCommandBarReflowTest = async (mode: 'narrow' | 'wide'): Promise => { + const setupWindowForCommandBarReflowTest = async (narrowFactor: number): Promise => { await app.setFeatureFlag(UnifiedFeatureFlags.leftNavBar, true); - const width = - mode === 'narrow' - ? narrowModeThresholds.collapseCommandBarThreshold - 2 - : narrowModeThresholds.collapseCommandBarThreshold; + const width = narrowModeThresholds.collapseCommandBarThreshold - narrowFactor; + + app.client.browserWindow.restore(); + app.client.browserWindow.setSize(width, height); - await app.client.browserWindow.restore(); - await app.client.browserWindow.setSize(width, height); + return automatedChecksView.client.$(AutomatedChecksViewSelectors.leftNavHamburgerButton); }; it('command bar reflows when narrow mode threshold is crossed', async () => { - await setupWindowForCommandBarReflowTest('narrow'); - await automatedChecksView.waitForSelector( - AutomatedChecksViewSelectors.leftNavHamburgerButton, - ); + const result = await setupWindowForCommandBarReflowTest(2); + expect(await result.isExisting()).toBe(true); + }); - await setupWindowForCommandBarReflowTest('wide'); - await automatedChecksView.waitForSelectorToDisappear( - AutomatedChecksViewSelectors.leftNavHamburgerButton, - ); + it('command bar does not reflow when narrow mode threshold is not crossed', async () => { + const result = await setupWindowForCommandBarReflowTest(0); + expect(await result.isExisting()).toBe(false); }); const waitForFluentLeftNavToDisappear = async (): Promise => { - await automatedChecksView.waitForSelectorToDisappear( + return automatedChecksView.waitForSelectorToDisappear( AutomatedChecksViewSelectors.fluentLeftNav, ); }; + const expectFluentLeftNavNotToBeRendered = async (): Promise => { + const result = await automatedChecksView.client.$( + AutomatedChecksViewSelectors.fluentLeftNav, + ); + expect(await result.isExisting()).toBe(false); + }; + it('hamburger button click opens and closes left nav', async () => { - await setupWindowForCommandBarReflowTest('narrow'); - await waitForFluentLeftNavToDisappear(); + await setupWindowForCommandBarReflowTest(2); + await expectFluentLeftNavNotToBeRendered(); await automatedChecksView.client.click(AutomatedChecksViewSelectors.leftNavHamburgerButton); await automatedChecksView.waitForSelector(AutomatedChecksViewSelectors.fluentLeftNav); @@ -246,15 +250,17 @@ describe('AutomatedChecksView', () => { const selector = `${AutomatedChecksViewSelectors.fluentLeftNav} ${AutomatedChecksViewSelectors.leftNavHamburgerButton}`; await automatedChecksView.client.click(selector); await waitForFluentLeftNavToDisappear(); + await expectFluentLeftNavNotToBeRendered(); }); it('left nav closes when item is selected', async () => { - await setupWindowForCommandBarReflowTest('narrow'); + await setupWindowForCommandBarReflowTest(2); await automatedChecksView.client.click(AutomatedChecksViewSelectors.leftNavHamburgerButton); await automatedChecksView.waitForSelector(AutomatedChecksViewSelectors.fluentLeftNav); const selector = `${AutomatedChecksViewSelectors.fluentLeftNav} a`; await automatedChecksView.client.click(selector); await waitForFluentLeftNavToDisappear(); + await expectFluentLeftNavNotToBeRendered(); }); }); From e2dc000d85ab12f03d86645a7523da8e147787ca Mon Sep 17 00:00:00 2001 From: karan Date: Mon, 2 Nov 2020 14:41:38 -0800 Subject: [PATCH 17/26] add comment about remote module usage --- src/electron/main/main.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/electron/main/main.ts b/src/electron/main/main.ts index 929d127114d..4a652783704 100644 --- a/src/electron/main/main.ts +++ b/src/electron/main/main.ts @@ -37,6 +37,7 @@ const electronAutoUpdateCheck = new AutoUpdaterClient(autoUpdater); const createWindow = () => { mainWindow = new BrowserWindow({ show: false, + // enableRemoteModule required for spectron (https://github.com/electron-userland/spectron/issues/693#issuecomment-696957538) webPreferences: { nodeIntegration: true, enableRemoteModule: true }, titleBarStyle: 'hidden', width: mainWindowConfig.defaultWidth, From f370a243ce42de5bcfeaa00fbbc74da8bf1807d2 Mon Sep 17 00:00:00 2001 From: karan Date: Mon, 2 Nov 2020 14:50:15 -0800 Subject: [PATCH 18/26] re-add CG now that test builds are done --- .../build-unsigned-release-packages.yaml | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/pipeline/unified/build-unsigned-release-packages.yaml b/pipeline/unified/build-unsigned-release-packages.yaml index 22932411e1d..8f7bc1c83f1 100644 --- a/pipeline/unified/build-unsigned-release-packages.yaml +++ b/pipeline/unified/build-unsigned-release-packages.yaml @@ -24,20 +24,20 @@ steps: - template: ./download-electron-mirror.yaml - #- task: ComponentGovernanceComponentDetection@0 - # displayName: 'dependency detection (Component Governance)' - # inputs: - # detectorsFilter: Yarn - # ignoreDirectories: 'drop,dist,extension,node_modules' - # verbosity: Normal - # timeoutInMinutes: 5 - - #- task: msospo.ospo-extension.8d7f9abb-6896-461d-9e25-4f74ed65ddb2.notice@0 - # displayName: 'generate NOTICE.html file' - # inputs: - # outputfile: '$(System.DefaultWorkingDirectory)/src/NOTICE.html' - # outputformat: html - # timeoutInMinutes: 5 + - task: ComponentGovernanceComponentDetection@0 + displayName: 'dependency detection (Component Governance)' + inputs: + detectorsFilter: Yarn + ignoreDirectories: 'drop,dist,extension,node_modules' + verbosity: Normal + timeoutInMinutes: 5 + + - task: msospo.ospo-extension.8d7f9abb-6896-461d-9e25-4f74ed65ddb2.notice@0 + displayName: 'generate NOTICE.html file' + inputs: + outputfile: '$(System.DefaultWorkingDirectory)/src/NOTICE.html' + outputformat: html + timeoutInMinutes: 5 - template: ./unified-e2e-test-interactive.yaml From 9be2f85885b274bf98f71b84bed06ab3139ba075 Mon Sep 17 00:00:00 2001 From: karan Date: Mon, 2 Nov 2020 15:46:52 -0800 Subject: [PATCH 19/26] use explicit waitFor timeout parametmer --- src/tests/electron/common/create-application.ts | 2 ++ src/tests/electron/common/view-controllers/view-controller.ts | 2 +- src/tests/electron/setup/timeouts.ts | 3 +++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/tests/electron/common/create-application.ts b/src/tests/electron/common/create-application.ts index 4475e091db4..c3540fd2047 100644 --- a/src/tests/electron/common/create-application.ts +++ b/src/tests/electron/common/create-application.ts @@ -9,6 +9,7 @@ import { DEFAULT_APP_CONNECT_TIMEOUT_MS, DEFAULT_CHROMEDRIVER_START_RETRIES, DEFAULT_CHROMEDRIVER_START_TIMEOUT_MS, + DEFAULT_WEBDRIVERIO_WAIT_TIMEOUT, } from 'tests/electron/setup/timeouts'; import { AppController } from './view-controllers/app-controller'; @@ -48,6 +49,7 @@ export async function createAppController( connectionRetryCount: DEFAULT_APP_CONNECT_RETRIES, connectionRetryTimeout: DEFAULT_APP_CONNECT_TIMEOUT_MS, startTimeout: DEFAULT_CHROMEDRIVER_START_TIMEOUT_MS, + waitTimeout: DEFAULT_WEBDRIVERIO_WAIT_TIMEOUT, ...overrideSpectronOptions, }); await app.start(); diff --git a/src/tests/electron/common/view-controllers/view-controller.ts b/src/tests/electron/common/view-controllers/view-controller.ts index 02c39967a10..bb80d9163a4 100644 --- a/src/tests/electron/common/view-controllers/view-controller.ts +++ b/src/tests/electron/common/view-controllers/view-controller.ts @@ -39,7 +39,7 @@ export abstract class ViewController { public async waitForSelectorToDisappear( selector: string, - timeout: number = DEFAULT_WAIT_FOR_ELEMENT_TO_BE_VISIBLE_TIMEOUT_MS * 2, + timeout: number = DEFAULT_WAIT_FOR_ELEMENT_TO_BE_VISIBLE_TIMEOUT_MS, ): Promise { await this.screenshotOnError(async () => this.client.waitForExist( diff --git a/src/tests/electron/setup/timeouts.ts b/src/tests/electron/setup/timeouts.ts index 6ba9e2b781d..01d514b7799 100644 --- a/src/tests/electron/setup/timeouts.ts +++ b/src/tests/electron/setup/timeouts.ts @@ -19,3 +19,6 @@ export const DEFAULT_WAIT_FOR_ELEMENT_TO_BE_VISIBLE_TIMEOUT_MS = 5000; // How long of a wait to artificially inject between element hover/mousedown/mouseup during clicks export const DEFAULT_CLICK_HOVER_DELAY_MS = 100; + +// https://webdriver.io/docs/api/browser/setTimeout.html +export const DEFAULT_WEBDRIVERIO_WAIT_TIMEOUT = 1000; From 45b0329ec4b8ab06b6e11ae9b523ad316bcbcde0 Mon Sep 17 00:00:00 2001 From: karan Date: Mon, 2 Nov 2020 16:29:40 -0800 Subject: [PATCH 20/26] check if retry catches webdriver ECONNRESETissue --- src/tests/electron/common/create-application.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/tests/electron/common/create-application.ts b/src/tests/electron/common/create-application.ts index c3540fd2047..9fcef22b05f 100644 --- a/src/tests/electron/common/create-application.ts +++ b/src/tests/electron/common/create-application.ts @@ -59,7 +59,9 @@ export async function createAppController( operationLabel: 'app.start', warnOnRetry: true, maxRetries: DEFAULT_CHROMEDRIVER_START_RETRIES, - retryOnlyIfMatches: err => err?.message?.includes('ChromeDriver did not start within'), + retryOnlyIfMatches: err => + err?.message?.includes('ChromeDriver did not start within') || + err?.message?.includes('Error: Failed to create session.'), }, ); From 58b70a3574ceb9cee624cd43c0ebf3dc18f48186 Mon Sep 17 00:00:00 2001 From: karan Date: Mon, 2 Nov 2020 16:45:42 -0800 Subject: [PATCH 21/26] Revert "check if retry catches webdriver ECONNRESETissue" This reverts commit 45b0329ec4b8ab06b6e11ae9b523ad316bcbcde0. --- src/tests/electron/common/create-application.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/tests/electron/common/create-application.ts b/src/tests/electron/common/create-application.ts index 9fcef22b05f..c3540fd2047 100644 --- a/src/tests/electron/common/create-application.ts +++ b/src/tests/electron/common/create-application.ts @@ -59,9 +59,7 @@ export async function createAppController( operationLabel: 'app.start', warnOnRetry: true, maxRetries: DEFAULT_CHROMEDRIVER_START_RETRIES, - retryOnlyIfMatches: err => - err?.message?.includes('ChromeDriver did not start within') || - err?.message?.includes('Error: Failed to create session.'), + retryOnlyIfMatches: err => err?.message?.includes('ChromeDriver did not start within'), }, ); From 247623b67a89c868142d3c09c0e600674f59fac1 Mon Sep 17 00:00:00 2001 From: karan Date: Mon, 2 Nov 2020 17:04:45 -0800 Subject: [PATCH 22/26] Try adding agent-base resolution to work around ECONNRESET issue mentioned in got@987 --- package.json | 1 + yarn.lock | 63 ++++++++++++++++------------------------------------ 2 files changed, 20 insertions(+), 44 deletions(-) diff --git a/package.json b/package.json index ceaceae6ec1..3bdad2bdfc1 100644 --- a/package.json +++ b/package.json @@ -184,6 +184,7 @@ "resolutions": { "@types/node": "^12.16.1", "acorn": "^7.1.1", + "agent-base": "^6.0.2", "dot-prop": "^5.2.0", "kind-of": "^6.0.3", "minimist": "^1.2.3", diff --git a/yarn.lock b/yarn.lock index 121fb95e497..45477aa7056 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2146,7 +2146,21 @@ resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.6.tgz#f4c7ec43e81b319a9815115031709f26987891f0" integrity sha512-3c+yGKvVP5Y9TYBEibGNR+kLtijnj7mYrXRg+WpFb2X9xm04g/DXYkfg4hmzJQosc9snFNUPkbYIhu+KAm6jJw== -"@types/lodash@^4.14.164": +"@types/keyv@*": + version "3.1.1" + resolved "https://registry.yarnpkg.com/@types/keyv/-/keyv-3.1.1.tgz#e45a45324fca9dab716ab1230ee249c9fb52cfa7" + integrity sha512-MPtoySlAZQ37VoLaPcTHCu1RWJ4llDkULYZIzOYxlhxBqYPB0RsRlmMU0R6tahtFe27mIdkHV+551ZWV4PLmVw== + dependencies: + "@types/node" "*" + +"@types/lodash.merge@^4.6.6": + version "4.6.6" + resolved "https://registry.yarnpkg.com/@types/lodash.merge/-/lodash.merge-4.6.6.tgz#b84b403c1d31bc42d51772d1cd5557fa008cd3d6" + integrity sha512-IB90krzMf7YpfgP3u/EvZEdXVvm4e3gJbUvh5ieuI+o+XqiNEt6fCzqNRaiLlPVScLI59RxIGZMQ3+Ko/DJ8vQ== + dependencies: + "@types/lodash" "*" + +"@types/lodash@*", "@types/lodash@^4.14.164": version "4.14.164" resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.164.tgz#52348bcf909ac7b4c1bcbeda5c23135176e5dfa0" integrity sha512-fXCEmONnrtbYUc5014avwBeMdhHHO8YJCkOBflUL9EoJBSKZ1dei+VO74fA7JkTHZ1GvZack2TyIw5U+1lT8jg== @@ -2784,32 +2798,13 @@ adbkit-apkreader@^3.1.2: debug "~4.1.1" yauzl "^2.7.0" -agent-base@4, agent-base@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.3.0.tgz#8165f01c436009bccad0b1d122f05ed770efc6ee" - integrity sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg== - dependencies: - es6-promisify "^5.0.0" - -agent-base@5: - version "5.1.1" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-5.1.1.tgz#e8fb3f242959db44d63be665db7a8e739537a32c" - integrity sha512-TMeqbNl2fMW0nMjTEPOwe3J/PRFP4vqeoNuQMG0HlMrtm5QxKqdvAkZ1pRBQ/ulIyDD5Yq0nJ7YbdD8ey0TO3g== - -agent-base@6: - version "6.0.0" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.0.tgz#5d0101f19bbfaed39980b22ae866de153b93f09a" - integrity sha512-j1Q7cSCqN+AwrmDd+pzgqc0/NpC655x2bUf5ZjRIO77DcNBFmh+OgRNzF6OKdCC9RSCb19fGd99+bhXFdkRNqw== +agent-base@4, agent-base@5, agent-base@6, agent-base@^4.3.0, agent-base@^6.0.2, agent-base@~4.2.1: + version "6.0.2" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" + integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== dependencies: debug "4" -agent-base@~4.2.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.2.1.tgz#d89e5999f797875674c07d87f260fc41e83e8ca9" - integrity sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg== - dependencies: - es6-promisify "^5.0.0" - agentkeepalive@^3.4.1: version "3.5.2" resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-3.5.2.tgz#a113924dd3fa24a0bc3b78108c450c2abee00f67" @@ -5924,18 +5919,6 @@ es6-mapify@^1.1.0: dependencies: "@babel/runtime" "^7.0.0" -es6-promise@^4.0.3: - version "4.2.8" - resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a" - integrity sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w== - -es6-promisify@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203" - integrity sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM= - dependencies: - es6-promise "^4.0.3" - escape-goat@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/escape-goat/-/escape-goat-2.1.1.tgz#1b2dc77003676c457ec760b2dc68edb648188675" @@ -11630,14 +11613,6 @@ prettier@^2.1.2: resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.1.2.tgz#3050700dae2e4c8b67c4c3f666cdb8af405e1ce5" integrity sha512-16c7K+x4qVlJg9rEbXl7HEGmQyZlG4R9AgP+oHKRMsMsuk8s+ATStlf1NpDqyBI1HpVyfjLOeMhH2LvuNvV5Vg== -pretty-bytes@^1.0.2: - version "1.0.4" - resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-1.0.4.tgz#0a22e8210609ad35542f8c8d5d2159aff0751c84" - integrity sha1-CiLoIQYJrTVUL4yNXSFZr/B1HIQ= - dependencies: - get-stdin "^4.0.1" - meow "^3.1.0" - pretty-format@^26.0.0, pretty-format@^26.6.1, pretty-format@^26.6.2: version "26.6.2" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-26.6.2.tgz#e35c2705f14cb7fe2fe94fa078345b444120fc93" From 6152b40979823313ec83b61290342d8e9c112d1d Mon Sep 17 00:00:00 2001 From: karan Date: Tue, 3 Nov 2020 11:51:32 -0800 Subject: [PATCH 23/26] Revert global waitForTimeout to implicit 5 and double wrapping timeout in waitForExist calls when reverse is true --- src/tests/electron/common/create-application.ts | 2 -- .../electron/common/view-controllers/view-controller.ts | 5 ++++- src/tests/electron/setup/timeouts.ts | 3 --- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/tests/electron/common/create-application.ts b/src/tests/electron/common/create-application.ts index c3540fd2047..4475e091db4 100644 --- a/src/tests/electron/common/create-application.ts +++ b/src/tests/electron/common/create-application.ts @@ -9,7 +9,6 @@ import { DEFAULT_APP_CONNECT_TIMEOUT_MS, DEFAULT_CHROMEDRIVER_START_RETRIES, DEFAULT_CHROMEDRIVER_START_TIMEOUT_MS, - DEFAULT_WEBDRIVERIO_WAIT_TIMEOUT, } from 'tests/electron/setup/timeouts'; import { AppController } from './view-controllers/app-controller'; @@ -49,7 +48,6 @@ export async function createAppController( connectionRetryCount: DEFAULT_APP_CONNECT_RETRIES, connectionRetryTimeout: DEFAULT_APP_CONNECT_TIMEOUT_MS, startTimeout: DEFAULT_CHROMEDRIVER_START_TIMEOUT_MS, - waitTimeout: DEFAULT_WEBDRIVERIO_WAIT_TIMEOUT, ...overrideSpectronOptions, }); await app.start(); diff --git a/src/tests/electron/common/view-controllers/view-controller.ts b/src/tests/electron/common/view-controllers/view-controller.ts index bb80d9163a4..fea11279236 100644 --- a/src/tests/electron/common/view-controllers/view-controller.ts +++ b/src/tests/electron/common/view-controllers/view-controller.ts @@ -37,9 +37,12 @@ export abstract class ViewController { }); } + // Webdriver waits the full implicit waitForTimeout before returning not-found. + // This means we need to wrap the waitForExist call with a longer timeout when + // reverse is true. See webdriverio@2082 and ai-web@3599. public async waitForSelectorToDisappear( selector: string, - timeout: number = DEFAULT_WAIT_FOR_ELEMENT_TO_BE_VISIBLE_TIMEOUT_MS, + timeout: number = DEFAULT_WAIT_FOR_ELEMENT_TO_BE_VISIBLE_TIMEOUT_MS * 2, ): Promise { await this.screenshotOnError(async () => this.client.waitForExist( diff --git a/src/tests/electron/setup/timeouts.ts b/src/tests/electron/setup/timeouts.ts index 01d514b7799..6ba9e2b781d 100644 --- a/src/tests/electron/setup/timeouts.ts +++ b/src/tests/electron/setup/timeouts.ts @@ -19,6 +19,3 @@ export const DEFAULT_WAIT_FOR_ELEMENT_TO_BE_VISIBLE_TIMEOUT_MS = 5000; // How long of a wait to artificially inject between element hover/mousedown/mouseup during clicks export const DEFAULT_CLICK_HOVER_DELAY_MS = 100; - -// https://webdriver.io/docs/api/browser/setTimeout.html -export const DEFAULT_WEBDRIVERIO_WAIT_TIMEOUT = 1000; From 759bef31f5a09fa125ef3b852c37e4873da5d281 Mon Sep 17 00:00:00 2001 From: karan Date: Tue, 3 Nov 2020 13:01:24 -0800 Subject: [PATCH 24/26] retry econnreset --- src/tests/electron/common/create-application.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/tests/electron/common/create-application.ts b/src/tests/electron/common/create-application.ts index 4475e091db4..b9114e623b6 100644 --- a/src/tests/electron/common/create-application.ts +++ b/src/tests/electron/common/create-application.ts @@ -59,6 +59,13 @@ export async function createAppController( maxRetries: DEFAULT_CHROMEDRIVER_START_RETRIES, retryOnlyIfMatches: err => err?.message?.includes('ChromeDriver did not start within'), }, + { + operationLabel: 'app.start', + warnOnRetry: true, + maxRetries: DEFAULT_CHROMEDRIVER_START_RETRIES, + retryOnlyIfMatches: err => + err?.message?.includes('Failed to create session.\nread ECONNRESET'), + }, ); return new AppController(app); From 594be0ac80dc4199f2b46545c50b89aae55b0786 Mon Sep 17 00:00:00 2001 From: karan Date: Tue, 3 Nov 2020 13:34:59 -0800 Subject: [PATCH 25/26] combine msgs --- src/tests/electron/common/create-application.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/tests/electron/common/create-application.ts b/src/tests/electron/common/create-application.ts index b9114e623b6..45e82be5edc 100644 --- a/src/tests/electron/common/create-application.ts +++ b/src/tests/electron/common/create-application.ts @@ -53,17 +53,12 @@ export async function createAppController( await app.start(); return app; }, - { - operationLabel: 'app.start', - warnOnRetry: true, - maxRetries: DEFAULT_CHROMEDRIVER_START_RETRIES, - retryOnlyIfMatches: err => err?.message?.includes('ChromeDriver did not start within'), - }, { operationLabel: 'app.start', warnOnRetry: true, maxRetries: DEFAULT_CHROMEDRIVER_START_RETRIES, retryOnlyIfMatches: err => + err?.message?.includes('ChromeDriver did not start within') || err?.message?.includes('Failed to create session.\nread ECONNRESET'), }, ); From 4a92556f78a1254505a0e8d1bbe457f1024a7a3d Mon Sep 17 00:00:00 2001 From: karan Date: Tue, 3 Nov 2020 14:06:44 -0800 Subject: [PATCH 26/26] remove agent base resolution in favor of retry --- package.json | 1 - yarn.lock | 50 ++++++++++++++++++++++++++++++++++++++------------ 2 files changed, 38 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index 5a5162f2118..6d8e21814ca 100644 --- a/package.json +++ b/package.json @@ -185,7 +185,6 @@ "resolutions": { "@types/node": "^14.14.6", "acorn": "^7.1.1", - "agent-base": "^6.0.2", "dot-prop": "^5.2.0", "kind-of": "^6.0.3", "minimist": "^1.2.3", diff --git a/yarn.lock b/yarn.lock index 72ec0d123bd..56a615109b5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2733,13 +2733,32 @@ adbkit-apkreader@^3.1.2: debug "~4.1.1" yauzl "^2.7.0" -agent-base@4, agent-base@5, agent-base@6, agent-base@^4.3.0, agent-base@^6.0.2, agent-base@~4.2.1: +agent-base@4, agent-base@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.3.0.tgz#8165f01c436009bccad0b1d122f05ed770efc6ee" + integrity sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg== + dependencies: + es6-promisify "^5.0.0" + +agent-base@5: + version "5.1.1" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-5.1.1.tgz#e8fb3f242959db44d63be665db7a8e739537a32c" + integrity sha512-TMeqbNl2fMW0nMjTEPOwe3J/PRFP4vqeoNuQMG0HlMrtm5QxKqdvAkZ1pRBQ/ulIyDD5Yq0nJ7YbdD8ey0TO3g== + +agent-base@6: version "6.0.2" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== dependencies: debug "4" +agent-base@~4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.2.1.tgz#d89e5999f797875674c07d87f260fc41e83e8ca9" + integrity sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg== + dependencies: + es6-promisify "^5.0.0" + agentkeepalive@^3.4.1: version "3.5.2" resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-3.5.2.tgz#a113924dd3fa24a0bc3b78108c450c2abee00f67" @@ -5795,6 +5814,18 @@ es6-mapify@^1.1.0: dependencies: "@babel/runtime" "^7.0.0" +es6-promise@^4.0.3: + version "4.2.8" + resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a" + integrity sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w== + +es6-promisify@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203" + integrity sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM= + dependencies: + es6-promise "^4.0.3" + escape-goat@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/escape-goat/-/escape-goat-2.1.1.tgz#1b2dc77003676c457ec760b2dc68edb648188675" @@ -9523,7 +9554,7 @@ memorystream@^0.3.1: resolved "https://registry.yarnpkg.com/memorystream/-/memorystream-0.3.1.tgz#86d7090b30ce455d63fbae12dda51a47ddcaf9b2" integrity sha1-htcJCzDORV1j+64S3aUaR93K+bI= -meow@^3.1.0, meow@^3.3.0: +meow@^3.3.0: version "3.7.0" resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb" integrity sha1-cstmi0JSKCkKu/qFaJJYcwioAfs= @@ -12297,6 +12328,11 @@ rgb2hex@^0.1.9: resolved "https://registry.yarnpkg.com/rgb2hex/-/rgb2hex-0.1.10.tgz#4fdd432665273e2d5900434940ceba0a04c8a8a8" integrity sha512-vKz+kzolWbL3rke/xeTE2+6vHmZnNxGyDnaVW4OckntAIcc7DcZzWkQSfxMDwqHS8vhgySnIFyBUH7lIk6PxvQ== +rgb2hex@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/rgb2hex/-/rgb2hex-0.2.0.tgz#801b4887127181d1e691f610df2cecdb77330265" + integrity sha512-cHdNTwmTMPu/TpP1bJfdApd6MbD+Kzi4GNnM6h35mdFChhQPSi9cAI8J7DMn5kQDKX8NuBaQXAyo360Oa7tOEA== + rimraf@2.6.3: version "2.6.3" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" @@ -12450,16 +12486,6 @@ sanitize-filename@^1.6.1, sanitize-filename@^1.6.2, sanitize-filename@^1.6.3: dependencies: truncate-utf8-bytes "^1.0.0" -sass-graph@2.2.5: - version "2.2.5" - resolved "https://registry.yarnpkg.com/sass-graph/-/sass-graph-2.2.5.tgz#a981c87446b8319d96dce0671e487879bd24c2e8" - integrity sha512-VFWDAHOe6mRuT4mZRd4eKE+d8Uedrk6Xnh7Sh9b4NGufQLQjOrvf/MQoOdx+0s92L89FeyUUNfU597j/3uNpag== - dependencies: - glob "^7.0.0" - lodash "^4.0.0" - scss-tokenizer "^0.2.3" - yargs "^13.3.2" - sass-loader@^10.0.5: version "10.0.5" resolved "https://registry.yarnpkg.com/sass-loader/-/sass-loader-10.0.5.tgz#f53505b5ddbedf43797470ceb34066ded82bb769"