File tree Expand file tree Collapse file tree 3 files changed +37
-223
lines changed Expand file tree Collapse file tree 3 files changed +37
-223
lines changed Original file line number Diff line number Diff line change @@ -318,6 +318,24 @@ npm run clean # Full cleanup (includes node_modules)
318
318
- ** Linting** - Enforced on all commits via Husky + lint-staged
319
319
- ** Accessibility tests** - Run automatically on default-ocean-blue-a11y swatch
320
320
321
+ #### HTML Test File Creation Rules
322
+
323
+ - ** DO NOT** create ` .html ` files directly in ` tests/component/ ` folders
324
+ - ** DO** create ` .tsx ` test files in ` packages/html/src/{component}/tests/ ` folder
325
+ - ** Use existing components** from the respective component spec and templates
326
+ - ** Keep tests simple** - they are for visual purposes only, no complex functionality
327
+ - ** Follow naming convention** - use descriptive names like ` component-feature.tsx `
328
+ - ** HTML files are auto-generated** - CI will automatically generate HTML files from TSX tests
329
+
330
+ #### Test File Structure
331
+ ```
332
+ packages/html/src/{component}/
333
+ ├── {component}.spec.tsx # Component specifications
334
+ ├── templates/ # Reusable component templates
335
+ └── tests/ # Test scenarios (create .tsx files here)
336
+ └── {test-name}.tsx # Individual test files
337
+ ```
338
+
321
339
## Common Issues
322
340
323
341
- ** Unit tests failing** : Run ` npm run docs ` first to generate metadata
Original file line number Diff line number Diff line change
1
+ import { Pager } from "../../pager" ;
2
+
3
+ export default ( ) => (
4
+ < >
5
+ < div id = "test-area" className = "k-d-grid k-grid-cols-1" >
6
+ < span > Small pager with 100 items per page</ span >
7
+ < Pager size = "small" itemsPerPage = { 100 } responsive = { false } />
8
+
9
+ < span > Medium pager with 500 items per page</ span >
10
+ < Pager size = "medium" itemsPerPage = { 500 } responsive = { false } />
11
+
12
+ < span > Large pager with 1000 items per page</ span >
13
+ < Pager size = "large" itemsPerPage = { 1000 } responsive = { false } />
14
+
15
+ < span > Large pager with 10000 items per page (should demonstrate clipping)</ span >
16
+ < Pager size = "large" itemsPerPage = { 10000 } responsive = { false } />
17
+ </ div >
18
+ </ >
19
+ ) ;
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments