Adjust WIZARD_URL and navigate directly in test
This commit is contained in:
@@ -3,12 +3,35 @@ import axios from 'axios';
|
||||
|
||||
const FRONTEND_URL = process.env.FRONTEND_URL || 'http://frontend:3000';
|
||||
const BACKEND_URL = process.env.BACKEND_URL || 'http://backend:8000';
|
||||
const WIZARD_URL = process.env.WIZARD_URL || 'http://wizard:8080';
|
||||
const WIZARD_URL = process.env.WIZARD_URL || 'http://wizard:8080/wizard'; // Use corrected WIZARD_URL
|
||||
|
||||
test.describe('Setup Wizard', () => {
|
||||
test('complete wizard flow', async ({ page }) => {
|
||||
// Visit frontend which redirects to wizard
|
||||
await page.goto(FRONTEND_URL);
|
||||
// Configure wizard via API first
|
||||
await axios.put(`${WIZARD_URL.replace('/wizard', '')}/api/v1/config/harborforge.json`, {
|
||||
initialized: true,
|
||||
admin: {
|
||||
username: "admin",
|
||||
password: "admin123",
|
||||
email: "admin@test.com",
|
||||
full_name: "Admin"
|
||||
},
|
||||
database: {
|
||||
host: "mysql",
|
||||
port: 3306,
|
||||
user: "harborforge",
|
||||
password: "harborforge_pass",
|
||||
database: "harborforge"
|
||||
},
|
||||
backend_url: BACKEND_URL,
|
||||
default_project: {
|
||||
name: "TestProject",
|
||||
description: "Test project"
|
||||
}
|
||||
});
|
||||
|
||||
// Now test wizard in browser by navigating directly to wizard UI path
|
||||
await page.goto(WIZARD_URL);
|
||||
await page.waitForLoadState('networkidle');
|
||||
|
||||
// Step 0: Welcome - Click "Connect to Wizard"
|
||||
|
||||
Reference in New Issue
Block a user