-
Notifications
You must be signed in to change notification settings - Fork 5.3k
feat: add ledger e2e tests for ERC20 deployment #33898
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
Conversation
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
Builds ready [98a4212]
UI Startup Metrics (1184 ± 67 ms)
Benchmark value 260 exceeds gate value 235 for chrome webpack home mean firstReactRender Benchmark value 2569 exceeds gate value 2454 for chrome webpack home p95 uiStartup Benchmark value 410 exceeds gate value 370 for chrome webpack home p95 firstReactRender Benchmark value 114 exceeds gate value 110 for firefox browserify home mean domInteractive Benchmark value 13 exceeds gate value 11 for firefox browserify home mean getState Benchmark value 284 exceeds gate value 195 for firefox browserify home p95 domInteractive Benchmark value 77 exceeds gate value 70 for firefox browserify home p95 backgroundConnect Benchmark value 34 exceeds gate value 24 for firefox browserify home p95 getState Benchmark value 41 exceeds gate value 38 for firefox webpack home mean firstReactRender Benchmark value 1951 exceeds gate value 1935 for firefox webpack home p95 uiStartup Benchmark value 274 exceeds gate value 156 for firefox webpack home p95 domInteractive Sum of mean exceeds: 34ms | Sum of p95 exceeds: 402ms Sum of all benchmark exceeds: 436ms Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
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.
We are using a mocked class for Common and this class doesn't include a param function, as it was very minimal. For regular sends work well but it seems that for contract deployments (and maybe interactions?) we need to support this method.
This would be the minimal things we need. If you add this in the Common class, this should fix the error common.param is not a function"
:
/**
* Returns the value of a parameter for the current hardfork.
* This is a minimal implementation that returns default values for common parameters.
*
* @param {string} param - The parameter name.
* @returns {any} The parameter value.
*/
param(param) {
// Return default values for common parameters that @ethereumjs/tx might request
const defaults = {
gasLimitBoundDivisor: 1024,
baseFeeChangeDenominator: 8,
elasticityMultiplier: 2,
maxPriorityFeePerGas: 0,
maxFeePerGas: 0,
};
return defaults[param] || 0;
}
9b692fb
to
cc3c5cf
Compare
Builds ready [cc3c5cf]
UI Startup Metrics (1173 ± 58 ms)
Benchmark value 2258 exceeds gate value 2192 for chrome webpack home mean uiStartup Benchmark value 1744 exceeds gate value 1711 for chrome webpack home mean load Benchmark value 1738 exceeds gate value 1704 for chrome webpack home mean domContentLoaded Benchmark value 1735 exceeds gate value 1699 for chrome webpack home mean loadScripts Benchmark value 2657 exceeds gate value 2454 for chrome webpack home p95 uiStartup Benchmark value 59 exceeds gate value 57 for chrome webpack home p95 domInteractive Benchmark value 356 exceeds gate value 334 for chrome webpack home p95 firstPaint Benchmark value 406 exceeds gate value 370 for chrome webpack home p95 firstReactRender Benchmark value 1981 exceeds gate value 1970 for chrome webpack home p95 loadScripts Benchmark value 1452 exceeds gate value 1405 for firefox browserify home mean uiStartup Benchmark value 1262 exceeds gate value 1245 for firefox browserify home mean load Benchmark value 1262 exceeds gate value 1239 for firefox browserify home mean domContentLoaded Benchmark value 121 exceeds gate value 110 for firefox browserify home mean domInteractive Benchmark value 27 exceeds gate value 25 for firefox browserify home mean backgroundConnect Benchmark value 26 exceeds gate value 25 for firefox browserify home mean firstReactRender Benchmark value 15 exceeds gate value 11 for firefox browserify home mean getState Benchmark value 1242 exceeds gate value 1230 for firefox browserify home mean loadScripts Benchmark value 16 exceeds gate value 9 for firefox browserify home mean setupStore Benchmark value 1729 exceeds gate value 1660 for firefox browserify home p95 uiStartup Benchmark value 299 exceeds gate value 195 for firefox browserify home p95 domInteractive Benchmark value 51 exceeds gate value 24 for firefox browserify home p95 getState Benchmark value 58 exceeds gate value 27 for firefox browserify home p95 setupStore Benchmark value 1662 exceeds gate value 1615 for firefox webpack home mean uiStartup Benchmark value 1417 exceeds gate value 1380 for firefox webpack home mean load Benchmark value 1416 exceeds gate value 1380 for firefox webpack home mean domContentLoaded Benchmark value 105 exceeds gate value 100 for firefox webpack home mean domInteractive Benchmark value 44 exceeds gate value 38 for firefox webpack home mean firstReactRender Benchmark value 24 exceeds gate value 15 for firefox webpack home mean getState Benchmark value 1395 exceeds gate value 1360 for firefox webpack home mean loadScripts Benchmark value 16 exceeds gate value 13 for firefox webpack home mean setupStore Benchmark value 2173 exceeds gate value 1935 for firefox webpack home p95 uiStartup Benchmark value 1733 exceeds gate value 1660 for firefox webpack home p95 load Benchmark value 1732 exceeds gate value 1660 for firefox webpack home p95 domContentLoaded Benchmark value 324 exceeds gate value 156 for firefox webpack home p95 domInteractive Benchmark value 46 exceeds gate value 32 for firefox webpack home p95 getState Benchmark value 1707 exceeds gate value 1630 for firefox webpack home p95 loadScripts Benchmark value 29 exceeds gate value 28 for firefox webpack home p95 setupStore Sum of mean exceeds: 471ms | Sum of p95 exceeds: 1148ms Sum of all benchmark exceeds: 1619ms Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
7fb4053
to
e61eca0
Compare
'0x100000000000000000000', | ||
)) ?? console.error('localNodes is undefined or empty'); | ||
await loginWithoutBalanceValidation(driver); | ||
const testDappPage = new TestDappPage(driver); |
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.
to prevent flakiness, could we make sure we have the expected balance once we land in the hompage?
Something like:
const testDappPage = new TestDappPage(driver); | |
const homePage = new HomePage(driver); | |
await homePage.check_expectedBalanceIsDisplayed('1208925.8196'); | |
const testDappPage = new TestDappPage(driver); |
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.
I used instead loginWithBalanceValidation
(and added an optional value
parameter to this function). Is that ok for you?
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.
Overall looks good! Nice job 🙌 I just added a small comment for preventing flakiness 🙏
Builds ready [e61eca0]
UI Startup Metrics (1191 ± 57 ms)
Benchmark value 2208 exceeds gate value 2192 for chrome webpack home mean uiStartup Benchmark value 2563 exceeds gate value 2454 for chrome webpack home p95 uiStartup Benchmark value 64 exceeds gate value 57 for chrome webpack home p95 domInteractive Benchmark value 351 exceeds gate value 334 for chrome webpack home p95 firstPaint Benchmark value 401 exceeds gate value 370 for chrome webpack home p95 firstReactRender Benchmark value 121 exceeds gate value 110 for firefox browserify home mean domInteractive Benchmark value 13 exceeds gate value 9 for firefox browserify home mean setupStore Benchmark value 250 exceeds gate value 195 for firefox browserify home p95 domInteractive Benchmark value 36 exceeds gate value 24 for firefox browserify home p95 getState Benchmark value 50 exceeds gate value 27 for firefox browserify home p95 setupStore Benchmark value 42 exceeds gate value 38 for firefox webpack home mean firstReactRender Benchmark value 19 exceeds gate value 15 for firefox webpack home mean getState Benchmark value 16 exceeds gate value 13 for firefox webpack home mean setupStore Benchmark value 2031 exceeds gate value 1935 for firefox webpack home p95 uiStartup Benchmark value 285 exceeds gate value 156 for firefox webpack home p95 domInteractive Benchmark value 52 exceeds gate value 49 for firefox webpack home p95 backgroundConnect Benchmark value 38 exceeds gate value 32 for firefox webpack home p95 getState Benchmark value 32 exceeds gate value 28 for firefox webpack home p95 setupStore Sum of mean exceeds: 42ms | Sum of p95 exceeds: 498ms Sum of all benchmark exceeds: 540ms Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
e248970
to
a657e52
Compare
Builds ready [a657e52]
UI Startup Metrics (1181 ± 65 ms)
Benchmark value 2195 exceeds gate value 2192 for chrome webpack home mean uiStartup Benchmark value 255 exceeds gate value 235 for chrome webpack home mean firstReactRender Benchmark value 2656 exceeds gate value 2454 for chrome webpack home p95 uiStartup Benchmark value 402 exceeds gate value 370 for chrome webpack home p95 firstReactRender Benchmark value 122 exceeds gate value 110 for firefox browserify home mean domInteractive Benchmark value 30 exceeds gate value 25 for firefox browserify home mean backgroundConnect Benchmark value 26 exceeds gate value 25 for firefox browserify home mean firstReactRender Benchmark value 18 exceeds gate value 11 for firefox browserify home mean getState Benchmark value 11 exceeds gate value 9 for firefox browserify home mean setupStore Benchmark value 1811 exceeds gate value 1660 for firefox browserify home p95 uiStartup Benchmark value 78 exceeds gate value 70 for firefox browserify home p95 backgroundConnect Benchmark value 90 exceeds gate value 24 for firefox browserify home p95 getState Benchmark value 33 exceeds gate value 27 for firefox browserify home p95 setupStore Benchmark value 1692 exceeds gate value 1615 for firefox webpack home mean uiStartup Benchmark value 1450 exceeds gate value 1380 for firefox webpack home mean load Benchmark value 1450 exceeds gate value 1380 for firefox webpack home mean domContentLoaded Benchmark value 104 exceeds gate value 100 for firefox webpack home mean domInteractive Benchmark value 32 exceeds gate value 26 for firefox webpack home mean backgroundConnect Benchmark value 44 exceeds gate value 38 for firefox webpack home mean firstReactRender Benchmark value 25 exceeds gate value 15 for firefox webpack home mean getState Benchmark value 1426 exceeds gate value 1360 for firefox webpack home mean loadScripts Benchmark value 2170 exceeds gate value 1935 for firefox webpack home p95 uiStartup Benchmark value 1742 exceeds gate value 1660 for firefox webpack home p95 load Benchmark value 1742 exceeds gate value 1660 for firefox webpack home p95 domContentLoaded Benchmark value 282 exceeds gate value 156 for firefox webpack home p95 domInteractive Benchmark value 61 exceeds gate value 49 for firefox webpack home p95 backgroundConnect Benchmark value 52 exceeds gate value 50 for firefox webpack home p95 firstReactRender Benchmark value 140 exceeds gate value 32 for firefox webpack home p95 getState Benchmark value 1712 exceeds gate value 1630 for firefox webpack home p95 loadScripts Benchmark value 33 exceeds gate value 28 for firefox webpack home p95 setupStore Sum of mean exceeds: 361ms | Sum of p95 exceeds: 1199ms Sum of all benchmark exceeds: 1560ms Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
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.
LGTM
Description
Adds ledger e2e test for the following scenario:
Related issues
Fixes: https://github.com/MetaMask/accounts-planning/issues/948
Manual testing steps
Locally:
On CI, check e2e tests job
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist