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

   ### What changes were proposed in this PR?
   
   Takes the untaken branch on each conditional in four small files (15 new 
tests):
   
   | File | Before | After |
   | --- | --- | --- |
   | `user-dataset-staged-objects-list.component.ts` | 31/32 lines, 17/22 
branches | **32/32, 22/22** |
   | `shared-model.ts` | 26/28 lines, 6/10 branches | **28/28, 10/10** |
   | `ui-udf-parameters.component.ts` | 47/49 lines, 29/36 branches | **49/49, 
36/36** |
   | `landing-page.component.ts` | 45/45 lines, 16/21 branches | **45/45, 
20/21** |
   
   - **UserDatasetStagedObjectsList** — a missing `userMakeChangesEvent`, 
reverting
     with no dataset id, the delete-failure notification, and the three
     `getFileUploadTime` guards (no map, a path whose last segment is empty so 
the
     `|| filePath` fallback runs, and a filename absent from the map).
   - **SharedModel** — this file had no spec of its own, so this adds one: the 
room
     suffix with and without a workflow id, the local `CoeditorState` published 
for
     a signed-in user versus an anonymous one, `updateAwareness` in both modes,
     `transact`, and each combination of `shouldConnect`/`wsconnected` in 
`destroy`.
     The spec substitutes a `WebsocketProvider` double — the real one opens a 
socket
     and schedules reconnects, which would put the network and a leaked timer 
inside
     the test.
   - **UiUdfParameters** — a parse error alongside the already-covered edit 
error and
     an unrelated error that must be rethrown, a `fieldArray` supplied as a 
factory
     function, a generated row that declares none of the expected columns (both
     `if (!field) return` guards), a repeat populate that re-applies the 
disabled
     state instead of re-wrapping the hook, and `trackByParameterName`'s `?? 
index`.
   - **LandingPage** — a hub response without the requested action buckets plus 
an
     enrichment that yields nothing, so all four `|| []` fallbacks run, and a
     construction with no signed-in user.
   
   `landing-page.component.ts` ends at 20/21: the remaining entry is a synthetic
   branch the compiler/instrumenter attributes to the class-declaration line. 
The
   behaviour behind it is covered — the new test drives the no-user path and 
asserts
   `currentUid` stays undefined — but neither stubbing `getCurrentUser` nor 
clearing
   the stub's user moves that counter.
   
   No production code was changed.
   
   ### Any related issues, documentation, discussions?
   
   Closes #7684.
   
   ### How was this PR tested?
   
   `ng test --watch=false` over the four specs — 47 passed; the per-file 
line/branch numbers above come 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 / 43 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]

Reply via email to