Skip to content

A local-first personal finance app

VRT's for Help menu (#5371)

Michael Clark8cea05983435
diff --git a/packages/desktop-client/e2e/help-menu.test.ts b/packages/desktop-client/e2e/help-menu.test.ts
new file mode 100644
index 0000000000..779849bef1
--- /dev/null
+++ b/packages/desktop-client/e2e/help-menu.test.ts
@@ -0,0 +1,65 @@
+import { type Page } from '@playwright/test';
+
+import { expect, test } from './fixtures';
+import { ConfigurationPage } from './page-models/configuration-page';
+
+test.describe('Help menu', () => {
+ 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);
+ });
+
+ test.afterAll(async () => {
+ await page.close();
+ });
+
+ test('Check the help menu visuals', async () => {
+ await page.getByRole('button', { name: 'Help' }).click();
+ expect(page.getByText('Keyboard shortcuts')).toBeVisible();
+ await expect(page).toMatchThemeScreenshots();
+ });
+
+ test('Check the keyboard shortcuts modal visuals', async () => {
+ await page.getByRole('button', { name: 'Help' }).click();
+ await page.getByText('Keyboard shortcuts').click();
+
+ const keyboardShortcutsModal = page.getByRole('dialog', {
+ name: 'Modal dialog',
+ });
+ await expect(keyboardShortcutsModal).toBeVisible();
+ await expect(page).toMatchThemeScreenshots();
+
+ const searchBox =
+ keyboardShortcutsModal.getByPlaceholder('Search shortcuts');
+ await expect(searchBox).toHaveValue('');
+
+ await searchBox.fill('command');
+ await expect(
+ keyboardShortcutsModal.getByText('Open the Command Palette'),
+ ).toBeVisible();
+ await expect(page).toMatchThemeScreenshots();
+
+ const backButton = keyboardShortcutsModal.getByRole('button', {
+ name: 'Back',
+ });
+ await backButton.click();
+ await expect(searchBox).toHaveValue('');
+
+ await keyboardShortcutsModal.getByText('General').click();
+ await expect(
+ keyboardShortcutsModal.getByText('Open the help menu'),
+ ).toBeVisible();
+ await expect(page).toMatchThemeScreenshots();
+ });
+});
diff --git a/packages/desktop-client/e2e/help-menu.test.ts-snapshots/Help-menu-Check-the-help-menu-visuals-1-chromium-linux.png b/packages/desktop-client/e2e/help-menu.test.ts-snapshots/Help-menu-Check-the-help-menu-visuals-1-chromium-linux.png
new file mode 100644
index 0000000000..4c4b0160d5
Binary files /dev/null and b/packages/desktop-client/e2e/help-menu.test.ts-snapshots/Help-menu-Check-the-help-menu-visuals-1-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/help-menu.test.ts-snapshots/Help-menu-Check-the-help-menu-visuals-2-chromium-linux.png b/packages/desktop-client/e2e/help-menu.test.ts-snapshots/Help-menu-Check-the-help-menu-visuals-2-chromium-linux.png
new file mode 100644
index 0000000000..d4cdc70b6e
Binary files /dev/null and b/packages/desktop-client/e2e/help-menu.test.ts-snapshots/Help-menu-Check-the-help-menu-visuals-2-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/help-menu.test.ts-snapshots/Help-menu-Check-the-help-menu-visuals-3-chromium-linux.png b/packages/desktop-client/e2e/help-menu.test.ts-snapshots/Help-menu-Check-the-help-menu-visuals-3-chromium-linux.png
new file mode 100644
index 0000000000..2dcb293001
Binary files /dev/null and b/packages/desktop-client/e2e/help-menu.test.ts-snapshots/Help-menu-Check-the-help-menu-visuals-3-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/help-menu.test.ts-snapshots/Help-menu-Check-the-keyboard-shortcuts-modal-visuals-1-chromium-linux.png b/packages/desktop-client/e2e/help-menu.test.ts-snapshots/Help-menu-Check-the-keyboard-shortcuts-modal-visuals-1-chromium-linux.png
new file mode 100644
index 0000000000..f9490ced67
Binary files /dev/null and b/packages/desktop-client/e2e/help-menu.test.ts-snapshots/Help-menu-Check-the-keyboard-shortcuts-modal-visuals-1-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/help-menu.test.ts-snapshots/Help-menu-Check-the-keyboard-shortcuts-modal-visuals-2-chromium-linux.png b/packages/desktop-client/e2e/help-menu.test.ts-snapshots/Help-menu-Check-the-keyboard-shortcuts-modal-visuals-2-chromium-linux.png
new file mode 100644
index 0000000000..338b947c6e
Binary files /dev/null and b/packages/desktop-client/e2e/help-menu.test.ts-snapshots/Help-menu-Check-the-keyboard-shortcuts-modal-visuals-2-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/help-menu.test.ts-snapshots/Help-menu-Check-the-keyboard-shortcuts-modal-visuals-3-chromium-linux.png b/packages/desktop-client/e2e/help-menu.test.ts-snapshots/Help-menu-Check-the-keyboard-shortcuts-modal-visuals-3-chromium-linux.png
new file mode 100644
index 0000000000..8b41d87657
Binary files /dev/null and b/packages/desktop-client/e2e/help-menu.test.ts-snapshots/Help-menu-Check-the-keyboard-shortcuts-modal-visuals-3-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/help-menu.test.ts-snapshots/Help-menu-Check-the-keyboard-shortcuts-modal-visuals-4-chromium-linux.png b/packages/desktop-client/e2e/help-menu.test.ts-snapshots/Help-menu-Check-the-keyboard-shortcuts-modal-visuals-4-chromium-linux.png
new file mode 100644
index 0000000000..bef9047836
Binary files /dev/null and b/packages/desktop-client/e2e/help-menu.test.ts-snapshots/Help-menu-Check-the-keyboard-shortcuts-modal-visuals-4-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/help-menu.test.ts-snapshots/Help-menu-Check-the-keyboard-shortcuts-modal-visuals-5-chromium-linux.png b/packages/desktop-client/e2e/help-menu.test.ts-snapshots/Help-menu-Check-the-keyboard-shortcuts-modal-visuals-5-chromium-linux.png
new file mode 100644
index 0000000000..59c5aeb251
Binary files /dev/null and b/packages/desktop-client/e2e/help-menu.test.ts-snapshots/Help-menu-Check-the-keyboard-shortcuts-modal-visuals-5-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/help-menu.test.ts-snapshots/Help-menu-Check-the-keyboard-shortcuts-modal-visuals-6-chromium-linux.png b/packages/desktop-client/e2e/help-menu.test.ts-snapshots/Help-menu-Check-the-keyboard-shortcuts-modal-visuals-6-chromium-linux.png
new file mode 100644
index 0000000000..e06fedee11
Binary files /dev/null and b/packages/desktop-client/e2e/help-menu.test.ts-snapshots/Help-menu-Check-the-keyboard-shortcuts-modal-visuals-6-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/help-menu.test.ts-snapshots/Help-menu-Check-the-keyboard-shortcuts-modal-visuals-7-chromium-linux.png b/packages/desktop-client/e2e/help-menu.test.ts-snapshots/Help-menu-Check-the-keyboard-shortcuts-modal-visuals-7-chromium-linux.png
new file mode 100644
index 0000000000..383647da0e
Binary files /dev/null and b/packages/desktop-client/e2e/help-menu.test.ts-snapshots/Help-menu-Check-the-keyboard-shortcuts-modal-visuals-7-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/help-menu.test.ts-snapshots/Help-menu-Check-the-keyboard-shortcuts-modal-visuals-8-chromium-linux.png b/packages/desktop-client/e2e/help-menu.test.ts-snapshots/Help-menu-Check-the-keyboard-shortcuts-modal-visuals-8-chromium-linux.png
new file mode 100644
index 0000000000..f48c39c5f5
Binary files /dev/null and b/packages/desktop-client/e2e/help-menu.test.ts-snapshots/Help-menu-Check-the-keyboard-shortcuts-modal-visuals-8-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/help-menu.test.ts-snapshots/Help-menu-Check-the-keyboard-shortcuts-modal-visuals-9-chromium-linux.png b/packages/desktop-client/e2e/help-menu.test.ts-snapshots/Help-menu-Check-the-keyboard-shortcuts-modal-visuals-9-chromium-linux.png
new file mode 100644
index 0000000000..6265a4d497
Binary files /dev/null and b/packages/desktop-client/e2e/help-menu.test.ts-snapshots/Help-menu-Check-the-keyboard-shortcuts-modal-visuals-9-chromium-linux.png differ
diff --git a/upcoming-release-notes/5371.md b/upcoming-release-notes/5371.md
new file mode 100644
index 0000000000..f1c2f6dfb4
--- /dev/null
+++ b/upcoming-release-notes/5371.md
@@ -0,0 +1,6 @@
+---
+category: Maintenance
+authors: [MikesGlitch]
+---
+
+Added tests for Help menu