Files
actual/packages/desktop-client/e2e/page-models/mobile-accounts-page.js
Joel Jeremy Marquez 3985d2549e [React Aria Button] All remaining components except filters, mobile transaction edit, and autocomplete (#3163)
* vrt

* Fix account menu test

* Fix payee icons and category notes

* vrt

* vrt

* Fix notes button

* VRT

* VRT

* React Aria Button - All except filters and autocomplete

* Release notes

* Fix typecheck errors

* Fix typecheck error

* Fix button links

* Update

* Fix typecheck error

* Fix link button variant

* Fix typecheck error

* Fix typecheck error

* Fix typecheck error

* Fix border

* Fix mobile accounts page

* VRT

* Fix playwright config

* Revert MobileForms and TransactionEdit

* VRT

* Remove borderRadius

* Fix add account button

* VRT

* Revert VRT

* Fix tests

* Fix Cover and Transfer modals

* Fix lint error
2024-09-09 12:53:28 -07:00

31 lines
652 B
JavaScript

import { MobileAccountPage } from './mobile-account-page';
export class MobileAccountsPage {
constructor(page) {
this.page = page;
this.accounts = this.page.getByTestId('account');
}
/**
* Get the name and balance of the nth account
*/
async getNthAccount(idx) {
const accountRow = this.accounts.nth(idx);
return {
name: accountRow.getByTestId('account-name'),
balance: accountRow.getByTestId('account-balance'),
};
}
/**
* Click on the n-th account to open it up
*/
async openNthAccount(idx) {
await this.accounts.nth(idx).click();
return new MobileAccountPage(this.page);
}
}