Skip to content

Commit

Permalink
test(extension): cleanup onboarding steps
Browse files Browse the repository at this point in the history
  • Loading branch information
wklos-iohk committed Apr 25, 2024
1 parent 682976e commit f952c08
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 166 deletions.
10 changes: 0 additions & 10 deletions packages/e2e-tests/src/assert/modalAssert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,6 @@ class ModalAssert {
await this.assertSeeConfirmButton(confirmButtonLabel);
}

async assertSeeRestoringMultiAddressWalletModal() {
const title = await t('browserView.walletSetup.confirmRestoreModal.header');
const description = await t('browserView.walletSetup.confirmRestoreModal.content');
const cancelButtonLabel = await t('general.button.cancel');
const confirmButtonLabel = await t('browserView.walletSetup.confirmRestoreModal.confirm');
const parsedDescription = description.replace('<b>', '').replace('</b>', '');

await this.assertSeeModal(title, parsedDescription, cancelButtonLabel, confirmButtonLabel);
}

async assertSeeRemoveWalletModal(shouldBeDisplayed: boolean) {
if (shouldBeDisplayed) {
const title = await t('browserView.settings.wallet.general.removeWalletAlert.title');
Expand Down
71 changes: 0 additions & 71 deletions packages/e2e-tests/src/elements/onboarding/analyticsPage.ts

This file was deleted.

10 changes: 0 additions & 10 deletions packages/e2e-tests/src/elements/onboarding/selectAccountPage.ts

This file was deleted.

1 change: 1 addition & 0 deletions packages/e2e-tests/src/elements/tokensPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ class TokensPage {
}

async clickOnCoinGeckoCreditsLink() {
await this.coinGeckoLink.waitForClickable();
await this.coinGeckoLink.click();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ Feature: Onboarding - Create wallet
| sad |
| saddle |
| sadness |
And I click header to loose focus
And I click header to lose focus
Then I do not see autocomplete options list
And I click on mnemonic input
Then I see following autocomplete options:
Expand Down
38 changes: 20 additions & 18 deletions packages/e2e-tests/src/features/OnboardingRestoreWallet.feature
Original file line number Diff line number Diff line change
Expand Up @@ -3,56 +3,56 @@ Feature: Onboarding - Restore wallet

@LW-2457
Scenario: Restore Wallet - Mnemonic writedown page - next button
Given I click "Restore" button and confirm
Given I click "Restore" button on wallet setup page
Then "Mnemonic verification" page is displayed from "Restore wallet" flow with 24 words
And "Next" button is disabled during onboarding process

@LW-2459
Scenario: Restore Wallet - happy path to "Name your wallet" page
Given I click "Restore" button and confirm
Given I click "Restore" button on wallet setup page
And I go to "Wallet setup" page from "Restore" wallet flow
And "Wallet setup" page is displayed

@LW-2460
Scenario: Restore Wallet - Mnemonic verification - fill all fields - wrong mnemonic
Given I click "Restore" button and confirm
Given I click "Restore" button on wallet setup page
And I go to "Mnemonic verification" page from "Restore" wallet flow
When I add characters "asd" in word 7
Then "Next" button is disabled during onboarding process

@LW-2461
Scenario: Restore Wallet - Name your wallet - back button
Given I click "Restore" button and confirm
Given I click "Restore" button on wallet setup page
And I go to "Wallet setup" page from "Restore" wallet flow
And "Wallet setup" page is displayed
When I click "Back" button during wallet setup
Then "Mnemonic verification" page is displayed from "Restore wallet" flow with 24 words

@LW-2462 @Smoke
Scenario: Restore Wallet - Name your wallet - happy path to "Enter wallet step"
Given I click "Restore" button and confirm
Given I click "Restore" button on wallet setup page
And I enter 24 correct mnemonic words on "Mnemonic verification" page
And I click "Next" button during wallet setup
And I enter wallet name: "ValidName", password: "N_8J@bne87A" and password confirmation: "N_8J@bne87A"
Then "Enter wallet" button is enabled

@LW-2977
Scenario Outline: Restore Wallet - Set password - Recommendation for password: <passw_err>, password: <password>, password confirmation: <password_conf>
Given I click "Restore" button and confirm
Given I click "Restore" button on wallet setup page
And I go to "Wallet setup" page from "Restore" wallet flow and "not fill" values
When I enter wallet name: "wallet", password: "<password>" and password confirmation: "<password_conf>"
Then Password recommendation: "<passw_err>", complexity bar level: "<complex_bar_lvl>" and password confirmation error: "<passw_conf_err>" are displayed
Examples:
| password | password_conf | passw_err | complex_bar_lvl | passw_conf_err |
| password | password_conf | passw_err | complex_bar_lvl | passw_conf_err |
| a | | core.walletNameAndPasswordSetupStep.firstLevelPasswordStrengthFeedback | 1 | empty |
| P@ss | | core.walletNameAndPasswordSetupStep.firstLevelPasswordStrengthFeedback | 1 | empty |
| N_8J@bne | | core.walletNameAndPasswordSetupStep.secondLevelPasswordStrengthFeedback | 2 | empty |
| N_8J@bne87 | | empty | 3 | empty |
| N_8J@bne87A | N_8J@bne87 | empty | 4 | core.walletSetupRegisterStep.noMatchPassword |
| N_8J@bne87 | | empty | 3 | empty |
| N_8J@bne87A | N_8J@bne87 | empty | 4 | core.walletSetupRegisterStep.noMatchPassword |

@LW-2464
Scenario: Restore Wallet - All done page - happy path
Given I click "Restore" button and confirm
Given I click "Restore" button on wallet setup page
And I go to "Wallet setup" page from "Restore" wallet flow
When I click "Enter wallet" button
Then I see LW homepage
Expand All @@ -63,6 +63,7 @@ Feature: Onboarding - Restore wallet
And I go to "Wallet setup" page from "Restore" wallet flow
When I click "Enter wallet" button
Then I see LW homepage
When I confirm multi-address discovery modal
And I open settings from header menu
Then Analytics toggle is enabled: true
When I open settings from header menu
Expand All @@ -73,19 +74,20 @@ Feature: Onboarding - Restore wallet
And I go to "Wallet setup" page from "Restore" wallet flow
When I click "Enter wallet" button
Then I see LW homepage
When I confirm multi-address discovery modal
And I open settings from header menu
Then Analytics toggle is enabled: false

@LW-2628
Scenario: Restore Wallet - autofill words
Given I click "Restore" button and confirm
Given I click "Restore" button on wallet setup page
Then "Mnemonic verification" page is displayed from "Restore wallet" flow with 24 words
When I fill mnemonic input with "s"
Then I see following autocomplete options:
| sad |
| saddle |
| sadness |
And I click header to loose focus
And I click header to lose focus
Then I do not see autocomplete options list
And I click on mnemonic input
Then I see following autocomplete options:
Expand All @@ -109,15 +111,15 @@ Feature: Onboarding - Restore wallet

@LW-4612
Scenario: Restore Wallet - Mnemonic verification - mnemonic length limited to 10 characters - paste word exceeding the limit
Given I click "Restore" button and confirm
Given I click "Restore" button on wallet setup page
And "Mnemonic verification" page is displayed from "Restore wallet" flow with 24 words
When I fill mnemonic input with "abcdefghijklmnopqrstuvwxyz"
Then the mnemonic input contains the word "abcdefghij"
And the word in mnemonic input has only 10 characters

@LW-4613
Scenario: Restore Wallet - Mnemonic verification - mnemonic length limited to 10 characters - add letter to mnemonic to exceed the limit
Given I click "Restore" button and confirm
Given I click "Restore" button on wallet setup page
And "Mnemonic verification" page is displayed from "Restore wallet" flow with 24 words
When I fill mnemonic input with "abcdefghij"
And I add characters "x" in word 0
Expand All @@ -126,7 +128,7 @@ Feature: Onboarding - Restore wallet

@LW-4546 @LW-4549
Scenario Outline: Restore wallet - Limit the wallet name input - Realtime error when inputs name with size of <value> character
Given I click "Restore" button and confirm
Given I click "Restore" button on wallet setup page
And I go to "Wallet setup" page from "Restore" wallet flow
When I enter wallet name with size of: <value> characters
Then wallet name error "core.walletSetupRegisterStep.nameMaxLength" <is_displayed> displayed
Expand Down Expand Up @@ -162,7 +164,7 @@ Feature: Onboarding - Restore wallet

@LW-6080 @LW-5839 @LW-5838
Scenario Outline: Restore Wallet - "Recovery phrase length page" restore <mnemonicLength> words happy path
Given I click "Restore" button and confirm
Given I click "Restore" button on wallet setup page
And I select <mnemonicLength> word passphrase length
Then "Mnemonic verification" page is displayed from "Restore wallet" flow with <mnemonicLength> words
When I enter <mnemonicLength> correct mnemonic words on "Mnemonic verification" page
Expand All @@ -178,7 +180,7 @@ Feature: Onboarding - Restore wallet

@LW-6081
Scenario Outline: Restore Wallet - error message is displayed for <mnemonicLength> passphrase length
Given I click "Restore" button and confirm
Given I click "Restore" button on wallet setup page
And "Mnemonic verification" page is displayed from "Restore wallet" flow with 24 words
And I select <mnemonicLength> word passphrase length
When I enter <mnemonicLength> incorrect mnemonic words on "Mnemonic verification" page
Expand All @@ -194,7 +196,7 @@ Feature: Onboarding - Restore wallet
Given I set <mode> theme mode in Local Storage
When "Get started" page is displayed
Then I see current onboarding page in <mode> mode
And I click "Restore" button and confirm
And I click "Restore" button on wallet setup page
When "Mnemonic verification" page is displayed from "Restore wallet" flow with 24 words
Then I see current onboarding page in <mode> mode
And I enter 24 correct mnemonic words on "Mnemonic verification" page
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ Feature: Send - Extended Browser View (Advanced Tx)
And click on the coin selector for "tADA" asset in bundle 2
And click on an token with name: "LaceCoin"
And I enter a value of: 1 to the "LaceCoin1" asset in bundle 2
Then transaction fee is around 0.25 ADA and Ada allocation cost is around 1.07 ADA
Then transaction fee is around 0.26 ADA and Ada allocation cost is around 1.07 ADA

@LW-4505
Scenario: Extended-view - Cancel transaction with multiple bundles on Summary page
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ Feature: General Settings - Extended Browser View
And I click "Remove wallet" button on "Remove wallet" modal
And I accept analytics banner on "Get started" page
Then "Get started" page is displayed
When I click "Restore" button and confirm
When I click "Restore" button on wallet setup page
And I go to "Wallet setup" page with wallet TAWalletNoFunds from "Restore" wallet flow
When I click "Enter wallet" button
Then I see LW homepage
Expand Down
11 changes: 3 additions & 8 deletions packages/e2e-tests/src/features/trezor/Trezor.feature
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,12 @@ Feature: Trezor Onboarding

Scenario: Onboarding Trezor wallet
And I connect, unlock and enter correct pin on Trezor emulator
Given I click "Connect" button on wallet setup page
Given I reject analytics banner on "Get started" page
And I click "Connect" button on wallet setup page
# TODO: remove/replace outdated steps
# And I click "OK" button on "Limited support for DApp" modal
# And I am on "Lace terms of use" page and accept terms
# And I am on "Help us improve your experience" page
When I click "Agree" button on Analytics page
# And I click Trezor wallet icon
And I click "Next" button during wallet setup
And I select 1 account on Select Account page
# And I select 1 account on Select Account page
When I click "Next" button during wallet setup
When I enter wallet name with size of: 10 characters
When I click "Next" button during wallet setup
Expand All @@ -20,6 +17,4 @@ Feature: Trezor Onboarding
And I click "Export" on Trezor Connect page
And I confirm exporting public key on Trezor emulator
And I switch to window with Lace
# Then "All done" page is displayed
When I click "Go to my wallet" button on "All done" page
Then I see LW homepage

0 comments on commit f952c08

Please sign in to comment.