Skip to content

Commit 483a2a4

Browse files
vcarlclaude
andcommitted
Add /jobs page, OAuth callback, and Playwright e2e tests
Ports the jobs board to Astro with a fresh Tailwind rewrite of the Discord auth gate and job listing, plus the /auth/discordcb popup handler. Adds a Playwright harness running against astro build + serve dist with localStorage-injected sessions and route-stubbed Discord / jobs endpoints, so tests never touch live Discord or api.reactiflux.com. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 66db9e9 commit 483a2a4

14 files changed

Lines changed: 1392 additions & 6 deletions

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,10 @@ npm-debug.log*
2626
# typescript
2727
*.tsbuildinfo
2828

29+
# playwright
30+
/test-results/
31+
/playwright-report/
32+
/blob-report/
33+
/playwright/.cache/
34+
2935
tmp.md

astro.config.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { defineConfig } from "astro/config";
22
import tailwindcss from "@tailwindcss/vite";
33
import netlify from "@astrojs/netlify";
44
import sitemap from "@astrojs/sitemap";
5+
import react from "@astrojs/react";
56
import remarkGfm from "remark-gfm";
67
import rehypeSlug from "rehype-slug";
78
import rehypeWrapTimecodes from "./src/plugins/rehype-wrap-timecodes.ts";
@@ -13,6 +14,7 @@ export default defineConfig({
1314
output: "static",
1415
adapter: netlify(),
1516
integrations: [
17+
react(),
1618
sitemap({
1719
serialize(item) {
1820
try {

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
},
1717
"dependencies": {
1818
"@astrojs/netlify": "^6.6.4",
19+
"@astrojs/react": "^5.0.3",
1920
"@astrojs/sitemap": "^3.7.2",
2021
"@netlify/functions": "^3.0.0",
2122
"@tailwindcss/vite": "^4.2.1",
@@ -61,8 +62,10 @@
6162
]
6263
},
6364
"devDependencies": {
65+
"@playwright/test": "^1.59.1",
6466
"husky": "^9.1.7",
6567
"lint-staged": "^16.3.2",
66-
"prettier": "^2.8.8"
68+
"prettier": "^2.8.8",
69+
"serve": "^14.2.6"
6770
}
6871
}

playwright.config.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import { defineConfig, devices } from "@playwright/test";
2+
3+
export default defineConfig({
4+
testDir: "./tests/e2e",
5+
fullyParallel: true,
6+
forbidOnly: !!process.env.CI,
7+
retries: process.env.CI ? 2 : 0,
8+
reporter: "list",
9+
use: {
10+
baseURL: "http://localhost:4321",
11+
trace: "on-first-retry",
12+
},
13+
projects: [{ name: "chromium", use: { ...devices["Desktop Chrome"] } }],
14+
webServer: {
15+
command: "pnpm build && pnpm exec serve dist --listen 4321 --no-clipboard",
16+
url: "http://localhost:4321",
17+
reuseExistingServer: !process.env.CI,
18+
timeout: 180_000,
19+
},
20+
});

0 commit comments

Comments
 (0)