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. |
| text: 'Next', | ||
| }); | ||
| driver.waitForSelector({ | ||
| await driver.waitForSelector({ |
There was a problem hiding this comment.
this await was missing, but it's not the cause of the flakiness
| await driver.waitForSelector({ | ||
| tag: 'h6', | ||
| text: '0.000062 ETH', | ||
| }); |
There was a problem hiding this comment.
here we await for the correct gas estimate. This way we ensure that the increaseAllowance tx is successful and we can proceed with the transferFrom, from account 2
There was a problem hiding this comment.
(could) add explicit expected maximum timeout in seconds here
There was a problem hiding this comment.
thank you for the review @legobeat 🙇♀️ I think in this case is safe to rely on the default timeout, since I've observed that the gas update is really a matter of ms, so the default timeout seems more than enough.
But let me know if you think otherwise and we could add it 🙏
async waitForSelector(
rawLocator,
{ timeout = this.timeout, state = 'visible' } = {}
There was a problem hiding this comment.
ℹ️ after talking with Lego, we've agreed to merge this PR but we could have another task to look into explicit timeouts more generally
Builds ready [798cf22]
Page Load Metrics (904 ± 550 ms)
Bundle size diffs
|
|
Missing release label release-11.16.3 on PR. Adding release label release-11.16.3 on PR and removing other release labels(release-11.18.0), as PR was cherry-picked in branch 11.16.3. |

Description
This PR fixes the flaky test
Increase Token Allowance increases token spending cap to allow other accounts to transfer tokens @no-mmi).The problem with this flaky test is that we are changing the allowance amount (from 0 to 1) and we confirm the transaction before the gas has been updated. This makes that the increase token allowance transaction fails, and the subsequent transaction with the Account 2 cannot be performed as it doesn't have the allowance for doing a transfer from action. So the dialog window cannot be found, as the popup is never triggered (see dapp error).
The fix is to simply await for the expected gas for the increaseAllowance with amount 1.
This can be clearly seen when you check the tx history from Account 1:
31000-- correct26776-- incorrect (this value corresponds to the increaseAllowance with amount 0)Related issues
Fixes: one of this cases, but not all of them, as the rest of testcases need to be looked separately #24603
Manual testing steps
yarn test:e2e:single test/e2e/tests/tokens/increase-token-allowance.spec.js --browser=firefox --leave-running --retryUntilFailure --retries=10Screenshots/Recordings
increase-token-allowance-flaky.mp4
Pre-merge author checklist
Pre-merge reviewer checklist