The GitHub Actions job "Required Checks" on texera.git/main has failed.
Run started by GitHub user github-merge-queue[bot] (triggered by 
github-merge-queue[bot]).

Head commit for run:
36b36872173c923d0024663e0e55be44353c900c / Prateek Ganigi 
<[email protected]>
test(frontend): add unit test coverage for calculateTotalTranslate3d (#6403)

### What changes were proposed in this PR?
Adds unit test coverage for the calculateTotalTranslate3d function in
[frontend/src/app/common/util/panel-dock.ts](vscode-webview://1epki5h79lmkghv36u4evg54fuvmk17ndjca203mcg7opnnd5sg9/frontend/src/app/common/util/panel-dock.ts),
which was previously untested. This is a pure function that parses one
or more CSS translate3d(...) fragments from a string and returns the
component-wise sum of their x/y/z offsets.

A new spec file, frontend/src/app/common/util/panel-dock.spec.ts, was
created following the testing style of size-formatter.util.spec.ts. It
covers:
- Parsing a single translate3d(...) fragment
- Summing multiple concatenated fragments component-wise
- Decimal pixel values
- Negative pixel values
- Returning [0, 0, 0] when no translate3d(...) pattern is present
- A fragment missing px units, which does not match the parser and
contributes [0, 0, 0]

### Any related issues, documentation, discussions?
Closes #6255

### How was this PR tested?
Added 6 unit tests in the new spec file, all passing via ng test:
cd frontend && npx ng test --watch=false
--include='**/panel-dock.spec.ts'
src/app/common/util/panel-dock.spec.ts (6 tests) 3ms
 Test Files - 1, passed (1)
      Tests - 6, passed (6)

### Was this PR authored or co-authored using generative AI tooling?
Co-authored with Claude Opus 4.8 in compliance with ASF

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

With regards,
GitHub Actions via GitBox

Reply via email to