mirror of
https://github.com/actualbudget/actual.git
synced 2026-04-28 18:40:34 -05:00
Command bar VRTs (#5591)
* command bar vrts * release notes * reduce flakiness * oh * add screenshots back in * Update VRT * trigger * reducing screenshots * Update VRT * trigger * jeez --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
77
packages/desktop-client/e2e/command-bar.test.ts
Normal file
77
packages/desktop-client/e2e/command-bar.test.ts
Normal file
@@ -0,0 +1,77 @@
|
||||
import { type Page } from '@playwright/test';
|
||||
|
||||
import { expect, test } from './fixtures';
|
||||
import { ConfigurationPage } from './page-models/configuration-page';
|
||||
|
||||
test.describe('Command bar', () => {
|
||||
let page: Page;
|
||||
let configurationPage: ConfigurationPage;
|
||||
|
||||
test.beforeAll(async ({ browser }) => {
|
||||
page = await browser.newPage();
|
||||
configurationPage = new ConfigurationPage(page);
|
||||
|
||||
await page.goto('/');
|
||||
await configurationPage.createTestFile();
|
||||
|
||||
// Move mouse to corner of the screen;
|
||||
// sometimes the mouse hovers on a budget element thus rendering an input box
|
||||
// and this breaks screenshot tests
|
||||
await page.mouse.move(0, 0);
|
||||
|
||||
// ensure page is loaded
|
||||
await expect(page.getByTestId('budget-table')).toBeVisible();
|
||||
await expect(page.getByRole('button', { name: 'Add group' })).toBeVisible({
|
||||
timeout: 10000,
|
||||
});
|
||||
});
|
||||
|
||||
test.afterAll(async () => {
|
||||
await page.close();
|
||||
});
|
||||
|
||||
test('Check the command bar visuals', async () => {
|
||||
// Open the command bar
|
||||
await page.keyboard.press('ControlOrMeta+k');
|
||||
const commandBar = page.getByRole('combobox', {
|
||||
name: 'Command Bar',
|
||||
});
|
||||
|
||||
await expect(commandBar).toBeVisible();
|
||||
await expect(page).toMatchThemeScreenshots();
|
||||
|
||||
// Close the command bar
|
||||
await page.keyboard.press('Escape');
|
||||
await expect(commandBar).not.toBeVisible();
|
||||
});
|
||||
|
||||
test('Check the command bar search works correctly', async () => {
|
||||
await page.keyboard.press('ControlOrMeta+k');
|
||||
|
||||
const commandBar = page.getByRole('combobox', {
|
||||
name: 'Command Bar',
|
||||
});
|
||||
|
||||
await expect(commandBar).toBeVisible();
|
||||
await expect(commandBar).toHaveValue('');
|
||||
|
||||
// Search and navigate to reports
|
||||
await commandBar.fill('reports');
|
||||
await page.keyboard.press('Enter');
|
||||
await expect(page.getByTestId('reports-page')).toBeVisible();
|
||||
await expect(page.getByText('Loading reports...')).not.toBeVisible(); // wait for screen to load
|
||||
|
||||
// Navigate to schedule page
|
||||
await page.keyboard.press('ControlOrMeta+k');
|
||||
await page.keyboard.press('ArrowDown');
|
||||
await page.keyboard.press('ArrowDown'); // Select second suggestion - Schedules
|
||||
await expect(page).toMatchThemeScreenshots();
|
||||
|
||||
await page.keyboard.press('Enter');
|
||||
await expect(
|
||||
page.getByRole('button', {
|
||||
name: 'Add new schedule',
|
||||
}),
|
||||
).toBeVisible();
|
||||
});
|
||||
});
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 68 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 68 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 67 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 74 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 73 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 73 KiB |
6
upcoming-release-notes/5591.md
Normal file
6
upcoming-release-notes/5591.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
category: Maintenance
|
||||
authors: [MikesGlitch]
|
||||
---
|
||||
|
||||
Added Command bar VRT's
|
||||
Reference in New Issue
Block a user