Description
Add integration tests using Testcontainers that verify the trusted server
operates correctly against real frontend applications.
WordPress frontend
- Spin up a WordPress container with a minimal theme
- Configure the trusted server to proxy/inject into the WordPress site
- Verify:
- HTML response contains injected
<script> tags
/static/tsjs= endpoint serves concatenated JS bundles
- Integration-specific attributes are rewritten in ad markup
- GDPR consent signals propagate correctly
Next.js frontend
- Spin up a Next.js container with a minimal app
- Configure the trusted server to proxy/inject into the Next.js site
- Verify:
- Server-side rendered pages receive script injection
- Client-side navigation does not break after injection
- Deferred script tags load correctly on route transitions
/static/tsjs= endpoint serves valid JS
Shared concerns
- Tests should be runnable locally and in CI
- Each test suite should start, exercise, and tear down containers
automatically
- Use Testcontainers lifecycle management for setup and teardown
- Document any required Docker images or build steps in the test README
Done when
Running CI pipeline
Affected area
CI / Tooling
Additional context
No response
Description
Add integration tests using Testcontainers that verify the trusted server
operates correctly against real frontend applications.
WordPress frontend
<script>tags/static/tsjs=endpoint serves concatenated JS bundlesNext.js frontend
/static/tsjs=endpoint serves valid JSShared concerns
automatically
Done when
Running CI pipeline
Affected area
CI / Tooling
Additional context
No response