Skip to content

Commit 6b07156

Browse files
committed
Updates
1 parent 23f4e0e commit 6b07156

File tree

7 files changed

+639
-52
lines changed

7 files changed

+639
-52
lines changed

test/e2e/page-objects/flows/transaction.ts

+16
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,22 @@ export const createInternalTransaction = async (driver: Driver) => {
1919
await sendToPage.goToNextScreen();
2020
};
2121

22+
export const createInternalTransactionWithMaxAmount = async (
23+
driver: Driver,
24+
) => {
25+
// Firefox has incorrect balance if send flow started too quickly.
26+
await driver.delay(1000);
27+
28+
const homePage = new HomePage(driver);
29+
await homePage.startSendFlow();
30+
31+
const sendToPage = new SendTokenPage(driver);
32+
await sendToPage.check_pageIsLoaded();
33+
await sendToPage.fillRecipient('0x2f318C334780961FB129D2a6c30D0763d9a5C970');
34+
await sendToPage.clickMaxAmountButton();
35+
await sendToPage.goToNextScreen();
36+
};
37+
2238
export const createDappTransaction = async (
2339
driver: Driver,
2440
override?: Partial<TransactionParams>,

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

+6
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ class SendTokenPage {
4343
private readonly warning =
4444
'[data-testid="send-warning"] .mm-box--min-width-0 span';
4545

46+
private readonly maxAmountButton = '[data-testid="max-clear-button"]';
47+
4648
constructor(driver: Driver) {
4749
this.driver = driver;
4850
}
@@ -138,6 +140,10 @@ class SendTokenPage {
138140
await this.driver.pasteIntoField(this.inputRecipient, recipientAddress);
139141
}
140142

143+
async clickMaxAmountButton(): Promise<void> {
144+
await this.driver.clickElement(this.maxAmountButton);
145+
}
146+
141147
async goToNextScreen(): Promise<void> {
142148
await this.driver.clickElement(this.continueButton);
143149
}

0 commit comments

Comments
 (0)