diff --git a/e2e/helpers/plugin-test.helpers.ts b/e2e/helpers/plugin-test.helpers.ts index ac15837de..2ad8b8a9b 100644 --- a/e2e/helpers/plugin-test.helpers.ts +++ b/e2e/helpers/plugin-test.helpers.ts @@ -97,7 +97,25 @@ export const waitForPluginManagementInit = async ( // Wait a bit for the page to stabilize await page.waitForTimeout(500); - // Expand plugin section if collapsed and scroll it into view + // Navigate to the Plugins tab (4th tab, index 3) + // The plugin section is now inside the Plugins tab, not directly on the page + 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(); + } + }); + + // Wait for tab content to load + await page.waitForTimeout(500); + + // Now expand plugin section if collapsed and scroll it into view await page.evaluate(() => { const pluginSection = document.querySelector('.plugin-section'); if (pluginSection) { diff --git a/e2e/pages/import.page.ts b/e2e/pages/import.page.ts index 6799931c5..7ff47ba56 100644 --- a/e2e/pages/import.page.ts +++ b/e2e/pages/import.page.ts @@ -40,8 +40,34 @@ export class ImportPage extends BasePage { // Wait for page content to fully render await this.page.waitForTimeout(1000); - // The file-imex component is inside the collapsible "Import/Export" section - // First, find and expand the Import/Export section + // Dismiss any tour/welcome dialogs that might be blocking interactions + // Look for Shepherd tour dialog or Material dialogs + const tourDialog = this.page.locator('[data-shepherd-step-id="Welcome"]'); + if (await tourDialog.isVisible().catch(() => false)) { + // Close button is in the tour dialog + const closeBtn = tourDialog.locator( + '.shepherd-cancel-icon, button.shepherd-cancel-icon', + ); + if (await closeBtn.isVisible().catch(() => false)) { + await closeBtn.click(); + await this.page.waitForTimeout(300); + } else { + // Try pressing Escape to dismiss + await this.page.keyboard.press('Escape'); + await this.page.waitForTimeout(300); + } + } + + // The file-imex component is now in the "Sync & Backup" tab (5th tab, index 4) + // Step 1: Click on the "Sync & Backup" tab to navigate to it + const syncBackupTab = this.page.locator( + 'mat-tab-header .mat-mdc-tab:has(mat-icon:has-text("cloud_sync"))', + ); + await syncBackupTab.waitFor({ state: 'visible', timeout: 10000 }); + await syncBackupTab.click(); + await this.page.waitForTimeout(500); + + // Step 2: Within the tab, expand the "Import/Export" collapsible section const importExportSection = this.page.locator( 'collapsible:has-text("Import/Export")', ); @@ -53,7 +79,7 @@ export class ImportPage extends BasePage { await collapsibleHeader.click(); await this.page.waitForTimeout(500); - // Now the file-imex component should be visible + // Now the file-imex component should be visible in the active tab await this.importFromFileBtn.waitFor({ state: 'visible', timeout: 10000 }); } diff --git a/e2e/pages/settings.page.ts b/e2e/pages/settings.page.ts index 818dc9b15..18b81a4b5 100644 --- a/e2e/pages/settings.page.ts +++ b/e2e/pages/settings.page.ts @@ -64,9 +64,18 @@ export class SettingsPage extends BasePage { /** * Expand plugin section + * Note: The plugin section is now in the "Plugins" tab (4th tab, index 3) */ async expandPluginSection(): Promise { - await this.expandSection(PLUGIN_SECTION); + // The plugin section is now in the "Plugins" tab (4th tab, index 3) + // Click on the "Plugins" tab to navigate to it + const pluginsTab = this.page.locator( + 'mat-tab-header .mat-mdc-tab:has(mat-icon:has-text("extension"))', + ); + await pluginsTab.waitFor({ state: 'visible', timeout: 10000 }); + await pluginsTab.click(); + await this.page.waitForTimeout(500); + // Ensure plugin management component and at least file input are visible await this.pluginManagement.waitFor({ state: 'visible', timeout: 5000 }); await this.page