@alliance-droid/svelte-docs-system 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/COMPONENTS.md +365 -0
- package/COVERAGE_REPORT.md +663 -0
- package/README.md +42 -0
- package/SEARCH_VERIFICATION.md +229 -0
- package/TEST_SUMMARY.md +344 -0
- package/bin/init.js +821 -0
- package/docs/E2E_TESTS.md +354 -0
- package/docs/TESTING.md +754 -0
- package/docs/de/index.md +41 -0
- package/docs/en/COMPONENTS.md +443 -0
- package/docs/en/api/examples.md +100 -0
- package/docs/en/api/overview.md +69 -0
- package/docs/en/components/index.md +622 -0
- package/docs/en/config/navigation.md +505 -0
- package/docs/en/config/theme-and-colors.md +395 -0
- package/docs/en/getting-started/integration.md +406 -0
- package/docs/en/guides/common-setups.md +651 -0
- package/docs/en/index.md +243 -0
- package/docs/en/markdown.md +102 -0
- package/docs/en/routing.md +64 -0
- package/docs/en/setup.md +52 -0
- package/docs/en/troubleshooting.md +704 -0
- package/docs/es/index.md +41 -0
- package/docs/fr/index.md +41 -0
- package/docs/ja/index.md +41 -0
- package/package.json +40 -0
- package/pagefind.toml +8 -0
- package/postcss.config.js +5 -0
- package/src/app.css +119 -0
- package/src/app.d.ts +13 -0
- package/src/app.html +11 -0
- package/src/lib/assets/favicon.svg +1 -0
- package/src/lib/components/APITable.svelte +120 -0
- package/src/lib/components/APITable.test.ts +153 -0
- package/src/lib/components/Breadcrumbs.svelte +85 -0
- package/src/lib/components/Breadcrumbs.test.ts +148 -0
- package/src/lib/components/Callout.svelte +60 -0
- package/src/lib/components/Callout.test.ts +100 -0
- package/src/lib/components/CodeBlock.svelte +68 -0
- package/src/lib/components/CodeBlock.test.ts +133 -0
- package/src/lib/components/DocLayout.svelte +84 -0
- package/src/lib/components/Footer.svelte +78 -0
- package/src/lib/components/Image.svelte +100 -0
- package/src/lib/components/Image.test.ts +163 -0
- package/src/lib/components/Navbar.svelte +141 -0
- package/src/lib/components/Search.svelte +248 -0
- package/src/lib/components/Sidebar.svelte +110 -0
- package/src/lib/components/Tabs.svelte +48 -0
- package/src/lib/components/Tabs.test.ts +102 -0
- package/src/lib/config.test.ts +140 -0
- package/src/lib/config.ts +179 -0
- package/src/lib/configIntegration.test.ts +272 -0
- package/src/lib/configLoader.ts +231 -0
- package/src/lib/configParser.test.ts +217 -0
- package/src/lib/configParser.ts +234 -0
- package/src/lib/index.ts +34 -0
- package/src/lib/integration.test.ts +426 -0
- package/src/lib/navigationBuilder.test.ts +338 -0
- package/src/lib/navigationBuilder.ts +268 -0
- package/src/lib/performance.test.ts +369 -0
- package/src/lib/routing.test.ts +202 -0
- package/src/lib/routing.ts +127 -0
- package/src/lib/search-functionality.test.ts +493 -0
- package/src/lib/stores/i18n.test.ts +180 -0
- package/src/lib/stores/i18n.ts +143 -0
- package/src/lib/stores/nav.ts +36 -0
- package/src/lib/stores/search.test.ts +140 -0
- package/src/lib/stores/search.ts +162 -0
- package/src/lib/stores/theme.ts +59 -0
- package/src/lib/stores/version.test.ts +139 -0
- package/src/lib/stores/version.ts +111 -0
- package/src/lib/themeCustomization.test.ts +223 -0
- package/src/lib/themeCustomization.ts +212 -0
- package/src/lib/utils/highlight.test.ts +136 -0
- package/src/lib/utils/highlight.ts +100 -0
- package/src/lib/utils/index.ts +7 -0
- package/src/lib/utils/markdown.test.ts +357 -0
- package/src/lib/utils/markdown.ts +77 -0
- package/src/routes/+layout.server.ts +1 -0
- package/src/routes/+layout.svelte +28 -0
- package/src/routes/+page.svelte +165 -0
- package/static/robots.txt +3 -0
- package/svelte.config.js +18 -0
- package/tailwind.config.ts +55 -0
- package/template-starter/.github/workflows/build.yml +40 -0
- package/template-starter/.github/workflows/deploy-github-pages.yml +47 -0
- package/template-starter/.github/workflows/deploy-netlify.yml +41 -0
- package/template-starter/.github/workflows/deploy-vercel.yml +64 -0
- package/template-starter/NPM-PACKAGE-SETUP.md +233 -0
- package/template-starter/README.md +320 -0
- package/template-starter/docs/_config.json +39 -0
- package/template-starter/docs/api/components.md +257 -0
- package/template-starter/docs/api/overview.md +169 -0
- package/template-starter/docs/guides/configuration.md +145 -0
- package/template-starter/docs/guides/github-pages-deployment.md +254 -0
- package/template-starter/docs/guides/netlify-deployment.md +159 -0
- package/template-starter/docs/guides/vercel-deployment.md +131 -0
- package/template-starter/docs/index.md +49 -0
- package/template-starter/docs/setup.md +149 -0
- package/template-starter/package.json +31 -0
- package/template-starter/pagefind.toml +3 -0
- package/template-starter/postcss.config.js +5 -0
- package/template-starter/src/app.css +34 -0
- package/template-starter/src/app.d.ts +13 -0
- package/template-starter/src/app.html +11 -0
- package/template-starter/src/lib/components/APITable.svelte +120 -0
- package/template-starter/src/lib/components/APITable.test.ts +19 -0
- package/template-starter/src/lib/components/Breadcrumbs.svelte +85 -0
- package/template-starter/src/lib/components/Breadcrumbs.test.ts +19 -0
- package/template-starter/src/lib/components/Callout.svelte +60 -0
- package/template-starter/src/lib/components/Callout.test.ts +16 -0
- package/template-starter/src/lib/components/CodeBlock.svelte +68 -0
- package/template-starter/src/lib/components/CodeBlock.test.ts +12 -0
- package/template-starter/src/lib/components/DocLayout.svelte +84 -0
- package/template-starter/src/lib/components/Footer.svelte +78 -0
- package/template-starter/src/lib/components/Image.svelte +100 -0
- package/template-starter/src/lib/components/Image.test.ts +15 -0
- package/template-starter/src/lib/components/Navbar.svelte +141 -0
- package/template-starter/src/lib/components/Search.svelte +248 -0
- package/template-starter/src/lib/components/Sidebar.svelte +110 -0
- package/template-starter/src/lib/components/Tabs.svelte +48 -0
- package/template-starter/src/lib/components/Tabs.test.ts +17 -0
- package/template-starter/src/lib/index.ts +15 -0
- package/template-starter/src/routes/+layout.svelte +28 -0
- package/template-starter/src/routes/+page.svelte +92 -0
- package/template-starter/svelte.config.js +17 -0
- package/template-starter/tailwind.config.ts +17 -0
- package/template-starter/tsconfig.json +13 -0
- package/template-starter/vite.config.ts +6 -0
- package/tests/e2e/example.spec.ts +345 -0
- package/tsconfig.json +20 -0
- package/vite.config.ts +6 -0
- package/vitest.config.ts +34 -0
- package/vitest.setup.ts +21 -0
|
@@ -0,0 +1,354 @@
|
|
|
1
|
+
# End-to-End Tests (E2E) Specification
|
|
2
|
+
|
|
3
|
+
This document specifies the E2E tests for the Svelte Documentation System using Playwright.
|
|
4
|
+
|
|
5
|
+
## Test Environment Setup
|
|
6
|
+
|
|
7
|
+
These tests require Playwright to be installed:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install --save-dev @playwright/test
|
|
11
|
+
npx playwright install
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Running E2E Tests
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm run test:e2e
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Test Categories
|
|
21
|
+
|
|
22
|
+
### 1. Navigation Tests
|
|
23
|
+
|
|
24
|
+
#### Test: Basic Navigation
|
|
25
|
+
- **Step 1**: Load homepage (`/docs`)
|
|
26
|
+
- **Step 2**: Verify title in header
|
|
27
|
+
- **Step 3**: Click navigation link to `/docs/guides`
|
|
28
|
+
- **Step 4**: Verify page content loads
|
|
29
|
+
- **Expected**: Page transitions smoothly, content updates
|
|
30
|
+
|
|
31
|
+
#### Test: Breadcrumb Navigation
|
|
32
|
+
- **Step 1**: Navigate to `/docs/guides/getting-started`
|
|
33
|
+
- **Step 2**: Verify breadcrumbs show: Home > Docs > Guides > Getting Started
|
|
34
|
+
- **Step 3**: Click on "Guides" breadcrumb
|
|
35
|
+
- **Step 4**: Verify navigation to `/docs/guides`
|
|
36
|
+
- **Expected**: Breadcrumbs work as navigation
|
|
37
|
+
|
|
38
|
+
#### Test: Sidebar Navigation
|
|
39
|
+
- **Step 1**: Open page with sidebar visible
|
|
40
|
+
- **Step 2**: Verify all navigation items render
|
|
41
|
+
- **Step 3**: Click on a navigation section
|
|
42
|
+
- **Step 4**: Verify active state updates
|
|
43
|
+
- **Expected**: Active item highlighted, content loads
|
|
44
|
+
|
|
45
|
+
#### Test: Prev/Next Navigation
|
|
46
|
+
- **Step 1**: Navigate to a doc page
|
|
47
|
+
- **Step 2**: Click "Next" button
|
|
48
|
+
- **Step 3**: Verify next document loads
|
|
49
|
+
- **Step 4**: Click "Previous" button
|
|
50
|
+
- **Step 5**: Verify previous document loads
|
|
51
|
+
- **Expected**: Navigation works correctly through document sequence
|
|
52
|
+
|
|
53
|
+
### 2. Search Tests
|
|
54
|
+
|
|
55
|
+
#### Test: Basic Search
|
|
56
|
+
- **Step 1**: Click search input
|
|
57
|
+
- **Step 2**: Type "getting started"
|
|
58
|
+
- **Step 3**: Wait for results to load
|
|
59
|
+
- **Step 4**: Verify results display at least one match
|
|
60
|
+
- **Expected**: Search results show relevant pages
|
|
61
|
+
|
|
62
|
+
#### Test: Search Results Navigation
|
|
63
|
+
- **Step 1**: Perform search for "API"
|
|
64
|
+
- **Step 2**: Click on first search result
|
|
65
|
+
- **Step 3**: Verify page loads and contains "API" in title
|
|
66
|
+
- **Step 4**: Verify search query cleared
|
|
67
|
+
- **Expected**: Clicking result navigates to page
|
|
68
|
+
|
|
69
|
+
#### Test: Search Highlighting
|
|
70
|
+
- **Step 1**: Search for "authentication"
|
|
71
|
+
- **Step 2**: Navigate to a result
|
|
72
|
+
- **Step 3**: Verify search term is highlighted in content
|
|
73
|
+
- **Expected**: Search terms highlighted with visual indicator
|
|
74
|
+
|
|
75
|
+
#### Test: No Results
|
|
76
|
+
- **Step 1**: Search for gibberish "xyzabc123notaterm"
|
|
77
|
+
- **Step 2**: Verify "No results found" message displays
|
|
78
|
+
- **Step 3**: Verify suggestion to try different keywords
|
|
79
|
+
- **Expected**: Helpful error message shown
|
|
80
|
+
|
|
81
|
+
#### Test: Search Pagination
|
|
82
|
+
- **Step 1**: Search for common term with many results
|
|
83
|
+
- **Step 2**: Verify pagination controls appear
|
|
84
|
+
- **Step 3**: Click page 2
|
|
85
|
+
- **Step 4**: Verify different results load
|
|
86
|
+
- **Expected**: Pagination works, page updates
|
|
87
|
+
|
|
88
|
+
### 3. Dark Mode Tests
|
|
89
|
+
|
|
90
|
+
#### Test: Dark Mode Toggle
|
|
91
|
+
- **Step 1**: Load page in light mode
|
|
92
|
+
- **Step 2**: Locate dark mode toggle
|
|
93
|
+
- **Step 3**: Click toggle
|
|
94
|
+
- **Step 4**: Verify page switches to dark theme
|
|
95
|
+
- **Step 5**: Verify toggle state updated
|
|
96
|
+
- **Expected**: Dark mode applies instantly
|
|
97
|
+
|
|
98
|
+
#### Test: Dark Mode Persistence
|
|
99
|
+
- **Step 1**: Enable dark mode
|
|
100
|
+
- **Step 2**: Navigate to different page
|
|
101
|
+
- **Step 3**: Verify dark mode still active
|
|
102
|
+
- **Step 4**: Reload page
|
|
103
|
+
- **Step 5**: Verify dark mode persisted
|
|
104
|
+
- **Expected**: Dark mode preference saved
|
|
105
|
+
|
|
106
|
+
#### Test: Dark Mode Readability
|
|
107
|
+
- **Step 1**: Enable dark mode
|
|
108
|
+
- **Step 2**: Verify text contrast meets WCAG AA standard
|
|
109
|
+
- **Step 3**: Check code blocks are readable
|
|
110
|
+
- **Step 4**: Verify links are distinguishable
|
|
111
|
+
- **Expected**: Dark mode is readable and accessible
|
|
112
|
+
|
|
113
|
+
#### Test: System Dark Mode Detection
|
|
114
|
+
- **Step 1**: Set system to dark mode
|
|
115
|
+
- **Step 2**: Load page without preference set
|
|
116
|
+
- **Step 3**: Verify page loads in dark mode
|
|
117
|
+
- **Expected**: Respects system preference
|
|
118
|
+
|
|
119
|
+
### 4. Responsive Design Tests
|
|
120
|
+
|
|
121
|
+
#### Test: Mobile Navigation
|
|
122
|
+
- **Step 1**: Resize to mobile (375px width)
|
|
123
|
+
- **Step 2**: Verify hamburger menu appears
|
|
124
|
+
- **Step 3**: Click hamburger menu
|
|
125
|
+
- **Step 4**: Verify sidebar menu opens
|
|
126
|
+
- **Step 5**: Click menu item
|
|
127
|
+
- **Step 6**: Verify menu closes and navigates
|
|
128
|
+
- **Expected**: Mobile menu works correctly
|
|
129
|
+
|
|
130
|
+
#### Test: Mobile Search
|
|
131
|
+
- **Step 1**: Resize to mobile
|
|
132
|
+
- **Step 2**: Click search icon
|
|
133
|
+
- **Step 3**: Type search query
|
|
134
|
+
- **Step 4**: Verify results display in mobile layout
|
|
135
|
+
- **Expected**: Search works on mobile
|
|
136
|
+
|
|
137
|
+
#### Test: Tablet Layout
|
|
138
|
+
- **Step 1**: Resize to tablet (768px width)
|
|
139
|
+
- **Step 2**: Verify layout adapts appropriately
|
|
140
|
+
- **Step 3**: Verify sidebar and content visible
|
|
141
|
+
- **Expected**: Tablet layout balanced
|
|
142
|
+
|
|
143
|
+
#### Test: Desktop Layout
|
|
144
|
+
- **Step 1**: Resize to desktop (1440px)
|
|
145
|
+
- **Step 2**: Verify three-column layout (nav, content, toc)
|
|
146
|
+
- **Step 3**: Verify all elements visible
|
|
147
|
+
- **Expected**: Full desktop layout works
|
|
148
|
+
|
|
149
|
+
### 5. Content Rendering Tests
|
|
150
|
+
|
|
151
|
+
#### Test: Markdown Rendering
|
|
152
|
+
- **Step 1**: Navigate to page with various markdown
|
|
153
|
+
- **Step 2**: Verify headers render correctly
|
|
154
|
+
- **Step 3**: Verify lists render correctly
|
|
155
|
+
- **Step 4**: Verify code blocks render correctly
|
|
156
|
+
- **Step 5**: Verify links render correctly
|
|
157
|
+
- **Expected**: All markdown elements render properly
|
|
158
|
+
|
|
159
|
+
#### Test: Code Block Display
|
|
160
|
+
- **Step 1**: Navigate to page with code blocks
|
|
161
|
+
- **Step 2**: Verify syntax highlighting applied
|
|
162
|
+
- **Step 3**: Verify copy button present
|
|
163
|
+
- **Step 4**: Click copy button
|
|
164
|
+
- **Step 5**: Verify code copied to clipboard
|
|
165
|
+
- **Expected**: Code blocks fully functional
|
|
166
|
+
|
|
167
|
+
#### Test: Table of Contents
|
|
168
|
+
- **Step 1**: Navigate to page with multiple sections
|
|
169
|
+
- **Step 2**: Verify TOC appears on right sidebar
|
|
170
|
+
- **Step 3**: Click TOC link
|
|
171
|
+
- **Step 4**: Verify page scrolls to section
|
|
172
|
+
- **Expected**: TOC works and smooth scrolls
|
|
173
|
+
|
|
174
|
+
#### Test: Image Display
|
|
175
|
+
- **Step 1**: Navigate to page with images
|
|
176
|
+
- **Step 2**: Verify images load
|
|
177
|
+
- **Step 3**: Verify captions display
|
|
178
|
+
- **Step 4**: Verify responsive sizing
|
|
179
|
+
- **Expected**: Images display correctly
|
|
180
|
+
|
|
181
|
+
### 6. Accessibility Tests
|
|
182
|
+
|
|
183
|
+
#### Test: Keyboard Navigation
|
|
184
|
+
- **Step 1**: Load page
|
|
185
|
+
- **Step 2**: Press Tab to navigate
|
|
186
|
+
- **Step 3**: Verify focus visible on elements
|
|
187
|
+
- **Step 4**: Press Enter on links
|
|
188
|
+
- **Step 5**: Verify navigation works
|
|
189
|
+
- **Expected**: Fully keyboard navigable
|
|
190
|
+
|
|
191
|
+
#### Test: Screen Reader Support
|
|
192
|
+
- **Step 1**: Load page with screen reader
|
|
193
|
+
- **Step 2**: Verify page structure announced
|
|
194
|
+
- **Step 3**: Verify links have descriptive text
|
|
195
|
+
- **Step 4**: Verify images have alt text
|
|
196
|
+
- **Expected**: Content accessible to screen readers
|
|
197
|
+
|
|
198
|
+
#### Test: Focus Management
|
|
199
|
+
- **Step 1**: Navigate to new page
|
|
200
|
+
- **Step 2**: Verify focus moves to main content
|
|
201
|
+
- **Step 3**: Skip to main content link works
|
|
202
|
+
- **Expected**: Focus properly managed
|
|
203
|
+
|
|
204
|
+
#### Test: Color Contrast
|
|
205
|
+
- **Step 1**: Analyze page color contrast
|
|
206
|
+
- **Step 2**: Verify WCAG AA compliance
|
|
207
|
+
- **Step 3**: Check both light and dark modes
|
|
208
|
+
- **Expected**: Sufficient contrast for readability
|
|
209
|
+
|
|
210
|
+
### 7. Performance Tests
|
|
211
|
+
|
|
212
|
+
#### Test: Page Load Performance
|
|
213
|
+
- **Step 1**: Measure page load time
|
|
214
|
+
- **Step 2**: Verify LCP (Largest Contentful Paint) < 2.5s
|
|
215
|
+
- **Step 3**: Verify CLS (Cumulative Layout Shift) < 0.1
|
|
216
|
+
- **Expected**: Good Core Web Vitals
|
|
217
|
+
|
|
218
|
+
#### Test: Search Performance
|
|
219
|
+
- **Step 1**: Perform search
|
|
220
|
+
- **Step 2**: Measure time to results
|
|
221
|
+
- **Step 3**: Verify results within 100ms
|
|
222
|
+
- **Expected**: Search responsive
|
|
223
|
+
|
|
224
|
+
#### Test: Navigation Performance
|
|
225
|
+
- **Step 1**: Navigate between pages
|
|
226
|
+
- **Step 2**: Measure navigation time
|
|
227
|
+
- **Step 3**: Verify smooth transitions
|
|
228
|
+
- **Expected**: No lag in navigation
|
|
229
|
+
|
|
230
|
+
### 8. Form and Input Tests
|
|
231
|
+
|
|
232
|
+
#### Test: Search Form
|
|
233
|
+
- **Step 1**: Click search input
|
|
234
|
+
- **Step 2**: Type and verify input captures text
|
|
235
|
+
- **Step 3**: Clear search
|
|
236
|
+
- **Step 4**: Verify input cleared
|
|
237
|
+
- **Expected**: Search form works
|
|
238
|
+
|
|
239
|
+
#### Test: Theme Selector
|
|
240
|
+
- **Step 1**: Locate theme selector
|
|
241
|
+
- **Step 2**: Select different theme
|
|
242
|
+
- **Step 3**: Verify theme applied
|
|
243
|
+
- **Expected**: Theme selector functional
|
|
244
|
+
|
|
245
|
+
### 9. Error Handling Tests
|
|
246
|
+
|
|
247
|
+
#### Test: 404 Page
|
|
248
|
+
- **Step 1**: Navigate to non-existent page
|
|
249
|
+
- **Step 2**: Verify 404 page displays
|
|
250
|
+
- **Step 3**: Verify helpful message
|
|
251
|
+
- **Step 4**: Verify link to homepage
|
|
252
|
+
- **Expected**: Graceful error handling
|
|
253
|
+
|
|
254
|
+
#### Test: Offline Handling
|
|
255
|
+
- **Step 1**: Go offline
|
|
256
|
+
- **Step 2**: Try to search
|
|
257
|
+
- **Step 3**: Verify appropriate message
|
|
258
|
+
- **Expected**: Handles offline state
|
|
259
|
+
|
|
260
|
+
### 10. Cross-browser Tests
|
|
261
|
+
|
|
262
|
+
#### Test: Chrome/Chromium
|
|
263
|
+
- Run all tests in Chrome
|
|
264
|
+
|
|
265
|
+
#### Test: Firefox
|
|
266
|
+
- Run all tests in Firefox
|
|
267
|
+
|
|
268
|
+
#### Test: Safari
|
|
269
|
+
- Run all tests in Safari (macOS)
|
|
270
|
+
|
|
271
|
+
#### Test: Edge
|
|
272
|
+
- Run all tests in Edge
|
|
273
|
+
|
|
274
|
+
## Test Configuration
|
|
275
|
+
|
|
276
|
+
```javascript
|
|
277
|
+
// playwright.config.ts
|
|
278
|
+
import { defineConfig, devices } from '@playwright/test';
|
|
279
|
+
|
|
280
|
+
export default defineConfig({
|
|
281
|
+
testDir: './tests/e2e',
|
|
282
|
+
fullyParallel: true,
|
|
283
|
+
forbidOnly: !!process.env.CI,
|
|
284
|
+
retries: process.env.CI ? 2 : 0,
|
|
285
|
+
workers: process.env.CI ? 1 : undefined,
|
|
286
|
+
reporter: 'html',
|
|
287
|
+
use: {
|
|
288
|
+
baseURL: 'http://localhost:5173',
|
|
289
|
+
trace: 'on-first-retry',
|
|
290
|
+
},
|
|
291
|
+
|
|
292
|
+
projects: [
|
|
293
|
+
{
|
|
294
|
+
name: 'chromium',
|
|
295
|
+
use: { ...devices['Desktop Chrome'] },
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
name: 'firefox',
|
|
299
|
+
use: { ...devices['Desktop Firefox'] },
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
name: 'webkit',
|
|
303
|
+
use: { ...devices['Desktop Safari'] },
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
name: 'Mobile Chrome',
|
|
307
|
+
use: { ...devices['Pixel 5'] },
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
name: 'Mobile Safari',
|
|
311
|
+
use: { ...devices['iPhone 12'] },
|
|
312
|
+
},
|
|
313
|
+
],
|
|
314
|
+
|
|
315
|
+
webServer: {
|
|
316
|
+
command: 'npm run dev',
|
|
317
|
+
url: 'http://localhost:5173',
|
|
318
|
+
reuseExistingServer: !process.env.CI,
|
|
319
|
+
},
|
|
320
|
+
});
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
## Continuous Integration
|
|
324
|
+
|
|
325
|
+
E2E tests run in CI pipeline after unit tests pass:
|
|
326
|
+
|
|
327
|
+
```yaml
|
|
328
|
+
# .github/workflows/test.yml
|
|
329
|
+
- name: Run E2E tests
|
|
330
|
+
run: npm run test:e2e
|
|
331
|
+
if: success()
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
## Coverage Goals
|
|
335
|
+
|
|
336
|
+
- Navigation: 100%
|
|
337
|
+
- Search: 95%
|
|
338
|
+
- Dark Mode: 90%
|
|
339
|
+
- Accessibility: 90%
|
|
340
|
+
- Performance: 85%
|
|
341
|
+
|
|
342
|
+
## Known Limitations
|
|
343
|
+
|
|
344
|
+
- E2E tests depend on stable test environment
|
|
345
|
+
- Tests may be flaky on slow CI systems
|
|
346
|
+
- Search tests depend on Pagefind index being built
|
|
347
|
+
- Offline tests require special network setup
|
|
348
|
+
|
|
349
|
+
## Future Improvements
|
|
350
|
+
|
|
351
|
+
- Visual regression testing with Percy or similar
|
|
352
|
+
- Performance budgets and monitoring
|
|
353
|
+
- Automated accessibility scanning
|
|
354
|
+
- Analytics and error tracking tests
|