Skip to content

Commit d9e233f

Browse files
committed
test: split Vue and Solid Start basic e2e modes
1 parent 7e63efc commit d9e233f

67 files changed

Lines changed: 853 additions & 119 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules
2+
3+
/test-results/
4+
/playwright-report/
5+
/blob-report/
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"name": "tanstack-solid-start-e2e-basic-prerender",
3+
"private": true,
4+
"sideEffects": false,
5+
"type": "module",
6+
"scripts": {
7+
"test:e2e:startDummyServer": "node -e 'import(\"../basic-test-suite/src/setup/global.setup.ts\").then(m => m.default())' & node -e 'import(\"../basic-test-suite/src/setup/waitForDummyServer.ts\").then(m => m.default())'",
8+
"test:e2e:stopDummyServer": "node -e 'import(\"../basic-test-suite/src/setup/global.teardown.ts\").then(m => m.default())'",
9+
"test:e2e": "rm -rf port*.txt; MODE=prerender playwright test --project=chromium"
10+
},
11+
"devDependencies": {
12+
"@playwright/test": "^1.50.1",
13+
"@tanstack/router-e2e-utils": "workspace:^",
14+
"tanstack-solid-start-e2e-basic": "workspace:*",
15+
"tanstack-solid-start-e2e-basic-test-suite": "workspace:*"
16+
},
17+
"nx": {
18+
"targets": {
19+
"test:e2e": {
20+
"parallelism": false
21+
}
22+
}
23+
}
24+
}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
import { defineConfig, devices } from '@playwright/test'
2+
import {
3+
getDummyServerPort,
4+
getTestServerPort,
5+
} from '@tanstack/router-e2e-utils'
6+
import packageJson from './package.json' with { type: 'json' }
7+
8+
const PORT = await getTestServerPort(packageJson.name)
9+
const START_PORT = await getTestServerPort(`${packageJson.name}_start`)
10+
const EXTERNAL_PORT = await getDummyServerPort(packageJson.name)
11+
const baseURL = `http://localhost:${PORT}`
12+
13+
export default defineConfig({
14+
testDir: '../basic-test-suite/src',
15+
workers: 1,
16+
reporter: [['line']],
17+
18+
globalTeardown: '../basic-test-suite/src/setup/global.teardown.ts',
19+
20+
use: {
21+
baseURL,
22+
},
23+
24+
webServer: {
25+
command:
26+
'pnpm run test:e2e:startDummyServer && pnpm --dir ../basic build:prerender && pnpm --dir ../basic start',
27+
url: baseURL,
28+
reuseExistingServer: !process.env.CI,
29+
stdout: 'pipe',
30+
env: {
31+
MODE: 'prerender',
32+
VITE_NODE_ENV: 'test',
33+
VITE_EXTERNAL_PORT: String(EXTERNAL_PORT),
34+
VITE_SERVER_PORT: String(PORT),
35+
START_PORT: String(START_PORT),
36+
PORT: String(PORT),
37+
},
38+
},
39+
40+
projects: [
41+
{
42+
name: 'chromium',
43+
use: {
44+
...devices['Desktop Chrome'],
45+
},
46+
},
47+
],
48+
})
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules
2+
3+
/test-results/
4+
/playwright-report/
5+
/blob-report/
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"name": "tanstack-solid-start-e2e-basic-preview",
3+
"private": true,
4+
"sideEffects": false,
5+
"type": "module",
6+
"scripts": {
7+
"test:e2e:startDummyServer": "node -e 'import(\"../basic-test-suite/src/setup/global.setup.ts\").then(m => m.default())' & node -e 'import(\"../basic-test-suite/src/setup/waitForDummyServer.ts\").then(m => m.default())'",
8+
"test:e2e:stopDummyServer": "node -e 'import(\"../basic-test-suite/src/setup/global.teardown.ts\").then(m => m.default())'",
9+
"test:e2e": "rm -rf port*.txt; MODE=preview playwright test --project=chromium"
10+
},
11+
"devDependencies": {
12+
"@playwright/test": "^1.50.1",
13+
"@tanstack/router-e2e-utils": "workspace:^",
14+
"tanstack-solid-start-e2e-basic": "workspace:*",
15+
"tanstack-solid-start-e2e-basic-test-suite": "workspace:*"
16+
},
17+
"nx": {
18+
"targets": {
19+
"test:e2e": {
20+
"parallelism": false
21+
}
22+
}
23+
}
24+
}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
import { defineConfig, devices } from '@playwright/test'
2+
import {
3+
getDummyServerPort,
4+
getTestServerPort,
5+
} from '@tanstack/router-e2e-utils'
6+
import packageJson from './package.json' with { type: 'json' }
7+
8+
const PORT = await getTestServerPort(packageJson.name)
9+
const START_PORT = await getTestServerPort(`${packageJson.name}_start`)
10+
const EXTERNAL_PORT = await getDummyServerPort(packageJson.name)
11+
const baseURL = `http://localhost:${PORT}`
12+
13+
export default defineConfig({
14+
testDir: '../basic-test-suite/src',
15+
workers: 1,
16+
reporter: [['line']],
17+
18+
globalTeardown: '../basic-test-suite/src/setup/global.teardown.ts',
19+
20+
use: {
21+
baseURL,
22+
},
23+
24+
webServer: {
25+
command: `pnpm run test:e2e:startDummyServer && pnpm --dir ../basic build && pnpm --dir ../basic preview --port ${PORT}`,
26+
url: baseURL,
27+
reuseExistingServer: !process.env.CI,
28+
stdout: 'pipe',
29+
env: {
30+
MODE: 'preview',
31+
VITE_NODE_ENV: 'test',
32+
VITE_EXTERNAL_PORT: String(EXTERNAL_PORT),
33+
VITE_SERVER_PORT: String(PORT),
34+
START_PORT: String(START_PORT),
35+
PORT: String(PORT),
36+
},
37+
},
38+
39+
projects: [
40+
{
41+
name: 'chromium',
42+
use: {
43+
...devices['Desktop Chrome'],
44+
},
45+
},
46+
],
47+
})
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules
2+
3+
/test-results/
4+
/playwright-report/
5+
/blob-report/
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"name": "tanstack-solid-start-e2e-basic-spa",
3+
"private": true,
4+
"sideEffects": false,
5+
"type": "module",
6+
"scripts": {
7+
"test:e2e:startDummyServer": "node -e 'import(\"../basic-test-suite/src/setup/global.setup.ts\").then(m => m.default())' & node -e 'import(\"../basic-test-suite/src/setup/waitForDummyServer.ts\").then(m => m.default())'",
8+
"test:e2e:stopDummyServer": "node -e 'import(\"../basic-test-suite/src/setup/global.teardown.ts\").then(m => m.default())'",
9+
"test:e2e": "rm -rf port*.txt; MODE=spa playwright test --project=chromium"
10+
},
11+
"devDependencies": {
12+
"@playwright/test": "^1.50.1",
13+
"@tanstack/router-e2e-utils": "workspace:^",
14+
"tanstack-solid-start-e2e-basic": "workspace:*",
15+
"tanstack-solid-start-e2e-basic-test-suite": "workspace:*"
16+
},
17+
"nx": {
18+
"targets": {
19+
"test:e2e": {
20+
"parallelism": false
21+
}
22+
}
23+
}
24+
}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
import { defineConfig, devices } from '@playwright/test'
2+
import {
3+
getDummyServerPort,
4+
getTestServerPort,
5+
} from '@tanstack/router-e2e-utils'
6+
import packageJson from './package.json' with { type: 'json' }
7+
8+
const PORT = await getTestServerPort(packageJson.name)
9+
const START_PORT = await getTestServerPort(`${packageJson.name}_start`)
10+
const EXTERNAL_PORT = await getDummyServerPort(packageJson.name)
11+
const baseURL = `http://localhost:${PORT}`
12+
13+
export default defineConfig({
14+
testDir: '../basic-test-suite/src',
15+
workers: 1,
16+
reporter: [['line']],
17+
18+
globalTeardown: '../basic-test-suite/src/setup/global.teardown.ts',
19+
20+
use: {
21+
baseURL,
22+
},
23+
24+
webServer: {
25+
command:
26+
'pnpm run test:e2e:startDummyServer && pnpm --dir ../basic build:spa && pnpm --dir ../basic start',
27+
url: baseURL,
28+
reuseExistingServer: !process.env.CI,
29+
stdout: 'pipe',
30+
env: {
31+
MODE: 'spa',
32+
VITE_NODE_ENV: 'test',
33+
VITE_EXTERNAL_PORT: String(EXTERNAL_PORT),
34+
VITE_SERVER_PORT: String(PORT),
35+
START_PORT: String(START_PORT),
36+
PORT: String(PORT),
37+
},
38+
},
39+
40+
projects: [
41+
{
42+
name: 'chromium',
43+
use: {
44+
...devices['Desktop Chrome'],
45+
},
46+
},
47+
],
48+
})
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules
2+
3+
/test-results/
4+
/playwright-report/
5+
/blob-report/

0 commit comments

Comments
 (0)