-
Notifications
You must be signed in to change notification settings - Fork 5k
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
fix: test failure on metrics test #25896
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. |
ead89fa
to
1844040
Compare
1844040
to
c7363ba
Compare
Quality Gate passedIssues Measures |
@@ -36,7 +40,7 @@ export function withRedesignConfirmationFixtures( | |||
.build(), | |||
ganacheOptions: defaultGanacheOptions, | |||
title, | |||
testSpecificMock: mockSegment, | |||
testSpecificMock: testSpecificMockOverride || mockSegment, |
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.
hi there 👋 the custom fixture function seems a bit confusing, but it looks like the test is failing because you are not passing the smartContract, meaning this won't be deployed. Then, when it tries to get the contract address, in the openDAppWithContract
that is undefined:
TypeError: Cannot read properties of undefined (reading 'getContractAddress')
|
||
await createContractDeploymentTransaction(driver); | ||
await confirmContractDeploymentTransaction(driver); | ||
await openDAppWithContract(driver, contractRegistry, smartContract); |
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.
nit: this function is a bit miss-leading, it is called openDappWithContract
but what it's actually doing is:
- unlocking MetaMask
- fetching the address of the contract
- going to the test dapp with the contract address
Since it's not introduced by this PR, it's not a blocker, but it could be improved in a subsequent PR
I am skeptic of using Refactoring all the tests that use it to add the arguments before the test assertions would be too much work for a small optimisation. Since the failure has now been resolved in #25520, I will close this PR. |
Description
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist