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

test: rpc get addresses #5281

Merged
merged 1 commit into from
Apr 25, 2024
Merged

test: rpc get addresses #5281

merged 1 commit into from
Apr 25, 2024

Conversation

kyranjamie
Copy link
Collaborator

@kyranjamie kyranjamie commented Apr 21, 2024

Try out Leather build 6322afdExtension build, Test report, Storybook, Chromatic

Closes #5279 #5066 #5042

Adds thorough integration tests for getAddresses.

Running 9 tests using 6 workers

  ✓  1 [chromium] › specs/rpc-get-addresses/get-addresses.spec.ts:98:7 › Rpc: GetAddresses › softwareWallet  › the promise resolves with addresses successfully (13.7s)
  ✓  2 [chromium] › specs/rpc-get-addresses/get-addresses.spec.ts:112:7 › Rpc: GetAddresses › ledgerWithBitcoinAndStacksKey  › the promise rejects when user closes popup window (9.7s)
  ✓  3 [chromium] › specs/rpc-get-addresses/get-addresses.spec.ts:121:9 › Rpc: GetAddresses › softwareWallet  › it redirects back to get addresses flow when wallet is locked (18.0s)
  ✓  4 [chromium] › specs/rpc-get-addresses/get-addresses.spec.ts:98:7 › Rpc: GetAddresses › ledgerWithBitcoinAndStacksKey  › the promise resolves with addresses successfully (10.3s)
  ✓  5 [chromium] › specs/rpc-get-addresses/get-addresses.spec.ts:112:7 › Rpc: GetAddresses › softwareWallet  › the promise rejects when user closes popup window (13.0s)
  ✓  6 [chromium] › specs/rpc-get-addresses/get-addresses.spec.ts:98:7 › Rpc: GetAddresses › ledgerWithStacksKeysOnly  › the promise resolves with addresses successfully (10.1s)
  ✓  7 [chromium] › specs/rpc-get-addresses/get-addresses.spec.ts:112:7 › Rpc: GetAddresses › ledgerWithStacksKeysOnly  › the promise rejects when user closes popup window (8.3s)
  ✓  8 [chromium] › specs/rpc-get-addresses/get-addresses.spec.ts:98:7 › Rpc: GetAddresses › ledgerWithBitcoinKeysOnly  › the promise resolves with addresses successfully (8.8s)
  ✓  9 [chromium] › specs/rpc-get-addresses/get-addresses.spec.ts:112:7 › Rpc: GetAddresses › ledgerWithBitcoinKeysOnly  › the promise rejects when user closes popup window (8.4s)

  9 passed (20.5s)

Tests that:

  • We get expected result in resolved promise
  • Cancelling the operation rejects the promise
  • When locked, wallet redirects to flow when unlocked

For these tests, we iterate through 4 possible wallet presets: software, ledger all keys, ledger bitcoin only keys, ledger stacks only keys.

#5279 #5066 were introduced in this PR #4159, which changed the logic from navigate(-1) to navigate(RouteUrls.Home. This was a mistake, as user can land on request password page from any route, and we want to take them back where they were.

@kyranjamie kyranjamie force-pushed the test/get-addresses branch 2 times, most recently from 90335be to 5fbb164 Compare April 21, 2024 11:20
@kyranjamie kyranjamie added this pull request to the merge queue Apr 24, 2024
@kyranjamie kyranjamie removed this pull request from the merge queue due to a manual request Apr 24, 2024
@kyranjamie kyranjamie added this pull request to the merge queue Apr 25, 2024
Merged via the queue into dev with commit 0e935ea Apr 25, 2024
28 checks passed
@kyranjamie kyranjamie deleted the test/get-addresses branch April 25, 2024 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Redirect back to action Fix redirect to relevant screen for API request instead of home upon unlock
4 participants