stack/apps/e2e/tests/js
BilalG1 69fb5151f0
fix tests (#922)
<!--

Make sure you've read the CONTRIBUTING.md guidelines:
https://github.com/stack-auth/stack-auth/blob/dev/CONTRIBUTING.md

-->

<!-- RECURSEML_SUMMARY:START -->
## High-level PR Summary
This PR fixes test issues by making two primary changes: 1) In the API
keys test, replacing `Date {}` with actual date strings in test
snapshots to make them deterministic, and 2) Adding "react-dom" to the
node modules list in the email rendering component. These changes likely
address test failures that were occurring due to non-deterministic date
serialization in snapshots and a missing dependency.

⏱️ Estimated Review Time: 5-15 minutes

<details>
<summary>💡 Review Order Suggestion</summary>

| Order | File Path |
|-------|-----------|
| 1 | `apps/e2e/tests/js/api-keys.test.ts` |
| 2 | `apps/backend/src/lib/email-rendering.tsx` |
</details>



[![Need help? Join our
Discord](https://img.shields.io/badge/Need%20help%3F%20Join%20our%20Discord-5865F2?style=plastic&logo=discord&logoColor=white)](https://discord.gg/n3SsVDAW6U)

<!-- RECURSEML_SUMMARY:END -->
<!-- ELLIPSIS_HIDDEN -->

----

> [!IMPORTANT]
> Fixes inline snapshot for `expiresAt` in `api-keys.test.ts` and adds
`react-dom` to dependencies in `email-rendering.tsx`.
> 
>   - **Tests**:
> - Fixes inline snapshot for `expiresAt` in `api-keys.test.ts` by using
a constant `expiresAt` variable.
> - Updates `expiresAt` field in three inline snapshots to use
`expiresAt.toISOString()`.
>   - **Dependencies**:
> - Adds `react-dom` version "19.1.1" to `nodeModules` in
`email-rendering.tsx`.
> 
> <sup>This description was created by </sup>[<img alt="Ellipsis"
src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=stack-auth%2Fstack-auth&utm_source=github&utm_medium=referral)<sup>
for 290a6a2cf9. You can
[customize](https://app.ellipsis.dev/stack-auth/settings/summaries) this
summary. It will automatically update as commits are pushed.</sup>

<!-- ELLIPSIS_HIDDEN -->

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Bug Fixes**
* Improved reliability of email template rendering, ensuring content
that relies on DOM behavior renders correctly during Freestyle
executions.

* **Tests**
* Unified expiration timestamps in API key tests for consistency and
updated related snapshots.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-10-03 11:10:35 -07:00
..
api-keys.test.ts fix tests (#922) 2025-10-03 11:10:35 -07:00
app.test.ts Add basic client lib tests (#601) 2025-04-03 20:05:44 +02:00
config.test.ts Config override CRUD (#803) 2025-08-01 18:28:27 +02:00
convex.test.ts Convex implementation (#913) 2025-09-24 19:16:45 +00:00
data-vault.test.ts Data vaults (#871) 2025-08-30 23:42:56 -07:00
email.test.ts Email Drafts (#849) 2025-09-10 22:57:18 +00:00
js-helpers.ts oauth sign in scope and test (#887) 2025-09-09 19:21:28 -07:00
oauth-providers.test.ts OAuth provider client and dashboard (#792) 2025-09-10 10:48:19 +02:00
oauth.test.ts oauth sign in scope and test (#887) 2025-09-09 19:21:28 -07:00
payments.test.ts payments schema changes, ledger algo, stackable items (#862) 2025-08-27 20:13:22 +00:00