Skip to content

Commit 26b1fe4

Browse files
authored
test: remove unnecessary step (#1943)
1 parent b7fd6f1 commit 26b1fe4

10 files changed

+10
-33
lines changed

packages/e2e-tests/src/elements/newTransaction/coinConfigure.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,6 @@ export class CoinConfigure {
7474
if (loseFocus) await this.clickToLoseFocus();
7575
};
7676

77-
fillTokenValueUsingKeys = async (valueToEnter: number): Promise<void> => {
78-
await this.input.waitForClickable();
79-
await this.input.click();
80-
await browser.keys(String(valueToEnter));
81-
};
82-
8377
fillTokenValueWithoutClearingField = async (valueToEnter: number): Promise<void> => {
8478
await this.input.waitForClickable();
8579
await this.input.click();

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,11 @@ Feature: Send - Extended Browser View (Advanced Tx)
4242
And I click "Send" button on page header
4343
And I enter a valid "shelley" address in the bundle 1 recipient's address
4444
And I enter a 51% of total "tADA" asset in bundle 1
45-
And I open cancel modal to trigger button validation
4645
Then I do not see insufficient balance error in bundle 1 for "tADA" asset
4746
And "Review transaction" button is enabled on "Send" page
4847
When I click "Add bundle" button on "Send" page
4948
And I enter a valid "shelley" address in the bundle 2 recipient's address
5049
And I enter a 51% of total "tADA" asset in bundle 2
51-
And I open cancel modal to trigger button validation
5250
Then I see insufficient balance error in bundle 2 for "tADA" asset
5351
And I do not see insufficient balance error in bundle 1 for "tADA" asset
5452
And "Review transaction" button is disabled on "Send" page

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,13 +147,11 @@ Feature: Send - Extended Browser View (Advanced Tx)
147147
And I click "Send" button on page header
148148
And I enter a valid "shelley" address in the bundle 1 recipient's address
149149
And I enter a 51% of total "ADA" asset in bundle 1
150-
And I open cancel modal to trigger button validation
151150
Then I do not see insufficient balance error in bundle 1 for "ADA" asset
152151
And "Review transaction" button is enabled on "Send" page
153152
When I click "Add bundle" button on "Send" page
154153
And I enter a valid "shelley" address in the bundle 2 recipient's address
155154
And I enter a 51% of total "ADA" asset in bundle 2
156-
And I open cancel modal to trigger button validation
157155
Then I see insufficient balance error in bundle 2 for "ADA" asset
158156
And I see insufficient balance error in bundle 1 for "ADA" asset
159157
And "Review transaction" button is disabled on "Send" page

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,11 +175,9 @@ Feature: LW-484: Send & Receive - Extended Browser View (Simple Tx)
175175
Scenario: Extended-view - Error displayed when token value out of range
176176
And I click "Send" button on page header
177177
And I enter a valid "shelley" address in the bundle 1 recipient's address
178-
When I enter a value of: 99999999 to the "tADA" asset
179-
And I open cancel modal to trigger button validation
178+
When I enter a value of: 99999999 to the "tADA" asset in bundle 1
180179
Then "Insufficient balance" error is displayed on "Send" page
181180
And "Review transaction" button is disabled on "Send" page
182-
When I enter a value of: 2 to the "tADA" asset
183-
And I open cancel modal to trigger button validation
181+
When I enter a value of: 2 to the "tADA" asset in bundle 1
184182
Then "Insufficient balance" error is not displayed on "Send" page
185183
And "Review transaction" button is enabled on "Send" page

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ Feature: LW-484: Send & Receive - Extended Browser View (Simple Tx)
99
When I click "Send" button on page header
1010
When I enter a valid "shelley" address in the bundle 1 recipient's address
1111
Then I enter a value of: <value> to the "tADA" asset in bundle 1
12-
And I open cancel modal to trigger button validation
1312
Then "Insufficient balance" error <should_see> displayed on "Send" page
1413
Then "Review transaction" button is <status> on "Send" page
1514
Examples:

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Feature: LW-484: Send & Receive - Extended Browser View (Simple Tx)
1212
And <assetSelectionAction> "<assetName>"
1313
And I enter an exact value of: <value_to_enter> to the "<assetName>" asset in bundle 1
1414
Then I see <displayed_value> as displayed value
15-
When I click to loose focus from value field
15+
When I click to lose focus from value field
1616
Then I see <conv_value> as displayed value
1717
And I <shouldSeeError> insufficient balance error in bundle 1 for "<assetName>" asset
1818
When I hover over the value for "<assetName>" asset in bundle 1
@@ -56,7 +56,7 @@ Feature: LW-484: Send & Receive - Extended Browser View (Simple Tx)
5656
And <assetSelectionAction> "<assetName>"
5757
And I enter an exact value of: <value_to_enter> to the "<assetName>" asset in bundle 1
5858
Then I see <displayed_value> as displayed value
59-
When I click to loose focus from value field
59+
When I click to lose focus from value field
6060
Then I see <conv_value> as displayed value
6161
And I <shouldSeeError> insufficient balance error in bundle 1 for "<assetName>" asset
6262
When I hover over the value for "<assetName>" asset in bundle 1
@@ -106,7 +106,7 @@ Feature: LW-484: Send & Receive - Extended Browser View (Simple Tx)
106106
When I click "Send" button on page header
107107
And click on the coin selector for "tADA" asset in bundle 1
108108
And click on an token with name: "Ibilecoin"
109-
And I click to loose focus from value field
109+
And I click to lose focus from value field
110110
Then I see 0.00 as displayed value
111111
And I do not see insufficient balance error in bundle 1 for "Ibilecoin" asset
112112
When I hover over the value for "Ibilecoin" asset in bundle 1

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,11 +169,9 @@ Feature: LW-484: Send & Receive - Popup View (Simple Tx)
169169
And I click "Send" button on Tokens page in popup mode
170170
And I enter a valid "shelley" address in the bundle 1 recipient's address
171171
When I enter a value of: 99999999 to the "tADA" asset in bundle 1
172-
And I open cancel modal to trigger button validation
173172
Then "Insufficient balance" error is displayed on "Send" page
174173
And "Review transaction" button is disabled on "Send" page
175174
When I enter a value of: 2 to the "tADA" asset in bundle 1
176-
And I open cancel modal to trigger button validation
177175
Then "Insufficient balance" error is not displayed on "Send" page
178176
Then "Review transaction" button is enabled on "Send" page
179177

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,6 @@ Feature: LW-484: Send & Receive - Popup View (Simple Tx)
220220
When I click "Send" button on Tokens page in popup mode
221221
When I enter a valid "shelley" address in the bundle 1 recipient's address
222222
Then I enter a value of: <value> to the "tADA" asset in bundle 1
223-
And I open cancel modal to trigger button validation
224223
Then "Insufficient balance" error <should_see> displayed on "Send" page
225224
And "Review transaction" button is <status> on "Send" page
226225
Examples:

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Feature: LW-484: Send & Receive - Popup View (Simple Tx)
2929
And <assetSelectionAction> "<assetName>"
3030
And I enter an exact value of: <value_to_enter> to the "<assetName>" asset in bundle 1
3131
Then I see <displayed_value> as displayed value
32-
When I click to loose focus from value field
32+
When I click to lose focus from value field
3333
Then I see <conv_value> as displayed value
3434
And I <shouldSeeError> insufficient balance error in bundle 1 for "<assetName>" asset
3535
When I hover over the value for "<assetName>" asset in bundle 1
@@ -73,7 +73,7 @@ Feature: LW-484: Send & Receive - Popup View (Simple Tx)
7373
And <assetSelectionAction> "<assetName>"
7474
And I enter an exact value of: <value_to_enter> to the "<assetName>" asset in bundle 1
7575
Then I see <displayed_value> as displayed value
76-
When I click to loose focus from value field
76+
When I click to lose focus from value field
7777
Then I see <conv_value> as displayed value
7878
And I <shouldSeeError> insufficient balance error in bundle 1 for "<assetName>" asset
7979
When I hover over the value for "<assetName>" asset in bundle 1
@@ -123,7 +123,7 @@ Feature: LW-484: Send & Receive - Popup View (Simple Tx)
123123
When I click "Send" button on Tokens page in popup mode
124124
And click on the coin selector for "tADA" asset in bundle 1
125125
And click on an token with name: "Ibilecoin"
126-
And I click to loose focus from value field
126+
And I click to lose focus from value field
127127
Then I see 0.00 as displayed value
128128
And I do not see insufficient balance error in bundle 1 for "Ibilecoin" asset
129129
When I hover over the value for "Ibilecoin" asset in bundle 1

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

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ import { AddressInput } from '../elements/AddressInput';
4141
import { AssetInput } from '../elements/newTransaction/assetInput';
4242
import TokenSelectionPage from '../elements/newTransaction/tokenSelectionPage';
4343
import TransactionPasswordPage from '../elements/newTransaction/transactionPasswordPage';
44-
import { Key } from 'webdriverio';
4544
import { parseWalletAddress } from '../utils/parseWalletAddress';
4645
import { AddressType } from '../enums/AddressTypeEnum';
4746
import clipboard from 'clipboardy';
@@ -269,7 +268,7 @@ When(
269268
}
270269
);
271270

272-
When(/^I click to loose focus from value field$/, async () => {
271+
When(/^I click to lose focus from value field$/, async () => {
273272
await TransactionNewPage.coinConfigure().clickToLoseFocus();
274273
});
275274

@@ -288,12 +287,6 @@ Then(
288287
}
289288
);
290289

291-
Then(/^I open cancel modal to trigger button validation$/, async () => {
292-
// workaround for test automation only to fire all events after finished typing
293-
await browser.keys(Key.Escape);
294-
await Modal.cancelButton.click();
295-
});
296-
297290
Then(/^I click on transaction drawer background to lose focus$/, async () => {
298291
await TransactionNewPage.clickDrawerBackground();
299292
});
@@ -332,7 +325,7 @@ Then(
332325
const tokenBalance: string = testContext.load(`${assetName}tokenBalance`);
333326
const value = Number.parseFloat(tokenBalance) * (Number.parseFloat(percentage) * (1 / 100));
334327
const valueToEnter = Number.parseFloat(value.toPrecision(2));
335-
await TransactionNewPage.coinConfigure(bundleIndex, assetName).fillTokenValueUsingKeys(valueToEnter);
328+
await TransactionNewPage.coinConfigure(bundleIndex, assetName).fillTokenValue(valueToEnter);
336329
}
337330
);
338331

0 commit comments

Comments
 (0)