The GitHub Actions job "Required Checks" on 
texera.git/gh-readonly-queue/main/pr-7917-7d5aea83b1d9360be8214fbd04923204e2fbac6f
 has failed.
Run started by GitHub user mengw15 (triggered by mengw15).

Head commit for run:
c22f6172d93326cbb4d13b30c4178805e98e7e1f / Meng Wang <[email protected]>
test(frontend): cover the property editor's Formly field-mapping rules (#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 88.71 % to
96.08 % (49 -> 17 uncovered lines) and branch coverage from 86.30 % to
95.55 %, measured
locally on top of #7916.

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 17 lines that remain are the two unreachable blocks above plus the
Quill /
collaborative-title region (`connectQuillToText`,
`disconnectQuillFromText`,
`registerQuillBinding`), which is 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`
-> 236 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)

Report URL: https://github.com/apache/texera/actions/runs/32904868005

With regards,
GitHub Actions via GitBox

Reply via email to