Skip to content

Conversation

@tx-nikola
Copy link

Refactor the E2E tests so that they can be run in the new redesigned structure.

  • In this PR, only the tests related to the common actions are fixed - the ones with the @transactions tag.

They test the functionalities of:

  • Deposit
  • Withdraw
  • Send

This PR fixes #213

@tx-nikola tx-nikola self-assigned this Mar 9, 2025
@github-actions
Copy link

github-actions bot commented Mar 9, 2025

Visit the preview URL for this PR (updated for commit 2f47346):

https://staging-zksync-dapp-wallet-v2--pr224-tx-nikola-txfusio-8wzkh9il.web.app

(expires Thu, 05 Jun 2025 11:45:32 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: a25831e6058958ccabf0f806505b5b8e7241b178

@tx-nikola tx-nikola requested a review from popzxc March 10, 2025 11:07
network:
type: string
default: 'Sepolia'
default: "Goerli"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why Goerli?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

price: {
type: [String, Number] as PropType<TokenPrice>,
},
dataTestid: {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't have to add this prop everywhere if it will be mounted directly to the main element. It will already be inherited by default.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Given I go to "Deposit" transaction section
When I click by "text" with "Your account" value
Then Element with "id" "amount-input" should have "" "value"
Given I go to page "/bridge?network=sepolia"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we setup env somewhere else in the configs? Why do we need to hardcode ?network=...

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes - my mistake. Fixed.

Comment on lines 1 to 15
# Encrypted rich wallet mnemonic:
E2E_WALLET_1_MAIN_PUB_KEY=
E2E_WALLET_2_SECOND_PUB_KEY=
E2E_WALLET_0_EMPTY_PUB_KEY=

# Public addresses
E2E_WALLET_1_MAIN=
E2E_WALLET_2_SECOND=
E2E_WALLET_0_EMPTY=
E2E_WALLET_PASSWORD_MM=

# Our random key for encryption
E2E_WALLET_SECRET_PK=
# Our random salt for encryption
E2E_WALLET_SALT_IV= No newline at end of file
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The setup looks quite complicated. Do we really need all that? Do we need to keep track of so many secrets that I used for encryption, etc?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can update this - what would you prefer?
We can use the plain-text values in the env file so we don't need to handle the encryption, or do you have something else in mind?

@tx-nikola
Copy link
Author

Updated to remove the unnecessary env variables - now we just need the mnemonic seed phrase for 2 wallets.
When installing/creating MetaMask, it asks for seed phrase when importing the existing wallet so we can't simply use private keys.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create e2e tests for common actions

2 participants