mirror of
https://github.com/actualbudget/actual.git
synced 2026-04-30 10:14:53 -05:00
* useTransactions hook to load transactions * Release notes + lint fix * Update useQuery * useTransactions update * Stabilize tests * Fx flaky test * Fix tests * Fix tests * Update queries * Apply coderabbit suggestions * Fix onlySync * Update useTransactions * Code rabbit suggestions * useTransactionsSearch hook * Debounce the useTransactionsSearch search method * usePreviewTransactions debounce fix * Fix lint * Coderabbit feedback + make useSchedules consistent with query pattern used in useTransactions * Code review feedback and improve schedules loading * Update error handling * Cancel debounce on unmount * Fix lint * set loading state on error * Fix test * VRT * Revert VRT --------- Co-authored-by: Matt Fiddaman <github@m.fiddaman.uk>
36 lines
776 B
JavaScript
36 lines
776 B
JavaScript
import { MobileAccountPage } from './mobile-account-page';
|
|
|
|
export class MobileAccountsPage {
|
|
constructor(page) {
|
|
this.page = page;
|
|
|
|
this.accountList = this.page.getByLabel('Account list');
|
|
this.accounts = this.page.getByTestId('account');
|
|
}
|
|
|
|
async waitFor() {
|
|
await this.accountList.waitFor();
|
|
}
|
|
|
|
/**
|
|
* 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);
|
|
}
|
|
}
|