From 7137533407950f413bbdc228fdfab2f88286aa77 Mon Sep 17 00:00:00 2001 From: Johannes Millan Date: Sat, 17 Jan 2026 13:26:57 +0100 Subject: [PATCH] test(e2e): fix additional tests for tabbed config page Update plugin-lifecycle, plugin-upload, and reminders tests to navigate to correct tabs: - Plugin tests navigate to Plugins tab (extension icon) - Reminder tests navigate to Time & Tracking tab (timer icon) Fixes 5 additional E2E test failures after config page refactoring. --- e2e/tests/plugins/plugin-lifecycle.spec.ts | 32 +++++++++++++++++++ e2e/tests/plugins/plugin-upload.spec.ts | 16 ++++++++++ ...minders-default-task-remind-option.spec.ts | 17 ++++++++++ 3 files changed, 65 insertions(+) diff --git a/e2e/tests/plugins/plugin-lifecycle.spec.ts b/e2e/tests/plugins/plugin-lifecycle.spec.ts index cc02f2d61..e13649bea 100644 --- a/e2e/tests/plugins/plugin-lifecycle.spec.ts +++ b/e2e/tests/plugins/plugin-lifecycle.spec.ts @@ -45,6 +45,22 @@ test.describe('Plugin Lifecycle', () => { .first() .waitFor({ state: 'visible', timeout: 10000 }); + // Navigate to Plugins tab first + await page.evaluate(() => { + const pluginsTab = Array.from( + document.querySelectorAll('mat-tab-header .mat-mdc-tab'), + ).find((tab) => { + const icon = tab.querySelector('mat-icon'); + return icon?.textContent?.trim() === 'extension'; + }); + + if (pluginsTab) { + (pluginsTab as HTMLElement).click(); + } + }); + + await page.waitForTimeout(500); + await page.evaluate(() => { const configPage = document.querySelector('.page-settings'); if (!configPage) { @@ -155,6 +171,22 @@ test.describe('Plugin Lifecycle', () => { .first() .waitFor({ state: 'visible', timeout: 10000 }); + // Navigate to Plugins tab first + await page.evaluate(() => { + const pluginsTab = Array.from( + document.querySelectorAll('mat-tab-header .mat-mdc-tab'), + ).find((tab) => { + const icon = tab.querySelector('mat-icon'); + return icon?.textContent?.trim() === 'extension'; + }); + + if (pluginsTab) { + (pluginsTab as HTMLElement).click(); + } + }); + + await page.waitForTimeout(500); + // Expand plugin section await page.evaluate(() => { const pluginSection = document.querySelector('.plugin-section'); diff --git a/e2e/tests/plugins/plugin-upload.spec.ts b/e2e/tests/plugins/plugin-upload.spec.ts index c99a04dbd..3f6ba7d88 100644 --- a/e2e/tests/plugins/plugin-upload.spec.ts +++ b/e2e/tests/plugins/plugin-upload.spec.ts @@ -27,6 +27,22 @@ test.describe.serial('Plugin Upload', () => { .first() .waitFor({ state: 'visible', timeout: 10000 }); + // Navigate to Plugins tab first + await page.evaluate(() => { + const pluginsTab = Array.from( + document.querySelectorAll('mat-tab-header .mat-mdc-tab'), + ).find((tab) => { + const icon = tab.querySelector('mat-icon'); + return icon?.textContent?.trim() === 'extension'; + }); + + if (pluginsTab) { + (pluginsTab as HTMLElement).click(); + } + }); + + await page.waitForTimeout(500); + await page.evaluate(() => { const configPage = document.querySelector('.page-settings'); if (!configPage) { diff --git a/e2e/tests/reminders/reminders-default-task-remind-option.spec.ts b/e2e/tests/reminders/reminders-default-task-remind-option.spec.ts index f6cc44103..d3aa0f162 100644 --- a/e2e/tests/reminders/reminders-default-task-remind-option.spec.ts +++ b/e2e/tests/reminders/reminders-default-task-remind-option.spec.ts @@ -12,6 +12,23 @@ test.describe('Default task reminder option', () => { const changeDefaultTaskReminderOption = async (page: Page): Promise => { await page.getByRole('menuitem', { name: 'Settings' }).click(); + + // Navigate to Time & Tracking tab first (2nd tab with timer icon) + await page.evaluate(() => { + const timeTrackingTab = Array.from( + document.querySelectorAll('mat-tab-header .mat-mdc-tab'), + ).find((tab) => { + const icon = tab.querySelector('mat-icon'); + return icon?.textContent?.trim() === 'timer'; + }); + + if (timeTrackingTab) { + (timeTrackingTab as HTMLElement).click(); + } + }); + + await page.waitForTimeout(500); + const remindersSection = await page.locator('section', { hasText: 'Reminders' }); await remindersSection.click();