Skip to content

Commit

Permalink
test(extension): maintenance 25th Apr (#1103)
Browse files Browse the repository at this point in the history
* test(extension): update LW-5044

* test(extension): block tests due to LW-10336

* test(extension): update translation for LW-2521

* test(extension): cleanup onboarding steps
  • Loading branch information
wklos-iohk committed Apr 25, 2024
1 parent 9abd6e2 commit 5425031
Show file tree
Hide file tree
Showing 16 changed files with 40 additions and 177 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
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class SettingsPageAssert {
async assertSeeRemoveWalletButton() {
await SettingsPage.removeWalletButton.waitForDisplayed();
expect(await SettingsPage.removeWalletButton.getText()).to.equal(
await t('browserView.settings.wallet.general.removeWalletAction')
await t('browserView.settings.wallet.general.removeAction')
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ export class TokenSearchResult {
}

get grayedOutTokenIcon(): ChainablePromiseElement<WebdriverIO.Element> {
return $(String(`(${this.CONTAINER}${this.TOKEN_ICON}//div[contains(@class, 'overlay')]`));
return $(String(`${this.CONTAINER}${this.TOKEN_ICON}//div[contains(@class, 'overlay')]`));
}

get checkmarkInSelectedToken(): ChainablePromiseElement<WebdriverIO.Element> {
return $(String(`(${this.CONTAINER}${this.TOKEN_ICON}//*[name()='svg']`));
return $(String(`${this.CONTAINER}${this.TOKEN_ICON}//*[name()='svg']`));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class TokenSelectionPage extends CommonDrawerElements {
};

deselectToken = async (assetType: string, index: number) => {
assetType === 'Tokens' ? await this.tokenItem(index).container.click() : await this.nftNames[index].click();
assetType === 'Tokens' ? await this.tokenItem(Number(index)).container.click() : await this.nftNames[index].click();
};

saveSelectedTokens = async (assetType: string, bundle: number) => {
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 @@ -20,11 +20,11 @@ Feature: Staking Page - Delegated funds - Single pool - Extended View
| manage | I close the drawer by clicking close button |
| confirmation | I close the drawer by clicking close button |
| password | I close the drawer by clicking close button |
| success | I close the drawer by clicking close button |
# | success | I close the drawer by clicking close button | TODO: unblock when LW-10336 is resolved
| manage | I click outside the drawer |
| confirmation | I click outside the drawer |
| password | I click outside the drawer |
| success | I click outside the drawer |
# | success | I click outside the drawer | TODO: unblock when LW-10336 is resolved

@LW-8450
Scenario Outline: Extended View - Staking - Hover over currently staking element: <element>
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 @@ -13,10 +13,10 @@ Feature: Send - Multiple selection for Popup View
And click on the <assetsType> button in the coin selector dropdown
And I click "Select multiple" button on asset picker drawer
And I select amount: 30 of asset type: <assetsType>
Then the 3 selected <assetsType> are grayed out and display checkmark
Then the 30 selected <assetsType> are grayed out and display checkmark
And I see counter with number: 30 of selected tokens
When I deselect <assetsType> 30
Then the 2 selected <assetsType> are grayed out and display checkmark
Then the 29 selected <assetsType> are grayed out and display checkmark
And I see counter with number: 29 of selected tokens
When I save selected <assetsType> in bundle 1
And I click "Add to transaction" button on asset picker drawer
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
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Feature: Staking Page - Switching pools - Extended Browser View - E2E
Given Wallet is synced
And I navigate to Staking extended page

@LW-7819 @Testnet
@LW-7819 @Testnet @Pending @issue=LW-10336
Scenario Outline: Extended View - Multidelegation - Delegate to multiple pools E2E
When I open Overview tab
And I wait until delegation info card shows staking to "<pools_before>" pool(s)
Expand All @@ -31,7 +31,7 @@ Feature: Staking Page - Switching pools - Extended Browser View - E2E
| 2 | 10 | 8BETA, OCEAN, WOOF, PIANO, SMAUG, ZZZZX, ZZZG3, YATP, XSP, CENT | Delegation |
| 10 | 1 | 8BETA | Stake Key De-Registration |

@LW-8434 @Testnet
@LW-8434 @Testnet @Pending @issue=LW-10336
Scenario: Extended View - Transactions details - Delegation Tx shows pool name and ticker - Stake pool with metadata
And I save identifiers of stake pools currently in use
And I open Browse pools tab
Expand All @@ -55,7 +55,7 @@ Feature: Staking Page - Switching pools - Extended Browser View - E2E
When I click on a transaction: 1
Then The Tx details are displayed for Staking with metadata

@LW-8435 @Testnet
@LW-8435 @Testnet @Pending @issue=LW-10336
Scenario: Extended View - Transactions details - Delegation Tx shows pool name and ticker - Stake pool without metadata
And I save identifiers of stake pools currently in use
And I open Browse pools tab
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 5425031

Please sign in to comment.