mengw15 opened a new pull request, #7682:
URL: https://github.com/apache/texera/pull/7682
### What changes were proposed in this PR?
Extends the `DatasetDetailComponent` spec with the upload failure handling
and the
template controls that were still unexecuted. No production code was changed.
**Upload failures** (+5) — driven by erroring the spec's existing upload
subject,
so no real time passes:
- a `409` produces the specific "Upload blocked (409)" notification, any
other
status the generic `"Upload failed. Please retry."`;
- the task is marked `failed` and **keeps its progress** (a partially
uploaded
file stays at 42%, rather than being left at 100);
- the concurrency slot is freed, so a queued fourth upload starts;
- the `taskIndex === -1` arm still reports the failure.
**Template** (+7) — contributor rows and their actions trigger, edit and
delete,
the toolbar's download and scale controls, and the sider resize.
Three notes on how the DOM actually behaves here, recorded in comments:
- The toolbar's download/scale buttons sit behind `*ngIf="selectedVersion"`,
so
the tests seed a version; the scale icon is `expand`/`compress`.
- A contributor's Edit/Delete items live in an `nz-dropdown-menu`, which only
mounts into a CDK overlay on a real user open — jsdom does not drive that.
Those two tests assert the handlers the menu items bind to, while a
separate
test asserts the rendered rows and one dropdown trigger per contributor.
- `onSideResize` defers to `requestAnimationFrame`; the test awaits a real
frame
and asserts `siderWidth`, and a second test spies `cancelAnimationFrame` to
check the previous frame is dropped. No fake timers are introduced, and no
pixel width is asserted (zero under jsdom).
### Any related issues, documentation, discussions?
Closes #7679
### How was this PR tested?
Extended unit tests, run locally in `frontend/` (all green; the failure path
was
verified by breaking an assertion to confirm the suite goes red):
```
ng test --watch=false --include
src/app/dashboard/component/user/user-dataset/user-dataset-explorer/dataset-detail.component.spec.ts
# Test Files 1 passed (1) | Tests 141 passed (141)
prettier --write <spec> # clean
eslint <spec> # clean
```
### Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Opus 4.8 [1M context])
--
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]