Skip to content

test(amplify_event_enrichment): add unit tests#7068

Open
ekjotmultani wants to merge 3 commits into
feat/event-enrichment-clientfrom
feat/event-enrichment-client-tests
Open

test(amplify_event_enrichment): add unit tests#7068
ekjotmultani wants to merge 3 commits into
feat/event-enrichment-clientfrom
feat/event-enrichment-client-tests

Conversation

@ekjotmultani

Copy link
Copy Markdown
Member

Summary

Splits the unit tests for the Event Enrichment packages into their own PR so the core implementation and the tests review independently.

Stacked on #7029. This targets the feat/event-enrichment-client branch (the package PR), so the diff shows only the test files. Once #7029 merges, this will be rebased onto main.

What's here

  • amplify_event_enrichment_dart/test/: enriched event serialization, client, global fields manager, session manager
  • amplify_event_enrichment/test/: Flutter lifecycle observer

Verification

  • amplify_event_enrichment_dart: 41 tests pass (dart test)
  • amplify_event_enrichment (Flutter wrapper): 6 tests pass (flutter test)
  • Analyzer clean (0 errors, 0 warnings)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@codecov-commenter

codecov-commenter commented Jun 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 43.15%. Comparing base (4485a46) to head (3f201c3).

Additional details and impacted files
@@                       Coverage Diff                        @@
##           feat/event-enrichment-client    #7068      +/-   ##
================================================================
- Coverage                         43.23%   43.15%   -0.08%     
================================================================
  Files                                99      102       +3     
  Lines                              7769     7818      +49     
  Branches                           3401     3423      +22     
================================================================
+ Hits                               3359     3374      +15     
- Misses                             4410     4444      +34     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ekjotmultani ekjotmultani force-pushed the feat/event-enrichment-client branch from 4954624 to b05a0ad Compare June 30, 2026 16:42
@ekjotmultani ekjotmultani force-pushed the feat/event-enrichment-client-tests branch from 328e67e to 4f87f1f Compare June 30, 2026 16:42
@ekjotmultani ekjotmultani force-pushed the feat/event-enrichment-client-tests branch from 4f87f1f to 37a24b8 Compare July 6, 2026 15:46
Records an event, stops the session, then records again and asserts the second event gets a new session id with no stop_timestamp, proving a stopped session is not reused.
@ekjotmultani ekjotmultani force-pushed the feat/event-enrichment-client-tests branch from 37a24b8 to d81689e Compare July 6, 2026 18:45
Apply prefer_const, prefer_int_literals, and cascade_invocations fixes plus formatting so the per-package CI passes analyze (--fatal-infos --fatal-warnings) and the format check on both enrichment packages.
@ekjotmultani ekjotmultani marked this pull request as ready for review July 6, 2026 20:07
@ekjotmultani ekjotmultani requested a review from a team as a code owner July 6, 2026 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants