Skip to content

Commit 14ce359

Browse files
committed
fix: standardize test URLs and playwright config
- Unified all test goto() calls to use '/super-json/' (matching vite base) - Removed hardcoded localhost:3000/3004 URLs from tests - Updated playwright webServer to use --strictPort and --no-open - Set reuseExistingServer only for local dev (not CI) https://claude.ai/code/session_01Cv3BVrC7kNVEtijCfe2R5e
1 parent 65e13b5 commit 14ce359

20 files changed

Lines changed: 26 additions & 26 deletions

playwright.config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ export default defineConfig({
1919
},
2020
],
2121
webServer: {
22-
command: 'npm run dev',
23-
url: 'http://localhost:3000',
24-
reuseExistingServer: true,
22+
command: 'npx vite --port 3000 --strictPort --no-open',
23+
url: 'http://localhost:3000/super-json/',
24+
reuseExistingServer: !process.env.CI,
2525
timeout: 120 * 1000,
2626
},
2727
})

tests/analyzer-debug.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ test('debug analyzer with console output', async ({ page }) => {
1313
}
1414
})
1515

16-
await page.goto('/')
16+
await page.goto('/super-json/')
1717
await page.waitForLoadState('networkidle')
1818

1919
const testJson = {

tests/analyzer-test.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { test } from '@playwright/test'
22

33
test('test JSON analyzer directly in browser', async ({ page }) => {
4-
await page.goto('/')
4+
await page.goto('/super-json/')
55
await page.waitForLoadState('networkidle')
66

77
// Test the analyzer in the browser console

tests/basic-regression.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { test, expect } from '@playwright/test'
22

33
test.describe('Basic Regression Tests After Refactoring', () => {
44
test.beforeEach(async ({ page }) => {
5-
await page.goto('http://localhost:3000/super-json/')
5+
await page.goto('/super-json/')
66
await page.waitForLoadState('networkidle')
77
})
88

tests/breadcrumb-debug.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { test, expect } from '@playwright/test'
22

33
test('debug breadcrumb dropdown', async ({ page }) => {
4-
await page.goto('/')
4+
await page.goto('/super-json/')
55
await page.waitForLoadState('networkidle')
66

77
// Simple test JSON

tests/breadcrumb-multilayer.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { test, expect } from '@playwright/test'
22

33
test('test breadcrumb with multiple layers', async ({ page }) => {
4-
await page.goto('/')
4+
await page.goto('/super-json/')
55
await page.waitForLoadState('networkidle')
66

77
// Multi-layer nested JSON

tests/complex-test.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ test('complex nested JSON test', async ({ page }) => {
88
logs.push(text)
99
})
1010

11-
await page.goto('/')
11+
await page.goto('/super-json/')
1212
await page.waitForLoadState('networkidle')
1313

1414
// Complex nested JSON

tests/direct-analyzer.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { test, expect } from '@playwright/test'
22

33
test('test analyzer directly in browser', async ({ page }) => {
4-
await page.goto('/')
4+
await page.goto('/super-json/')
55
await page.waitForLoadState('networkidle')
66

77
// Execute analyzer test directly in browser context

tests/document-management.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { test, expect } from '@playwright/test'
22

33
test.describe('Document Management', () => {
44
test.beforeEach(async ({ page }) => {
5-
await page.goto('/')
5+
await page.goto('/super-json/')
66
await page.waitForLoadState('networkidle')
77
})
88

tests/hero-mode.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { test, expect } from '@playwright/test'
22

33
test.describe('Hero Mode', () => {
44
test.beforeEach(async ({ page }) => {
5-
await page.goto('/')
5+
await page.goto('/super-json/')
66
await page.waitForLoadState('networkidle')
77

88
// Switch to Hero mode

0 commit comments

Comments
 (0)