mirror of
https://github.com/actualbudget/actual.git
synced 2026-03-21 15:36:50 -05:00
* 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
44 lines
1.1 KiB
JavaScript
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();
|
|
});
|
|
});
|