-
Notifications
You must be signed in to change notification settings - Fork 5.4k
test: Add new test job for dist tests #35906
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -52,6 +52,7 @@ | |
| "test:integration": "yarn webpack-cli build --config ./development/webpack/webpack.integration.tests.config.ts && jest --config jest.integration.config.js", | ||
| "test:integration:coverage": "yarn test:integration --coverage", | ||
| "test:e2e:chrome": "SELENIUM_BROWSER=chrome tsx test/e2e/run-all.ts", | ||
| "test:e2e:chrome:dist": "SELENIUM_BROWSER=chrome tsx test/e2e/run-all.ts --dist", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I generally argue for "we already have too many There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It can be run locally as well, e.g. when debugging an E2E test failure for this job. It's important to have a simple command that can replicate CI tests locally. |
||
| "test:e2e:chrome:flask": "SELENIUM_BROWSER=chrome tsx test/e2e/run-all.ts --build-type flask", | ||
| "test:api-specs": "SELENIUM_BROWSER=chrome tsx test/e2e/run-openrpc-api-test-coverage.ts", | ||
| "test:api-specs-multichain": "SELENIUM_BROWSER=chrome ts-node test/e2e/run-api-specs-multichain.ts", | ||
|
|
@@ -62,6 +63,7 @@ | |
| "test:e2e:chrome:rpc": "SELENIUM_BROWSER=chrome tsx test/e2e/run-all.ts --rpc", | ||
| "test:e2e:chrome:multi-provider": "MULTIPROVIDER=true SELENIUM_BROWSER=chrome tsx test/e2e/run-all.ts --multi-provider", | ||
| "test:e2e:firefox": "SELENIUM_BROWSER=firefox tsx test/e2e/run-all.ts", | ||
| "test:e2e:firefox:dist": "SELENIUM_BROWSER=firefox tsx test/e2e/run-all.ts --dist", | ||
| "test:e2e:firefox:flask": "SELENIUM_BROWSER=firefox tsx test/e2e/run-all.ts --build-type flask", | ||
| "test:e2e:single": "node test/e2e/run-e2e-test.js", | ||
| "ganache:start": "./development/run-ganache.sh", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,14 +2,14 @@ import os from 'os'; | |
| import path from 'path'; | ||
| import fs from 'fs-extra'; | ||
| import level from 'level'; | ||
| import { Driver } from './webdriver/driver'; | ||
| import { WALLET_PASSWORD, WINDOW_TITLES, withFixtures } from './helpers'; | ||
| import HeaderNavbar from './page-objects/pages/header-navbar'; | ||
| import HomePage from './page-objects/pages/home/homepage'; | ||
| import PrivacySettings from './page-objects/pages/settings/privacy-settings'; | ||
| import SettingsPage from './page-objects/pages/settings/settings-page'; | ||
| import VaultDecryptorPage from './page-objects/pages/vault-decryptor-page'; | ||
| import { completeCreateNewWalletOnboardingFlowWithCustomSettings } from './page-objects/flows/onboarding.flow'; | ||
| import { Driver } from '../webdriver/driver'; | ||
| import { WALLET_PASSWORD, WINDOW_TITLES, withFixtures } from '../helpers'; | ||
| import HeaderNavbar from '../page-objects/pages/header-navbar'; | ||
| import HomePage from '../page-objects/pages/home/homepage'; | ||
| import PrivacySettings from '../page-objects/pages/settings/privacy-settings'; | ||
| import SettingsPage from '../page-objects/pages/settings/settings-page'; | ||
| import VaultDecryptorPage from '../page-objects/pages/vault-decryptor-page'; | ||
| import { completeCreateNewWalletOnboardingFlowWithCustomSettings } from '../page-objects/flows/onboarding.flow'; | ||
|
|
||
| const VAULT_DECRYPTOR_PAGE = 'https://metamask.github.io/vault-decryptor'; | ||
|
|
||
|
|
@@ -165,6 +165,10 @@ async function closePopoverIfPresent(driver: Driver) { | |
|
|
||
| describe('Vault Decryptor Page', function () { | ||
| it('is able to decrypt the vault uploading the log file in the vault-decryptor webapp', async function () { | ||
| if (process.env.SELENIUM_BROWSER !== 'chrome') { | ||
| // TODO: Get this working on Firefox | ||
| this.skip(); | ||
| } | ||
|
Comment on lines
+168
to
+171
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We're going to skip ALL of the tests in the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These changes were split from this PR, which has a test that would run on Firefox: #31435 I can certainly omit the Firefox workflow until that PR though, so it doesn't spin up a VM that does nothing. Good point. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If it's coming very soon, it matters a little less. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed here: 3e45984 I'll re-add it in the PR that adds the first test |
||
| await withFixtures( | ||
| { | ||
| disableServerMochaToBackground: true, | ||
|
|
@@ -223,6 +227,10 @@ describe('Vault Decryptor Page', function () { | |
| }); | ||
|
|
||
| it('is able to decrypt the vault pasting the text in the vault-decryptor webapp', async function () { | ||
| if (process.env.SELENIUM_BROWSER !== 'chrome') { | ||
| // TODO: Get this working on Firefox | ||
| this.skip(); | ||
| } | ||
| await withFixtures( | ||
| { | ||
| disableServerMochaToBackground: true, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding this happens to be a little unfortunate, because you're adding the longest build process as a
needsbefore the longest test suite. So this definitely adds time to the workflow as a whole. Possible solutions include:test-e2e-firefox-browserifyandtest-e2e-firefox-flasktest-e2e-firefox-distout ofe2e-firefox.ymland rework how the YML files call each other and are organized, but I think that's not worth itEdit: hmmmm and then I noticed that
test-e2e-firefox-distis running zero tests....There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is Firefox substantially slower than Chrome to build and/or run tests? I had thought the difference was fairly small
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the build step, it's the
distbuild that's slower.build-dist-browserifyandbuild-dist-mv2-browserifytake the same amount of time. But thisneedsdid not have adistbuild in the list before.For the E2E tests, the
test-e2e-firefox-browserifyshards take 12-14 minutes, but thetest-e2e-firefox-browserifytake 9-11 minutes. I have not done any additional investigation as to why it's slower. If we can't make it faster, we could also increase the number of Firefox shards.