You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@texera.apache.org by "mengw15 (via GitHub)" <gi...@apache.org> on 2026/08/25 06:40:31 UTC
[PR] test(frontend): cover the admin settings uploads and save guards [texera]
mengw15 opened a new pull request, #7961:
URL: https://github.com/apache/texera/pull/7961
### What changes were proposed in this PR?
Extends `admin-settings.component.spec.ts` with 9 tests covering the last
uncovered lines and half-taken branches. Measured locally with
`--coverage --coverage-reporters=lcovonly`:
| `admin-settings.component.ts` | Before | After |
| --- | --- | --- |
| lines | 104/112 (92.86 %) | **112/112 (100 %)** |
| branches | 46/54 | **54/54** |
Every line and branch the issue lists is now covered.
- **`onFileChange`** — the spec already had a `FileReader` double for one arm; it
is lifted into a helper so the logo arm, the favicon arm and the type guard
share it. A result that is not a string (an `ArrayBuffer`) takes the other side
of `typeof e.target?.result === "string" ? … : null` and clears the field.
- **`saveLogos`** — the favicon leg, asserting all three PUTs are issued and that
the favicon request carries the right body (the existing test covers the case
where it is absent).
- **`partsAtMax` / `requiredMinPartSizeMiB`** — each missing-value combination, so
both early returns are taken, plus one case above the floor where the
10,000-part limit decides the result.
- **`saveDatasetSettings` / `saveCsvSettings`** — the `settingsLoaded` guard: the
`ngOnInit` bulk GET is deliberately left outstanding so the flag is still false,
then the test asserts the error message and that no PUT is issued.
- **`resetCsvSettings`** — the error handler, by failing the reset request.
Two places where the issue's description and the code disagree; the tests follow
the code and the difference is worth flagging for the next reader:
1. The issue says `onFileChange` stores into `logoData` for `"logo"` or
`faviconData` for `"mini_logo"`. The component actually routes `mini_logo` to
`miniLogoData` and the remaining type (`favicon`) to `faviconData` via the
`else`, which is what lines 149 and 153 are.
2. The issue attributes lines 227/232 to `resetTabs`. Those lines are the
`partsAtMax` and `requiredMinPartSizeMiB` getters that sit just below it, so
the tests target the getters.
No production code was changed.
### Any related issues, documentation, discussions?
Closes #7913.
### How was this PR tested?
`ng test --watch=false --include src/app/dashboard/component/admin/settings/admin-settings.component.spec.ts`
— 45 passed (36 before, 9 new), repeated 3× for stability; the whole
`dashboard/component/admin/**` folder stays green at 156 passed. `yarn format:ci`
clean. Failure path verified by breaking one assertion in each of the 9 new
tests: 9 failed / 36 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: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] test(frontend): cover the admin settings uploads and save guards [texera]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #7961:
URL: https://github.com/apache/texera/pull/7961#issuecomment-5406638020
## [Codecov](https://app.codecov.io/gh/apache/texera/pull/7961?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 92.83%. Comparing base ([`3198595`](https://app.codecov.io/gh/apache/texera/commit/319859571e30d123a50081a918815d9b65b4300f?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`e7b2f48`](https://app.codecov.io/gh/apache/texera/commit/e7b2f480a8389ad51e9a7ba3f019018898dee276?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## main #7961 +/- ##
============================================
+ Coverage 92.79% 92.83% +0.03%
Complexity 4616 4616
============================================
Files 1174 1174
Lines 47453 47453
Branches 5304 5304
============================================
+ Hits 44034 44051 +17
+ Misses 1899 1891 -8
+ Partials 1520 1511 -9
```
| [Flag](https://app.codecov.io/gh/apache/texera/pull/7961/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | | *Carryforward flag |
|---|---|---|---|
| [access-control-service](https://app.codecov.io/gh/apache/texera/pull/7961/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `81.00% <ø> (ø)` | | Carriedforward from [3198595](https://app.codecov.io/gh/apache/texera/commit/319859571e30d123a50081a918815d9b65b4300f?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [agent-service](https://app.codecov.io/gh/apache/texera/pull/7961/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `98.62% <ø> (ø)` | | Carriedforward from [3198595](https://app.codecov.io/gh/apache/texera/commit/319859571e30d123a50081a918815d9b65b4300f?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [amber](https://app.codecov.io/gh/apache/texera/pull/7961/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `89.12% <ø> (ø)` | | Carriedforward from [3198595](https://app.codecov.io/gh/apache/texera/commit/319859571e30d123a50081a918815d9b65b4300f?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [computing-unit-managing-service](https://app.codecov.io/gh/apache/texera/pull/7961/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `73.67% <ø> (ø)` | | Carriedforward from [3198595](https://app.codecov.io/gh/apache/texera/commit/319859571e30d123a50081a918815d9b65b4300f?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [config-service](https://app.codecov.io/gh/apache/texera/pull/7961/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `86.73% <ø> (ø)` | | Carriedforward from [3198595](https://app.codecov.io/gh/apache/texera/commit/319859571e30d123a50081a918815d9b65b4300f?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [file-service](https://app.codecov.io/gh/apache/texera/pull/7961/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `84.48% <ø> (ø)` | | Carriedforward from [3198595](https://app.codecov.io/gh/apache/texera/commit/319859571e30d123a50081a918815d9b65b4300f?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [frontend](https://app.codecov.io/gh/apache/texera/pull/7961/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `95.11% <ø> (+0.08%)` | :arrow_up: | |
| [notebook-migration-service](https://app.codecov.io/gh/apache/texera/pull/7961/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `79.13% <ø> (ø)` | | Carriedforward from [3198595](https://app.codecov.io/gh/apache/texera/commit/319859571e30d123a50081a918815d9b65b4300f?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [pyamber](https://app.codecov.io/gh/apache/texera/pull/7961/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `97.57% <ø> (ø)` | | Carriedforward from [3198595](https://app.codecov.io/gh/apache/texera/commit/319859571e30d123a50081a918815d9b65b4300f?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [workflow-compiling-service](https://app.codecov.io/gh/apache/texera/pull/7961/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `77.19% <ø> (ø)` | | Carriedforward from [3198595](https://app.codecov.io/gh/apache/texera/commit/319859571e30d123a50081a918815d9b65b4300f?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
*This pull request uses carry forward flags. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to find out more.
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/texera/pull/7961?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
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: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] test(frontend): cover the admin settings uploads and save guards [texera]
Posted by "mengw15 (via GitHub)" <gi...@apache.org>.
mengw15 merged PR #7961:
URL: https://github.com/apache/texera/pull/7961
--
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: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] test(frontend): cover the admin settings uploads and save guards [texera]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #7961:
URL: https://github.com/apache/texera/pull/7961#issuecomment-5406546313
<!-- texera-reviewer-suggestion -->
### Automated Reviewer Suggestions
Based on the `git blame` history of the changed files, we recommend the following reviewers:
- **Contributors with relevant context:** `@aglinxinyuan`
You can notify them by mentioning `@aglinxinyuan` in a comment.
--
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: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org