Skip to content

Commit fb25f5d

Browse files
committed
Update units and add e2e tests for contact form, several feature tickets to reproduce behavior from before refactor to web component
1 parent 6a56ce6 commit fb25f5d

43 files changed

Lines changed: 1722 additions & 1579 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

_TODO.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,25 @@
11
# TODO
22

3+
## Centralize toast notifications to Toast component
4+
5+
- Right now, the consent/preferences component has its own showNotification() method and toast handling. We have a centralized Toast component but is only being used for network availability right now. Maybe refactor to use a single Toast component, and move the network availability logic somewhere else like bootstrap.
6+
7+
- Add an error-path test to consent/preferences component to simulate a failing network call and ensure the error variant renders.
8+
9+
- Look at what other components might need toast handling and implement it.
10+
311
## src/pages/api next steps
412

513
1. build Supabase-aware fixtures to cover the GDPR endpoints (consent/request/export/verify) end-to-end
614
2. add integration-style tests that exercise the DSAR flow using a lightweight fake DB layer.
15+
3. Do the same for RESEND and the contact endpoint
16+
4. Where are we uploading files to? We need to implement the Uppy library in ContactForm, but currently nowhere to send the files to
17+
5. Need to add network failure testing modes to component unit tests where it's possible, but this is related to the above Toast issue.
18+
19+
Components that need full e2e testing implemented:
20+
21+
- CallToAction/Newsletter
22+
- ContactForm
723

824
## Unit tests failure groups
925

@@ -45,6 +61,11 @@ Shared Types vs Swagger / Keeping Docs in Sync
4561
- Maintain an OpenAPI YAML/JSON file as the source of truth, run Swagger Codegen (or openapi-typescript) to produce both server stubs and client SDKs.
4662
- Guarantees: developers edit the spec, run codegen (enforced via a pre-commit/CI task), and the generated server stubs remind you to implement every path/verb. Documentation pages (Swagger UI) are rendered straight from the same spec, so they inherently match the implementation.
4763

64+
Affected components:
65+
66+
- CallToAction/Newsletter
67+
- ContactForm
68+
4869
## Files with Skipped Tests
4970

5071
social-shares.spec.ts - 12 @wip

src/components/ContactForm/__tests__/email.spec.ts

Lines changed: 0 additions & 149 deletions
This file was deleted.

src/components/ContactForm/__tests__/message.spec.ts

Lines changed: 0 additions & 197 deletions
This file was deleted.

0 commit comments

Comments
 (0)