From b2d63429119d91d72ca640ab85cab9d7d6d0e19f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 22 Sep 2022 17:05:44 +0000 Subject: [PATCH 01/34] chore(deps): Bump github/codeql-action from 2.1.24 to 2.1.25 Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.1.24 to 2.1.25. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/904260d7d935dff982205cbdb42025ce30b7a34f...86f3159a697a097a813ad9bfa0002412d97690a4) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/audit_and_lint.yml | 2 +- .github/workflows/codeql.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/audit_and_lint.yml b/.github/workflows/audit_and_lint.yml index 7cf965d24..6d4ff6bdc 100644 --- a/.github/workflows/audit_and_lint.yml +++ b/.github/workflows/audit_and_lint.yml @@ -76,7 +76,7 @@ jobs: if: always() && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' || github.event_name == 'pull_request') - uses: github/codeql-action/upload-sarif@904260d7d935dff982205cbdb42025ce30b7a34f # pin@codeql-bundle-20210517 + uses: github/codeql-action/upload-sarif@86f3159a697a097a813ad9bfa0002412d97690a4 # pin@codeql-bundle-20210517 with: sarif_file: lint-results.sarif continue-on-error: true diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 74472ec5b..59646c45b 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -17,10 +17,10 @@ jobs: uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # pin@v2 - name: Initialize CodeQL - uses: github/codeql-action/init@904260d7d935dff982205cbdb42025ce30b7a34f + uses: github/codeql-action/init@86f3159a697a097a813ad9bfa0002412d97690a4 with: queries: security-and-quality languages: javascript - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@904260d7d935dff982205cbdb42025ce30b7a34f + uses: github/codeql-action/analyze@86f3159a697a097a813ad9bfa0002412d97690a4 From 612f93238fd696b3dfc658fd03e7c40f8b31c3b0 Mon Sep 17 00:00:00 2001 From: Jakub Mucha Date: Mon, 26 Sep 2022 22:57:17 +0200 Subject: [PATCH 02/34] po: add popup background Signed-off-by: Jakub Mucha --- pages/metamask/main-page.js | 1 + 1 file changed, 1 insertion(+) diff --git a/pages/metamask/main-page.js b/pages/metamask/main-page.js index bfe3de491..ea27646fa 100644 --- a/pages/metamask/main-page.js +++ b/pages/metamask/main-page.js @@ -9,6 +9,7 @@ const walletOverview = '.wallet-overview'; const popup = { container: '.popover-container', closeButton: '.popover-header__button', + background: '.popover-bg', }; const accountMenu = { From dd13339f2bc708d487253f8d109ca46251f8079e Mon Sep 17 00:00:00 2001 From: Jakub Mucha Date: Mon, 26 Sep 2022 22:57:47 +0200 Subject: [PATCH 03/34] fix: close popup with click on background Signed-off-by: Jakub Mucha --- commands/metamask.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/commands/metamask.js b/commands/metamask.js index cfbf01abf..601a93ca5 100644 --- a/commands/metamask.js +++ b/commands/metamask.js @@ -70,7 +70,13 @@ module.exports = { .metamaskWindow() .$(mainPageElements.popup.container)) !== null ) { - await playwright.waitAndClick(mainPageElements.popup.closeButton); + const popupBackground = playwright + .metamaskWindow() + .locator(mainPageElements.popup.background); + const popupBackgroundBox = await popupBackground.boundingBox(); + await playwright + .metamaskWindow() + .mouse.click(popupBackgroundBox.x + 1, popupBackgroundBox.y + 1); } return true; }, From 263dc1954d11678d5dc2ac2d0161326a800ded01 Mon Sep 17 00:00:00 2001 From: Jakub Mucha Date: Mon, 26 Sep 2022 22:58:14 +0200 Subject: [PATCH 04/34] docker: pass SYNDEBUG Signed-off-by: Jakub Mucha --- docker-compose.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index c26325913..70e04b117 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,6 +8,7 @@ services: - DISPLAY=display:0.0 - CYPRESS_PRIVATE_KEY_WITH_FUNDS=${CYPRESS_PRIVATE_KEY_WITH_FUNDS} - GITHUB_TOKEN=${GITHUB_TOKEN} + - SYNDEBUG=${SYNDEBUG} depends_on: - display - video @@ -29,6 +30,8 @@ services: image: synthetixio/display:b2643097e891906524e52e7ee956260b20fa01fb-base environment: - RUN_XTERM=no + - DISPLAY_WIDTH=800 + - DISPLAY_HEIGHT=600 ports: - '8080:8080' networks: @@ -53,6 +56,8 @@ services: volumes: - ./docker/videos-ci:/videos environment: + - SE_SCREEN_WIDTH=800 + - SE_SCREEN_HEIGHT=600 - FILE_NAME=CI-full-video.mp4 depends_on: - display From b44cf1c50036078679dc9dca10c54a29ab1c4bda Mon Sep 17 00:00:00 2001 From: Jakub Mucha Date: Mon, 26 Sep 2022 22:58:51 +0200 Subject: [PATCH 05/34] add todo Signed-off-by: Jakub Mucha --- commands/metamask.js | 1 + 1 file changed, 1 insertion(+) diff --git a/commands/metamask.js b/commands/metamask.js index 601a93ca5..d93d8267d 100644 --- a/commands/metamask.js +++ b/commands/metamask.js @@ -476,6 +476,7 @@ module.exports = { await switchToMetamaskIfNotActive(); await playwright.waitAndClick(mainPageElements.accountMenu.button); + // todo: can't click on settings button, go to url directly? await playwright.waitAndClick( mainPageElements.accountMenu.settingsButton, await playwright.metamaskWindow(), From b1ca0bf980fe2857a123737f31a5084c67008db1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 30 Sep 2022 17:04:54 +0000 Subject: [PATCH 06/34] chore(deps): Bump github/codeql-action from 2.1.25 to 2.1.26 Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.1.25 to 2.1.26. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/86f3159a697a097a813ad9bfa0002412d97690a4...e0e5ded33cabb451ae0a9768fc7b0410bad9ad44) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/audit_and_lint.yml | 2 +- .github/workflows/codeql.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/audit_and_lint.yml b/.github/workflows/audit_and_lint.yml index 6d4ff6bdc..7d11b3b62 100644 --- a/.github/workflows/audit_and_lint.yml +++ b/.github/workflows/audit_and_lint.yml @@ -76,7 +76,7 @@ jobs: if: always() && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' || github.event_name == 'pull_request') - uses: github/codeql-action/upload-sarif@86f3159a697a097a813ad9bfa0002412d97690a4 # pin@codeql-bundle-20210517 + uses: github/codeql-action/upload-sarif@e0e5ded33cabb451ae0a9768fc7b0410bad9ad44 # pin@codeql-bundle-20210517 with: sarif_file: lint-results.sarif continue-on-error: true diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 59646c45b..ec722b890 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -17,10 +17,10 @@ jobs: uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # pin@v2 - name: Initialize CodeQL - uses: github/codeql-action/init@86f3159a697a097a813ad9bfa0002412d97690a4 + uses: github/codeql-action/init@e0e5ded33cabb451ae0a9768fc7b0410bad9ad44 with: queries: security-and-quality languages: javascript - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@86f3159a697a097a813ad9bfa0002412d97690a4 + uses: github/codeql-action/analyze@e0e5ded33cabb451ae0a9768fc7b0410bad9ad44 From 6addda388e873a8273c8815f59b01c4eb6a19068 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Oct 2022 17:04:46 +0000 Subject: [PATCH 07/34] chore(deps): Bump actions/cache from 3.0.8 to 3.0.10 Bumps [actions/cache](https://github.com/actions/cache) from 3.0.8 to 3.0.10. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/v3.0.8...56461b9eb0f8438fd15c7a9968e3c9ebb18ceff1) --- updated-dependencies: - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/audit_and_lint.yml | 4 ++-- .github/workflows/release.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/audit_and_lint.yml b/.github/workflows/audit_and_lint.yml index 6d4ff6bdc..8cea20c4c 100644 --- a/.github/workflows/audit_and_lint.yml +++ b/.github/workflows/audit_and_lint.yml @@ -51,7 +51,7 @@ jobs: run: yarn config set cache-folder .yarn-cache continue-on-error: true - - uses: actions/cache@fd5de65bc895cf536527842281bea11763fefd77 # pin@v2 + - uses: actions/cache@56461b9eb0f8438fd15c7a9968e3c9ebb18ceff1 # pin@v2 with: path: | .yarn-cache @@ -103,7 +103,7 @@ jobs: uses: docker/setup-buildx-action@dc7b9719a96d48369863986a06765841d7ea23f6 # pin@v1 - name: Cache Docker layers - uses: actions/cache@515d10b4fd9bb4858066bd5769f55bd498dcdd27 # pin@v2 + uses: actions/cache@56461b9eb0f8438fd15c7a9968e3c9ebb18ceff1 # pin@v2 with: path: /tmp/.buildx-cache key: ${{ runner.os }}-buildx-${{ github.sha }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 657c05ae5..331a24207 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -36,7 +36,7 @@ jobs: run: yarn config set cache-folder .yarn-cache continue-on-error: true - - uses: actions/cache@fd5de65bc895cf536527842281bea11763fefd77 # pin@v2 + - uses: actions/cache@56461b9eb0f8438fd15c7a9968e3c9ebb18ceff1 # pin@v2 with: path: | .yarn-cache From ac0f77937b4278b4211cf40c8041e1914828f3f1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 4 Oct 2022 17:04:51 +0000 Subject: [PATCH 08/34] chore(deps): Bump actions/checkout from 3.0.2 to 3.1.0 Bumps [actions/checkout](https://github.com/actions/checkout) from 3.0.2 to 3.1.0. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3.0.2...93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/audit_and_lint.yml | 6 +++--- .github/workflows/codeql.yml | 2 +- .github/workflows/release.yml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/audit_and_lint.yml b/.github/workflows/audit_and_lint.yml index 6d4ff6bdc..50a05fac2 100644 --- a/.github/workflows/audit_and_lint.yml +++ b/.github/workflows/audit_and_lint.yml @@ -22,7 +22,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # pin@v2 + uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # pin@v2 - name: Audit dependencies run: audit-ci --critical --report-type full @@ -45,7 +45,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # pin@v2 + uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # pin@v2 - name: Set yarn cache directory run: yarn config set cache-folder .yarn-cache @@ -94,7 +94,7 @@ jobs: run: chown -R $(whoami) . - name: Checkout - uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97 # pin@v2 + uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # pin@v2 - name: Set up QEMU uses: docker/setup-qemu-action@8b122486cedac8393e77aa9734c3528886e4a1a8 # pin@v1 diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 59646c45b..2d5ff7160 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -14,7 +14,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # pin@v2 + uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # pin@v2 - name: Initialize CodeQL uses: github/codeql-action/init@86f3159a697a097a813ad9bfa0002412d97690a4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 657c05ae5..a057ee16f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,7 +27,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # pin@v2 + uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # pin@v2 with: fetch-depth: 0 ref: master From e01c5a82fe9294c992e1f0ac4d9557de200dde20 Mon Sep 17 00:00:00 2001 From: Jakub Mucha Date: Wed, 5 Oct 2022 20:58:15 +0200 Subject: [PATCH 09/34] feat: added getExtensionDetails Signed-off-by: Jakub Mucha --- commands/metamask.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/commands/metamask.js b/commands/metamask.js index d93d8267d..5abcff5b1 100644 --- a/commands/metamask.js +++ b/commands/metamask.js @@ -32,13 +32,30 @@ const { } = require('../pages/metamask/confirmation-page'); const { setNetwork, getNetwork } = require('../helpers'); +let extensionInitialUrl; +let extensionId; +let extensionHomeUrl; +let extensionSettingsUrl; let walletAddress; let switchBackToCypressWindow; module.exports = { + extensionId: () => { + return extensionId; + }, + extensionUrls: () => { + return { extensionInitialUrl, extensionHomeUrl, extensionSettingsUrl }; + }, walletAddress: () => { return walletAddress; }, + getExtensionDetails: async () => { + extensionInitialUrl = await playwright.metamaskWindow().url(); + extensionId = extensionInitialUrl.match('//(.*?)/')[1]; + extensionHomeUrl = `chrome-extension://${extensionId}/home.html`; + extensionSettingsUrl = `${extensionHomeUrl}#settings`; + return { extensionInitialUrl, extensionId, extensionSettingsUrl }; + }, // workaround for metamask random blank page on first run fixBlankPage: async () => { await playwright.metamaskWindow().waitForTimeout(1000); From df44f86f49a4191191039c0890d5f967e9252f52 Mon Sep 17 00:00:00 2001 From: Jakub Mucha Date: Wed, 5 Oct 2022 20:58:29 +0200 Subject: [PATCH 10/34] feat: add goToSettings Signed-off-by: Jakub Mucha --- commands/metamask.js | 35 ++++++++++------------------------- 1 file changed, 10 insertions(+), 25 deletions(-) diff --git a/commands/metamask.js b/commands/metamask.js index 5abcff5b1..9ef359677 100644 --- a/commands/metamask.js +++ b/commands/metamask.js @@ -49,6 +49,12 @@ module.exports = { walletAddress: () => { return walletAddress; }, + goToSettings: async () => { + await Promise.all([ + playwright.metamaskWindow().waitForNavigation(), + playwright.metamaskWindow().goto(extensionSettingsUrl), + ]); + }, getExtensionDetails: async () => { extensionInitialUrl = await playwright.metamaskWindow().url(); extensionId = extensionInitialUrl.match('//(.*?)/')[1]; @@ -367,14 +373,7 @@ module.exports = { network.networkName = network.networkName.toLowerCase(); } - await playwright.waitAndClick(mainPageElements.accountMenu.button); - await playwright.waitAndClick( - mainPageElements.accountMenu.settingsButton, - await playwright.metamaskWindow(), - { - waitForEvent: 'navi', - }, - ); + await module.exports.goToSettings(); await playwright.waitAndClick( settingsPageElements.networksButton, await playwright.metamaskWindow(), @@ -492,15 +491,7 @@ module.exports = { activateCustomNonce: async () => { await switchToMetamaskIfNotActive(); - await playwright.waitAndClick(mainPageElements.accountMenu.button); - // todo: can't click on settings button, go to url directly? - await playwright.waitAndClick( - mainPageElements.accountMenu.settingsButton, - await playwright.metamaskWindow(), - { - waitForEvent: 'navi', - }, - ); + await module.exports.goToSettings(); await playwright.waitAndClick( settingsPageElements.advancedButton, await playwright.metamaskWindow(), @@ -530,14 +521,7 @@ module.exports = { resetAccount: async () => { await switchToMetamaskIfNotActive(); - await playwright.waitAndClick(mainPageElements.accountMenu.button); - await playwright.waitAndClick( - mainPageElements.accountMenu.settingsButton, - await playwright.metamaskWindow(), - { - waitForEvent: 'navi', - }, - ); + await module.exports.goToSettings(); await playwright.waitAndClick( settingsPageElements.advancedButton, await playwright.metamaskWindow(), @@ -798,6 +782,7 @@ module.exports = { await playwright.init(); await playwright.assignWindows(); await playwright.assignActiveTabName('metamask'); + await module.exports.getExtensionDetails(); await module.exports.fixBlankPage(); if ( (await playwright From de4db05fdf14b2e5de5222f95800bc6d1c3e758a Mon Sep 17 00:00:00 2001 From: Jakub Mucha Date: Wed, 5 Oct 2022 21:07:06 +0200 Subject: [PATCH 11/34] feat: use goToAdvancedSettings Signed-off-by: Jakub Mucha --- commands/metamask.js | 40 +++++++++++++++++----------------------- 1 file changed, 17 insertions(+), 23 deletions(-) diff --git a/commands/metamask.js b/commands/metamask.js index 9ef359677..331d34cfc 100644 --- a/commands/metamask.js +++ b/commands/metamask.js @@ -36,6 +36,7 @@ let extensionInitialUrl; let extensionId; let extensionHomeUrl; let extensionSettingsUrl; +let extensionAdvancedSettingsUrl; let walletAddress; let switchBackToCypressWindow; @@ -44,7 +45,12 @@ module.exports = { return extensionId; }, extensionUrls: () => { - return { extensionInitialUrl, extensionHomeUrl, extensionSettingsUrl }; + return { + extensionInitialUrl, + extensionHomeUrl, + extensionSettingsUrl, + extensionAdvancedSettingsUrl, + }; }, walletAddress: () => { return walletAddress; @@ -55,11 +61,19 @@ module.exports = { playwright.metamaskWindow().goto(extensionSettingsUrl), ]); }, + goToAdvancedSettings: async () => { + await Promise.all([ + playwright.metamaskWindow().waitForNavigation(), + playwright.metamaskWindow().goto(extensionAdvancedSettingsUrl), + ]); + }, getExtensionDetails: async () => { extensionInitialUrl = await playwright.metamaskWindow().url(); extensionId = extensionInitialUrl.match('//(.*?)/')[1]; extensionHomeUrl = `chrome-extension://${extensionId}/home.html`; extensionSettingsUrl = `${extensionHomeUrl}#settings`; + extensionAdvancedSettingsUrl = `${extensionSettingsUrl}/advanced`; + return { extensionInitialUrl, extensionId, extensionSettingsUrl }; }, // workaround for metamask random blank page on first run @@ -490,15 +504,7 @@ module.exports = { }, activateCustomNonce: async () => { await switchToMetamaskIfNotActive(); - - await module.exports.goToSettings(); - await playwright.waitAndClick( - settingsPageElements.advancedButton, - await playwright.metamaskWindow(), - { - waitForEvent: 'navi', - }, - ); + await module.exports.goToAdvancedSettings(); if ( (await playwright .metamaskWindow() @@ -513,22 +519,12 @@ module.exports = { waitForEvent: 'navi', }, ); - // await playwright.waitFor(mainPageElements.walletOverview); - await switchToCypressIfNotActive(); return true; }, resetAccount: async () => { await switchToMetamaskIfNotActive(); - - await module.exports.goToSettings(); - await playwright.waitAndClick( - settingsPageElements.advancedButton, - await playwright.metamaskWindow(), - { - waitForEvent: 'navi', - }, - ); + await module.exports.goToAdvancedSettings(); await playwright.waitAndClick(advancedPageElements.resetAccountButton); await playwright.waitAndClick(resetAccountModalElements.resetButton); await playwright.waitAndClick( @@ -538,8 +534,6 @@ module.exports = { waitForEvent: 'navi', }, ); - // await playwright.waitFor(mainPageElements.walletOverview); - await switchToCypressIfNotActive(); return true; }, From 2891d7f15a30aaa4ddd1391b9a9eba7c713a450d Mon Sep 17 00:00:00 2001 From: Jakub Mucha Date: Wed, 5 Oct 2022 21:12:44 +0200 Subject: [PATCH 12/34] feat: use gotoaddnetwork Signed-off-by: Jakub Mucha --- commands/metamask.js | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/commands/metamask.js b/commands/metamask.js index 331d34cfc..e20c38ae4 100644 --- a/commands/metamask.js +++ b/commands/metamask.js @@ -24,7 +24,6 @@ const { settingsPageElements, advancedPageElements, resetAccountModalElements, - networksPageElements, addNetworkPageElements, } = require('../pages/metamask/settings-page'); const { @@ -37,6 +36,7 @@ let extensionId; let extensionHomeUrl; let extensionSettingsUrl; let extensionAdvancedSettingsUrl; +let extensionAddNetworkUrl; let walletAddress; let switchBackToCypressWindow; @@ -50,6 +50,7 @@ module.exports = { extensionHomeUrl, extensionSettingsUrl, extensionAdvancedSettingsUrl, + extensionAddNetworkUrl, }; }, walletAddress: () => { @@ -67,14 +68,27 @@ module.exports = { playwright.metamaskWindow().goto(extensionAdvancedSettingsUrl), ]); }, + goToAddNetwork: async () => { + await Promise.all([ + playwright.metamaskWindow().waitForNavigation(), + playwright.metamaskWindow().goto(extensionAddNetworkUrl), + ]); + }, getExtensionDetails: async () => { extensionInitialUrl = await playwright.metamaskWindow().url(); extensionId = extensionInitialUrl.match('//(.*?)/')[1]; extensionHomeUrl = `chrome-extension://${extensionId}/home.html`; extensionSettingsUrl = `${extensionHomeUrl}#settings`; extensionAdvancedSettingsUrl = `${extensionSettingsUrl}/advanced`; + extensionAddNetworkUrl = `${extensionSettingsUrl}/networks/add-network`; - return { extensionInitialUrl, extensionId, extensionSettingsUrl }; + return { + extensionInitialUrl, + extensionId, + extensionSettingsUrl, + extensionAdvancedSettingsUrl, + extensionAddNetworkUrl, + }; }, // workaround for metamask random blank page on first run fixBlankPage: async () => { @@ -387,15 +401,7 @@ module.exports = { network.networkName = network.networkName.toLowerCase(); } - await module.exports.goToSettings(); - await playwright.waitAndClick( - settingsPageElements.networksButton, - await playwright.metamaskWindow(), - { - waitForEvent: 'navi', - }, - ); - await playwright.waitAndClick(networksPageElements.addNetworkButton); + await module.exports.goToAddNetwork(); await playwright.waitAndType( addNetworkPageElements.networkNameInput, network.networkName, From 2c76fbdbdacabcbcffaa40e80dec5db114954c4e Mon Sep 17 00:00:00 2001 From: Jakub Mucha Date: Wed, 5 Oct 2022 21:18:59 +0200 Subject: [PATCH 13/34] feat: use goToImportAccount Signed-off-by: Jakub Mucha --- commands/metamask.js | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/commands/metamask.js b/commands/metamask.js index e20c38ae4..887ed7188 100644 --- a/commands/metamask.js +++ b/commands/metamask.js @@ -37,6 +37,7 @@ let extensionHomeUrl; let extensionSettingsUrl; let extensionAdvancedSettingsUrl; let extensionAddNetworkUrl; +let extensionImportAccountUrl; let walletAddress; let switchBackToCypressWindow; @@ -51,6 +52,7 @@ module.exports = { extensionSettingsUrl, extensionAdvancedSettingsUrl, extensionAddNetworkUrl, + extensionImportAccountUrl, }; }, walletAddress: () => { @@ -74,6 +76,12 @@ module.exports = { playwright.metamaskWindow().goto(extensionAddNetworkUrl), ]); }, + goToImportAccount: async () => { + await Promise.all([ + playwright.metamaskWindow().waitForNavigation(), + playwright.metamaskWindow().goto(extensionImportAccountUrl), + ]); + }, getExtensionDetails: async () => { extensionInitialUrl = await playwright.metamaskWindow().url(); extensionId = extensionInitialUrl.match('//(.*?)/')[1]; @@ -81,6 +89,7 @@ module.exports = { extensionSettingsUrl = `${extensionHomeUrl}#settings`; extensionAdvancedSettingsUrl = `${extensionSettingsUrl}/advanced`; extensionAddNetworkUrl = `${extensionSettingsUrl}/networks/add-network`; + extensionImportAccountUrl = `${extensionHomeUrl}#new-account/import`; return { extensionInitialUrl, @@ -88,6 +97,7 @@ module.exports = { extensionSettingsUrl, extensionAdvancedSettingsUrl, extensionAddNetworkUrl, + extensionImportAccountUrl, }; }, // workaround for metamask random blank page on first run @@ -141,7 +151,6 @@ module.exports = { waitForEvent: 'navi', }, ); - // await playwright.waitFor(mainPageElements.walletOverview); await module.exports.closePopup(); return true; }, @@ -187,7 +196,6 @@ module.exports = { waitForEvent: 'navi', }, ); - // await playwright.waitFor(mainPageElements.walletOverview); await module.exports.closePopup(); return true; }, @@ -238,28 +246,17 @@ module.exports = { waitForEvent: 'navi', }, ); - // await playwright.waitFor(mainPageElements.walletOverview); await module.exports.closePopup(); return true; }, importAccount: async privateKey => { await switchToMetamaskIfNotActive(); - - await playwright.waitAndClick(mainPageElements.accountMenu.button); - await playwright.waitAndClick( - mainPageElements.accountMenu.importAccountButton, - await playwright.metamaskWindow(), - { - waitForEvent: 'navi', - }, - ); - + await module.exports.goToImportAccount(); await playwright.waitAndType( mainPageElements.importAccount.input, privateKey, ); await playwright.waitAndClick(mainPageElements.importAccount.importButton); - await switchToCypressIfNotActive(); return true; }, From 2a4f323ec976a90eff1f16fa6b4eedb753b45c46 Mon Sep 17 00:00:00 2001 From: Jakub Mucha Date: Wed, 5 Oct 2022 21:24:56 +0200 Subject: [PATCH 14/34] feat: use goToNewAccount Signed-off-by: Jakub Mucha --- commands/metamask.js | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/commands/metamask.js b/commands/metamask.js index 887ed7188..245b5bc17 100644 --- a/commands/metamask.js +++ b/commands/metamask.js @@ -37,6 +37,7 @@ let extensionHomeUrl; let extensionSettingsUrl; let extensionAdvancedSettingsUrl; let extensionAddNetworkUrl; +let extensionNewAccountUrl; let extensionImportAccountUrl; let walletAddress; let switchBackToCypressWindow; @@ -52,6 +53,7 @@ module.exports = { extensionSettingsUrl, extensionAdvancedSettingsUrl, extensionAddNetworkUrl, + extensionNewAccountUrl, extensionImportAccountUrl, }; }, @@ -76,6 +78,12 @@ module.exports = { playwright.metamaskWindow().goto(extensionAddNetworkUrl), ]); }, + goToNewAccount: async () => { + await Promise.all([ + playwright.metamaskWindow().waitForNavigation(), + playwright.metamaskWindow().goto(extensionNewAccountUrl), + ]); + }, goToImportAccount: async () => { await Promise.all([ playwright.metamaskWindow().waitForNavigation(), @@ -89,7 +97,8 @@ module.exports = { extensionSettingsUrl = `${extensionHomeUrl}#settings`; extensionAdvancedSettingsUrl = `${extensionSettingsUrl}/advanced`; extensionAddNetworkUrl = `${extensionSettingsUrl}/networks/add-network`; - extensionImportAccountUrl = `${extensionHomeUrl}#new-account/import`; + extensionNewAccountUrl = `${extensionHomeUrl}#new-account`; + extensionImportAccountUrl = `${extensionNewAccountUrl}/import`; return { extensionInitialUrl, @@ -97,6 +106,7 @@ module.exports = { extensionSettingsUrl, extensionAdvancedSettingsUrl, extensionAddNetworkUrl, + extensionNewAccountUrl, extensionImportAccountUrl, }; }, @@ -266,15 +276,7 @@ module.exports = { } await switchToMetamaskIfNotActive(); - - await playwright.waitAndClick(mainPageElements.accountMenu.button); - await playwright.waitAndClick( - mainPageElements.accountMenu.createAccountButton, - await playwright.metamaskWindow(), - { - waitForEvent: 'navi', - }, - ); + await module.exports.goToNewAccount(); if (accountName) { await playwright.waitAndType( From 5930e226964c1270f3515f094a02622c7fe2e6e2 Mon Sep 17 00:00:00 2001 From: Jakub Mucha Date: Wed, 5 Oct 2022 21:49:09 +0200 Subject: [PATCH 15/34] deps: update Signed-off-by: Jakub Mucha --- package.json | 18 ++--- yarn.lock | 211 +++++++++++++++++++++++++++++++-------------------- 2 files changed, 139 insertions(+), 90 deletions(-) diff --git a/package.json b/package.json index 5159f9937..53464712d 100644 --- a/package.json +++ b/package.json @@ -48,22 +48,22 @@ "@cypress/react": "^6.2.0", "@cypress/webpack-dev-server": "^2.3.0", "@drptbl/gremlins.js": "^2.2.1", - "@playwright/test": "^1.25.2", + "@playwright/test": "^1.26.1", "@synthetixio/js": "^2.41.0", "@testing-library/cypress": "^8.0.3", "@testing-library/react": "^13.4.0", "@types/testing-library__cypress": "^5.0.9", - "axios": "^0.27.2", + "axios": "^1.0.0", "babel-plugin-istanbul": "^6.1.1", "babel-plugin-react-generate-property": "^1.1.2", "babel-plugin-react-remove-properties": "^0.3.0", "babel-plugin-transform-react-qa-classes": "^1.6.0", "babel-plugin-transform-react-styled-components-qa": "^2.1.0", "bytes32": "^0.0.3", - "commander": "^9.4.0", - "cypress": "^10.8.0", + "commander": "^9.4.1", + "cypress": "^10.9.0", "cypress-wait-until": "^1.7.2", - "dotenv": "^16.0.2", + "dotenv": "^16.0.3", "dotenv-parse-variables": "^2.0.0", "download": "^8.0.0", "eslint": "^7.32.0", @@ -76,9 +76,9 @@ "eslint-plugin-prettier": "^4.2.1", "eslint-plugin-promise": "^6.0.1", "eslint-plugin-standard": "^4.1.0", - "eslint-plugin-testing-library": "^5.6.4", + "eslint-plugin-testing-library": "^5.7.2", "eslint-plugin-ui-testing": "^2.0.1", - "eslint-plugin-unicorn": "^43.0.2", + "eslint-plugin-unicorn": "^44.0.1", "etherscan-api": "^10.2.0", "find-config": "^1.0.0", "node-fetch": "^2.6.1", @@ -89,8 +89,8 @@ }, "devDependencies": { "@microsoft/eslint-formatter-sarif": "^3.0.0", - "npm-check-updates": "^16.1.2", - "release-it": "^15.4.1" + "npm-check-updates": "^16.3.8", + "release-it": "^15.5.0" }, "engines": { "node": ">=10" diff --git a/yarn.lock b/yarn.lock index 7a7f59623..e2b7e8fd4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -151,6 +151,11 @@ resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz#9c97e30d31b2b8c72a1d08984f2ca9b574d7a076" integrity sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g== +"@babel/helper-validator-identifier@^7.19.1": + version "7.19.1" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz#7eea834cf32901ffdc1a7ee555e2f9c27e249ca2" + integrity sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w== + "@babel/helper-validator-option@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz#bf0d2b5a509b1f336099e4ff36e1a63aa5db4db8" @@ -1171,13 +1176,13 @@ dependencies: "@octokit/openapi-types" "^13.9.0" -"@playwright/test@^1.25.2": - version "1.25.2" - resolved "https://registry.yarnpkg.com/@playwright/test/-/test-1.25.2.tgz#e726cf4844f096315c3954fdb3abf295cede43ba" - integrity sha512-6qPznIR4Fw02OMbqXUPMG6bFFg1hDVNEdihKy0t9K0dmRbus1DyP5Q5XFQhGwEHQkLG5hrSfBuu9CW/foqhQHQ== +"@playwright/test@^1.26.1": + version "1.26.1" + resolved "https://registry.yarnpkg.com/@playwright/test/-/test-1.26.1.tgz#73ada4e70f618bca69ba7509c4ba65b5a41c4b10" + integrity sha512-bNxyZASVt2adSZ9gbD7NCydzcb5JaI0OR9hc7s+nmPeH604gwp0zp17NNpwXY4c8nvuBGQQ9oGDx72LE+cUWvw== dependencies: "@types/node" "*" - playwright-core "1.25.2" + playwright-core "1.26.1" "@pnpm/network.ca-file@^1.0.1": version "1.0.1" @@ -1538,7 +1543,7 @@ resolved "https://registry.yarnpkg.com/@types/html-minifier-terser/-/html-minifier-terser-6.1.0.tgz#4fc33a00c1d0c16987b1a20cf92d20614c55ac35" integrity sha512-oh/6byDPnL1zeNXFrDXFLyZjkr1MsBG667IM792caf1L2UPOOMf65NFzjUH/ltyfwjAGfs1rsX1eftK0jC/KIg== -"@types/http-cache-semantics@*": +"@types/http-cache-semantics@*", "@types/http-cache-semantics@^4.0.1": version "4.0.1" resolved "https://registry.yarnpkg.com/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz#0ea7b61496902b95890dc4c3a116b60cb8dae812" integrity sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ== @@ -1661,13 +1666,6 @@ dependencies: 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/retry@0.12.0": version "0.12.0" resolved "https://registry.yarnpkg.com/@types/retry/-/retry-0.12.0.tgz#2b35eccfcee7d38cd72ad99232fbd58bffb3c84d" @@ -2485,7 +2483,7 @@ aws4@^1.8.0: resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59" integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA== -axios@0.27.2, axios@^0.27.2: +axios@0.27.2: version "0.27.2" resolved "https://registry.yarnpkg.com/axios/-/axios-0.27.2.tgz#207658cc8621606e586c85db4b41a750e756d972" integrity sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ== @@ -2508,6 +2506,15 @@ axios@^0.21.1: dependencies: follow-redirects "^1.14.0" +axios@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.0.0.tgz#16ded6096c1d37650db9f6a8d48a2f7c1bb58622" + integrity sha512-SsHsGFN1qNPFT5QhSoSD37SHDfGyLSW5AESmyLk2JeCMHv5g0I9g0Hz/zQHx2KNe0jGXh2q2hAm7OdkXm360CA== + dependencies: + follow-redirects "^1.15.0" + form-data "^4.0.0" + proxy-from-env "^1.1.0" + babel-code-frame@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" @@ -3536,6 +3543,24 @@ cacheable-lookup@^6.0.4: resolved "https://registry.yarnpkg.com/cacheable-lookup/-/cacheable-lookup-6.1.0.tgz#0330a543471c61faa4e9035db583aad753b36385" integrity sha512-KJ/Dmo1lDDhmW2XDPMo+9oiy/CeqosPguPCrgcVzKyZrL6pM1gU2GmPY/xo6OQPTUaA/c0kwHuywB4E6nmT9ww== +cacheable-lookup@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/cacheable-lookup/-/cacheable-lookup-7.0.0.tgz#3476a8215d046e5a3202a9209dd13fec1f933a27" + integrity sha512-+qJyx4xiKra8mZrcwhjMRMUhD5NR1R8esPkzIYxX96JiecFoxAXFuz/GpR3+ev4PE1WamHip78wV0vcmPQtp8w== + +cacheable-request@^10.2.1: + version "10.2.1" + resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-10.2.1.tgz#cbc7480bf057fb7bd5bc7520f7e5a43d9c865626" + integrity sha512-3tLJyBjGuXw1s5gpKFSG3iS4kaKT4id04dZi98wzHQp/8cqZNweBnrF9J+rrlvrf4M53OdtDGNctNHFias8BEA== + dependencies: + "@types/http-cache-semantics" "^4.0.1" + get-stream "^6.0.1" + http-cache-semantics "^4.1.0" + keyv "^4.5.0" + mimic-response "^4.0.0" + normalize-url "^7.1.0" + responselike "^3.0.0" + cacheable-request@^2.1.1: version "2.1.4" resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-2.1.4.tgz#0d808801b6342ad33c91df9d0b44dc09b91e5c3d" @@ -3793,11 +3818,16 @@ chownr@^2.0.0: resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece" integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ== -ci-info@^3.2.0, ci-info@^3.3.2: +ci-info@^3.2.0: version "3.3.2" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.3.2.tgz#6d2967ffa407466481c6c90b6e16b3098f080128" integrity sha512-xmDt/QIAdeZ9+nfdPsaBCpMvHNLFiLdjj59qjqn+6iPe6YmHGQ35sBnQ8uslRBXFmXkiZQOJRjvQeoGppoTjjg== +ci-info@^3.4.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.4.0.tgz#b28484fd436cbc267900364f096c9dc185efb251" + integrity sha512-t5QdPT5jq3o262DOQ8zA6E1tlH2upmUc4Hlvrbx1pGYJuiiHl7O7rvVNI+l8HTVhd/q3Qc9vqimkNk5yiXsAug== + cids@^0.7.1: version "0.7.5" resolved "https://registry.yarnpkg.com/cids/-/cids-0.7.5.tgz#60a08138a99bfb69b6be4ceb63bfef7a396b28b2" @@ -4071,10 +4101,10 @@ commander@^8.1.0, commander@^8.3.0: resolved "https://registry.yarnpkg.com/commander/-/commander-8.3.0.tgz#4837ea1b2da67b9c616a67afbb0fafee567bca66" integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww== -commander@^9.4.0: - version "9.4.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-9.4.0.tgz#bc4a40918fefe52e22450c111ecd6b7acce6f11c" - integrity sha512-sRPT+umqkz90UA8M1yqYfnHlZA7fF6nSphDtxeywPZ49ysjxDQybzk13CL+mXekDRG92skbcqCLVovuCusNmFw== +commander@^9.4.1: + version "9.4.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-9.4.1.tgz#d1dd8f2ce6faf93147295c0df13c7c21141cfbdd" + integrity sha512-5EEkTNyHNGFPD2H+c/dXXfQZYa/scCKasxWcXJaWnNJ99pnQN9Vnmqow+p+PlFPE63Q6mThaZws1T+HxfpgtPw== common-tags@^1.8.0: version "1.8.2" @@ -4440,10 +4470,10 @@ cypress@*: untildify "^4.0.0" yauzl "^2.10.0" -cypress@^10.8.0: - version "10.8.0" - resolved "https://registry.yarnpkg.com/cypress/-/cypress-10.8.0.tgz#12a681f2642b6f13d636bab65d5b71abdb1497a5" - integrity sha512-QVse0dnLm018hgti2enKMVZR9qbIO488YGX06nH5j3Dg1isL38DwrBtyrax02CANU6y8F4EJUuyW6HJKw1jsFA== +cypress@^10.9.0: + version "10.9.0" + resolved "https://registry.yarnpkg.com/cypress/-/cypress-10.9.0.tgz#273a61a6304766f9d6423e5ac8d4a9a11ed8b485" + integrity sha512-MjIWrRpc+bQM9U4kSSdATZWZ2hUqHGFEQTF7dfeZRa4MnalMtc88FIE49USWP2ZVtfy5WPBcgfBX+YorFqGElA== dependencies: "@cypress/request" "^2.88.10" "@cypress/xvfb" "^1.2.4" @@ -4932,10 +4962,10 @@ dotenv-parse-variables@^2.0.0: debug "^4.3.1" is-string-and-not-blank "^0.0.2" -dotenv@^16.0.2: - version "16.0.2" - resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.0.2.tgz#0b0f8652c016a3858ef795024508cddc4bffc5bf" - integrity sha512-JvpYKUmzQhYoIFgK2MOnF3bciIZoItIIoryihy0rIA+H4Jy0FmgyKYAHCTN98P5ybGSJcIFbh6QKeJdtZd1qhA== +dotenv@^16.0.3: + version "16.0.3" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.0.3.tgz#115aec42bac5053db3c456db30cc243a5a836a07" + integrity sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ== dotignore@~0.1.2: version "0.1.2" @@ -5344,10 +5374,10 @@ eslint-plugin-standard@^4.1.0: resolved "https://registry.yarnpkg.com/eslint-plugin-standard/-/eslint-plugin-standard-4.1.0.tgz#0c3bf3a67e853f8bbbc580fb4945fbf16f41b7c5" integrity sha512-ZL7+QRixjTR6/528YNGyDotyffm5OQst/sGxKDwGb9Uqs4In5Egi4+jbobhqJoyoCM6/7v/1A5fhQ7ScMtDjaQ== -eslint-plugin-testing-library@^5.6.4: - version "5.6.4" - resolved "https://registry.yarnpkg.com/eslint-plugin-testing-library/-/eslint-plugin-testing-library-5.6.4.tgz#9dffd9feafbb08a36240f88156357685b56f0b8a" - integrity sha512-0oW3tC5NNT2WexmJ3848a/utawOymw4ibl3/NkwywndVAz2hT9+ab70imA7ccg3RaScQgMvJT60OL00hpmJvrg== +eslint-plugin-testing-library@^5.7.2: + version "5.7.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-testing-library/-/eslint-plugin-testing-library-5.7.2.tgz#c1b2112a40aab61f93e10859e8b2d81e54f0ce84" + integrity sha512-0ZmHeR/DUUgEzW8rwUBRWxuqntipDtpvxK0hymdHnLlABryJkzd+CAHr+XnISaVsTisZ5MLHp6nQF+8COHLLTA== dependencies: "@typescript-eslint/utils" "^5.13.0" @@ -5358,18 +5388,18 @@ eslint-plugin-ui-testing@^2.0.1: dependencies: "@typescript-eslint/experimental-utils" "^5.3.0" -eslint-plugin-unicorn@^43.0.2: - version "43.0.2" - resolved "https://registry.yarnpkg.com/eslint-plugin-unicorn/-/eslint-plugin-unicorn-43.0.2.tgz#b189d58494c8a0985a4b89dba5dbfde3ad7575a5" - integrity sha512-DtqZ5mf/GMlfWoz1abIjq5jZfaFuHzGBZYIeuJfEoKKGWRHr2JiJR+ea+BF7Wx2N1PPRoT/2fwgiK1NnmNE3Hg== +eslint-plugin-unicorn@^44.0.1: + version "44.0.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-unicorn/-/eslint-plugin-unicorn-44.0.1.tgz#e5171368ffadd9f5d5434342edd1fd39aad817d3" + integrity sha512-ly6Ye9OfgYBCw/FfsdycCzAztcRd+pOA0F6xZwtUsUkgOBjtNR0684xC7u+0RmE3SKr3y7z8MaIWunw36tbZdg== dependencies: - "@babel/helper-validator-identifier" "^7.18.6" - ci-info "^3.3.2" + "@babel/helper-validator-identifier" "^7.19.1" + ci-info "^3.4.0" clean-regexp "^1.0.0" eslint-utils "^3.0.0" esquery "^1.4.0" indent-string "^4.0.0" - is-builtin-module "^3.1.0" + is-builtin-module "^3.2.0" lodash "^4.17.21" pluralize "^8.0.0" read-pkg-up "^7.0.1" @@ -6420,10 +6450,10 @@ figures@^3.2.0: dependencies: escape-string-regexp "^1.0.5" -figures@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/figures/-/figures-4.0.1.tgz#27b26609907bc888b3e3b0ef5403643f80aa2518" - integrity sha512-rElJwkA/xS04Vfg+CaZodpso7VqBknOYbzi6I76hI4X80RUjkSxO2oAyPmGbuXUppywjqndOrQDl817hDnI++w== +figures@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-5.0.0.tgz#126cd055052dea699f8a54e8c9450e6ecfc44d5f" + integrity sha512-ej8ksPF4x6e5wvK9yevct0UCXh8TTFlWGVLlgjZuoBH1HwjIfKE/IdL5mq89sFA7zELi1VhKpmtDnrs7zWyeyg== dependencies: escape-string-regexp "^5.0.0" is-unicode-supported "^1.2.0" @@ -6593,6 +6623,11 @@ follow-redirects@^1.0.0, follow-redirects@^1.14.0, follow-redirects@^1.14.9: resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.1.tgz#0ca6a452306c9b276e4d3127483e29575e207ad5" integrity sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA== +follow-redirects@^1.15.0: + version "1.15.2" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" + integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== + for-each@^0.3.3, for-each@~0.3.3: version "0.3.3" resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" @@ -6613,11 +6648,16 @@ forever-agent@~0.6.1: resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" integrity sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw== -form-data-encoder@^2.0.1, form-data-encoder@^2.1.0: +form-data-encoder@^2.1.0: version "2.1.2" resolved "https://registry.yarnpkg.com/form-data-encoder/-/form-data-encoder-2.1.2.tgz#5996b7c236e8c418d08316055a2235226c5e4061" integrity sha512-FCaIOVTRA9E0siY6FeXid7D5yrCqpsErplUkE2a1BEiKj1BE9z6FbKB4ntDTwC4NVLie9p+4E9nX4mWwEOT05A== +form-data-encoder@^2.1.2: + version "2.1.3" + resolved "https://registry.yarnpkg.com/form-data-encoder/-/form-data-encoder-2.1.3.tgz#682cd821a8423605093992ff895e6b2ed5a9d429" + integrity sha512-KqU0nnPMgIJcCOFTNJFEA8epcseEaoox4XZffTgy8jlI6pL/5EFyR54NRG7CnCJN0biY7q52DO3MH6/sJ/TKlQ== + form-data@4.0.0, form-data@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" @@ -6917,10 +6957,10 @@ git-up@^7.0.0: is-ssh "^1.4.0" parse-url "^8.1.0" -git-url-parse@13.0.0: - version "13.0.0" - resolved "https://registry.yarnpkg.com/git-url-parse/-/git-url-parse-13.0.0.tgz#9a18d0eaec579fb6379c368aecb09f00b544669c" - integrity sha512-X1kozCqKL82dMrCLi4vie9SHDC+QugKskAMs4VUbIkhURKg5yDwxDmf6Ixg73J+/xVgK5TXKhzn8a94nHJHpnA== +git-url-parse@13.1.0: + version "13.1.0" + resolved "https://registry.yarnpkg.com/git-url-parse/-/git-url-parse-13.1.0.tgz#07e136b5baa08d59fabdf0e33170de425adf07b4" + integrity sha512-5FvPJP/70WkIprlUZ33bm4UAaFdjcLkJLpWft1BeZKqwR0uhhNGoKwlUaPtVb4LxCSQ++erHapRak9kWGj+FCA== dependencies: git-up "^7.0.0" @@ -7039,24 +7079,22 @@ globby@^6.1.0: pify "^2.0.0" pinkie-promise "^2.0.0" -got@12.3.1: - version "12.3.1" - resolved "https://registry.yarnpkg.com/got/-/got-12.3.1.tgz#79d6ebc0cb8358c424165698ddb828be56e74684" - integrity sha512-tS6+JMhBh4iXMSXF6KkIsRxmloPln31QHDlcb6Ec3bzxjjFJFr/8aXdpyuLmVc9I4i2HyBHYw1QU5K1ruUdpkw== +got@12.5.1: + version "12.5.1" + resolved "https://registry.yarnpkg.com/got/-/got-12.5.1.tgz#0796191c61478273f4cdbeb19d358a75a54a008d" + integrity sha512-sD16AK8cCyUoPtKr/NMvLTFFa+T3i3S+zoiuvhq0HP2YiqBZA9AtlBjAdsQBsLBK7slPuvmfE0OxhGi7N5dD4w== dependencies: "@sindresorhus/is" "^5.2.0" "@szmarczak/http-timer" "^5.0.1" - "@types/cacheable-request" "^6.0.2" - "@types/responselike" "^1.0.0" - cacheable-lookup "^6.0.4" - cacheable-request "^7.0.2" + cacheable-lookup "^7.0.0" + cacheable-request "^10.2.1" decompress-response "^6.0.0" - form-data-encoder "^2.0.1" + form-data-encoder "^2.1.2" get-stream "^6.0.1" http2-wrapper "^2.1.10" lowercase-keys "^3.0.0" p-cancelable "^3.0.0" - responselike "^2.0.0" + responselike "^3.0.0" got@9.6.0: version "9.6.0" @@ -7674,17 +7712,17 @@ inquirer-list-search-prompt@^1.0.2: figures "^2.0.0" run-async "^2.3.0" -inquirer@9.1.0: - version "9.1.0" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-9.1.0.tgz#446a09abe2e5a18973322bee89b42a6c304f2cd3" - integrity sha512-eukdjrBljg9t55ZnvJjvGi1OyYEzVBFsO/8o5d2MV3mc28u3x4X2kS4eJ/+9U10KiREfPkEBSeCrU/S2G/uRtw== +inquirer@9.1.2: + version "9.1.2" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-9.1.2.tgz#37f5486f3de0e38820aad83a1f75c52c747e2f9a" + integrity sha512-Hj2Ml1WpxKJU2npP2Rj0OURGkHV+GtNW2CwFdHDiXlqUBAUrWTcZHxCkFywX/XHzOS7wrG/kExgJFbUkVgyHzg== dependencies: ansi-escapes "^5.0.0" chalk "^5.0.1" cli-cursor "^4.0.0" cli-width "^4.0.0" external-editor "^3.0.3" - figures "^4.0.1" + figures "^5.0.0" lodash "^4.17.21" mute-stream "0.0.8" ora "^6.1.2" @@ -7808,7 +7846,7 @@ is-buffer@^2.0.2: resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.5.tgz#ebc252e400d22ff8d77fa09888821a24a658c191" integrity sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ== -is-builtin-module@^3.1.0: +is-builtin-module@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-3.2.0.tgz#bb0310dfe881f144ca83f30100ceb10cf58835e0" integrity sha512-phDA4oSGt7vl1n5tJvTWooWWAsXLY+2xCnxNqvKhGEzujg+A43wPlPOyDg3C8XQHN+6k/JTQWJ/j0dQh/qr+Hw== @@ -8546,7 +8584,7 @@ keyv@^3.0.0: dependencies: json-buffer "3.0.0" -keyv@^4.0.0: +keyv@^4.0.0, keyv@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.0.tgz#dbce9ade79610b6e641a9a65f2f6499ba06b9bc6" integrity sha512-2YvuMsA+jnFGtBareKqgANOEKe1mk3HKiXu2fRmAfyxG0MJAywNhi5ttWA3PMjl4NmpyjZNbFifR2vNjW1znfA== @@ -9100,6 +9138,11 @@ mimic-response@^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== +mimic-response@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-4.0.0.tgz#35468b19e7c75d10f5165ea25e75a5ceea7cf70f" + integrity sha512-e5ISH9xMYU0DzrT+jl8q2ze9D6eWBto+I8CNpe+VI+K2J/F/k3PdkdTdz4wvGVH4NTpo+NRYTVIuMQEMMcsLqg== + min-document@^2.19.0: version "2.19.0" resolved "https://registry.yarnpkg.com/min-document/-/min-document-2.19.0.tgz#7bd282e3f5842ed295bb748cdd9f1ffa2c824685" @@ -9507,6 +9550,11 @@ normalize-url@^6.0.1: resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-6.1.0.tgz#40d0885b535deffe3f3147bec877d05fe4c5668a" integrity sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A== +normalize-url@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-7.2.0.tgz#5317f78cff95f5fa1e76cc0b5e33245c43781e11" + integrity sha512-uhXOdZry0L6M2UIo9BTt7FdpBDiAGN/7oItedQwPKh8jh31ZlvC8U9Xl/EJ3aijDHaywXTW3QbZ6LuCocur1YA== + npm-bundled@^1.1.1: version "1.1.2" resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.1.2.tgz#944c78789bd739035b70baa2ca5cc32b8d860bc1" @@ -9521,14 +9569,14 @@ npm-bundled@^2.0.0: dependencies: npm-normalize-package-bin "^2.0.0" -npm-check-updates@^16.1.2: - version "16.1.2" - resolved "https://registry.yarnpkg.com/npm-check-updates/-/npm-check-updates-16.1.2.tgz#855d2ce682ef8148240a01daff6592c095cbab47" - integrity sha512-6ZnDkrGkQQ+tnCeMXIO7sxdTWwXiodzO02sOtyZzj9HbJqAf4qY0wdmTEkG7wBNggwlIksVxgyjCzSejMdv6qg== +npm-check-updates@^16.3.8: + version "16.3.8" + resolved "https://registry.yarnpkg.com/npm-check-updates/-/npm-check-updates-16.3.8.tgz#3f128ce8ca658f6af8f1ebfc8c905168a7996dfe" + integrity sha512-2CUeCWEs+arWQUJH2IEkiZU/Ak2fLBqGkMyM5JDkfnGhz1VHNe3yyGiXD+0JeVmjbXTEpgZ0t6C9VK52atGuAw== dependencies: chalk "^5.0.1" cli-table "^0.3.11" - commander "^9.4.0" + commander "^9.4.1" fast-memoize "^2.5.2" find-up "5.0.0" fp-and-or "^0.1.3" @@ -9551,6 +9599,7 @@ npm-check-updates@^16.1.2: semver-utils "^1.1.4" source-map-support "^0.5.21" spawn-please "^1.0.0" + untildify "^4.0.0" update-notifier "^6.0.2" yaml "^2.1.1" @@ -10361,10 +10410,10 @@ pkg-dir@^4.1.0: dependencies: find-up "^4.0.0" -playwright-core@1.25.2: - version "1.25.2" - resolved "https://registry.yarnpkg.com/playwright-core/-/playwright-core-1.25.2.tgz#ea4baa398a4d45fcdfe48799482b599e3d0f033f" - integrity sha512-0yTbUE9lIddkEpLHL3u8PoCL+pWiZtj5A/j3U7YoNjcmKKDGBnCrgHJMzwd2J5vy6l28q4ki3JIuz7McLHhl1A== +playwright-core@1.26.1: + version "1.26.1" + resolved "https://registry.yarnpkg.com/playwright-core/-/playwright-core-1.26.1.tgz#a162f476488312dcf12638d97685144de6ada512" + integrity sha512-hzFchhhxnEiPc4qVPs9q2ZR+5eKNifY2hQDHtg1HnTTUuphYCBP8ZRb2si+B1TR7BHirgXaPi48LIye5SgrLAA== pluralize@^8.0.0: version "8.0.0" @@ -10580,7 +10629,7 @@ proxy-from-env@1.0.0: resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.0.0.tgz#33c50398f70ea7eb96d21f7b817630a55791c7ee" integrity sha512-F2JHgJQ1iqwnHDcQjVBsq3n/uoaFL+iPW/eAeL7kVxy/2RrWaN4WroKjjvbsoRtv0ftelNyC01bjRhn/bhcf4A== -proxy-from-env@^1.0.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== @@ -10975,10 +11024,10 @@ relateurl@^0.2.7: resolved "https://registry.yarnpkg.com/relateurl/-/relateurl-0.2.7.tgz#54dbf377e51440aca90a4cd274600d3ff2d888a9" integrity sha512-G08Dxvm4iDN3MLM0EsP62EDV9IuhXPR6blNz6Utcp7zyV3tr4HVNINt6MpaRWbxoOHT3Q7YN2P+jaHX8vUbgog== -release-it@^15.4.1: - version "15.4.1" - resolved "https://registry.yarnpkg.com/release-it/-/release-it-15.4.1.tgz#bf9302124405e57401bd10bd635d9458b30faf15" - integrity sha512-w6adXfE+bN/fdcG1KehgS7gYcTfZLYIPml4jPOUEtYQ6NJyaiCtCF/ks032w1jf6EUgvGgWruRP+2TyyyDDBgA== +release-it@^15.5.0: + version "15.5.0" + resolved "https://registry.yarnpkg.com/release-it/-/release-it-15.5.0.tgz#773c247d4fd5a5e5c8801b02bf1e7e9e536bee27" + integrity sha512-/pQo/PwEXAWRBgVGLE+3IQ3hUoeiDZMGAo/Egin1envCyLyjzrU7+0P2w4iZ1Xv5OxhC2AcaPaN5eY1ql47cBA== dependencies: "@iarna/toml" "2.2.5" "@octokit/rest" "19.0.4" @@ -10987,10 +11036,10 @@ release-it@^15.4.1: cosmiconfig "7.0.1" execa "6.1.0" form-data "4.0.0" - git-url-parse "13.0.0" + git-url-parse "13.1.0" globby "13.1.2" - got "12.3.1" - inquirer "9.1.0" + got "12.5.1" + inquirer "9.1.2" is-ci "3.0.1" lodash "4.17.21" mime-types "2.1.35" From 0f31e5d39c4b10144d139461ba9333215656376f Mon Sep 17 00:00:00 2001 From: Jakub Mucha Date: Wed, 5 Oct 2022 21:49:16 +0200 Subject: [PATCH 16/34] fix: addnetwork Signed-off-by: Jakub Mucha --- commands/metamask.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/commands/metamask.js b/commands/metamask.js index 245b5bc17..70c2fdaf4 100644 --- a/commands/metamask.js +++ b/commands/metamask.js @@ -24,6 +24,7 @@ const { settingsPageElements, advancedPageElements, resetAccountModalElements, + networksPageElements, addNetworkPageElements, } = require('../pages/metamask/settings-page'); const { @@ -401,6 +402,7 @@ module.exports = { } await module.exports.goToAddNetwork(); + await playwright.waitAndClick(networksPageElements.addNetworkButton); await playwright.waitAndType( addNetworkPageElements.networkNameInput, network.networkName, From 859be0c0a796ffa2deb3fabb25de66e0bae71f17 Mon Sep 17 00:00:00 2001 From: Jakub Mucha Date: Wed, 5 Oct 2022 21:49:59 +0200 Subject: [PATCH 17/34] Squashed commit of the following: commit 2cb209893380d9c47240d80b8de9ff4cbaebce7d Merge: 3d5d63a ac0f779 Author: drptbl Date: Wed Oct 5 21:29:24 2022 +0200 Merge pull request #528 from Synthetixio/dependabot/github_actions/actions/checkout-3.1.0 chore(deps): Bump actions/checkout from 3.0.2 to 3.1.0 commit 3d5d63a1f435608a3f4cb95062d0302f59867911 Merge: 7f76f40 6addda3 Author: drptbl Date: Wed Oct 5 21:29:11 2022 +0200 Merge pull request #526 from Synthetixio/dependabot/github_actions/actions/cache-3.0.10 chore(deps): Bump actions/cache from 3.0.8 to 3.0.10 commit 7f76f40cbb4b5635c944cce327154dcf5d460323 Merge: dd4e14a b1ca0bf Author: drptbl Date: Wed Oct 5 21:29:02 2022 +0200 Merge pull request #522 from Synthetixio/dependabot/github_actions/github/codeql-action-2.1.26 chore(deps): Bump github/codeql-action from 2.1.25 to 2.1.26 commit ac0f77937b4278b4211cf40c8041e1914828f3f1 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue Oct 4 17:04:51 2022 +0000 chore(deps): Bump actions/checkout from 3.0.2 to 3.1.0 Bumps [actions/checkout](https://github.com/actions/checkout) from 3.0.2 to 3.1.0. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3.0.2...93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] commit 6addda388e873a8273c8815f59b01c4eb6a19068 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Oct 3 17:04:46 2022 +0000 chore(deps): Bump actions/cache from 3.0.8 to 3.0.10 Bumps [actions/cache](https://github.com/actions/cache) from 3.0.8 to 3.0.10. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/v3.0.8...56461b9eb0f8438fd15c7a9968e3c9ebb18ceff1) --- updated-dependencies: - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] commit b1ca0bf980fe2857a123737f31a5084c67008db1 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri Sep 30 17:04:54 2022 +0000 chore(deps): Bump github/codeql-action from 2.1.25 to 2.1.26 Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.1.25 to 2.1.26. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/86f3159a697a097a813ad9bfa0002412d97690a4...e0e5ded33cabb451ae0a9768fc7b0410bad9ad44) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Signed-off-by: Jakub Mucha --- .github/workflows/audit_and_lint.yml | 12 ++++++------ .github/workflows/codeql.yml | 6 +++--- .github/workflows/release.yml | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/audit_and_lint.yml b/.github/workflows/audit_and_lint.yml index 6d4ff6bdc..2d63cd601 100644 --- a/.github/workflows/audit_and_lint.yml +++ b/.github/workflows/audit_and_lint.yml @@ -22,7 +22,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # pin@v2 + uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # pin@v2 - name: Audit dependencies run: audit-ci --critical --report-type full @@ -45,13 +45,13 @@ jobs: steps: - name: Checkout - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # pin@v2 + uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # pin@v2 - name: Set yarn cache directory run: yarn config set cache-folder .yarn-cache continue-on-error: true - - uses: actions/cache@fd5de65bc895cf536527842281bea11763fefd77 # pin@v2 + - uses: actions/cache@56461b9eb0f8438fd15c7a9968e3c9ebb18ceff1 # pin@v2 with: path: | .yarn-cache @@ -76,7 +76,7 @@ jobs: if: always() && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' || github.event_name == 'pull_request') - uses: github/codeql-action/upload-sarif@86f3159a697a097a813ad9bfa0002412d97690a4 # pin@codeql-bundle-20210517 + uses: github/codeql-action/upload-sarif@e0e5ded33cabb451ae0a9768fc7b0410bad9ad44 # pin@codeql-bundle-20210517 with: sarif_file: lint-results.sarif continue-on-error: true @@ -94,7 +94,7 @@ jobs: run: chown -R $(whoami) . - name: Checkout - uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97 # pin@v2 + uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # pin@v2 - name: Set up QEMU uses: docker/setup-qemu-action@8b122486cedac8393e77aa9734c3528886e4a1a8 # pin@v1 @@ -103,7 +103,7 @@ jobs: uses: docker/setup-buildx-action@dc7b9719a96d48369863986a06765841d7ea23f6 # pin@v1 - name: Cache Docker layers - uses: actions/cache@515d10b4fd9bb4858066bd5769f55bd498dcdd27 # pin@v2 + uses: actions/cache@56461b9eb0f8438fd15c7a9968e3c9ebb18ceff1 # pin@v2 with: path: /tmp/.buildx-cache key: ${{ runner.os }}-buildx-${{ github.sha }} diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 59646c45b..9db8032bd 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -14,13 +14,13 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # pin@v2 + uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # pin@v2 - name: Initialize CodeQL - uses: github/codeql-action/init@86f3159a697a097a813ad9bfa0002412d97690a4 + uses: github/codeql-action/init@e0e5ded33cabb451ae0a9768fc7b0410bad9ad44 with: queries: security-and-quality languages: javascript - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@86f3159a697a097a813ad9bfa0002412d97690a4 + uses: github/codeql-action/analyze@e0e5ded33cabb451ae0a9768fc7b0410bad9ad44 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 657c05ae5..78a8ccf69 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,7 +27,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # pin@v2 + uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # pin@v2 with: fetch-depth: 0 ref: master @@ -36,7 +36,7 @@ jobs: run: yarn config set cache-folder .yarn-cache continue-on-error: true - - uses: actions/cache@fd5de65bc895cf536527842281bea11763fefd77 # pin@v2 + - uses: actions/cache@56461b9eb0f8438fd15c7a9968e3c9ebb18ceff1 # pin@v2 with: path: | .yarn-cache From 85be0d61d1042424750a492c77bb078d5958b764 Mon Sep 17 00:00:00 2001 From: Jakub Mucha Date: Wed, 5 Oct 2022 21:51:19 +0200 Subject: [PATCH 18/34] fix: debug Signed-off-by: Jakub Mucha --- synpress.config.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/synpress.config.js b/synpress.config.js index 88f55408c..ffd585084 100644 --- a/synpress.config.js +++ b/synpress.config.js @@ -21,8 +21,8 @@ module.exports = defineConfig({ coverage: false, }, defaultCommandTimeout: process.env.SYNDEBUG ? 9999999 : 30000, - pageLoadTimeout: process.env.SYNDEBUG ? 0 : 9999999, - requestTimeout: process.env.SYNDEBUG ? 0 : 9999999, + pageLoadTimeout: process.env.SYNDEBUG ? 9999999 : 30000, + requestTimeout: process.env.SYNDEBUG ? 9999999 : 30000, e2e: { setupNodeEvents, baseUrl: 'http://localhost:3000', From 99f871fc57302e98d00082e90bcf1fb8adae0cf1 Mon Sep 17 00:00:00 2001 From: Jakub Mucha Date: Wed, 5 Oct 2022 22:29:06 +0200 Subject: [PATCH 19/34] fix: add closePopup Signed-off-by: Jakub Mucha --- commands/metamask.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/commands/metamask.js b/commands/metamask.js index 70c2fdaf4..9d4878276 100644 --- a/commands/metamask.js +++ b/commands/metamask.js @@ -137,6 +137,9 @@ module.exports = { return true; }, closePopup: async () => { + // note: this is required for fast execution of e2e tests + // otherwise popup may not be detected properly and not closed + await playwright.metamaskWindow().waitForTimeout(500); if ( (await playwright .metamaskWindow() @@ -278,7 +281,6 @@ module.exports = { await switchToMetamaskIfNotActive(); await module.exports.goToNewAccount(); - if (accountName) { await playwright.waitAndType( mainPageElements.createAccount.input, @@ -286,7 +288,6 @@ module.exports = { ); } await playwright.waitAndClick(mainPageElements.createAccount.createButton); - await switchToCypressIfNotActive(); return true; }, @@ -296,7 +297,9 @@ module.exports = { } await switchToMetamaskIfNotActive(); - + // note: closePopup() is required after changing createAccount() to use direct urls (popup started appearing) + // ^ this change also introduced 500ms delay for closePopup() function + await module.exports.closePopup(); await playwright.waitAndClick(mainPageElements.accountMenu.button); if (typeof accountNameOrAccountNumber === 'number') { From 52c79c5af0f005fc732e9837b0a35adacd9c5728 Mon Sep 17 00:00:00 2001 From: Jakub Mucha Date: Wed, 5 Oct 2022 23:01:37 +0200 Subject: [PATCH 20/34] docker: add env files Signed-off-by: Jakub Mucha --- high-res.env | 4 ++++ low-res.env | 4 ++++ medium-res.env | 4 ++++ 3 files changed, 12 insertions(+) create mode 100644 high-res.env create mode 100644 low-res.env create mode 100644 medium-res.env diff --git a/high-res.env b/high-res.env new file mode 100644 index 000000000..b912e6fa0 --- /dev/null +++ b/high-res.env @@ -0,0 +1,4 @@ +DISPLAY_WIDTH=1920 +DISPLAY_HEIGHT=1080 +SE_SCREEN_WIDTH=1920 +SE_SCREEN_HEIGHT=1080 diff --git a/low-res.env b/low-res.env new file mode 100644 index 000000000..5435cce65 --- /dev/null +++ b/low-res.env @@ -0,0 +1,4 @@ +DISPLAY_WIDTH=800 +DISPLAY_HEIGHT=600 +SE_SCREEN_WIDTH=800 +SE_SCREEN_HEIGHT=600 diff --git a/medium-res.env b/medium-res.env new file mode 100644 index 000000000..fe0f0c8a6 --- /dev/null +++ b/medium-res.env @@ -0,0 +1,4 @@ +DISPLAY_WIDTH=1366 +DISPLAY_HEIGHT=768 +SE_SCREEN_WIDTH=1366 +SE_SCREEN_HEIGHT=768 From 9090ebeaa4a1a020be245facc8c9d0661ebad2a3 Mon Sep 17 00:00:00 2001 From: Jakub Mucha Date: Wed, 5 Oct 2022 23:01:47 +0200 Subject: [PATCH 21/34] chore: improve warning for ngrok Signed-off-by: Jakub Mucha --- start-tests-ci.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/start-tests-ci.sh b/start-tests-ci.sh index ce013541b..bdac713be 100755 --- a/start-tests-ci.sh +++ b/start-tests-ci.sh @@ -1,4 +1,5 @@ #!/bin/bash docker-compose -f docker-compose.ci.yml --build --exit-code-from synpress -# todo: is it safe? +# warning: it's not safe to use ngrok if you have secrets set as environmental variables +# (someone could connect to your CI and steal your vars) # docker-compose -f docker-compose.ci.yml --profile ngrok up --build --exit-code-from synpress From 4fd07e9fefe622e6e6d019a6a93a7622a037ed45 Mon Sep 17 00:00:00 2001 From: Jakub Mucha Date: Wed, 5 Oct 2022 23:01:55 +0200 Subject: [PATCH 22/34] docker: remove res Signed-off-by: Jakub Mucha --- docker-compose.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 70e04b117..55ef2d6dc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -30,8 +30,6 @@ services: image: synthetixio/display:b2643097e891906524e52e7ee956260b20fa01fb-base environment: - RUN_XTERM=no - - DISPLAY_WIDTH=800 - - DISPLAY_HEIGHT=600 ports: - '8080:8080' networks: @@ -56,8 +54,6 @@ services: volumes: - ./docker/videos-ci:/videos environment: - - SE_SCREEN_WIDTH=800 - - SE_SCREEN_HEIGHT=600 - FILE_NAME=CI-full-video.mp4 depends_on: - display From 3df12ec771adb4585530c9ad2cc408bfee3676c0 Mon Sep 17 00:00:00 2001 From: Jakub Mucha Date: Wed, 5 Oct 2022 23:02:07 +0200 Subject: [PATCH 23/34] chore: add note Signed-off-by: Jakub Mucha --- commands/metamask.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/metamask.js b/commands/metamask.js index 9d4878276..14993b40a 100644 --- a/commands/metamask.js +++ b/commands/metamask.js @@ -137,7 +137,7 @@ module.exports = { return true; }, closePopup: async () => { - // note: this is required for fast execution of e2e tests + // note: this is required for fast execution of e2e tests to avoid flakiness // otherwise popup may not be detected properly and not closed await playwright.metamaskWindow().waitForTimeout(500); if ( From 07f95bead44a2972807ac2e1c275d72b518c5027 Mon Sep 17 00:00:00 2001 From: Jakub Mucha Date: Wed, 5 Oct 2022 23:03:19 +0200 Subject: [PATCH 24/34] ci: use matrix Signed-off-by: Jakub Mucha --- .github/workflows/audit_and_lint.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/audit_and_lint.yml b/.github/workflows/audit_and_lint.yml index 2d63cd601..5059de61e 100644 --- a/.github/workflows/audit_and_lint.yml +++ b/.github/workflows/audit_and_lint.yml @@ -88,6 +88,9 @@ jobs: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' || github.event_name == 'pull_request' runs-on: ubuntu-latest + strategy: + matrix: + resolution: ['low', 'medium', 'high'] steps: - name: Chown workspace @@ -111,7 +114,8 @@ jobs: ${{ runner.os }}-buildx- - name: Run e2e tests - run: ./start-tests.sh + run: | + docker-compose --env-file ./${{ matrix.resolution }}-res.env up --build --exit-code-from synpress env: COMPOSE_DOCKER_CLI_BUILD: 1 DOCKER_BUILDKIT: 1 From 55afe9652388702ed547319b3c8f7b436c3718be Mon Sep 17 00:00:00 2001 From: Jakub Mucha Date: Wed, 5 Oct 2022 23:07:16 +0200 Subject: [PATCH 25/34] ci: run tests on low and high res Signed-off-by: Jakub Mucha --- .github/workflows/audit_and_lint.yml | 43 +++++++++++++++++++++++----- 1 file changed, 36 insertions(+), 7 deletions(-) diff --git a/.github/workflows/audit_and_lint.yml b/.github/workflows/audit_and_lint.yml index 5059de61e..87487709d 100644 --- a/.github/workflows/audit_and_lint.yml +++ b/.github/workflows/audit_and_lint.yml @@ -88,9 +88,10 @@ jobs: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' || github.event_name == 'pull_request' runs-on: ubuntu-latest - strategy: - matrix: - resolution: ['low', 'medium', 'high'] + # todo: to enable matrix strategy we need to have different wallets on each resolution because of transactions + # strategy: + # matrix: + # resolution: ['low', 'medium', 'high'] steps: - name: Chown workspace @@ -113,9 +114,9 @@ jobs: restore-keys: | ${{ runner.os }}-buildx- - - name: Run e2e tests + - name: Run e2e tests (low res) run: | - docker-compose --env-file ./${{ matrix.resolution }}-res.env up --build --exit-code-from synpress + docker-compose --env-file ./low-res.env up --build --exit-code-from synpress env: COMPOSE_DOCKER_CLI_BUILD: 1 DOCKER_BUILDKIT: 1 @@ -127,11 +128,39 @@ jobs: CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Archive e2e artifacts + - name: Archive e2e artifacts (low res) uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # pin@v2 if: always() with: - name: e2e-artifacts + name: e2e-artifacts-low-res + path: | + docker/videos + docker/videos-ci + docker/screenshots + continue-on-error: true + + - name: Cleanup + run: rm -rf docker + + - name: Run e2e tests (high res) + run: | + docker-compose --env-file ./high-res.env up --build --exit-code-from synpress + env: + COMPOSE_DOCKER_CLI_BUILD: 1 + DOCKER_BUILDKIT: 1 + DOCKER_DEFAULT_PLATFORM: linux/amd64 + NGROK_AUTH: ${{ secrets.NGROK_AUTH }} + CYPRESS_PRIVATE_KEY_WITH_FUNDS: + ${{ secrets.CYPRESS_PRIVATE_KEY_WITH_FUNDS }} + CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }} + CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Archive e2e artifacts (high res) + uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # pin@v2 + if: always() + with: + name: e2e-artifacts-high-res path: | docker/videos docker/videos-ci From 0a10b68e28a32d42c7d6aeeb10910786aec8d20b Mon Sep 17 00:00:00 2001 From: Jakub Mucha Date: Wed, 5 Oct 2022 23:13:04 +0200 Subject: [PATCH 26/34] fix: critical vuln Signed-off-by: Jakub Mucha --- package.json | 3 +++ yarn.lock | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 53464712d..2bb031e11 100644 --- a/package.json +++ b/package.json @@ -92,6 +92,9 @@ "npm-check-updates": "^16.3.8", "release-it": "^15.5.0" }, + "resolutions": { + "@synthetixio/js/**/underscore": "^1.13.6" + }, "engines": { "node": ">=10" }, diff --git a/yarn.lock b/yarn.lock index e2b7e8fd4..18b63d1eb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12643,10 +12643,10 @@ unbzip2-stream@^1.0.9: buffer "^5.2.1" through "^2.3.8" -underscore@1.9.1: - version "1.9.1" - resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.9.1.tgz#06dce34a0e68a7babc29b365b8e74b8925203961" - integrity sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg== +underscore@1.9.1, underscore@^1.13.6: + version "1.13.6" + resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.13.6.tgz#04786a1f589dc6c09f761fc5f45b89e935136441" + integrity sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A== unique-filename@^2.0.0: version "2.0.1" From 8c37c271c8d080586721fb265bdaf893e1cc0bb5 Mon Sep 17 00:00:00 2001 From: Jakub Mucha Date: Wed, 5 Oct 2022 23:17:01 +0200 Subject: [PATCH 27/34] chore: trunk upgrade Signed-off-by: Jakub Mucha --- .trunk/.gitignore | 4 ++-- .trunk/config/.hadolint.yaml | 4 ++++ .trunk/config/.shellcheckrc | 7 +++++++ .trunk/trunk.yaml | 28 ++++++++++++++++++++-------- 4 files changed, 33 insertions(+), 10 deletions(-) create mode 100644 .trunk/config/.hadolint.yaml create mode 100644 .trunk/config/.shellcheckrc diff --git a/.trunk/.gitignore b/.trunk/.gitignore index b38b75f95..cf2f25470 100644 --- a/.trunk/.gitignore +++ b/.trunk/.gitignore @@ -1,7 +1,7 @@ *out *logs -actions -notifications +*actions +*notifications plugins user_trunk.yaml user.yaml diff --git a/.trunk/config/.hadolint.yaml b/.trunk/config/.hadolint.yaml new file mode 100644 index 000000000..98bf0cd2e --- /dev/null +++ b/.trunk/config/.hadolint.yaml @@ -0,0 +1,4 @@ +# Following source doesn't work in most setups +ignored: + - SC1090 + - SC1091 diff --git a/.trunk/config/.shellcheckrc b/.trunk/config/.shellcheckrc new file mode 100644 index 000000000..8c7b1ada8 --- /dev/null +++ b/.trunk/config/.shellcheckrc @@ -0,0 +1,7 @@ +enable=all +source-path=SCRIPTDIR +disable=SC2154 + +# If you're having issues with shellcheck following source, disable the errors via: +# disable=SC1090 +# disable=SC1091 diff --git a/.trunk/trunk.yaml b/.trunk/trunk.yaml index f576e71bf..a98a1bbb2 100644 --- a/.trunk/trunk.yaml +++ b/.trunk/trunk.yaml @@ -1,21 +1,33 @@ version: 0.1 +runtimes: + enabled: + - go@1.18.3 + - node@16.14.2 +actions: + enabled: + - trunk-cache-prune + - trunk-upgrade-available plugins: sources: - id: trunk - ref: v0.0.3 + ref: v0.0.5 uri: https://github.com/trunk-io/plugins cli: - version: 0.17.0-beta + version: 0.18.1-beta sha256: - darwin_arm64: d0f10cede5ce6f2e9cf93c13b7422a87994c57912c2f1ec3b2b6273d965d3726 - darwin_x86_64: de8cc96736b5888925523631926c1f5a0735bb086569ccdc3e2b62c2de2f4867 - linux_x86_64: ddba5eb37e6885210b43f2466f8240fbeae5327506876705ef3935627d771d70 + darwin_arm64: c25df7ef6d68a2bd8648d93830659d1675043db03d9f49182534f28e417dfda6 + darwin_x86_64: 6a7a4f9c5d0ad7d3d5ea45e6a1cf11a668ea68c36f01ebe31ef95f99560a6824 + linux_x86_64: d875fe70c221d6449a9cd09598ab278133c5513f52dbf6af0fca3161d7a39d46 lint: enabled: - - actionlint@1.6.17 - - eslint@8.23.0 + - dotenv-linter@3.2.0 + - hadolint@2.10.0 + - shellcheck@0.8.0 + - shfmt@3.5.0 + - actionlint@1.6.20 + - eslint@8.24.0 - git-diff-check@SYSTEM - - gitleaks@8.11.2 + - gitleaks@8.13.0 - markdownlint@0.32.2 - prettier@2.7.1 ignore: From fdbec7c2bafd9148bcd3cbc47c36ff1f589db094 Mon Sep 17 00:00:00 2001 From: Jakub Mucha Date: Wed, 5 Oct 2022 23:17:06 +0200 Subject: [PATCH 28/34] fix: linting Signed-off-by: Jakub Mucha --- high-res.env | 4 ++-- low-res.env | 4 ++-- medium-res.env | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/high-res.env b/high-res.env index b912e6fa0..02e0d313d 100644 --- a/high-res.env +++ b/high-res.env @@ -1,4 +1,4 @@ -DISPLAY_WIDTH=1920 DISPLAY_HEIGHT=1080 -SE_SCREEN_WIDTH=1920 +DISPLAY_WIDTH=1920 SE_SCREEN_HEIGHT=1080 +SE_SCREEN_WIDTH=1920 diff --git a/low-res.env b/low-res.env index 5435cce65..58f5d6af3 100644 --- a/low-res.env +++ b/low-res.env @@ -1,4 +1,4 @@ -DISPLAY_WIDTH=800 DISPLAY_HEIGHT=600 -SE_SCREEN_WIDTH=800 +DISPLAY_WIDTH=800 SE_SCREEN_HEIGHT=600 +SE_SCREEN_WIDTH=800 diff --git a/medium-res.env b/medium-res.env index fe0f0c8a6..c4e7f74e2 100644 --- a/medium-res.env +++ b/medium-res.env @@ -1,4 +1,4 @@ -DISPLAY_WIDTH=1366 DISPLAY_HEIGHT=768 -SE_SCREEN_WIDTH=1366 +DISPLAY_WIDTH=1366 SE_SCREEN_HEIGHT=768 +SE_SCREEN_WIDTH=1366 From 094f4637781692ebce8cb1864c1905a62e8415e3 Mon Sep 17 00:00:00 2001 From: Jakub Mucha Date: Wed, 5 Oct 2022 23:28:43 +0200 Subject: [PATCH 29/34] ci: cleanup not required Signed-off-by: Jakub Mucha --- .github/workflows/audit_and_lint.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/audit_and_lint.yml b/.github/workflows/audit_and_lint.yml index 87487709d..5f733e06e 100644 --- a/.github/workflows/audit_and_lint.yml +++ b/.github/workflows/audit_and_lint.yml @@ -139,9 +139,6 @@ jobs: docker/screenshots continue-on-error: true - - name: Cleanup - run: rm -rf docker - - name: Run e2e tests (high res) run: | docker-compose --env-file ./high-res.env up --build --exit-code-from synpress From 5db62310fb6320185f0751dc508504ae67d862aa Mon Sep 17 00:00:00 2001 From: Jakub Mucha Date: Wed, 5 Oct 2022 23:29:21 +0200 Subject: [PATCH 30/34] ci: continue on error for high res Signed-off-by: Jakub Mucha --- .github/workflows/audit_and_lint.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/audit_and_lint.yml b/.github/workflows/audit_and_lint.yml index 5f733e06e..1bda90842 100644 --- a/.github/workflows/audit_and_lint.yml +++ b/.github/workflows/audit_and_lint.yml @@ -152,6 +152,7 @@ jobs: CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }} CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + continue-on-error: true - name: Archive e2e artifacts (high res) uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # pin@v2 From a18788157cacda56001db19d639d2aa96d511086 Mon Sep 17 00:00:00 2001 From: Jakub Mucha Date: Wed, 5 Oct 2022 23:31:16 +0200 Subject: [PATCH 31/34] chore: increase closepopup timeout Signed-off-by: Jakub Mucha --- commands/metamask.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/metamask.js b/commands/metamask.js index 14993b40a..f96db7dd4 100644 --- a/commands/metamask.js +++ b/commands/metamask.js @@ -139,7 +139,7 @@ module.exports = { closePopup: async () => { // note: this is required for fast execution of e2e tests to avoid flakiness // otherwise popup may not be detected properly and not closed - await playwright.metamaskWindow().waitForTimeout(500); + await playwright.metamaskWindow().waitForTimeout(1000); if ( (await playwright .metamaskWindow() From baf0511f0cdca52b5ceacace320cd0d144673f42 Mon Sep 17 00:00:00 2001 From: Jakub Mucha Date: Wed, 5 Oct 2022 23:49:01 +0200 Subject: [PATCH 32/34] ci: continue on error Signed-off-by: Jakub Mucha --- .github/workflows/audit_and_lint.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/audit_and_lint.yml b/.github/workflows/audit_and_lint.yml index 1bda90842..1fb16e802 100644 --- a/.github/workflows/audit_and_lint.yml +++ b/.github/workflows/audit_and_lint.yml @@ -127,6 +127,7 @@ jobs: CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }} CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + continue-on-error: true - name: Archive e2e artifacts (low res) uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # pin@v2 From 4dad622b8ac487d387897103599602bd92345aee Mon Sep 17 00:00:00 2001 From: Jakub Mucha Date: Thu, 6 Oct 2022 00:39:28 +0200 Subject: [PATCH 33/34] docker: update ci compose Signed-off-by: Jakub Mucha --- docker-compose.ci.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docker-compose.ci.yml b/docker-compose.ci.yml index ccfd966d9..9b867d9a8 100644 --- a/docker-compose.ci.yml +++ b/docker-compose.ci.yml @@ -7,9 +7,10 @@ services: environment: - DISPLAY=display:0.0 - CYPRESS_PRIVATE_KEY_WITH_FUNDS=${CYPRESS_PRIVATE_KEY_WITH_FUNDS} - - CYPRESS_PROJECT_ID=${CYPRESS_PROJECT_ID} - - CYPRESS_RECORD_KEY=${CYPRESS_RECORD_KEY} + # - CYPRESS_PROJECT_ID=${CYPRESS_PROJECT_ID} + # - CYPRESS_RECORD_KEY=${CYPRESS_RECORD_KEY} - GITHUB_TOKEN=${GITHUB_TOKEN} + - SYNDEBUG=${SYNDEBUG} depends_on: - display - video @@ -31,6 +32,8 @@ services: image: synthetixio/display:b2643097e891906524e52e7ee956260b20fa01fb-base environment: - RUN_XTERM=no + - DISPLAY_WIDTH=${DISPLAY_WIDTH} + - DISPLAY_HEIGHT=${DISPLAY_HEIGHT} ports: - '8080:8080' networks: @@ -56,6 +59,8 @@ services: - ./docker/videos-ci:/videos environment: - FILE_NAME=CI-full-video.mp4 + - SE_SCREEN_WIDTH=${SE_SCREEN_WIDTH} + - SE_SCREEN_HEIGHT=${SE_SCREEN_HEIGHT} depends_on: - display networks: From f7801112a786f109398856cb217ec911de1fb6b0 Mon Sep 17 00:00:00 2001 From: Jakub Mucha Date: Thu, 6 Oct 2022 00:39:41 +0200 Subject: [PATCH 34/34] ci: use docker-compose.ci.yml Signed-off-by: Jakub Mucha --- .github/workflows/audit_and_lint.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/audit_and_lint.yml b/.github/workflows/audit_and_lint.yml index 1fb16e802..e350f04f0 100644 --- a/.github/workflows/audit_and_lint.yml +++ b/.github/workflows/audit_and_lint.yml @@ -116,7 +116,7 @@ jobs: - name: Run e2e tests (low res) run: | - docker-compose --env-file ./low-res.env up --build --exit-code-from synpress + docker-compose -f docker-compose.ci.yml --env-file low-res.env up --build --exit-code-from synpress env: COMPOSE_DOCKER_CLI_BUILD: 1 DOCKER_BUILDKIT: 1 @@ -142,7 +142,7 @@ jobs: - name: Run e2e tests (high res) run: | - docker-compose --env-file ./high-res.env up --build --exit-code-from synpress + docker-compose -f docker-compose.ci.yml --env-file high-res.env up --build --exit-code-from synpress env: COMPOSE_DOCKER_CLI_BUILD: 1 DOCKER_BUILDKIT: 1