From dc96811940443e061a3daad3d72f85310a37b428 Mon Sep 17 00:00:00 2001 From: Henry Heino <46334387+personalizedrefrigerator@users.noreply.github.com> Date: Mon, 16 Dec 2024 01:47:23 -0800 Subject: [PATCH] Chore: Desktop: Fix automated test that makes assumptions about which plugins are loaded (#11522) --- .../app-desktop/integration-tests/models/SettingsScreen.ts | 4 ++++ packages/app-desktop/integration-tests/settings.spec.ts | 2 +- packages/tools/cspell/dictionary4.txt | 3 ++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/app-desktop/integration-tests/models/SettingsScreen.ts b/packages/app-desktop/integration-tests/models/SettingsScreen.ts index 7cee88390..9ad906fce 100644 --- a/packages/app-desktop/integration-tests/models/SettingsScreen.ts +++ b/packages/app-desktop/integration-tests/models/SettingsScreen.ts @@ -14,6 +14,10 @@ export default class SettingsScreen { return this.page.getByRole('tab', { name: tabName }); } + public getLastTab() { + return this.page.getByRole('tablist').getByRole('tab').last(); + } + public async waitFor() { await this.okayButton.waitFor(); await this.appearanceTabButton.waitFor(); diff --git a/packages/app-desktop/integration-tests/settings.spec.ts b/packages/app-desktop/integration-tests/settings.spec.ts index d90a592c2..7e623104c 100644 --- a/packages/app-desktop/integration-tests/settings.spec.ts +++ b/packages/app-desktop/integration-tests/settings.spec.ts @@ -75,7 +75,7 @@ test.describe('settings', () => { // Pressing Up when the first item is focused should focus the last item await mainWindow.keyboard.press('ArrowUp'); - await expect(focusedItem).toHaveText('Backup'); + await expect(settingsScreen.getLastTab()).toBeFocused(); await mainWindow.keyboard.press('ArrowDown'); await mainWindow.keyboard.press('ArrowDown'); diff --git a/packages/tools/cspell/dictionary4.txt b/packages/tools/cspell/dictionary4.txt index e45eca19d..3b407ac47 100644 --- a/packages/tools/cspell/dictionary4.txt +++ b/packages/tools/cspell/dictionary4.txt @@ -147,4 +147,5 @@ setsize Comprar seguidores devbox -Ökonomie \ No newline at end of file +tablist +Ökonomie