Skip to content

Commit 7001d6c

Browse files
authored
test(extension): e2e fixes (#1038)
1 parent 1b24ad5 commit 7001d6c

9 files changed

+25
-18
lines changed

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

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ export type TransactionData = {
2525
assets?: string[];
2626
};
2727

28+
const stakeKeyRegistration = 'Stake Key Registration';
29+
2830
class TransactionsDetailsAssert {
2931
waitForTransactionsLoaded = async () => {
3032
await browser.waitUntil(async () => (await TransactionsPage.rows).length > 1, {
@@ -114,7 +116,7 @@ class TransactionsDetailsAssert {
114116
await TransactionDetailsPage.transactionDetailsInputsSection.waitForDisplayed();
115117
await TransactionDetailsPage.transactionDetailsOutputsSection.waitForDisplayed();
116118
const txType = await TransactionDetailsPage.transactionDetailsDescription.getText();
117-
if (!txType.includes('Stake Key Registration')) {
119+
if (!txType.includes(stakeKeyRegistration)) {
118120
await TransactionDetailsPage.transactionDetailsFeeADA.waitForDisplayed();
119121
await TransactionDetailsPage.transactionDetailsFeeFiat.waitForDisplayed();
120122
}
@@ -164,6 +166,7 @@ class TransactionsDetailsAssert {
164166

165167
const txDetailsInputADAValueString = await TransactionDetailsPage.transactionDetailsInputAdaAmount.getText();
166168
const txDetailsInputADAValue = Number(txDetailsInputADAValueString.split(' ', 1));
169+
const txType = await TransactionDetailsPage.transactionDetailsDescription.getText();
167170

168171
const txDetailsInputFiatValueString = await TransactionDetailsPage.transactionDetailsInputFiatAmount.getText();
169172
const txDetailsInputFiatValue = Number(txDetailsInputFiatValueString.slice(1).split(' ', 1));
@@ -174,18 +177,20 @@ class TransactionsDetailsAssert {
174177
const txDetailsOutputFiatValueString = await TransactionDetailsPage.transactionDetailsOutputFiatAmount.getText();
175178
const txDetailsOutputFiatValue = Number(txDetailsOutputFiatValueString.slice(1).split(' ', 1));
176179

177-
const txDetailsFeeADAValueString = await TransactionDetailsPage.transactionDetailsFeeADA.getText();
178-
const txDetailsFeeADAValue = Number(txDetailsFeeADAValueString.split(' ', 1));
180+
if (!txType.includes(stakeKeyRegistration)) {
181+
const txDetailsFeeADAValueString = await TransactionDetailsPage.transactionDetailsFeeADA.getText();
182+
const txDetailsFeeADAValue = Number(txDetailsFeeADAValueString.split(' ', 1));
183+
expect(txDetailsFeeADAValue).to.be.greaterThan(0);
179184

180-
const txDetailsFeeFiatValueString = await TransactionDetailsPage.transactionDetailsFeeFiat.getText();
181-
const txDetailsFeeFiatValue = Number(txDetailsFeeFiatValueString.slice(1).split(' ', 1));
185+
const txDetailsFeeFiatValueString = await TransactionDetailsPage.transactionDetailsFeeFiat.getText();
186+
const txDetailsFeeFiatValue = Number(txDetailsFeeFiatValueString.slice(1).split(' ', 1));
187+
expect(txDetailsFeeFiatValue).to.be.greaterThan(0);
188+
}
182189

183190
expect(txDetailsInputADAValue).to.be.greaterThan(0);
184191
expect(txDetailsInputFiatValue).to.be.greaterThan(0);
185192
expect(txDetailsOutputADAValue).to.be.greaterThan(0);
186193
expect(txDetailsOutputFiatValue).to.be.greaterThan(0);
187-
expect(txDetailsFeeADAValue).to.be.greaterThan(0);
188-
expect(txDetailsFeeFiatValue).to.be.greaterThan(0);
189194

190195
await TransactionDetailsPage.closeActivityDetails(mode);
191196
}
@@ -221,8 +226,8 @@ class TransactionsDetailsAssert {
221226
if ((await TransactionsPage.transactionsTableItemType(i).getText()) !== 'Self Transaction') {
222227
await TransactionsPage.clickOnTransactionRow(i);
223228
await TransactionDetailsPage.transactionDetailsDescription.waitForClickable({ timeout: 15_000 });
224-
const txType = await TransactionDetailsPage.transactionDetailsDescription.getText();
225-
if (!txType.includes('Delegation')) {
229+
const txType = (await TransactionDetailsPage.transactionDetailsDescription.getText()).split('\n')[0];
230+
if (!['Delegation', stakeKeyRegistration].includes(txType)) {
226231
const tokensAmountSummary =
227232
(await TransactionDetailsPage.getTransactionSentTokensWithoutDuplicates()).length + 1;
228233
let tokensDescriptionAmount = await TransactionDetailsPage.transactionDetailsAmountOfTokens.getText();

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { TestWalletName, getTestWallet } from '../../support/walletConfiguration';
1+
import { getTestWallet, TestWalletName } from '../../support/walletConfiguration';
22
import CommonOnboardingElements from './commonOnboardingElements';
33
import recoveryPhrasePage from './recoveryPhrasePage';
44
import walletSetupPage from './walletSetupPage';

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,9 @@ Feature: Onboarding - Create wallet
210210
| 21 | is | disabled |
211211

212212
@LW-5844
213-
Scenario Outline: "Get started" page - Legal links - click on <legal_link> link
213+
Scenario Outline: "Get started" page - Legal links in footer - click on <legal_link> link
214214
When "Get started" page is displayed
215-
And I click on "<legal_link>" legal link on "Main page"
215+
And I click on "<legal_link>" legal link
216216
Then "<legal_link>" is displayed in new tab
217217
Examples:
218218
| legal_link |

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ Feature: Send - Extended Browser View (Advanced Tx)
139139
And click on the coin selector for "tADA" asset in bundle 2
140140
And click on an token with name: "LaceCoin"
141141
And I enter a value of: 1 to the "LaceCoin1" asset in bundle 2
142-
Then transaction fee is around 0.19 ADA and Ada allocation cost is around 1.07 ADA
142+
Then transaction fee is around 0.25 ADA and Ada allocation cost is around 1.07 ADA
143143

144144
@LW-4505
145145
Scenario: Extended-view - Cancel transaction with multiple bundles on Summary page

packages/e2e-tests/src/features/SendTransactionSimpleExtended.part1.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ Feature: LW-484: Send & Receive - Extended Browser View (Simple Tx)
189189
Then I verify transaction costs amount is around 0.00 ADA
190190
And I enter a valid "shelley" address in the bundle 1 recipient's address
191191
When I enter a value of: 2 to the "tADA" asset
192-
Then I verify transaction costs amount is around 0.18 ADA
192+
Then I verify transaction costs amount is around 0.25 ADA
193193

194194
@LW-2370 @Testnet @Mainnet
195195
Scenario: Extended-view - Tx summary page is displayed

packages/e2e-tests/src/features/SendTransactionSimpleExtended.part2.feature

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,8 @@ Feature: LW-484: Send & Receive - Extended Browser View (Simple Tx)
176176
When I hover over the value for "tADA" asset in bundle 1
177177
Then the "MAX" button is not displayed
178178

179-
@LW-4762 @Testnet @Mainnet
179+
@LW-4762 @Testnet @Mainnet @Pending
180+
@issue=LW-10242
180181
Scenario: Extended View - Send flow - Enter and Escape buttons support
181182
When I click "Send" button on page header
182183
And I press keyboard Enter button

packages/e2e-tests/src/features/SendTransactionSimplePopup.part1.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ Feature: LW-484: Send & Receive - Popup View (Simple Tx)
182182
Then I verify transaction costs amount is around 0.00 ADA
183183
And I enter a valid "shelley" address in the bundle 1 recipient's address
184184
When I enter a value of: 2 to the "tADA" asset in bundle 1
185-
Then I verify transaction costs amount is around 0.18 ADA
185+
Then I verify transaction costs amount is around 0.25 ADA
186186

187187
@LW-2404 @Testnet @Mainnet
188188
Scenario: Popup-view - Tx summary page is displayed - single asset (ADA)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Feature: General Settings - Extended Browser View
33

44
Background:
5-
Given Lace is ready for test
5+
Given Wallet is synced
66

77
@LW-2324 @Smoke @Mainnet @Testnet
88
Scenario: Extended View - Visibility of Settings page and its content

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ Feature: LW: Tokens tab - extended view
7171
| FAQ | What type of governance features are supported in Lace using the GovTool in the current SanchoNet test environment? |
7272
| FAQ | What type of governance actions are supported by Lace? |
7373

74-
@LW-4878 @Testnet @Mainnet
74+
@LW-4878 @Testnet @Mainnet @Pending
75+
@issue=LW-10242
7576
Scenario: Extended-view - Tokens details - Enter and Escape buttons support
7677
And I click token with name: "Cardano"
7778
And The Token details screen is displayed for token "Cardano" with ticker "tADA" in extended mode

0 commit comments

Comments
 (0)