mengw15 opened a new pull request, #6527:
URL: https://github.com/apache/texera/pull/6527

   ### What changes were proposed in this PR?
   
   Extends the existing `AdminSettingsComponent` spec (previously only `should
   create` + a template check, ~35% coverage) to cover the untested save/reset
   handlers. `AdminSettingsService`, `NzMessageService`, and 
`NotificationService`
   are stubbed; fake timers keep the handlers' `window.location.reload()` from
   firing under jsdom.
   
   15 added tests cover:
   
   - `saveLogos` — persists only the branding assets that are set + success 
message; no-op when none set; error message on failure.
   - `resetBranding` — resets `logo` / `mini_logo` / `favicon`.
   - `saveTabs` / `resetTabs` — persist / reset every sidebar tab.
   - `saveDatasetSettings` — persists the four upload settings + success; 
rejects non-positive values; rejects a config that would exceed the 10,000-part 
limit (no save in either).
   - `resetDatasetSettings` — resets all four upload settings.
   - `saveCsvSettings` — persists the max-columns value + success; error on 
failure.
   - `resetCsvSettings` — resets the max-columns setting.
   - `onFileChange` — rejects a non-image file with an error; reads a valid 
image into the matching branding field.
   
   No production code was changed.
   
   ### Any related issues, documentation, discussions?
   
   Closes #6517
   
   ### How was this PR tested?
   
   Extended unit tests, run locally in `frontend/` (all green; the failure path 
was
   verified by deliberately breaking an assertion to confirm the suite goes 
red):
   
   ```
   ng test --watch=false --include 
src/app/dashboard/component/admin/settings/admin-settings.component.spec.ts
   # Test Files 1 passed (1) | Tests 17 passed (17)
   prettier --write <spec>   # unchanged
   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]

Reply via email to