Skip to content

test: add per-class unit tests for trigger framework#24395

Open
mshabarov wants to merge 2 commits into
mainfrom
add-more-trigger-tests
Open

test: add per-class unit tests for trigger framework#24395
mshabarov wants to merge 2 commits into
mainfrom
add-more-trigger-tests

Conversation

@mshabarov
Copy link
Copy Markdown
Contributor

Description

Direct unit tests for the small classes the existing TriggerTest only covered through full UI integration:

  • JsBuilderTest — reference()/captures() placeholder allocation and dedup, json() encoding of primitives and escape-prone strings.
  • LiteralInputTest — value encoding (incl. quote escaping) so a literal cannot break out of its surrounding JS expression.
  • PropertyInputTest — host vs non-host JS shape and property-name escaping in the bracket access.
  • HandlerInputTest — accepted in the owning trigger, rejected with IllegalArgumentException in any other.
  • SetPropertyActionTest — literal, Input-source, null literal, and escaped property name paths.
  • ClickTriggerTest — pins the modifier-key and clientX/Y factories that TriggerTest doesn't exercise.

Plus TriggerTest gains one test for idempotent remove().

Related-to #24361

mshabarov and others added 2 commits May 21, 2026 13:40
Direct unit tests for the small classes the existing TriggerTest only
covered through full UI integration:

- JsBuilderTest — reference()/captures() placeholder allocation and
  dedup, json() encoding of primitives and escape-prone strings.
- LiteralInputTest — value encoding (incl. quote escaping) so a
  literal cannot break out of its surrounding JS expression.
- PropertyInputTest — host vs non-host JS shape and property-name
  escaping in the bracket access.
- HandlerInputTest — accepted in the owning trigger, rejected with
  IllegalArgumentException in any other.
- SetPropertyActionTest — literal, Input-source, null literal, and
  escaped property name paths.
- ClickTriggerTest — pins the modifier-key and clientX/Y factories
  that TriggerTest doesn't exercise.

Plus TriggerTest gains one test for idempotent remove().

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@sonarqubecloud
Copy link
Copy Markdown

@github-actions
Copy link
Copy Markdown

Test Results

 1 419 files  + 6   1 419 suites  +6   1h 19m 12s ⏱️ -28s
10 001 tests +19   9 932 ✅ +19  69 💤 ±0  0 ❌ ±0 
10 476 runs  +19  10 405 ✅ +19  71 💤 ±0  0 ❌ ±0 

Results for commit 8757298. ± Comparison against base commit c1fe283.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant