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

Head commit for run:
f3f3fbe131891226c9b55261d991df41ed35054d / Xinyuan Lin <[email protected]>
test(frontend): add unit tests for AdminGmailComponent (#6576)

### What changes were proposed in this PR?

Adds a Vitest unit spec for `AdminGmailComponent`, which previously had
no test coverage. The 10 tests cover:
- reactive-form construction and every validator branch (empty,
malformed email, missing subject, missing content -> invalid; all filled
with a well-formed email -> valid).
- `getSenderEmail` success (sets `email`) and error (resets to undefined
+ logs) paths.
- `sendTestEmail` forwarding the form's subject/content/email to
`GmailService.sendEmail` in order.

`FormBuilder` stays real via `ReactiveFormsModule`; `GmailService` is
mocked with a controllable subject for both branches.

### Any related issues, documentation, discussions?

Closes #6573.

### How was this PR tested?

`npx ng test --watch=false --include='**/admin-gmail.component.spec.ts'`
-> 10/10 passing. `yarn format:ci` passes.

### Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Opus 4.8 [1M context])

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

With regards,
GitHub Actions via GitBox

Reply via email to