Commit 81bead7
* Add a test demonstrating how you can use extends to directly manage state as part of your baseClass
* Extend Tests for @method decorator inheritance, super() calls, method override, and method composition.
* Extend Tests for @prop and @State inheritance from base classes.
* Extend Tests for extending Stencil-decorated classes with render() method inheritance.
* Demonstrates base classes triggering host component updates via requestUpdate
* Tests demonstrating lifecycle hooks living on the base class
* Tests for multi-level lifecycle inheritance
* Tests for ReactiveControllerHost pattern - composition based controllers with automatic lifecycle hooking
* Run prettier
* Tests for decorator conflicts - duplicate decorator names of the same type in inheritance chains
Test Case #13 - Decorator Conflicts
Features:
- Duplicate @prop names (component overrides base)
- Duplicate @State names (component overrides base)
- Duplicate @method names (component overrides base)
- Compiler precedence rules (component decorators take precedence)
* Tests for event handling inheritance - @listen decorator inheritance
Test Case #10 - Event Handling Inheritance
Features:
- Inherits base class window/document/host listeners
- Handles child class window/document/host listeners
- Child override event handler takes precedence over base
- Handles event bubbling correctly
- Tracks events in combined event log
* Tests for @watch decorator inheritance
Test Case #11 - Watch Decorator Inheritance
Features:
- Inherits base class @watch decorators
- Handles child class @watch decorators
- Executes watch handlers in correct order (base first, then child)
- Child override watch handler takes precedence over base
- Reactive property chains work correctly
- Tracks watch calls in combined watch log
* Tests for mixed decorator types - different decorator types with same name
Test Case #18 - Mixed Decorator Types
Features:
- @prop in Base, @State in Component (same name)
- @State in Base, @prop in Component (same name)
- @method in Base, @prop in Component (same name)
- Component decorator type takes precedence
- Runtime behavior verification
* Tests for inheritance-based scaling with multiple components and controllers
Test Case #15 - Inheritance-Based Scaling
Features:
- 3 components (TextInput, RadioGroup, CheckboxGroup) using inheritance
- 2 controllers (ValidationController, FocusController) via inheritance
- Lifecycle methods called correctly
- Validation triggers on blur
- Focus tracking works
- Controllers use inheritance pattern
* Tests for composition-based scaling with multiple components and controllers
Test Case #16 - Composition-Based Scaling
Features:
- 3 components (TextInput, RadioGroup, CheckboxGroup) using composition
- 2 controllers (ValidationController, FocusController) via composition
- Lifecycle methods called automatically via ReactiveControllerHost
- Validation triggers on blur
- Focus tracking works
- Controllers are properly composed (not inherited)
* Apply prettier formatting & tweak test case #s
* Remove the duplicate method as it was causing types error
---------
Co-authored-by: Paul Visciano <[email protected]>
1 parent 3771af0 commit 81bead7
File tree
46 files changed
+5043
-3
lines changed- test/wdio/ts-target
- extends-composition-scaling
- extends-conflicts
- extends-controller-updates
- extends-direct-state
- extends-events
- extends-inheritance-scaling
- extends-mixed-decorators
- extends-via-host
- extends-watch
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
46 files changed
+5043
-3
lines changedLarge diffs are not rendered by default.
Lines changed: 119 additions & 0 deletions
| 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 | + | |
0 commit comments