Skip to content

Commit 43ef255

Browse files
committed
fix
1 parent a3e5c27 commit 43ef255

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

test/e2e/page-objects/pages/send/send-token-page.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,10 +239,19 @@ class SendTokenPage {
239239
await this.driver.pasteIntoField(this.hexInput, hex);
240240
}
241241

242-
async getHexInputValue(): Promise<string> {
242+
async waitForHexDataCleared(): Promise<string> {
243243
console.log('Getting value from hex input');
244244
const hexInputElement = await this.driver.waitForSelector(this.hexInput);
245-
await this.driver.waitForNonEmptyElement(hexInputElement);
245+
await this.driver.waitUntil(
246+
async () => {
247+
const value = await hexInputElement.getAttribute('value');
248+
return value === '';
249+
},
250+
{
251+
timeout: 5000,
252+
interval: 500,
253+
},
254+
);
246255
const value = await hexInputElement.getAttribute('value');
247256
console.log(`Hex input value: ${value}`);
248257
return value;

test/e2e/tests/transaction/change-assets.spec.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -232,12 +232,7 @@ describe('Change assets', function () {
232232
await sendTokenPage.fillAmount('2');
233233

234234
// Make sure hex data is cleared after switching assets
235-
const hexDataValue = await sendTokenPage.getHexInputValue();
236-
assert.equal(
237-
hexDataValue,
238-
'',
239-
'Hex data has not been cleared after switching assets.',
240-
);
235+
await sendTokenPage.waitForHexDataCleared();
241236

242237
// Make sure gas is updated by resetting amount and hex data
243238
// Note: this is needed until the race condition is fixed on the wallet level (issue #25243)

0 commit comments

Comments
 (0)