From 3b9533a43266b853ac64a79171a9f322bb39bfa8 Mon Sep 17 00:00:00 2001 From: Zhi Date: Sat, 14 Mar 2026 08:47:12 +0000 Subject: [PATCH] Add debug output to global setup --- global-setup.ts | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/global-setup.ts b/global-setup.ts index 71a2737..099b896 100644 --- a/global-setup.ts +++ b/global-setup.ts @@ -18,6 +18,7 @@ async function setupWizard() { await page.waitForLoadState('networkidle'); // Step 0: Welcome + console.log('⏳ Waiting for wizard page...'); await page.waitForSelector('h1:has-text("HarborForge")', { timeout: 10000 }); const connectButton = page.locator('button:has-text("Connect to Wizard")'); @@ -25,9 +26,24 @@ async function setupWizard() { console.log('🔗 Clicking Connect to Wizard...'); await connectButton.click(); + // Wait for the step to change after clicking + await page.waitForTimeout(3000); + + // Check what's on the page now + const pageContent = await page.content(); + console.log('Page after click:', pageContent.substring(0, 2000)); + // Wait for step 1: Database - console.log('📝 Filling Database configuration...'); - await page.waitForSelector('h2:has-text("Database configuration")', { timeout: 10000 }); + console.log('📝 Waiting for Database configuration...'); + try { + await page.waitForSelector('h2:has-text("Database configuration")', { timeout: 5000 }); + } catch (e) { + console.log('Could not find Database config, trying alternate selector...'); + // Try waiting for any h2 + await page.waitForSelector('h2', { timeout: 5000 }); + console.log('Found h2:', await page.locator('h2').first().textContent()); + } + await page.locator('label:has-text("Host") input').fill('mysql'); await page.locator('label:has-text("Port") input').fill('3306'); await page.locator('label:has-text("Username") input').fill('harborforge');