Skip to content

E2E framework plus tests#3829

Draft
joe-ayoub-segment wants to merge 211 commits into
mainfrom
e2e-framework-plus-tests
Draft

E2E framework plus tests#3829
joe-ayoub-segment wants to merge 211 commits into
mainfrom
e2e-framework-plus-tests

Conversation

@joe-ayoub-segment

Copy link
Copy Markdown
Contributor

⚠️ Not intended to be merged into main

This is a staging/integration branch, not a merge candidate. It exists so that end-to-end (e2e) tests can be authored for in-flight PRs before the e2e framework itself lands on main. Treat it as a working surface for e2e test development, not a feature PR.

Do not merge this into main. The underlying feature work lives in its own individual PRs (linked below), which go through the normal review/merge process on their own.

What's in this branch

Branched from feat/e2e-test-types-and-fixtures (the e2e framework PR #3817), with the following feature branches merged in to provide the destination code the e2e tests need to exercise:

  • pinterest-new-events
  • customerio-msresponse
  • iterable-subscription-management
  • hubspot-oauth-upgrade
  • iterable-update-email
  • mixpanel-secret-deprecation
  • rokt-capi-bug
  • linkedin-new-identifiers
  • braze-ecommerce-addtocart
  • s3-shah256-support
  • fb-appendvalue
  • gec-journeys2-support
  • feat/braze-merge-users

One merge conflict was resolved (braze/index.ts — Track Calls preset subscribe filter, kept the superset that excludes Product Added/Product Removed, consistent with the dedicated presets those branches add).

e2e tests added

google-enhanced-conversions (first destination):

  • Added createE2EJourneysV2AudienceEvent helper + supporting types to the e2e framework (packages/core/src/e2e-helpers.ts, e2e-types.ts), exported from @segment/actions-core. This models the Journeys V2 event shape (computation_class: 'journey_step', journey_context / journey_metadata) introduced by gec-journeys2-support.
  • Added userList/e2e/journeysV2.e2e.ts fixtures (single add, single add with explicit mirror sync mode, batch add) — covering the Journeys V2 path that the existing Engage / JourneysV1 / RETL fixtures did not.

This fills the one e2e coverage gap for g-e-c: the prior fixtures covered Engage, JourneysV1, and RETL, but not the new Journeys V2 support.

Notes

  • Verified: core builds clean, cloud typechecks clean against the new helper/types, and the helper emits the exact journey_step event shape used by gec-journeys2-support's unit tests.
  • Only google-enhanced-conversions e2e tests are included in this branch; e2e tests for the other merged destinations are intentionally out of scope here.

Copilot AI review requested due to automatic review settings June 19, 2026 10:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 166 out of 167 changed files in this pull request and generated 3 comments.

Comment on lines +83 to +96
export async function send(request: RequestClient, settings: Settings, payload: Payload) {
const { formId, leadFormFields, visitorData, cookie } = payload

const json: MarketoJSON = {
input: [
{
leadFormFields: removeEmpty(leadFormFields),
visitorData: removeEmpty(visitorData) as MarketoJSON['input'][0]['visitorData'],
cookie
}
],
formId
}

Comment on lines +39 to +52
leadFormFields: {
label: 'Lead Form FieldS',
description:
'The full set of lead form fields. Used to determine the destination Marketo form, campaign, and any route-specific fields.',
type: 'object',
required: true
},
visitorData: {
label: 'Visitor Data',
description:
'The visitor data to send to Marketo. This is used to associate the lead with the correct visitor in Marketo.',
type: 'object',
required: true
},
@@ -0,0 +1,45 @@
// Type which desribes JSON to send to Marketo
joe-ayoub-segment and others added 3 commits June 19, 2026 12:38
The syncAudience action populated the MultiStatusResponse `sent` and
`body` fields with the wrong values. Corrected so that:
- `sent` carries the input payload (the JSON sent into the action)
- `body` carries the patch request sent to Pendo

Validation errors (missing segment ID / visitor ID) now report the
input payload as `sent` and omit `body`, since nothing was sent to
Pendo. Renamed the helper to `buildPendoRequest` and generalized it to
accept an array of visitor IDs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Adds the e2e destination config (createAudience/getAudience/teardown
against real Pendo) and syncAudience fixtures covering single add/remove
plus a batch with successful add + remove alongside a missing-visitorId
validation failure and an unresolvable-membership failure.

Visitor IDs use $guid markers so each run targets fresh visitors, which
avoids Pendo's inconsistent 200/202 success codes. Must be run with
--fixtureConcurrency 1 to avoid 409 conflicts from concurrent writes to
the same freshly-created segment.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 19, 2026 13:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

joe-ayoub-segment and others added 2 commits June 19, 2026 14:36
Removes the single-event fixtures and keeps a single batch fixture that
verifies real success: asserts 200 for a successful add and 202 for a
successful remove (Pendo's documented per-operation codes), alongside the
missing-visitorId and unresolvable-membership validation failures.

A freshly-created segment briefly returns 409 ("operation in progress"),
so the fixture uses retries to let it settle before the writes succeed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 19, 2026 13:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

Brings the s3 destination in this e2e integration branch up to date with
s3-shah256-support: adds the flag-off guard that throws when columns_to_hash
is configured but the actions-s3-hashing feature flag is off, plus the
send-level tests covering flag on/off.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

New required fields detected

Warning

Your PR adds new required fields to an existing destination. Adding new required settings/mappings for a destination already in production requires updating existing customer destination configuration. Ignore this warning if this PR is for a new destination with no active customers in production.

The following required fields were added in this PR:

  • Destination: Braze Cloud Mode (Actions), Action Field(s):cart_id
  • Destination: Braze Cloud Mode (Actions), Action Field(s):cart_id
  • Destination: Actions Customerio, Action Field(s):cart_id
  • Destination: Actions Customerio, Action Field(s):cart_id
  • Destination: Facebook Conversions API (Actions), Action Field(s):cart_id
  • Destination: Facebook Conversions API (Actions), Action Field(s):cart_id
  • Destination: Facebook Conversions API (Actions), Action Field(s):append_event_details
  • Destination: Facebook Conversions API (Actions), Action Field(s):append_event_details
  • Destination: Facebook Conversions API (Actions), Action Field(s):append_event_details
  • Destination: Facebook Conversions API (Actions), Action Field(s):append_event_details
  • Destination: Facebook Custom Audiences (Actions), Action Field(s):cart_id
  • Destination: Facebook Custom Audiences (Actions), Action Field(s):cart_id
  • Destination: Facebook Custom Audiences (Actions), Action Field(s):append_event_details
  • Destination: Facebook Custom Audiences (Actions), Action Field(s):append_event_details
  • Destination: Facebook Custom Audiences (Actions), Action Field(s):append_event_details
  • Destination: Facebook Custom Audiences (Actions), Action Field(s):append_event_details
  • Destination: Google Ads Conversions, Action Field(s):cart_id
  • Destination: Google Ads Conversions, Action Field(s):cart_id
  • Destination: Google Ads Conversions, Action Field(s):append_event_details
  • Destination: Google Ads Conversions, Action Field(s):append_event_details
  • Destination: Google Ads Conversions, Action Field(s):append_event_details
  • Destination: Google Ads Conversions, Action Field(s):append_event_details
  • Destination: HubSpot Cloud Mode (Actions), Action Field(s):cart_id
  • Destination: HubSpot Cloud Mode (Actions), Action Field(s):cart_id
  • Destination: HubSpot Cloud Mode (Actions), Action Field(s):append_event_details
  • Destination: HubSpot Cloud Mode (Actions), Action Field(s):append_event_details
  • Destination: HubSpot Cloud Mode (Actions), Action Field(s):append_event_details
  • Destination: HubSpot Cloud Mode (Actions), Action Field(s):append_event_details
  • Destination: Iterable (Actions), Action Field(s):traitsOrProperties,segmentAudienceKey,segmentAudienceId
  • Destination: Iterable (Actions), Action Field(s):cart_id
  • Destination: Iterable (Actions), Action Field(s):cart_id
  • Destination: Iterable (Actions), Action Field(s):append_event_details
  • Destination: Iterable (Actions), Action Field(s):append_event_details
  • Destination: Iterable (Actions), Action Field(s):append_event_details
  • Destination: Iterable (Actions), Action Field(s):append_event_details
  • Destination: LinkedIn Conversions API, Action Field(s):traitsOrProperties,segmentAudienceKey,segmentAudienceId
  • Destination: LinkedIn Conversions API, Action Field(s):cart_id
  • Destination: LinkedIn Conversions API, Action Field(s):cart_id
  • Destination: LinkedIn Conversions API, Action Field(s):append_event_details
  • Destination: LinkedIn Conversions API, Action Field(s):append_event_details
  • Destination: LinkedIn Conversions API, Action Field(s):append_event_details
  • Destination: LinkedIn Conversions API, Action Field(s):append_event_details
  • Destination: Mixpanel (Actions), Action Field(s):traitsOrProperties,segmentAudienceKey,segmentAudienceId
  • Destination: Mixpanel (Actions), Action Field(s):cart_id
  • Destination: Mixpanel (Actions), Action Field(s):cart_id
  • Destination: Mixpanel (Actions), Action Field(s):append_event_details
  • Destination: Mixpanel (Actions), Action Field(s):append_event_details
  • Destination: Mixpanel (Actions), Action Field(s):append_event_details
  • Destination: Mixpanel (Actions), Action Field(s):append_event_details
  • Destination: Pendo Audiences, Action Field(s):cart_id
  • Destination: Pendo Audiences, Action Field(s):cart_id
  • Destination: Pendo Audiences, Action Field(s):append_event_details
  • Destination: Pendo Audiences, Action Field(s):append_event_details
  • Destination: Pendo Audiences, Action Field(s):append_event_details
  • Destination: Pendo Audiences, Action Field(s):append_event_details
  • Destination: Pinterest Conversions API, Action Field(s):cart_id
  • Destination: Pinterest Conversions API, Action Field(s):cart_id
  • Destination: Pinterest Conversions API, Action Field(s):append_event_details
  • Destination: Pinterest Conversions API, Action Field(s):append_event_details
  • Destination: Pinterest Conversions API, Action Field(s):append_event_details
  • Destination: Pinterest Conversions API, Action Field(s):append_event_details
  • Destination: Rokt Conversions API, Action Field(s):cart_id
  • Destination: Rokt Conversions API, Action Field(s):cart_id
  • Destination: Rokt Conversions API, Action Field(s):append_event_details
  • Destination: Rokt Conversions API, Action Field(s):append_event_details
  • Destination: Rokt Conversions API, Action Field(s):append_event_details
  • Destination: Rokt Conversions API, Action Field(s):append_event_details
  • Destination: AWS S3 (Actions), Action Field(s):cart_id
  • Destination: AWS S3 (Actions), Action Field(s):cart_id
  • Destination: AWS S3 (Actions), Action Field(s):append_event_details
  • Destination: AWS S3 (Actions), Action Field(s):append_event_details
  • Destination: AWS S3 (Actions), Action Field(s):append_event_details
  • Destination: AWS S3 (Actions), Action Field(s):append_event_details

Add these new fields as optional instead and assume default values in perform or performBatch block.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

joe-ayoub-segment and others added 2 commits July 2, 2026 18:19
Adds __e2e__ config for the s3 destination and four fixture files for the
syncToS3 action:
- hashing: flag ON single/batch SHA256, flag ON no-hash, flag OFF throws
- batching: single (onEvent) vs batch (onBatch) paths
- fields: column/delimiter/extension combinations
- audiences: Engage/RETL/Journeys V2 audience events

Verified against a real S3 bucket via action-destinations-e2e: 17/17 pass,
SHA256 hashing confirmed by matching file contents to computed hashes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…beled filenames

- Add formats.e2e.ts covering all 5 delimiters + both extensions, with a value
  that embeds every delimiter to verify quoting keeps it one field.
- Simplify audiences.e2e.ts to Engage events only (drop RETL/Journeys V2 helpers);
  source type is invisible to S3, so add/remove + single/batch is the real coverage.
- Trim fields.e2e.ts to column-combination cases (delimiter/extension moved to formats).
- Set a descriptive filename_prefix per fixture so each output file names what it
  tests (e.g. hash-single, delim-pipe, nonbatch-single); also avoids same-key
  overwrites within a run.

Verified: 20/20 pass against a real S3 bucket; SHA256 and delimiter quoting
confirmed by inspecting downloaded files.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 2, 2026 18:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

Whitespace-only values now correctly fail the required checks, and
leading/trailing spaces are stripped before matching against valid
column names. Addresses Copilot review comment on PR #3802.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants