Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/TW-823-e2e-Notifications' into T…
Browse files Browse the repository at this point in the history
…W-823-e2e-Notifications
  • Loading branch information
tttt24 committed Nov 15, 2023
2 parents ea37a89 + a943b5a commit 07c81ed
Show file tree
Hide file tree
Showing 28 changed files with 449 additions and 56 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/manual-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ jobs:
IMPORTED_HD_ACCOUNT_FIRST_HASH_SHORT_FORM: ${{ secrets.IMPORTED_HD_ACCOUNT_FIRST_HASH_SHORT_FORM }}
WATCH_ONLY_PUBLIC_KEY_HASH: ${{ secrets.WATCH_ONLY_PUBLIC_KEY_HASH }}
WATCH_ONLY_PUBLIC_KEY_HASH_SHORT_FORM: ${{ secrets.WATCH_ONLY_PUBLIC_KEY_HASH_SHORT_FORM }}
LONG_HD_ACCOUNT_SEED_PHRASE: ${{ secrets.LONG_HD_ACCOUNT_SEED_PHRASE }}
LONG_HD_ACCOUNT_FIRST_PRIVATE_KEY: ${{ secrets.LONG_HD_ACCOUNT_FIRST_PRIVATE_KEY }}
LONG_HD_ACCOUNT_FIRST_PUBLIC_KEY: ${{ secrets.LONG_HD_ACCOUNT_FIRST_PUBLIC_KEY }}
LONG_HD_ACCOUNT_FIRST_HASH_SHORT_FORM: ${{ secrets.LONG_HD_ACCOUNT_FIRST_HASH_SHORT_FORM }}
CUSTOM_NETWORK_RPC_URL: ${{ secrets.CUSTOM_NETWORK_RPC_URL }}
CUSTOM_NETWORK_SECOND_RPC_URL: ${{ secrets.CUSTOM_NETWORK_SECOND_RPC_URL }}
NOTIFICATION_AUTHORIZATION: ${{ secrets.NOTIFICATION_AUTHORIZATION }}
Expand Down
20 changes: 16 additions & 4 deletions .github/workflows/secrets-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ inputs:
required: true
TEMPLE_FIREBASE_MESSAGING_VAPID_KEY:
required: true
TEMPLE_WALLET_ROUTE3_AUTH_TOKEN:
required: true
TEMPLE_WALLET_MOONPAY_API_KEY:
required: true
# [e2e]
DEFAULT_HD_ACCOUNT_SEED_PHRASE:
required: false
Expand All @@ -50,14 +54,18 @@ inputs:
required: false
IMPORTED_HD_ACCOUNT_FIRST_HASH_SHORT_FORM:
required: false
TEMPLE_WALLET_ROUTE3_AUTH_TOKEN:
required: true
TEMPLE_WALLET_MOONPAY_API_KEY:
required: true
WATCH_ONLY_PUBLIC_KEY_HASH:
required: false
WATCH_ONLY_PUBLIC_KEY_HASH_SHORT_FORM:
required: false
LONG_HD_ACCOUNT_SEED_PHRASE:
required: false
LONG_HD_ACCOUNT_FIRST_PRIVATE_KEY:
required: false
LONG_HD_ACCOUNT_FIRST_PUBLIC_KEY:
required: false
LONG_HD_ACCOUNT_FIRST_HASH_SHORT_FORM:
required: false
CUSTOM_NETWORK_RPC_URL:
required: false
CUSTOM_NETWORK_SECOND_RPC_URL:
Expand Down Expand Up @@ -109,6 +117,10 @@ runs:
IMPORTED_HD_ACCOUNT_FIRST_HASH_SHORT_FORM=${{ inputs.IMPORTED_HD_ACCOUNT_FIRST_HASH_SHORT_FORM }}
WATCH_ONLY_PUBLIC_KEY_HASH=${{ inputs.WATCH_ONLY_PUBLIC_KEY_HASH }}
WATCH_ONLY_PUBLIC_KEY_HASH_SHORT_FORM=${{ inputs.WATCH_ONLY_PUBLIC_KEY_HASH_SHORT_FORM }}
LONG_HD_ACCOUNT_SEED_PHRASE=${{ inputs.LONG_HD_ACCOUNT_SEED_PHRASE }}
LONG_HD_ACCOUNT_FIRST_PRIVATE_KEY=${{ inputs.LONG_HD_ACCOUNT_FIRST_PRIVATE_KEY }}
LONG_HD_ACCOUNT_FIRST_PUBLIC_KEY=${{ inputs.LONG_HD_ACCOUNT_FIRST_PUBLIC_KEY }}
LONG_HD_ACCOUNT_FIRST_HASH_SHORT_FORM=${{ inputs.LONG_HD_ACCOUNT_FIRST_HASH_SHORT_FORM }}
CUSTOM_NETWORK_RPC_URL=${{ inputs.CUSTOM_NETWORK_RPC_URL }}
CUSTOM_NETWORK_SECOND_RPC_URL=${{ inputs.CUSTOM_NETWORK_SECOND_RPC_URL }}
NOTIFICATION_AUTHORIZATION=${{ inputs.NOTIFICATION_AUTHORIZATION }}
Expand Down
7 changes: 7 additions & 0 deletions e2e/.env.dist
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ IMPORTED_HD_ACCOUNT_FIRST_PUBLIC_KEY_HASH=
IMPORTED_HD_ACCOUNT_FIRST_HASH_SHORT_FORM=


LONG_HD_ACCOUNT_SEED_PHRASE=

LONG_HD_ACCOUNT_FIRST_PRIVATE_KEY=
LONG_HD_ACCOUNT_FIRST_PUBLIC_KEY=
LONG_HD_ACCOUNT_FIRST_HASH_SHORT_FORM=


WATCH_ONLY_PUBLIC_KEY_HASH=
WATCH_ONLY_PUBLIC_KEY_HASH_SHORT_FORM=

Expand Down
1 change: 1 addition & 0 deletions e2e/src/features/home.feature
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Feature: Check functional on the Home page
# empty state error
And The Empty State Text on the Home page has correct No assets found value
And I clear Search Assets Input (Tokens) value on the Assets page
And The Asset Item Button is displayed on the Assets page

# hide 0 balances
And I press Manage Dropdown Button on the Assets page
Expand Down
185 changes: 184 additions & 1 deletion e2e/src/features/import-account-by-mnemonic.feature
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,190 @@ Feature: Import Account by Mnemonic
And I select Mnemonic tab
And I am on the ImportAccountMnemonic page

And I enter second mnemonic
And I enter importedSeedPhrase mnemonic on the ImportAccountMnemonic page
And I press Mnemonic Import Button on the Import Account(Mnemonic) page

Then I reveal a private key and compare with importedFirstPrivateKey

Scenario: As a user, I'd like to import account by mnemonic with derivation path + password field
Given I have imported an existing account

And I press Account Icon on the Header page
And I am on the AccountsDropdown page

And I press Import Account Button on the Account Drop-down page
And I am on the ImportAccountTab page

And I select Mnemonic tab
And I am on the ImportAccountMnemonic page

And I enter importedSeedPhrase mnemonic on the ImportAccountMnemonic page
And I press Mnemonic Import Button on the Import Account(Mnemonic) page

And I am on the Home page
And I check if importedAccountShortHash is corresponded to the selected account

# importing an account with derivation path
And I press Account Icon on the Header page
And I am on the AccountsDropdown page

And I press Import Account Button on the Account Drop-down page
And I am on the ImportAccountTab page

And I select Mnemonic tab
And I am on the ImportAccountMnemonic page

And I enter importedSeedPhrase mnemonic on the ImportAccountMnemonic page

And I scroll 200 pixels on the ImportAccountMnemonic page
And I press Custom Derivation Path Button on the Import Account(Mnemonic) page
And I clear Custom Derivation Path Input value on the Import Account(Mnemonic) page
And I enter customDerivationPath into Custom Derivation Path Input on the Import Account(Mnemonic) page
And I scroll 900 pixels on the ImportAccountMnemonic page
And I press Mnemonic Import Button on the Import Account(Mnemonic) page

And I am on the Home page
And I check if importedAccountDerPathShortHash is corresponded to the selected account

# importing an account with additional 'Password' input
And I press Account Icon on the Header page
And I am on the AccountsDropdown page

And I press Import Account Button on the Account Drop-down page
And I am on the ImportAccountTab page

And I select Mnemonic tab
And I am on the ImportAccountMnemonic page

And I enter importedSeedPhrase mnemonic on the ImportAccountMnemonic page
And I scroll 900 pixels on the ImportAccountMnemonic page
And I enter amount_1 into Mnemonic Password Input on the Import Account(Mnemonic) page
And I press Mnemonic Import Button on the Import Account(Mnemonic) page

And I am on the Home page
Then I check if importedAccountByPasswordShortHash is corresponded to the selected account


@dev
Scenario: Import account by mnemonic validation + negative cases
Given I have imported an existing account

And I press Account Icon on the Header page
And I am on the AccountsDropdown page

And I press Import Account Button on the Account Drop-down page
And I am on the ImportAccountTab page

And I select Mnemonic tab
And I am on the ImportAccountMnemonic page
# validation checks 12 words seed
And I scroll 900 pixels on the ImportAccountMnemonic page
And I press Mnemonic Import Button on the Import Account(Mnemonic) page
And I got the validation-error 'Seed phrase must contain 12 words' with Mnemonic Validation Error Text element on the Import (Account/Wallet) page
And I scroll -300 pixels on the ImportAccountMnemonic page
And The Mnemonic Drop Down Button on the Import (Account/Wallet) page has correct My Seed phrase is 12 words value
# validation checks 24 words seed
And I press Mnemonic Drop Down Button on the Import (Account/Wallet) page
And I select mnemonic with 24 words
And I scroll 900 pixels on the ImportAccountMnemonic page
And I press Mnemonic Import Button on the Import Account(Mnemonic) page
And I got the validation-error 'Seed phrase must contain 24 words' with Mnemonic Validation Error Text element on the Import (Account/Wallet) page

And I reload the page
And I am on the ImportAccountMnemonic page

# validation checks word inputs with 'invalidRandomSeedPhrase'
And I enter invalidRandomSeedPhrase mnemonic on the ImportAccountMnemonic page
And I scroll 300 pixels on the ImportAccountMnemonic page
And I press Mnemonic Import Button on the Import Account(Mnemonic) page
And I got the validation-error 'Invalid Seed Phrase' with Mnemonic Validation Error Text element on the Import (Account/Wallet) page

And I scroll -300 pixels on the ImportAccountMnemonic page
And I clear entered mnemonic on the ImportAccountMnemonic page

# validation checks word inputs with 'incorrectSeedPhrase'
And I enter incorrectSeedPhrase mnemonic on the ImportAccountMnemonic page
And I scroll 300 pixels on the ImportAccountMnemonic page
And I press Mnemonic Import Button on the Import Account(Mnemonic) page
And I got the validation-error 'Invalid Seed PhraseMake sure the words spelled correctly' with Mnemonic Validation Error Text element on the Import (Account/Wallet) page

And I scroll -300 pixels on the ImportAccountMnemonic page
And I clear entered mnemonic on the ImportAccountMnemonic page

# validation checks word inputs with 'invalidSeedPhrase'
And I enter invalidSeedPhrase mnemonic on the ImportAccountMnemonic page
And I scroll 300 pixels on the ImportAccountMnemonic page
And I press Mnemonic Import Button on the Import Account(Mnemonic) page
And I got the validation-error 'Invalid Seed Phrase' with Mnemonic Validation Error Text element on the Import (Account/Wallet) page

And I scroll -300 pixels on the ImportAccountMnemonic page
And I clear entered mnemonic on the ImportAccountMnemonic page

# validation checks custom derivation path input
And I scroll 200 pixels on the ImportAccountMnemonic page
And I press Custom Derivation Path Button on the Import Account(Mnemonic) page
And I clear Custom Derivation Path Input value on the Import Account(Mnemonic) page

# importing 24 words seed
And I scroll -300 pixels on the ImportAccountMnemonic page
And I press Mnemonic Drop Down Button on the Import (Account/Wallet) page
And I select mnemonic with 24 words
And I enter longSeedPhrase24 mnemonic on the ImportAccountMnemonic page
And I scroll 900 pixels on the ImportAccountMnemonic page

And I press Mnemonic Import Button on the Import Account(Mnemonic) page

And I am on the Home page
And I check if longFirstAccountShortHash is corresponded to the selected account

# checking derivation type validation
And I press Account Icon on the Header page
And I am on the AccountsDropdown page

And I press Import Account Button on the Account Drop-down page
And I am on the ImportAccountTab page

And I select Mnemonic tab
And I am on the ImportAccountMnemonic page

And I enter importedSeedPhrase mnemonic on the ImportAccountMnemonic page
And I press Custom Derivation Path Button on the Import Account(Mnemonic) page
And I scroll 900 pixels on the ImportAccountMnemonic page
And I clear Custom Derivation Path Input value on the Import Account(Mnemonic) page
And I enter shortRandomContent into Custom Derivation Path Input on the Import Account(Mnemonic) page
And I press Mnemonic Import Button on the Import Account(Mnemonic) page

And I got the validation-error 'Must start with 'm'' with Input Error element on the Universal Component page
# invalid path validation
And I clear Custom Derivation Path Input value on the Import Account(Mnemonic) page
And I enter invalidDerivationPath into Custom Derivation Path Input on the Import Account(Mnemonic) page
And I press Mnemonic Import Button on the Import Account(Mnemonic) page
And I got the validation-error 'Invalid path' with Input Error element on the Universal Component page

And I clear Custom Derivation Path Input value on the Import Account(Mnemonic) page
And I enter secondInvalidDerivationPath into Custom Derivation Path Input on the Import Account(Mnemonic) page
And I press Mnemonic Import Button on the Import Account(Mnemonic) page

And I got the validation-error 'Invalid path' with Input Error element on the Universal Component page

And I clear Custom Derivation Path Input value on the Import Account(Mnemonic) page
And I enter thirdInvalidDerivationPath into Custom Derivation Path Input on the Import Account(Mnemonic) page
And I press Mnemonic Import Button on the Import Account(Mnemonic) page

And I got the validation-error 'Invalid path' with Input Error element on the Universal Component page

And I clear Custom Derivation Path Input value on the Import Account(Mnemonic) page
And I enter fourthInvalidDerivationPath into Custom Derivation Path Input on the Import Account(Mnemonic) page
And I press Mnemonic Import Button on the Import Account(Mnemonic) page

And I got the validation-error 'Invalid path' with Input Error element on the Universal Component page

# valid importing to finish the scenario
And I clear Custom Derivation Path Input value on the Import Account(Mnemonic) page
And I enter basicDerivationPath into Custom Derivation Path Input on the Import Account(Mnemonic) page
And I press Mnemonic Import Button on the Import Account(Mnemonic) page

And I am on the Home page
Then I check if importedAccountShortHash is corresponded to the selected account
39 changes: 39 additions & 0 deletions e2e/src/features/import-account-by-private-key.feature
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,42 @@ Feature: Import Account by Private Key
And I press Private Key Import Button on the Import Account(Private Key) page

Then I reveal a private key and compare with importedFirstPrivateKey



Scenario: Check validation importing by private key
Given I have imported an existing account

And I press Account Icon on the Header page
And I am on the AccountsDropdown page

And I press Import Account Button on the Account Drop-down page
And I am on the ImportAccountTab page

And I select Private Key tab
And I am on the ImportAccountPrivateKey page

And I press Private Key Import Button on the Import Account(Private Key) page
And I got the validation-error 'Required' with Input Error element on the Universal Component page

And I enter shortRandomContent into Private Key Input on the Import Account(Private Key) page
And I press Private Key Import Button on the Import Account(Private Key) page
# checking alert type , title and description of the error
And I got the 'Error' error with Alert title Text element on the Alert page
And I got the validation-error 'Failed to import account. This may happen because provided Key is invalid' with Alert description Text element on the Alert page

And I clear Private Key Input value on the Import Account(Private Key) page
And I enter defaultFirstPrivateKey into Private Key Input on the Import Account(Private Key) page
And I press Private Key Import Button on the Import Account(Private Key) page
# checking duplicate importing account error
And I got the 'Error' error with Alert title Text element on the Alert page
And I got the validation-error 'Account already exists' with Alert description Text element on the Alert page

And I clear Private Key Input value on the Import Account(Private Key) page
And I enter importedFirstPrivateKey into Private Key Input on the Import Account(Private Key) page
And I press Private Key Import Button on the Import Account(Private Key) page

And I am on the Home page
Then I check if importedAccountShortHash is corresponded to the selected account


30 changes: 30 additions & 0 deletions e2e/src/features/import-account-by-public-key.feature
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,33 @@ Feature: Import an account by public key (Watch-only)
And I press Watch Only Import Button on the Import Account(Watch-Only) page

Then I check if watchOnlyAccountShortHash is corresponded to the selected account

Scenario: Check validation importing by public key
Given I have imported an existing account

And I press Account Icon on the Header page
And I am on the AccountsDropdown page

And I press Import Account Button on the Account Drop-down page
And I am on the ImportAccountTab page

And I select Watch-only tab
And I am on the ImportAccountWatchOnly page

And I enter shortRandomContent into Watch Only Input on the Import Account(Watch-Only) page
And I press Watch Only Import Button on the Import Account(Watch-Only) page
And I got the validation-error 'Invalid address or domain name' with Input Error element on the Universal Component page

And I clear Watch Only Input value on the Import Account(Watch-Only) page
And I enter defaultFirstPublicKey into Watch Only Input on the Import Account(Watch-Only) page
And I press Watch Only Import Button on the Import Account(Watch-Only) page
# checking alert type , title and description of the error
And I got the 'Error' error with Alert title Text element on the Alert page
And I got the validation-error 'Account already exists' with Alert description Text element on the Alert page

And I clear Watch Only Input value on the Import Account(Watch-Only) page
And I clear Watch Only Input value on the Import Account(Watch-Only) page
And I enter watchOnlyPublicKey into Watch Only Input on the Import Account(Watch-Only) page
And I press Watch Only Import Button on the Import Account(Watch-Only) page

Then I check if watchOnlyAccountShortHash is corresponded to the selected account
6 changes: 3 additions & 3 deletions e2e/src/features/import-existing-wallet.feature
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Feature: Import existing wallet
And I press Import Existing Wallet button on the Welcome page

And I am on the ImportExistingWallet page
And I enter default mnemonic
And I enter defaultSeedPhrase mnemonic on the ImportExistingWallet page
And I press Next button on the Import Existing Seed Phrase page

And I am on the SetWallet page
Expand All @@ -29,7 +29,7 @@ Feature: Import existing wallet
And I press Import Existing Wallet button on the Welcome page

And I am on the ImportExistingWallet page
And I enter default mnemonic
And I enter defaultSeedPhrase mnemonic on the ImportExistingWallet page
And I press Next button on the Import Existing Seed Phrase page

And I am on the SetWallet page
Expand Down Expand Up @@ -66,7 +66,7 @@ Feature: Import existing wallet
And I press Import Existing Wallet button on the Welcome page

And I am on the ImportExistingWallet page
And I enter default mnemonic
And I enter defaultSeedPhrase mnemonic on the ImportExistingWallet page
And I press Next button on the Import Existing Seed Phrase page

And I am on the SetWallet page
Expand Down
Loading

0 comments on commit 07c81ed

Please sign in to comment.