Skip to content

✅ [RUM-17233] Add Shopify checkout views and actions e2e test - #4941

Open
lierniel wants to merge 4 commits into
mainfrom
stephan.koshcheev/RUM-17233/shopify-checkout-e2e-tests
Open

✅ [RUM-17233] Add Shopify checkout views and actions e2e test#4941
lierniel wants to merge 4 commits into
mainfrom
stephan.koshcheev/RUM-17233/shopify-checkout-e2e-tests

Conversation

@lierniel

@lierniel lierniel commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Motivation

RUM-17233: cover the Shopify integration with e2e tests. The dedicated browser-rum-shopify bundle (#4878) explicitly scoped e2e tests out; this closes that gap by exercising the full checkout flow against a real Shopify dev store.

Changes

  • Added e2e test framework support for Shopify: buildShopifyUrl/unlockShopifyStorePassword (dev store password gate), withShopifyApp()/shopifySetup (intercepts the CDN bundle request and injects RUM configuration into both the storefront's Theme Liquid snippet and the checkout's Custom Pixel sandbox), and a getShopifyStorePassword() secret accessor.
  • Added shopify.scenario.ts, covering the full flow: storefront → product page → add to cart → checkout → thank-you page → back to storefront. Asserts:
    • A single session id shared across the Theme Liquid and Custom Pixel SDK instances
    • 5 ordered view events with the correct URLs (checkout/thank-you matched via the same path regex used in browser-rum-shopify)
    • Ordered click actions with the correct target and page for each
    • No unexpected browser console errors, filtering known store-side noise
  • Runs serially with a 15s cooldown between invocations, and test.slow(), since this hits a live dev store that's sensitive to request volume (Cloudflare bot protection, checkout rate limiting) and the full flow runs close to the default test timeout.

Test instructions

To run locally:

SHOPIFY_STORE_PASSWORD=<dev store password> yarn test:e2e -g "shopify"

Or trigger the according pipeline on the gitlab: https://gitlab.ddbuild.io/DataDog/browser-sdk/-/pipelines

Chromium only (--disable-web-security is required to bypass the dev store's CSP/CORS restrictions). Runs against the live custom-pixel-e2e.myshopify.com dev store, so repeated back-to-back local runs may need a few minutes' gap to avoid tripping Cloudflare's verification wall.

Checklist

  • Tested locally
  • Tested on staging
  • Added unit tests for this change.
  • Added e2e/integration tests for this change.
  • Updated documentation and/or relevant AGENTS.md file

@cit-pr-commenter-54b7da

Copy link
Copy Markdown

Bundles Sizes Evolution

📦 Bundle Name Base Size Local Size 𝚫 𝚫% Status
Rum 180.44 KiB 180.44 KiB 0 B 0.00%
Rum Profiler 8.43 KiB 8.43 KiB 0 B 0.00%
Rum Recorder 21.12 KiB 21.12 KiB 0 B 0.00%
Logs 57.04 KiB 57.04 KiB 0 B 0.00%
Rum Salesforce N/A 138.47 KiB N/A N/A N/A
Rum Slim 138.47 KiB 138.47 KiB 0 B 0.00%
Worker 22.96 KiB 22.96 KiB 0 B 0.00%
Rum Shopify N/A 200.02 KiB N/A N/A N/A
Rum-shopify Profiler N/A 8.43 KiB N/A N/A N/A
Rum-shopify Recorder N/A 3.72 KiB N/A N/A N/A

@datadog-prod-us1-4

datadog-prod-us1-4 Bot commented Aug 12, 2026

Copy link
Copy Markdown

Tests

⚠️ Warnings

❄️ 1 New flaky test detected

shopify checkout views and actions from shopify.scenario.ts   View in Datadog
expect(received).toBe(expected) // Object.is equality

[chromium] › shopify.scenario.ts:61:13 › shopify checkout views and actions ──────────────────────

    Error: expect(received).toBe(expected) // Object.is equality

    Expected: 1
    Received: 2

      161 |         ...intakeRegistry.rumActionEvents.map((e) =&gt; e.session.id),
...

New test introduced in this PR is flaky.

View in Flaky Test Management

ℹ️ Info

No other issues found (see more)

🧪 All tests passed

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 77.20% (+0.00%)

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: ef6cdb5 | Docs | Datadog PR Page | Give us feedback!

@lierniel
lierniel marked this pull request as ready for review August 12, 2026 21:20
@lierniel
lierniel requested a review from a team as a code owner August 12, 2026 21:20
@sbarrio
sbarrio requested a review from thomas-lebeau August 13, 2026 07:03
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.

1 participant