Skip to content

Commit f7c4fd1

Browse files
authored
test(extension): test maintenance 30 December - remove 'next to' check (#784)
1 parent 6982157 commit f7c4fd1

File tree

6 files changed

+32
-50
lines changed

6 files changed

+32
-50
lines changed

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

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96,13 +96,13 @@ class TopNavigationAssert {
9696
await MenuHeader.menuButton.click();
9797
}
9898

99-
async assertNetworkIdVisible(expectedNetwork: 'Mainnet' | 'Preprod' | 'Preview') {
99+
async assertNetworkPillVisible(expectedNetwork: 'Mainnet' | 'Preprod' | 'Preview') {
100100
const networkPill = await MenuHeader.networkPill;
101101
await networkPill.waitForDisplayed();
102102
expect(await networkPill.getText()).to.equal(expectedNetwork);
103103
}
104104

105-
async assertNetworkIdNotVisible() {
105+
async assertNetworkPillNotVisible() {
106106
await MenuHeader.networkPill.waitForDisplayed({ reverse: true });
107107
}
108108

@@ -112,12 +112,6 @@ class TopNavigationAssert {
112112
expect(await networkPill.getText()).to.equal(await t('general.networks.offline'));
113113
}
114114

115-
async assertNetworkIdNextToLogo() {
116-
const logo = MenuHeader.logo;
117-
const logoSibling = await logo.$('//following-sibling::div');
118-
expect(await logoSibling.getAttribute('data-testid')).to.equal('network-pill');
119-
}
120-
121115
async assertThemeTitle(mode: string) {
122116
await MenuHeader.menuThemeLabel.waitForDisplayed();
123117
expect(await MenuHeader.menuThemeLabel.getText()).to.equal(mode === 'light' ? 'Light mode' : 'Dark mode');

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ Feature: Top Navigation - Extended view
4040
Then I see a toast with message: "general.clipboard.copiedToClipboard"
4141

4242
@LW-4598 @Testnet
43-
Scenario: Extended View - network id is visible next to Lace logo for Testnet
44-
Then I see network id next to Lace logo for: "Preprod"
43+
Scenario: Extended View - network id is visible for Testnet
44+
Then I see network id: "Preprod"
4545

4646
@LW-4598 @Mainnet
47-
Scenario: Extended View - network id is not visible next to Lace logo for Mainnet
48-
Then I don't see network id next to Lace logo for: "Mainnet"
47+
Scenario: Extended View - network id is not visible for Mainnet
48+
Then I do not see network id: "Mainnet"
4949

5050
@LW-4843 @Mainnet @Testnet
5151
Scenario Outline: Extended view - theme switcher - <theme> mode
@@ -112,14 +112,14 @@ Feature: Top Navigation - Extended view
112112
And I click on the settings option
113113
Then I see current network: "Preview" name in network setting
114114
And I see current network: "Preview" name in "About Lace" widget
115-
And I see network id: "Preview" next to Lace logo
115+
And I see network id: "Preview"
116116
And Local storage appSettings contains info about network: "Preview"
117117

118118
@LW-1717 @LW-5255 @Mainnet @Testnet
119119
Scenario: Avatar dropdown displays a valid wallet sync status (syncing) + toast & network pill
120120
Given I close wallet synced toast
121121
When I am in the offline network mode: true
122-
Then I see network pill indicates that status is offline next to Lace logo
122+
Then I see network id with status: offline
123123
And I see a toast with message: "general.errors.networkError"
124124
When I click the menu button
125125
Then wallet sync status component is visible

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ Feature: Top Navigation - Popup view
2525
Then I see a toast with message: "general.clipboard.copiedToClipboard"
2626

2727
@LW-4599 @Testnet
28-
Scenario: Popup View - network id is visible next to Lace logo for Testnet
29-
Then I see network id next to Lace logo for: "Preprod"
28+
Scenario: Popup View - network id is visible for Testnet
29+
Then I see network id: "Preprod"
3030

3131
@LW-4599 @Mainnet
32-
Scenario: Popup View - network id is not visible next to Lace logo for Mainnet
33-
Then I don't see network id next to Lace logo for: "Mainnet"
32+
Scenario: Popup View - network id is not visible for Mainnet
33+
Then I do not see network id: "Mainnet"
3434

3535
@LW-4809 @Mainnet @Testnet
3636
Scenario: Popup View - User menu button is displayed
@@ -86,14 +86,14 @@ Feature: Top Navigation - Popup view
8686
And I click on then network sub-menu back button
8787
And I click on the settings option
8888
Then I see current network: "Preview" name in network setting
89-
And I see network id: "Preview" next to Lace logo
89+
And I see network id: "Preview"
9090
And Local storage appSettings contains info about network: "Preview"
9191

9292
@LW-4726 @LW-5254 @Mainnet @Testnet
9393
Scenario: Avatar dropdown displays a valid wallet sync status (syncing) + toast & network pill
9494
Given I close wallet synced toast
9595
When I am in the offline network mode: true
96-
Then I see network pill indicates that status is offline next to Lace logo
96+
Then I see network id with status: offline
9797
And I see a toast with message: "general.errors.networkError"
9898
When I click the menu button
9999
Then wallet sync status component is visible

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Feature: General Settings - Extended Browser View
8282
Then I don't see a toast with message: "browserView.settings.wallet.network.networkSwitched"
8383
And I close the drawer by clicking close button
8484
When I navigate to Tokens extended page
85-
Then I see network id: "Preprod" next to Lace logo
85+
Then I see network id: "Preprod"
8686
And I see "Preprod" specific tokens in extended mode
8787

8888
@LW-2675 @Mainnet
@@ -93,33 +93,33 @@ Feature: General Settings - Extended Browser View
9393
Then I don't see a toast with message: "browserView.settings.wallet.network.networkSwitched"
9494
And I close the drawer by clicking close button
9595
When I navigate to Tokens extended page
96-
Then I don't see network id next to Lace logo for: "Mainnet"
96+
Then I do not see network id: "Mainnet"
9797
And I see "Mainnet" specific tokens in extended mode
9898

9999
@LW-5258 @Testnet
100100
Scenario: Extended View - Settings - Network name updated in settings, widget, logo, localStorage after network switching
101101
Given I am on Settings extended page
102102
And I see current network: "Preprod" name in network setting
103103
And I see current network: "Preprod" name in "About Lace" widget
104-
And I see network id: "Preprod" next to Lace logo
104+
And I see network id: "Preprod"
105105
And Local storage appSettings contains info about network: "Preprod"
106106
When I switch network to: "Preview" in extended mode
107107
Then I see current network: "Preview" name in network setting
108108
And I see current network: "Preview" name in "About Lace" widget
109-
And I see network id: "Preview" next to Lace logo
109+
And I see network id: "Preview"
110110
And Local storage appSettings contains info about network: "Preview"
111111

112112
@LW-5258 @Mainnet
113113
Scenario: Extended View - Settings - Network name updated in settings, widget, logo, localStorage after network switching
114114
Given I am on Settings extended page
115115
And I see current network: "Mainnet" name in network setting
116116
And I see current network: "Mainnet" name in "About Lace" widget
117-
And I don't see network id next to Lace logo for: "Mainnet"
117+
And I do not see network id: "Mainnet"
118118
And Local storage appSettings contains info about network: "Mainnet"
119119
When I switch network to: "Preview" in extended mode
120120
Then I see current network: "Preview" name in network setting
121121
And I see current network: "Preview" name in "About Lace" widget
122-
And I see network id: "Preview" next to Lace logo
122+
And I see network id: "Preview"
123123
And Local storage appSettings contains info about network: "Preview"
124124

125125
@LW-5259 @Mainnet @Testnet

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ Feature: General Settings - Popup View
9191
Then I don't see a toast with message: "browserView.settings.wallet.network.networkSwitched"
9292
And I close the drawer by clicking back button
9393
When I navigate to Tokens popup page
94-
Then I see network id: "Preprod" next to Lace logo
94+
Then I see network id: "Preprod"
9595
And I see "Preprod" specific tokens in popup mode
9696

9797
@LW-2717 @Mainnet
@@ -102,29 +102,29 @@ Feature: General Settings - Popup View
102102
Then I don't see a toast with message: "browserView.settings.wallet.network.networkSwitched"
103103
And I close the drawer by clicking back button
104104
When I navigate to Tokens popup page
105-
Then I don't see network id next to Lace logo for: "Mainnet"
105+
Then I do not see network id: "Mainnet"
106106
And I see "Mainnet" specific tokens in popup mode
107107

108108
@LW-5260 @Testnet
109109
Scenario: Popup View - Settings - Network name updated in settings, logo, localStorage after network switching
110110
Given I am on Settings popup page
111111
And I see current network: "Preprod" name in network setting
112-
And I see network id: "Preprod" next to Lace logo
112+
And I see network id: "Preprod"
113113
And Local storage appSettings contains info about network: "Preprod"
114114
When I switch network to: "Preview" in popup mode
115115
Then I see current network: "Preview" name in network setting
116-
And I see network id: "Preview" next to Lace logo
116+
And I see network id: "Preview"
117117
And Local storage appSettings contains info about network: "Preview"
118118

119119
@LW-5260 @Mainnet
120120
Scenario: Popup View - Settings - Network name updated in settings, logo, localStorage after network switching
121121
Given I am on Settings popup page
122122
And I see current network: "Mainnet" name in network setting
123-
And I don't see network id next to Lace logo for: "Mainnet"
123+
And I do not see network id: "Mainnet"
124124
And Local storage appSettings contains info about network: "Mainnet""
125125
When I switch network to: "Preview" in popup mode
126126
Then I see current network: "Preview" name in network setting
127-
And I see network id: "Preview" next to Lace logo
127+
And I see network id: "Preview"
128128
And Local storage appSettings contains info about network: "Preview"
129129
130130
@LW-5261 @Testnet

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

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -37,28 +37,16 @@ Then(/sync status displays "([^"]*)" state/, async (walletState: string) => {
3737
});
3838

3939
Then(
40-
/^I see network id: "(Mainnet|Preprod|Preview)" next to Lace logo$/,
41-
async (expectedNetwork: 'Mainnet' | 'Preprod' | 'Preview') => {
42-
await topNavigationAssert.assertNetworkIdVisible(expectedNetwork);
43-
await topNavigationAssert.assertNetworkIdNextToLogo();
40+
/^I (see|do not see) network id: "(Mainnet|Preprod|Preview)"$/,
41+
async (shouldSee: 'see' | 'do not see', expectedNetwork: 'Mainnet' | 'Preprod' | 'Preview') => {
42+
await (shouldSee === 'see'
43+
? topNavigationAssert.assertNetworkPillVisible(expectedNetwork)
44+
: topNavigationAssert.assertNetworkPillNotVisible());
4445
}
4546
);
4647

47-
Then(/^I don't see network id next to Lace logo for: "Mainnet"$/, async () => {
48-
await topNavigationAssert.assertNetworkIdNotVisible();
49-
});
50-
51-
Then(
52-
/^I see network id next to Lace logo for: "(Preprod|Preview)"$/,
53-
async (expectedNetwork: 'Preprod' | 'Preview') => {
54-
await topNavigationAssert.assertNetworkIdVisible(expectedNetwork);
55-
await topNavigationAssert.assertNetworkIdNextToLogo();
56-
}
57-
);
58-
59-
Then(/^I see network pill indicates that status is offline next to Lace logo$/, async () => {
48+
Then(/^I see network id with status: offline$/, async () => {
6049
await topNavigationAssert.assertNetworkPillOffline();
61-
await topNavigationAssert.assertNetworkIdNextToLogo();
6250
});
6351

6452
Then(/^I can see application in (light|dark) mode$/, async (mode: 'light' | 'dark') => {

0 commit comments

Comments
 (0)