Files
actual/packages/desktop-client/e2e/page-models/mobile-navigation.js
Joel Jeremy Marquez a3995582c4 Swipe up mobile navbar (#1758)
* Swipe up mobile navbar to reveal more menus

* Release notes

* Revert navbar button height to 70

* Reduce debounce value

* More tabs coming soon

* VRT update

* VRT update

* Fix: e2e tests

* Smoother mobile navtabs

---------

Co-authored-by: Matiss Janis Aboltins <matiss@mja.lv>
2023-11-13 14:14:16 -08:00

47 lines
1.2 KiB
JavaScript

import { MobileAccountsPage } from './mobile-accounts-page';
import { MobileBudgetPage } from './mobile-budget-page';
import { MobileTransactionEntryPage } from './mobile-transaction-entry-page';
import { SettingsPage } from './settings-page';
export class MobileNavigation {
constructor(page) {
this.page = page;
}
async goToBudgetPage() {
const link = this.page.getByRole('link', { name: 'Budget' });
await link.click();
return new MobileBudgetPage(this.page);
}
async goToAccountsPage() {
const link = this.page.getByRole('link', { name: 'Accounts' });
await link.click();
return new MobileAccountsPage(this.page);
}
async goToTransactionEntryPage() {
const link = this.page.getByRole('link', { name: 'Transaction' });
await link.click();
return new MobileTransactionEntryPage(this.page);
}
async goToSettingsPage() {
await this.dragNavbarUp();
const link = this.page.getByRole('link', { name: 'Settings' });
await link.click();
return new SettingsPage(this.page);
}
async dragNavbarUp() {
await this.page
.getByRole('navigation')
.dragTo(this.page.getByTestId('budget-table'));
}
}