Skip to content

Commit c6897db

Browse files
committed
Merge branch 'main' into test/btc_add_wallet_e2e
2 parents c021a77 + 4e1a26d commit c6897db

16 files changed

Lines changed: 108 additions & 111 deletions

.github/shared/build/action.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,10 @@ inputs:
110110
description: ' ADA handle cache lifetime'
111111
required: false
112112
default: 600000
113+
NOTIFICATION_CENTER_USE_TEST_API:
114+
description: 'Use test API for Notification Center instead of the production PubNub service'
115+
required: false
116+
default: 'false'
113117
runs:
114118
using: 'composite'
115119
steps:
@@ -185,4 +189,5 @@ runs:
185189
BROWSER: ${{ inputs.BROWSER_TARGET }}
186190
E2E_FORCE_TREZOR_PICKED: ${{ inputs.E2E_FORCE_TREZOR_PICKED }}
187191
HANDLE_RESOLUTION_CACHE_LIFETIME: ${{ inputs.HANDLE_RESOLUTION_CACHE_LIFETIME }}
192+
NOTIFICATION_CENTER_USE_TEST_API: ${{ inputs.NOTIFICATION_CENTER_USE_TEST_API }}
188193
run: yarn browser build

packages/core/src/ui/components/WalletSetupRevamp/WalletSetupEnterPasswordStep.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export const WalletSetupEnterPasswordStep = ({
5454
label={t('core.walletSetupReuseRecoveryPhrase.insertPassword')}
5555
onSubmit={() => handleOnNext()}
5656
onChange={(target) => setPassword(target)}
57-
data-testid="wallet-setup-enter-password-input"
57+
testId="wallet-setup-enter-password-input"
5858
errorMessage={errorMessage}
5959
autoFocus
6060
/>

packages/e2e-tests/src/assert/notifications/NotificationDetailsAssert.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ class NotificationDetailsAssert {
1717
expect(await NotificationDetails.viewAllButton.getText()).to.equal(await t(translationKey));
1818
}
1919

20-
async assertNotificationDetailsContent(expectedTitle: string, expectedPublisher: string, expectedBody: string) {
20+
async assertNotificationDetailsContent(expectedTitle: string, expectedTopicName: string, expectedBody: string) {
2121
const actualTitle = await NotificationDetails.getTitle();
2222
expect(actualTitle).to.equal(expectedTitle);
2323

24-
const actualPublisher = await NotificationDetails.getPublisher();
25-
expect(actualPublisher).to.equal(expectedPublisher);
24+
const actualTopicName = await NotificationDetails.getTopicName();
25+
expect(actualTopicName).to.equal(expectedTopicName);
2626

2727
const actualBody = await NotificationDetails.getBody();
2828
expect(actualBody).to.equal(expectedBody);

packages/e2e-tests/src/assert/onboarding/ConfirmPasswordPageAssert.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,8 @@ class ConfirmPasswordPageAssert extends OnboardingCommonAssert {
2525
);
2626
}
2727

28-
async assertConfirmButtonIsEnabled() {
29-
await ConfirmPasswordPage.nextButton.waitForClickable();
30-
expect(await ConfirmPasswordPage.nextButton.isEnabled()).to.be.true;
31-
}
32-
33-
async assertConfirmButtonIsDisabled() {
34-
expect(await ConfirmPasswordPage.nextButton.isEnabled()).to.be.false;
28+
async assertConfirmButtonIsEnabled(shouldBeEnabled: boolean) {
29+
await ConfirmPasswordPage.nextButton.waitForEnabled({ reverse: !shouldBeEnabled });
3530
}
3631

3732
async assertSeePasswordError() {

packages/e2e-tests/src/assert/walletAddressPageAssert.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,23 +173,23 @@ class WalletAddressPageAssert {
173173
}
174174
}
175175

176-
async waitForWalletNameToBeNotEmpty() {
176+
async waitUntilWalletNameIsNotEmpty() {
177177
await browser.waitUntil(async () => (await WalletAddressPage.walletName.getText()) !== '', {
178178
timeout: 3000,
179179
timeoutMsg: 'failed while waiting for wallet name'
180180
});
181181
}
182182

183183
async assertSeeWalletNameAndAddress(wallet: WalletRepositoryConfig, mode: 'extended' | 'popup') {
184-
await this.waitForWalletNameToBeNotEmpty();
184+
await this.waitUntilWalletNameIsNotEmpty();
185185
expect(await WalletAddressPage.walletName.getText()).to.equal(wallet.name);
186186
const address = String(extensionUtils.isMainnet() ? wallet.accounts[0].mainnetAddress : wallet.accounts[0].address);
187187
const expectedAddress = mode === 'extended' ? address : `${address.slice(0, 7)}...${address.slice(-8)}`;
188188
expect(await WalletAddressPage.walletAddress.getText()).to.equal(expectedAddress);
189189
}
190190

191191
async assertSeeBitcoinWalletNameAndAddress(wallet: WalletRepositoryConfig, addressShouldMatch: boolean) {
192-
await this.waitForWalletNameToBeNotEmpty();
192+
await this.waitUntilWalletNameIsNotEmpty();
193193
expect(await WalletAddressPage.walletName.getText()).to.equal(wallet.name);
194194
const expectedAddress = String(
195195
extensionUtils.isMainnet() ? wallet.bitCoinMainnetAddress : wallet.bitCoinTestnetAddress

packages/e2e-tests/src/elements/notifications/NotificationDetails.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class NotificationDetails {
2525
return $(this.NOTIFICATION_TITLE);
2626
}
2727

28-
get notificationPublisher(): ChainablePromiseElement<WebdriverIO.Element> {
28+
get notificationTopicName(): ChainablePromiseElement<WebdriverIO.Element> {
2929
return $(this.NOTIFICATION_TOPIC_NAME);
3030
}
3131

@@ -52,8 +52,8 @@ class NotificationDetails {
5252
return await this.notificationTitle.getText();
5353
}
5454

55-
async getPublisher(): Promise<string> {
56-
return await this.notificationPublisher.getText();
55+
async getTopicName(): Promise<string> {
56+
return await this.notificationTopicName.getText();
5757
}
5858

5959
async getBody(): Promise<string> {

packages/e2e-tests/src/elements/onboarding/ConfirmPasswordPage.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
/* eslint-disable no-undef */
1+
/* global WebdriverIO */
22
import CommonOnboardingElements from './commonOnboardingElements';
33
import type { ChainablePromiseElement } from 'webdriverio';
44
import { setInputFieldValue } from '../../utils/inputFieldUtils';
55

66
class ConfirmPasswordPage extends CommonOnboardingElements {
7-
private PASSWORD_INPUT = 'input[type="password"]';
8-
private PASSWORD_ERROR = '[data-testid="wallet-setup-step-content"] form span';
7+
private PASSWORD_INPUT = '[data-testid="wallet-setup-enter-password-input"]';
8+
private PASSWORD_ERROR = '[data-testid="wallet-setup-enter-password-input-error"]';
99

1010
get passwordInput(): ChainablePromiseElement<WebdriverIO.Element> {
1111
return $(this.PASSWORD_INPUT);

packages/e2e-tests/src/elements/onboarding/IncompatibleRecoveryPhraseErrorPage.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* eslint-disable no-undef */
1+
/* global WebdriverIO */
22
import CommonOnboardingElements from './commonOnboardingElements';
33
import type { ChainablePromiseElement } from 'webdriverio';
44

packages/e2e-tests/src/elements/onboarding/ReuseRecoveryPhrasePage.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* eslint-disable no-undef */
1+
/* global WebdriverIO */
22
import CommonOnboardingElements from './commonOnboardingElements';
33
import type { ChainablePromiseElement } from 'webdriverio';
44

packages/e2e-tests/src/features/AddNewWalletCreateBitcoin.feature

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ Feature: Add new wallet - Create Bitcoin wallet
1313
Then "Choose recovery method" page is displayed on "Create" flow for Bitcoin chain
1414
And "Recovery phrase" is selected as a recovery method for Bitcoin chain
1515
When I click "Next" button during wallet setup
16-
Then "Reuse your Recovery Phrase?" screen is displayed
17-
When I click "Use same recovery phrase" button
18-
Then "Confirm your password" screen is displayed for wallet "MultiWallet2"
19-
When I enter valid password for wallet "MultiWallet2" on "Confirm your password" screen
20-
And I click "Confirm" button on "Confirm your password" screen
16+
Then "Reuse your Recovery Phrase" page is displayed
17+
When I click "Use same recovery phrase" button on "Reuse your Recovery Phrase" page
18+
Then "Confirm your password" page is displayed for wallet "MultiWallet2"
19+
When I enter valid password for wallet "MultiWallet2" on "Confirm your password" page
20+
And I click "Confirm" button on "Confirm your password" page
2121
Then "Wallet setup" page is displayed
2222
When I enter wallet name: "MultiWallet2", password: "N_8J@bne87A" and password confirmation: "N_8J@bne87A"
2323
And I click "Enter wallet" button
@@ -34,8 +34,8 @@ Feature: Add new wallet - Create Bitcoin wallet
3434
Then "Choose recovery method" page is displayed on "Create" flow for Bitcoin chain
3535
And "Recovery phrase" is selected as a recovery method for Bitcoin chain
3636
When I click "Next" button during wallet setup
37-
Then "Reuse your Recovery Phrase?" screen is displayed
38-
When I click "Create a new one" button
37+
Then "Reuse your Recovery Phrase" page is displayed
38+
When I click "Create a new one" button on "Reuse your Recovery Phrase" page
3939
Then "Mnemonic writedown" page is displayed with 24 words
4040
When I save mnemonic words
4141
And I click "Next" button during wallet setup
@@ -59,14 +59,14 @@ Feature: Add new wallet - Create Bitcoin wallet
5959
Then "Choose recovery method" page is displayed on "Create" flow for Bitcoin chain
6060
And "Recovery phrase" is selected as a recovery method for Bitcoin chain
6161
When I click "Next" button during wallet setup
62-
Then "Reuse your Recovery Phrase?" screen is displayed
63-
When I click "Use same recovery phrase" button
64-
Then "Confirm your password" screen is displayed for wallet "TwelveWordsMnemonic"
65-
When I enter valid password for wallet "TwelveWordsMnemonic" on "Confirm your password" screen
66-
And I click "Confirm" button on "Confirm your password" screen
62+
Then "Reuse your Recovery Phrase" page is displayed
63+
When I click "Use same recovery phrase" button on "Reuse your Recovery Phrase" page
64+
Then "Confirm your password" page is displayed for wallet "TwelveWordsMnemonic"
65+
When I enter valid password for wallet "TwelveWordsMnemonic" on "Confirm your password" page
66+
And I click "Confirm" button on "Confirm your password" page
6767
Then I see incompatible recovery phrase error page
6868
When I click "Select another wallet" button on incompatible recovery phrase error page
69-
Then "Reuse your Recovery Phrase?" screen is displayed
69+
Then "Reuse your Recovery Phrase" page is displayed
7070

7171
@LW-13747
7272
Scenario: Extended-view - Multi-wallet - Create Bitcoin Wallet - Only 24 words allowed - Create new recovery phrase
@@ -78,11 +78,11 @@ Feature: Add new wallet - Create Bitcoin wallet
7878
Then "Choose recovery method" page is displayed on "Create" flow for Bitcoin chain
7979
And "Recovery phrase" is selected as a recovery method for Bitcoin chain
8080
When I click "Next" button during wallet setup
81-
Then "Reuse your Recovery Phrase?" screen is displayed
82-
When I click "Use same recovery phrase" button
83-
Then "Confirm your password" screen is displayed for wallet "TwelveWordsMnemonic"
84-
When I enter valid password for wallet "TwelveWordsMnemonic" on "Confirm your password" screen
85-
And I click "Confirm" button on "Confirm your password" screen
81+
Then "Reuse your Recovery Phrase" page is displayed
82+
When I click "Use same recovery phrase" button on "Reuse your Recovery Phrase" page
83+
Then "Confirm your password" page is displayed for wallet "TwelveWordsMnemonic"
84+
When I enter valid password for wallet "TwelveWordsMnemonic" on "Confirm your password" page
85+
And I click "Confirm" button on "Confirm your password" page
8686
Then I see incompatible recovery phrase error page
8787
When I click "Create a new one" button on incompatible recovery phrase error page
8888
Then "Mnemonic writedown" page is displayed with 24 words
@@ -105,29 +105,29 @@ Feature: Add new wallet - Create Bitcoin wallet
105105
Then "Choose recovery method" page is displayed on "Create" flow for Bitcoin chain
106106
And "Recovery phrase" is selected as a recovery method for Bitcoin chain
107107
When I click "Next" button during wallet setup
108-
Then "Reuse your Recovery Phrase?" screen is displayed
109-
And "MultiWallet2" wallet name is selected on "Reuse your Recovery Phrase" screen
110-
When I select "MultiWallet1" wallet name on "Reuse your Recovery Phrase" screen
111-
Then "MultiWallet1" wallet name is selected on "Reuse your Recovery Phrase" screen
112-
When I select "MultiWallet2" wallet name on "Reuse your Recovery Phrase" screen
113-
Then "MultiWallet2" wallet name is selected on "Reuse your Recovery Phrase" screen
114-
When I click "Use same recovery phrase" button
115-
Then "Confirm your password" screen is displayed for wallet "MultiWallet2"
116-
When I enter invalid password for wallet "MultiWallet2" on "Confirm your password" screen
117-
And I click "Confirm" button on "Confirm your password" screen
118-
Then I see password error on "Confirm your password" screen
119-
And "Confirm" button is disabled on "Confirm your password" screen
108+
Then "Reuse your Recovery Phrase" page is displayed
109+
And "MultiWallet2" wallet name is selected on "Reuse your Recovery Phrase" page
110+
When I select "MultiWallet1" wallet name on "Reuse your Recovery Phrase" page
111+
Then "MultiWallet1" wallet name is selected on "Reuse your Recovery Phrase" page
112+
When I select "MultiWallet2" wallet name on "Reuse your Recovery Phrase" page
113+
Then "MultiWallet2" wallet name is selected on "Reuse your Recovery Phrase" page
114+
When I click "Use same recovery phrase" button on "Reuse your Recovery Phrase" page
115+
Then "Confirm your password" page is displayed for wallet "MultiWallet2"
116+
When I enter invalid password for wallet "MultiWallet2" on "Confirm your password" page
117+
And I click "Confirm" button on "Confirm your password" page
118+
Then I see password error on "Confirm your password" page
119+
And "Confirm" button is disabled on "Confirm your password" page
120120

121121
@LW-13741
122-
Scenario: Extended-view - Multi-wallet - Trying to reuse the same mnemonic twice
122+
Scenario: Extended-view - Multi-wallet - Trying to reuse the same mnemonic
123123
When I opened "Create" flow via "Add new wallet" feature
124124
And I select "Bitcoin" blockchain on the "Select a blockchain" page
125125
And I click "Next" button during wallet setup
126126
And I click "Understood" button on "Bitcoin warning" modal
127127
And I click "Next" button during wallet setup
128-
And I click "Use same recovery phrase" button
129-
And I enter valid password for wallet "MultiWallet2" on "Confirm your password" screen
130-
And I click "Confirm" button on "Confirm your password" screen
128+
And I click "Use same recovery phrase" button on "Reuse your Recovery Phrase" page
129+
And I enter valid password for wallet "MultiWallet2" on "Confirm your password" page
130+
And I click "Confirm" button on "Confirm your password" page
131131
And I enter wallet name: "MultiWallet2", password: "N_8J@bne87A" and password confirmation: "N_8J@bne87A"
132132
And I click "Enter wallet" button
133133
Then I see LW homepage
@@ -139,9 +139,9 @@ Feature: Add new wallet - Create Bitcoin wallet
139139
And I click "Next" button during wallet setup
140140
And I click "Understood" button on "Bitcoin warning" modal
141141
And I click "Next" button during wallet setup
142-
And I click "Use same recovery phrase" button
143-
And I enter valid password for wallet "MultiWallet2" on "Confirm your password" screen
144-
And I click "Confirm" button on "Confirm your password" screen
142+
And I click "Use same recovery phrase" button on "Reuse your Recovery Phrase" page
143+
And I enter valid password for wallet "MultiWallet2" on "Confirm your password" page
144+
And I click "Confirm" button on "Confirm your password" page
145145
And I enter wallet name: "MultiWallet2", password: "N_8J@bne87A" and password confirmation: "N_8J@bne87A"
146146
And I click "Enter wallet" button
147147
Then I see LW homepage

0 commit comments

Comments
 (0)