The GitHub Actions job "Required Checks" on 
texera.git/gh-readonly-queue/main/pr-7424-1e899aa4949c5307a8f016681cc2892b44d438c7
 has failed.
Run started by GitHub user aglinxinyuan (triggered by aglinxinyuan).

Head commit for run:
f9deb66dcccfb3b5994be659350021c2e0aa8e06 / Xinyuan Lin <[email protected]>
test(frontend): render the workflow list item's editing gates and row actions 
(#7424)

### What changes were proposed in this PR?

The existing suite calls the component's methods directly, so the
template's own decisions were never rendered: which control a click
reaches, what value an edit forwards, and which actions a row offers.

Adds 13 tests. The ones that carry real weight:

- **Renaming forwards the text that was typed.** The input is seeded
with the current name, so binding `workflow.name` instead would look
right on screen while silently discarding every rename.
- **The inline description gate is `editingDescription = editable`.**
Without it a shared read-only row opens an editor whose save the backend
then rejects.
- **The shared-access tooltip composes `accessLevel` then `ownerName`,**
and is shown only to a non-owner.
- **The per-tag remove passes the `ngFor` loop variable,** not the
component's `pid`.
- **Duplicate and delete stay on their own outputs,** and delete is
disabled for a non-owner.
- **The executions action appears only when execution tracking is
configured on.**

**Verified by mutation**, all reverted (template diff empty):

| Mutation | Result |
|---|---|
| rename forwards the old name instead of the typed one | red |
| drop the read-only gate on inline description editing | red |
| swap the two interpolations in the shared-access tooltip | red |
| show the shared-access marker to the owner too | red |
| pass the component's `pid` to the per-tag remove | red |
| stop disabling delete for a non-owner | red |
| always show the executions action | red |
| make duplicate emit `deleted` | red |
| invert the avatar indent | red |
| invert the light/dark tag arms | red |
| invert the tag text colour | red |

The light/dark test **survived its first mutation**: inverting both arms
merely swaps which tag gets which class, so an assertion that "both
classes appear somewhere" cannot see it. It now checks each tag
individually, and both that mutation and the text-colour one fail.

Three things worth recording, all commented in the spec:

- ng-zorro consumes the `nz-tooltip` attribute, and an interpolated
title is a property binding that never reaches the DOM at all. Elements
are located through `NzTooltipDirective` and its `directiveTitle`; an
attribute selector finds nothing.
- `StubWorkflowPersistService` does not declare `updateWorkflowName`, so
it cannot be spied on — the suite supplies its own persist stub.
- The project colours are supplied locally. The shared
`testUserProjects` fixture stores colours that already carry a `'#'`
while the template prepends one, so every tag fails the format check and
takes the dark arm, leaving the light arm unreachable.

No production file is touched.

### Any related issues, documentation, discussions?

Closes #7421

### How was this PR tested?

```
npx ng test --watch=false 
--include="**/user-workflow-list-item.component.spec.ts"
```

```
 Test Files  1 passed (1)
      Tests  28 passed (28)
```

13 new on top of the existing 15. `yarn format:ci` passes.

### Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Opus 5)

---------

Signed-off-by: Xinyuan Lin <[email protected]>
Co-authored-by: Copilot Autofix powered by AI 
<[email protected]>

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

With regards,
GitHub Actions via GitBox

Reply via email to