eugenegujing opened a new pull request, #8121:
URL: https://github.com/apache/texera/pull/8121
### What changes were proposed in this PR?
Remove unreachable code from the computing-unit selection component without
changing user-facing behavior:
- remove `getButtonText`; the template already renders the selected unit
name or `Connect` directly;
- remove `getCpuUnit` and `getMemoryUnit`; the live metrics template uses
`getCpuLimitUnit` and `getMemoryLimitUnit`;
- remove the test case and assertions that only preserved those unused
helpers; and
- remove `.button-content i.ant-dropdown-trigger`, which cannot match
because ng-zorro attaches `ant-dropdown-trigger` to the outer dropdown button,
not the inner icon.
Existing DOM tests continue to cover both trigger-button states. No
screenshots are included because the removed methods and selector were not part
of the rendered behavior, so there is no visible UI change.
### Any related issues, documentation, discussions?
Closes #8119
### How was this PR tested?
The targeted component suite passed before the refactor (109 tests) and
after it (108 tests). The removed test was the dedicated test for the unused
`getButtonText` helper; live DOM coverage remains unchanged.
```shell
NODE_OPTIONS="--localstorage-file=/private/tmp/texera-vitest-localstorage-root"
\
yarn test --include \
src/app/workspace/component/power-button/computing-unit-selection.component.spec.ts
yarn prettier --check \
src/app/workspace/component/power-button/computing-unit-selection.component.ts \
src/app/workspace/component/power-button/computing-unit-selection.component.spec.ts
\
src/app/workspace/component/power-button/computing-unit-selection.component.scss
yarn eslint \
src/app/workspace/component/power-button/computing-unit-selection.component.ts \
src/app/workspace/component/power-button/computing-unit-selection.component.spec.ts
git diff --check
```
Results:
- targeted component tests: 108/108 passed;
- Prettier check: passed;
- ESLint check: passed; and
- `git diff --check`: passed.
### Was this PR authored or co-authored using generative AI tooling?
Co-authored by: OpenAI Codex (GPT-5.6-Sol)
--
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]