Files
actual/packages/desktop-client/e2e/settings.mobile.test.js
Joel Jeremy Marquez a28fb93cec Mobile VRTs (#3506)
* More Mobile VRTs

* Mobile VRTs

* Fix mobile budget page

* Updated VRT

* VRT fix

* Update VRT

* [skip ci] Release notes

* Cleanup tests

* Fix VRT

* VRT

* Extend timeout

* Clean screenshots

* Updated VRT

* Category / group VRTs

* Mobile budget page menu VRT

* Updated VRT

* Prevous and next budget month tests

* Code Rabbit suggestions

* Feedback

* VRT

* Fix getSelectedMonth

* Fix selectedBudgetMonthButton locator

* Fix flaky tests

* Update VRT
2024-10-04 12:09:29 -07:00

44 lines
1.1 KiB
JavaScript

import { test, expect } from '@playwright/test';
import { ConfigurationPage } from './page-models/configuration-page';
import { MobileNavigation } from './page-models/mobile-navigation';
test.describe('Mobile Settings', () => {
let page;
let navigation;
let configurationPage;
test.beforeEach(async ({ browser }) => {
page = await browser.newPage();
navigation = new MobileNavigation(page);
configurationPage = new ConfigurationPage(page);
await page.setViewportSize({
width: 350,
height: 600,
});
await page.goto('/');
await configurationPage.createTestFile();
});
test.afterEach(async () => {
await page.close();
});
test('checks that settings page can be opened', async () => {
const settingsPage = await navigation.goToSettingsPage();
await expect(page).toMatchThemeScreenshots();
const downloadPromise = page.waitForEvent('download');
await settingsPage.exportData();
const download = await downloadPromise;
expect(await download.suggestedFilename()).toMatch(
/^\d{4}-\d{2}-\d{2}-.*.zip$/,
);
await expect(page).toMatchThemeScreenshots();
});
});