mengw15 opened a new pull request, #7657:
URL: https://github.com/apache/texera/pull/7657
### What changes were proposed in this PR?
Renders the state-gated blocks that four component specs never reached,
taking
each template to full line coverage (8 new tests):
| Template | Before | After |
| --- | --- | --- |
| `markdown-description.component.html` | 44/49 | **49/49** |
| `agent-registration.component.html` | 43/48 | **48/48** |
| `registration-request-modal.component.html` | 15/19 | **19/19** |
| `port-property-edit-frame.component.html` | 15/21 | **21/21** |
- **MarkdownDescription** — enters edit mode through the Edit button so the
toolbar and textarea render; asserts a toolbar click wraps the inserted
markup
into the draft, the textarea's `ngModelChange` re-renders the preview, and
the
Cancel / Save actions are wired.
- **AgentRegistration** — renders the loading branch (spinner + caption)
with a
never-emitting model source, then the loaded picker: one card per model
type,
and clicking one selects it and marks it `.selected`.
- **RegistrationRequestModal** — `modalTitle` is an `<ng-template>` handed to
nz-modal, so nothing renders it during a plain component render; the test
instantiates it explicitly and asserts the label and the logo's
`src`/`alt`.
- **PortPropertyEditFrame** — drives the port through the public
`ngOnChanges`
hook so the form is built, then asserts the `{{ formTitle }}` heading and
the
`[formGroup]` block render and that the form's `(modelChange)` reaches the
component. Its spec now imports
`FormlyModule.forRoot(TEXERA_FORMLY_CONFIG)` +
`FormlyNgZorroAntdModule` (mirroring the operator-property-edit-frame
spec) so
`formly-form` can instantiate its field types.
Two paths in the issue had drifted and were located by component name:
`markdown-description` lives under `dashboard/component/user/`, and
`agent-registration` under `workspace/component/agent/agent-panel/`.
No production code was changed.
### Any related issues, documentation, discussions?
Closes #7654.
### How was this PR tested?
`ng test --watch=false` over the four specs — 74 passed (66 existing + 8
new); the per-template line coverage above is from the local lcov report.
`eslint` and `prettier --check` clean. Failure path verified by breaking one
new assertion in each of the four files: 4 failed / 70 passed, non-zero exit,
then restored to green.
### 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]