diff --git a/packages/e2e-tests/src/assert/modalAssert.ts b/packages/e2e-tests/src/assert/modalAssert.ts index b525f16496..f25988a8af 100644 --- a/packages/e2e-tests/src/assert/modalAssert.ts +++ b/packages/e2e-tests/src/assert/modalAssert.ts @@ -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('', '').replace('', ''); - - await this.assertSeeModal(title, parsedDescription, cancelButtonLabel, confirmButtonLabel); - } - async assertSeeRemoveWalletModal(shouldBeDisplayed: boolean) { if (shouldBeDisplayed) { const title = await t('browserView.settings.wallet.general.removeWalletAlert.title'); diff --git a/packages/e2e-tests/src/elements/onboarding/analyticsPage.ts b/packages/e2e-tests/src/elements/onboarding/analyticsPage.ts deleted file mode 100644 index 5a55ac72fd..0000000000 --- a/packages/e2e-tests/src/elements/onboarding/analyticsPage.ts +++ /dev/null @@ -1,71 +0,0 @@ -import CommonOnboardingElements from './commonOnboardingElements'; - -class AnalyticsPage extends CommonOnboardingElements { - private TITLE = '[data-testid="wallet-setup-step-header"]'; - private DESCRIPTION = '[data-testid="wallet-setup-analytics-description"]'; - private DESCRIPTION_PRIVACY_POLICY_LINK = '[data-testid="wallet-setup-analytics-privacy-policy-link"]'; - private OPTIONS_TITLE = '[data-testid="wallet-setup-analytics-options-title"]'; - private OPTION_ALLOW_OPTOUT_ICON = '[data-testid="wallet-setup-analytics-options-allow-optout-icon"]'; - private OPTION_ALLOW_OPTOUT_TEXT = '[data-testid="wallet-setup-analytics-options-allow-optout-text"]'; - private OPTION_COLLECT_PRIVATE_KEYS_ICON = '[data-testid="wallet-setup-analytics-options-collect-private-keys-icon"]'; - private OPTION_COLLECT_PRIVATE_KEYS_TEXT = '[data-testid="wallet-setup-analytics-options-collect-private-keys-text"]'; - private OPTION_COLLECT_IP_ICON = '[data-testid="wallet-setup-analytics-options-collect-ip-icon"]'; - private OPTION_COLLECT_IP_TEXT = '[data-testid="wallet-setup-analytics-options-collect-ip-text"]'; - private OPTION_PERSONAL_DATA_ICON = '[data-testid="wallet-setup-analytics-options-personal-data-icon"]'; - private OPTION_PERSONAL_DATA_TEXT = '[data-testid="wallet-setup-analytics-options-personal-data-text"]'; - private SKIP_BUTTON = '[data-testid="wallet-setup-step-btn-skip"]'; - - get title() { - return $(this.TITLE); - } - - get description() { - return $(this.DESCRIPTION); - } - - get privacyPolicyLinkWithinDescription() { - return $(this.DESCRIPTION_PRIVACY_POLICY_LINK); - } - - get optionsTitle() { - return $(this.OPTIONS_TITLE); - } - - get optionsAllowOptoutIcon() { - return $(this.OPTION_ALLOW_OPTOUT_ICON); - } - - get optionsAllowOptoutText() { - return $(this.OPTION_ALLOW_OPTOUT_TEXT); - } - - get optionsCollectPrivateKeysIcon() { - return $(this.OPTION_COLLECT_PRIVATE_KEYS_ICON); - } - - get optionsCollectPrivateKeysText() { - return $(this.OPTION_COLLECT_PRIVATE_KEYS_TEXT); - } - - get optionsCollectIPIcon() { - return $(this.OPTION_COLLECT_IP_ICON); - } - - get optionsCollectIPText() { - return $(this.OPTION_COLLECT_IP_TEXT); - } - - get optionsPersonalDataIcon() { - return $(this.OPTION_PERSONAL_DATA_ICON); - } - - get optionsPersonalDataText() { - return $(this.OPTION_PERSONAL_DATA_TEXT); - } - - get skipButton() { - return $(this.SKIP_BUTTON); - } -} - -export default new AnalyticsPage(); diff --git a/packages/e2e-tests/src/features/OnboardingCreateWallet.feature b/packages/e2e-tests/src/features/OnboardingCreateWallet.feature index 6327978ad5..8bae785930 100755 --- a/packages/e2e-tests/src/features/OnboardingCreateWallet.feature +++ b/packages/e2e-tests/src/features/OnboardingCreateWallet.feature @@ -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: diff --git a/packages/e2e-tests/src/features/OnboardingRestoreWallet.feature b/packages/e2e-tests/src/features/OnboardingRestoreWallet.feature index 70e4c70852..fad1b3e4f6 100755 --- a/packages/e2e-tests/src/features/OnboardingRestoreWallet.feature +++ b/packages/e2e-tests/src/features/OnboardingRestoreWallet.feature @@ -3,26 +3,26 @@ 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 @@ -30,7 +30,7 @@ Feature: Onboarding - Restore wallet @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" @@ -38,21 +38,21 @@ Feature: Onboarding - Restore wallet @LW-2977 Scenario Outline: Restore Wallet - Set password - Recommendation for password: , password: , password confirmation: - 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: "" and password confirmation: "" Then Password recommendation: "", complexity bar level: "" and password confirmation error: "" 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 @@ -78,14 +78,14 @@ Feature: Onboarding - Restore wallet @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: @@ -109,7 +109,7 @@ 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" @@ -117,7 +117,7 @@ Feature: Onboarding - Restore wallet @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 @@ -126,7 +126,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 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: characters Then wallet name error "core.walletSetupRegisterStep.nameMaxLength" displayed @@ -162,7 +162,7 @@ Feature: Onboarding - Restore wallet @LW-6080 @LW-5839 @LW-5838 Scenario Outline: Restore Wallet - "Recovery phrase length page" restore words happy path - Given I click "Restore" button and confirm + Given I click "Restore" button on wallet setup page And I select word passphrase length Then "Mnemonic verification" page is displayed from "Restore wallet" flow with words When I enter correct mnemonic words on "Mnemonic verification" page @@ -178,7 +178,7 @@ Feature: Onboarding - Restore wallet @LW-6081 Scenario Outline: Restore Wallet - error message is displayed for 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 word passphrase length When I enter incorrect mnemonic words on "Mnemonic verification" page @@ -194,7 +194,7 @@ Feature: Onboarding - Restore wallet Given I set theme mode in Local Storage When "Get started" page is displayed Then I see current onboarding page in 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 And I enter 24 correct mnemonic words on "Mnemonic verification" page diff --git a/packages/e2e-tests/src/features/SettingsPageExtended.feature b/packages/e2e-tests/src/features/SettingsPageExtended.feature index b3f0f35e8f..8848d69e86 100644 --- a/packages/e2e-tests/src/features/SettingsPageExtended.feature +++ b/packages/e2e-tests/src/features/SettingsPageExtended.feature @@ -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 diff --git a/packages/e2e-tests/src/steps/onboardingSteps.ts b/packages/e2e-tests/src/steps/onboardingSteps.ts index 628672b681..f456ede1cc 100644 --- a/packages/e2e-tests/src/steps/onboardingSteps.ts +++ b/packages/e2e-tests/src/steps/onboardingSteps.ts @@ -5,8 +5,6 @@ import { switchToLastWindow } from '../utils/window'; import { t } from '../utils/translationService'; import CommonOnboardingElements from '../elements/onboarding/commonOnboardingElements'; import Modal from '../elements/modal'; -import ModalAssert from '../assert/modalAssert'; -import OnboardingAnalyticsPage from '../elements/onboarding/analyticsPage'; import OnboardingCommonAssert from '../assert/onboarding/onboardingCommonAssert'; import OnboardingConnectHWPageAssert from '../assert/onboarding/onboardingConnectHWPageAssert'; import OnboardingMainPage from '../elements/onboarding/mainPage'; @@ -76,27 +74,6 @@ When(/^I select ([^"]*) account on Select Account page$/, async (accountNumber: await SelectAccountPage.accountRadioButtons[accountNumber - 1].click(); }); -When(/^I click "(Back|Skip|Agree)" button on Analytics page$/, async (button: 'Back' | 'Skip' | 'Agree') => { - switch (button) { - case 'Back': - await OnboardingAnalyticsPage.backButton.click(); - break; - case 'Skip': - await OnboardingAnalyticsPage.skipButton.click(); - break; - case 'Agree': - await OnboardingAnalyticsPage.nextButton.click(); - break; - default: - throw new Error(`Unsupported button name: ${button}`); - } -}); - -When(/^I click "Go to my wallet" button on "All done" page$/, async () => { - await RecoveryPhrasePage.nextButton.waitForClickable(); - await RecoveryPhrasePage.nextButton.click(); -}); - When( /^I click "(Cancel|OK)" button on "(Limited support for DApp|Restoring a multi-address wallet\?|Are you sure you want to start again\?)" modal$/, // eslint-disable-next-line no-unused-vars,@typescript-eslint/no-unused-vars @@ -115,10 +92,6 @@ When( } ); -Given(/^I click "Restore" button and confirm$/, async () => { - await OnboardingMainPage.restoreWalletButton.click(); -}); - When(/^I enter wallet name: "([^"]*)"$/, async (walletName: string) => { await OnboardingWalletSetupPage.setWalletNameInput(walletName === 'empty' ? '' : walletName); }); @@ -128,10 +101,6 @@ When(/^I enter wallet name with size of: ([^"]*) characters$/, async (numberOfCh await OnboardingWalletSetupPage.setWalletNameInput(walletName); }); -Then(/^Name error "([^"]*)" is displayed/, async (nameError: string) => { - await OnboardingWalletSetupPageAssert.assertSeeWalletNameError(await t(nameError)); -}); - Then( // eslint-disable-next-line max-len /^Password recommendation: "([^"]*)", complexity bar level: "(\d{0,4})" and password confirmation error: "([^"]*)" are displayed$/, @@ -168,10 +137,6 @@ Then(/^I click Trezor wallet icon$/, async () => { await OnboardingConnectHardwareWalletPage.trezorButton.click(); }); -Then(/^"Restoring a multi-address wallet\?" modal is displayed$/, async () => { - await ModalAssert.assertSeeRestoringMultiAddressWalletModal(); -}); - Then(/^I clear saved words$/, async () => { mnemonicWordsForReference.length = 0; }); @@ -220,7 +185,7 @@ Then(/^I see following autocomplete options:$/, async (options: DataTable) => { await onboardingRecoveryPhrasePageAssert.assertSeeMnemonicAutocompleteOptions(dataTableAsStringArray(options)); }); -Then(/^I click header to loose focus$/, async () => { +Then(/^I click header to lose focus$/, async () => { await RecoveryPhrasePage.clickHeaderToLoseFocus(); }); @@ -247,10 +212,6 @@ Then(/^the word in mnemonic input has only ([^"]*) characters$/, async (expected await onboardingRecoveryPhrasePageAssert.assertMnemonicInputLength(0, Number(expectedLength)); }); -When(/^I click on Privacy Policy link$/, async () => { - await OnboardingAnalyticsPage.privacyPolicyLinkWithinDescription.click(); -}); - When( /^I click on "(Cookie policy|Privacy policy|Terms of service)" legal link(?: on "(Main page)")?$/, async (link: 'Cookie policy' | 'Privacy policy' | 'Terms of service', page?: 'Main page') => {