Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,7 @@ jobs:
osv-config: "osv-scanner.toml"
enable-l2: "true"
l2-command: "bun run test:e2e"
enable-l3: "true"
l3-command: "bun run test:e2e:bdd"
l3-browser: "chromium"
secrets: inherit
10 changes: 10 additions & 0 deletions e2e/bdd/navigation.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { test, expect } from "@playwright/test"

test.describe("App — BDD Smoke", () => {
test("Given the app is running, When I visit the terms page, Then I see the terms content", async ({
page,
}) => {
await page.goto("/terms")
await expect(page.getByText("服务条款")).toBeVisible({ timeout: 15_000 })
})
})
63 changes: 0 additions & 63 deletions e2e/navigation.spec.ts

This file was deleted.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"test:worker": "cd worker && vitest run",
"test:coverage": "vitest run --coverage",
"test:e2e": "bun run scripts/run-e2e.ts",
"test:e2e:bdd": "bunx playwright test",
"db:generate": "drizzle-kit generate",
"db:migrate": "drizzle-kit migrate",
"db:push": "drizzle-kit push",
Expand Down
11 changes: 6 additions & 5 deletions playwright.config.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import { defineConfig, devices } from "@playwright/test"

export default defineConfig({
testDir: "./e2e",
testDir: "./e2e/bdd",
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
workers: process.env.CI ? 1 : 2,
reporter: "html",
use: {
baseURL: process.env.PLAYWRIGHT_BASE_URL ?? "http://localhost:7004",
baseURL: process.env.PLAYWRIGHT_BASE_URL ?? "http://localhost:27004",
trace: "on-first-retry",
headless: true,
},
projects: [
{
Expand All @@ -18,9 +19,9 @@ export default defineConfig({
},
],
webServer: {
command: "bun run dev",
url: "http://localhost:7004",
command: "bun run dev -- --port 27004",
url: "http://localhost:27004",
reuseExistingServer: !process.env.CI,
timeout: 30000,
timeout: 60_000,
},
})
Loading