Commit 5bab2d9
authored
feat(testing): E2E runtime, enhanced smoke, and Playwright tests (#103)
* feat(testing): comprehensive testing infrastructure with E2E, smoke, and Playwright
Adds three new testing layers for runtime validation of generated projects:
**Layer 1: E2E Runtime Tests** (apps/cli/test/e2e/)
- Expanded from 3 to 9 test configs covering Next.js, Nuxt, SvelteKit,
TanStack Start, React Router, Astro with both fullstack and standalone backends
- New startDevServer() runs turbo dev and validates frontend pages load
- checkFrontendPage() validates HTML, detects error patterns
- checkStaticAssets() verifies CSS/JS bundles load
- validateFrameworkPage() checks framework-specific markers
**Layer 2: Enhanced Smoke Tests** (testing/)
- Added --strict flag: dev-check failures become blocking (not advisory)
- 5 new presets: next-payload, astro-sanity, nuxt-fullstack, react-router-hono,
tanstack-start-fullstack
- Improved HTML validation with framework-specific marker detection
- Empty body detection catches render failures
**Layer 3: Playwright Web Builder Tests** (apps/web/test/e2e/)
- Playwright configured with chromium, auto-starts dev server
- data-testid attributes added to stack builder and preview panel
- 5 test specs: builder load, CLI command display, URL state,
preview file tree, URL sharing restoration
**CI Workflow** (.github/workflows/e2e-test.yaml)
- Nightly at 4am UTC + manual dispatch
- 3 parallel jobs: e2e-runtime, smoke-strict, playwright
- Artifact upload for debugging failures
Root scripts: test:e2e, test:smoke:strict, test:playwright
* feat(testing): add CLI binary tests, interaction tests, typecheck verification, and turbo wiring
Addresses gaps in testing coverage:
- CLI binary tests: spawn actual `node dist/cli.mjs` with --yes, --yolo,
--ecosystem flags, verify project files are created correctly
- CLI interaction tests: test flag validation (incompatible combos rejected),
ecosystem selection, directory conflict handling via spawned process
- TypeScript verification: typecheckProject() runs tsc --noEmit on generated
projects to verify zero type errors
- Turbo pipeline: test:e2e and test:integration tasks added to turbo.json,
`turbo test` now runs all test suites across all packages
- Root scripts: test:e2e (CLI), test:e2e:web (Playwright), test:integration
Test results: 8/8 interaction tests pass, 7/7 binary tests pass
* feat(testing): add compatibility and mobile Playwright test specs
Adds the 2 missing Playwright test files:
- compatibility.spec.ts: Convex disables options, Payload requires Next.js, Sanity works everywhere
- mobile.spec.ts: mobile viewport, no overflow, CLI command visible, landing page
Total: 13 Playwright tests across 5 spec files
* chore: refresh snapshots and lockfile after rebase onto main1 parent 773746c commit 5bab2d9
File tree
23 files changed
+1392
-204
lines changed- .github/workflows
- apps
- cli
- test
- __snapshots__
- e2e
- web
- src/components/stack-builder
- test/e2e
- testing
- lib
23 files changed
+1392
-204
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
| 102 | + | |
| 103 | + | |
103 | 104 | | |
104 | 105 | | |
105 | 106 | | |
| |||
Lines changed: 14 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1177 | 1177 | | |
1178 | 1178 | | |
1179 | 1179 | | |
1180 | | - | |
| 1180 | + | |
1181 | 1181 | | |
1182 | 1182 | | |
1183 | 1183 | | |
| |||
1785 | 1785 | | |
1786 | 1786 | | |
1787 | 1787 | | |
1788 | | - | |
| 1788 | + | |
1789 | 1789 | | |
1790 | 1790 | | |
1791 | 1791 | | |
| |||
2429 | 2429 | | |
2430 | 2430 | | |
2431 | 2431 | | |
2432 | | - | |
| 2432 | + | |
2433 | 2433 | | |
2434 | 2434 | | |
2435 | 2435 | | |
| |||
2939 | 2939 | | |
2940 | 2940 | | |
2941 | 2941 | | |
2942 | | - | |
| 2942 | + | |
2943 | 2943 | | |
2944 | 2944 | | |
2945 | 2945 | | |
| |||
3698 | 3698 | | |
3699 | 3699 | | |
3700 | 3700 | | |
3701 | | - | |
| 3701 | + | |
3702 | 3702 | | |
3703 | 3703 | | |
3704 | 3704 | | |
| |||
4480 | 4480 | | |
4481 | 4481 | | |
4482 | 4482 | | |
4483 | | - | |
| 4483 | + | |
4484 | 4484 | | |
4485 | 4485 | | |
4486 | 4486 | | |
| |||
5276 | 5276 | | |
5277 | 5277 | | |
5278 | 5278 | | |
5279 | | - | |
| 5279 | + | |
5280 | 5280 | | |
5281 | 5281 | | |
5282 | 5282 | | |
| |||
6101 | 6101 | | |
6102 | 6102 | | |
6103 | 6103 | | |
6104 | | - | |
| 6104 | + | |
6105 | 6105 | | |
6106 | 6106 | | |
6107 | 6107 | | |
| |||
6594 | 6594 | | |
6595 | 6595 | | |
6596 | 6596 | | |
6597 | | - | |
| 6597 | + | |
6598 | 6598 | | |
6599 | 6599 | | |
6600 | 6600 | | |
| |||
7275 | 7275 | | |
7276 | 7276 | | |
7277 | 7277 | | |
7278 | | - | |
| 7278 | + | |
7279 | 7279 | | |
7280 | 7280 | | |
7281 | 7281 | | |
| |||
8026 | 8026 | | |
8027 | 8027 | | |
8028 | 8028 | | |
8029 | | - | |
| 8029 | + | |
8030 | 8030 | | |
8031 | 8031 | | |
8032 | 8032 | | |
| |||
8750 | 8750 | | |
8751 | 8751 | | |
8752 | 8752 | | |
8753 | | - | |
| 8753 | + | |
8754 | 8754 | | |
8755 | 8755 | | |
8756 | 8756 | | |
| |||
9308 | 9308 | | |
9309 | 9309 | | |
9310 | 9310 | | |
9311 | | - | |
| 9311 | + | |
9312 | 9312 | | |
9313 | 9313 | | |
9314 | 9314 | | |
| |||
9908 | 9908 | | |
9909 | 9909 | | |
9910 | 9910 | | |
9911 | | - | |
| 9911 | + | |
9912 | 9912 | | |
9913 | 9913 | | |
9914 | 9914 | | |
| |||
0 commit comments