mengw15 opened a new pull request, #7917:
URL: https://github.com/apache/texera/pull/7917

   ### What changes were proposed in this PR?
   
   `setFormlyFormBinding`'s `jsonSchemaMapIntercept` was the largest uncovered 
block in
   `OperatorPropertyEditFrameComponent`. This PR extends
   `operator-property-edit-frame.component.spec.ts` with 21 cases covering that 
chain.
   No production code changes.
   
   - the dummy-field lockdowns (`dummyOperator`, `dummyProperty`/`dummyValue`) 
and the
     `dummyPropertyList` visibility rule for both the `Dummy` operator and 
everything else
   - the `fileName` -> `inputautocomplete` and `huggingFaceModel` -> 
`huggingface` type substitutions
   - the schema-driven `hideTarget`/`hideType`/`hideExpectedValue` hide 
expression
   - the workflow-version diff style overrides, including the 
`operator-version` marker the
     binding writes straight to the DOM
   - the `Aggregate` operator's `attribute` requirement rule (both arms) and 
its absence elsewhere
   - the preset-wrapper wiring, with `userPresetEnabled` on and off
   - the non-interactive `hooks.onInit` form disable and its interactive 
counterpart
   - the `toggleHidden` / `dependOn` schema dependencies and the 
boolean-property skip
   - four early-return guards in the `checkAttributeType` validator (no 
operator selected,
     undeclared property, no `autofillAttributeOnPort`, `const` without `$data`)
   
   Statement coverage of `operator-property-edit-frame.component.ts` goes from 
82.72 % to
   91.01 % (74 -> 38 uncovered lines), measured locally.
   
   Two blocks are left uncovered deliberately, because neither is reachable:
   
   - `mappedField.validators === undefined` in the map intercept: the formly 
json-schema
     mapper calls `addValidator(field, "type", ...)` unconditionally before it 
invokes the
     `map` hook, so `validators` is always set by the time the intercept runs.
   - `if (field.validators === undefined) { field.validators = {}; }` inside the
     `checkAttributeType` expression: the next statement dereferences
     `field.validators.checkAttributeType`, so entering that branch only leads 
to a TypeError.
   
   The remaining uncovered lines sit in the Quill / collaborative-title region, 
outside the
   scope of this issue.
   
   ### Any related issues, documentation, discussions?
   
   Closes #7909
   
   ### How was this PR tested?
   
   `ng test --watch=false --include 
src/app/workspace/component/property-editor/operator-property-edit-frame/operator-property-edit-frame.component.spec.ts`
   -> 217 passed, 1 skipped; run three times with identical results. The new 
assertions were
   each verified to fail (non-zero exit) when deliberately broken. `prettier 
--check` and
   `eslint` are clean on the touched file.
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (Opus 5)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to