mengw15 opened a new pull request, #6524: URL: https://github.com/apache/texera/pull/6524
### What changes were proposed in this PR? Extends the existing `UserQuotaComponent` spec (which only asserted `should create`) to cover the previously untested data-transform and chart-building methods (`frontend/src/app/dashboard/component/user/user-quota/user-quota.component.ts`, ~52% coverage). `plotly.js-basic-dist-min` is mocked at the module level so the chart methods can be asserted without a real render. 10 new tests cover: - `aggregateByMonth` — sums values sharing a `YYYY-MM` prefix. - `filterOutdatedData` — keeps entries within the last year, drops older ones. - `aggregateData` — returns the data unchanged below the 8-point threshold; delegates to monthly aggregation across ≥3 months; and day-groups otherwise, preserving the total in every branch. - `refreshData` — loads datasets and executions, sets the totals/counts, and groups executions by workflow. - `deleteCollection` — removes an execution and subtracts its bytes; drops a workflow once its last execution is gone. - `generatePieChart` / `generateLineChart` — pass the expected series/labels and sizing/axis layout to `Plotly.newPlot`. No production code was changed. ### Any related issues, documentation, discussions? Closes #6519 ### How was this PR tested? Extended unit tests, run locally in `frontend/` (all green; the failure path was verified by deliberately breaking a chart-config assertion to confirm the suite goes red): ``` ng test --watch=false --include src/app/dashboard/component/user/user-quota/user-quota.component.spec.ts # Test Files 1 passed (1) | Tests 11 passed (11) prettier --write <spec> # formatted eslint <spec> # clean ``` The quota service is stubbed and Plotly is mocked, so the suite makes no network calls and renders no real charts (see `frontend/TESTING.md`). ### 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]
