E2E framework plus tests#3829
Draft
joe-ayoub-segment wants to merge 211 commits into
Draft
Conversation
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 | |||
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>
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>
2 tasks
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>
Contributor
New required fields detectedWarning 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:
Add these new fields as optional instead and assume default values in |
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>
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
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):
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