aglinxinyuan opened a new pull request, #7424:
URL: https://github.com/apache/texera/pull/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)
   


-- 
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