Skip to content

Commit 5e9e672

Browse files
authored
Add e2e token input tests (#1409)
1 parent a0a5a43 commit 5e9e672

15 files changed

+240
-84
lines changed

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -186,12 +186,6 @@ class DrawerSendExtendedAssert {
186186
: expect(colorProperty.parsed.hex).to.not.equal('#ff5470');
187187
}
188188

189-
async assertTokensValueAmount(expectedValue: string) {
190-
const coinConfigure = new CoinConfigure();
191-
const tokenAmount = await coinConfigure.input.getValue();
192-
expect(tokenAmount).to.equal(expectedValue);
193-
}
194-
195189
async assertSeeCancelTransactionModal(shouldSee: boolean) {
196190
await ModalAssert.assertSeeModalContainer(shouldSee);
197191
if (shouldSee) {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ export class CoinConfigure {
6868
return Number(value);
6969
};
7070

71-
fillTokenValue = async (valueToEnter: number): Promise<void> => {
71+
fillTokenValue = async (valueToEnter: number | string, loseFocus = true): Promise<void> => {
7272
await this.input.waitForClickable();
7373
await setInputFieldValue(await this.input, String(valueToEnter));
74-
await this.clickToLoseFocus();
74+
if (loseFocus) await this.clickToLoseFocus();
7575
};
7676

7777
fillTokenValueUsingKeys = async (valueToEnter: number): Promise<void> => {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ Feature: ADA handle - extended view
115115
And click on the NFTs button in the coin selector dropdown
116116
Then NFT with name: "$test_handle_1" is displayed in coin selector
117117
And I see ADA handle NFT with custom image on the Coin selector page
118-
When I click on NFT with name: "$test_handle_1" in asset selector
118+
When I click on NFT with name: "$test_handle_1"
119119
Then the "$test_handle_1" asset is displayed in bundle 1
120120

121121
@LW-7429

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ Feature: ADA handle - popup view
114114
And click on the NFTs button in the coin selector dropdown
115115
Then NFT with name: "$test_handle_1" is displayed in coin selector
116116
And I see ADA handle NFT with custom image on the Coin selector page
117-
When I click on NFT with name: "$test_handle_1" in asset selector
117+
When I click on NFT with name: "$test_handle_1"
118118
Then the "$test_hand..." asset is displayed in bundle 1
119119

120120
@LW-7434

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ Feature: Send - Extended Browser View (Advanced Tx)
7171
And I click "Add bundle" button on "Send" page
7272
And I click "Add token or NFT" button for bundle 1
7373
And click on the NFTs button in the coin selector dropdown
74-
And I click on NFT with name: "Ibilecoin" in asset selector
74+
And I click on NFT with name: "Ibilecoin"
7575
And I click "Add token or NFT" button for bundle 2
7676
And click on the NFTs button in the coin selector dropdown
7777
Then NFT with name: "Ibilecoin" is not displayed in coin selector
@@ -102,11 +102,11 @@ Feature: Send - Extended Browser View (Advanced Tx)
102102
Then the maximum available amount is displayed in bundle: 1 for "LaceCoin2" asset
103103
When I click "Add token or NFT" button for bundle 1
104104
And click on the NFTs button in the coin selector dropdown
105-
And I click on NFT with name: "Ibilecoin" in asset selector
105+
And I click on NFT with name: "Ibilecoin"
106106
Then the maximum available amount is displayed in bundle: 1 for "Ibilecoin" asset
107107
When I click "Add token or NFT" button for bundle 1
108108
And click on the NFTs button in the coin selector dropdown
109-
And I click on NFT with name: "Bison Coin" in asset selector
109+
And I click on NFT with name: "Bison Coin"
110110
Then the maximum available amount is displayed in bundle: 1 for "Bison Coin" asset
111111
And "Review transaction" button is enabled on "Send" page
112112

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ Feature: Send - Extended Browser View (Advanced Tx)
176176
And I click "Add bundle" button on "Send" page
177177
And I click "Add token or NFT" button for bundle 1
178178
And click on the NFTs button in the coin selector dropdown
179-
And I click on NFT with name: "Ibilecoin" in asset selector
179+
And I click on NFT with name: "Ibilecoin"
180180
And I click "Add token or NFT" button for bundle 1
181181
And click on the NFTs button in the coin selector dropdown
182182
And I close the drawer by clicking back button
@@ -207,12 +207,12 @@ Feature: Send - Extended Browser View (Advanced Tx)
207207
Then the maximum available amount is displayed in bundle: 1 for "HOSKY" asset
208208
When I click "Add token or NFT" button for bundle 1
209209
And click on the NFTs button in the coin selector dropdown
210-
And I click on NFT with name: "Ibilecoin" in asset selector
210+
And I click on NFT with name: "Ibilecoin"
211211
And I click MAX button in bundle 1 for "Ibilecoin" asset
212212
Then the maximum available amount is displayed in bundle: 1 for "Ibilecoin" asset
213213
When I click "Add token or NFT" button for bundle 1
214214
And click on the NFTs button in the coin selector dropdown
215-
And I click on NFT with name: "Bison Coin" in asset selector
215+
And I click on NFT with name: "Bison Coin"
216216
And I click MAX button in bundle 1 for "Bison Coin" asset
217217
Then the maximum available amount is displayed in bundle: 1 for "Bison Coin" asset
218218
And "Review transaction" button is enabled on "Send" page

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ Feature: LW-484: Send & Receive - Extended Browser View (Simple Tx)
168168
When I click "Send" button on page header
169169
And click on the coin selector for "tADA" asset in bundle 1
170170
And click on the NFTs button in the coin selector dropdown
171-
When I click on NFT with name: "Ibilecoin" in asset selector
171+
When I click on NFT with name: "Ibilecoin"
172172
Then the "Ibilecoin" asset is displayed in bundle 1
173173

174174
@LW-2368 @Testnet @Mainnet

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,5 +201,5 @@ Feature: LW-484: Send & Receive - Extended Browser View (Simple Tx)
201201
And I enter a valid "shelley" address in the bundle 1 recipient's address
202202
And click on the coin selector for "tADA" asset in bundle 1
203203
And click on the NFTs button in the coin selector dropdown
204-
When I click on NFT with name: "Ibilecoin" in asset selector
205-
Then the NFT displays 1 in the value field
204+
When I click on NFT with name: "Ibilecoin"
205+
Then I see 1 as displayed value

0 commit comments

Comments
 (0)