Skip to content
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

Refactor e2e tests to use unlockWallet consistently #21914

Closed
mikesposito opened this issue Nov 21, 2023 · 0 comments · Fixed by #21915
Closed

Refactor e2e tests to use unlockWallet consistently #21914

mikesposito opened this issue Nov 21, 2023 · 0 comments · Fixed by #21915
Assignees
Labels
release-11.7.0 Issue or pull request that will be included in release 11.7.0 team-wallet-framework

Comments

@mikesposito
Copy link
Member

mikesposito commented Nov 21, 2023

What is this about?

Our e2e tests always repeat the implementation for unlocking the wallet, even though there is an helper function to do that.

Moreover, the unlockWallet helper function should also wait for the login to actually end, so that test cases don't have to manually delay the execution for an arbitrary number of seconds.

Scenario

No response

Design

No response

Technical Details

Some of our test cases open external pages in the browser to test dapp features, and these tests take action on these pages right after the login. Some of them explicitly wait some time (with driver.delay(1000);), some others don't wait at all: this was ok-ish when the key derivation and vault decryption was fast, because the login operation used to end before the external pages were loaded, but now that the decryption is much slower this assumption is wrong because this happens:

  1. The test case inputs the password, then clicks on login
  2. The test case immediately opens an external page
  3. The test case immediately executes an action on the test dapp
  4. The pop-up (any pop-up screen, like the one to sign for example) will open, but instead of showing the expected screen, it will show the login screen to input the password, as the decryption is still happening on the main initial view.
  5. The test fails with a timeout, as the screen expected by the test will never show up.

Threat Modeling Framework

No response

Acceptance Criteria

No response

References

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-11.7.0 Issue or pull request that will be included in release 11.7.0 team-wallet-framework
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants