Skip to content

Commit e0618b2

Browse files
authored
test(extension): e2e - test maintenance 1 Nov (#693)
1 parent 0ccc47f commit e0618b2

File tree

6 files changed

+19
-2
lines changed

6 files changed

+19
-2
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ Feature: ADA handle - extended view
7474

7575
@LW-7138 @LW-8509
7676
Scenario: Extended View - Copy address/ADA handle
77+
Given I close wallet synced toast
7778
And I click "Receive" button on page header
7879
And I see "Wallet Address" page in extended mode for wallet "WalletAdaHandle"
7980
When I click "Copy" button on "Receive" page for default wallet address

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ Feature: Address book - extended view
110110

111111
@LW-4469
112112
Scenario: Extended-view - Address Book - Copy address button
113-
Given I have 3 addresses in my address book in extended mode
113+
Given I close wallet synced toast
114+
And I have 3 addresses in my address book in extended mode
114115
When I click address on the list with name "Byron"
115116
And I click "Copy" button on address details page
116117
Then I see a toast with message: "general.clipboard.copiedToClipboard"

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ Feature: Address book - popup view
1111

1212
@LW-4474
1313
Scenario: Popup-view - Address Book - Copy address button
14-
Given I have 3 addresses in my address book in popup mode
14+
Given I close wallet synced toast
15+
And I have 3 addresses in my address book in popup mode
1516
When I click address on the list with name "Byron"
1617
And I click "Copy" button on address details page
1718
Then I see a toast with message: "general.clipboard.copiedToClipboard"

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ Feature: Top Navigation - Extended view
3333

3434
@LW-2322 @Mainnet @Testnet
3535
Scenario: Avatar dropdown wallet address copy functions as expected
36+
Given I close wallet synced toast
3637
When I click the menu button
3738
Then the dropdown menu is visible
3839
When I click on the user details button
@@ -116,6 +117,7 @@ Feature: Top Navigation - Extended view
116117

117118
@LW-1717 @LW-5255 @Mainnet @Testnet
118119
Scenario: Avatar dropdown displays a valid wallet sync status (syncing) + toast & network pill
120+
Given I close wallet synced toast
119121
When I am in the offline network mode: true
120122
Then I see network pill indicates that status is offline next to Lace logo
121123
And I see a toast with message: "general.errors.networkError"

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Feature: Top Navigation - Popup view
1818

1919
@LW-4727 @Mainnet @Testnet
2020
Scenario: Avatar dropdown wallet address copy functions as expected
21+
Given I close wallet synced toast
2122
When I click the menu button
2223
Then the dropdown menu is visible
2324
When I click on the user details button
@@ -90,6 +91,7 @@ Feature: Top Navigation - Popup view
9091

9192
@LW-4726 @LW-5254 @Mainnet @Testnet
9293
Scenario: Avatar dropdown displays a valid wallet sync status (syncing) + toast & network pill
94+
Given I close wallet synced toast
9395
When I am in the offline network mode: true
9496
Then I see network pill indicates that status is offline next to Lace logo
9597
And I see a toast with message: "general.errors.networkError"

packages/e2e-tests/src/steps/commonSteps.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import tokensPageObject from '../pageobject/tokensPageObject';
2424
import menuMainAssert from '../assert/menuMainAssert';
2525
import LocalStorageAssert from '../assert/localStorageAssert';
2626
import ToastMessageAssert from '../assert/toastMessageAssert';
27+
import ToastMessage from '../elements/toastMessage';
2728
import menuMainExtended from '../elements/menuMainExtended';
2829
import { browser } from '@wdio/globals';
2930
import faqPageAssert from '../assert/faqPageAssert';
@@ -51,6 +52,15 @@ Then(/^I close the drawer by clicking back button$/, async () => {
5152
await simpleTxSideDrawerPageObject.clickBackDrawerButton();
5253
});
5354

55+
Then(/^I close wallet synced toast/, async () => {
56+
const toastMessage = await (await ToastMessage.messageText).getText();
57+
if (toastMessage === (await t('addressesDiscovery.toast.successText')).toString()) {
58+
await ToastMessage.closeButton.click();
59+
} else {
60+
Logger.warn('Wallet synced toast is not displayed, you might want to remove this step');
61+
}
62+
});
63+
5464
Then(/^Wallet is synced$/, async () => {
5565
await topNavigationAssert.assertWalletIsInSyncedStatus();
5666
});

0 commit comments

Comments
 (0)