Salesforce DX project used to exercise browser-sdk behavior in a real Lightning Web Components runtime.
This app is Lightning-only.
- A Lightning app named
SF LWC App - A trimmed Home page with Datadog test controls
- A
Product Explorerapp page with three hardcoded editable products c:datadogInitin the utility bar, backed by thedatadog_rum_slimstatic resource
The Salesforce flow uses the Salesforce CLI with a JWT keypair. There is no separate manual auth step: yarn salesforce:deploy-app and yarn salesforce:get-url always (re-)authenticate the sf-lwc-ci alias before running, since the JWT private key file used for authentication is deleted right after login and can't be reused to refresh a cached session.
Credentials are set as CI variables.
For local overrides, set the matching environment variables from .env.example:
This app runs from Salesforce metadata already deployed to the Salesforce org, so any change to that metadata (Apex, LWC markup/config, permission sets, etc.) requires a full redeploy to take effect.
For E2E testing, deployment is not necesary since we will override the deployed rum_slim bundle with Playwright.
yarn salesforce:deploy-appThis builds the local RUM slim bundle, copies it to the stable datadog_rum_slim static resource, and deploys the app metadata.
Regular test runs do not deploy the current SDK bundle to Salesforce. Build the test apps from the repository root instead:
yarn build:apps --app sf-lwc-appThis copies the locally built RUM slim bundle into the ignored stable datadog_rum_slim static resource file.
Playwright fulfills Salesforce static resource requests with this local file during E2E tests.
Print an authenticated URL for the app:
yarn salesforce:get-urlThe printed URL is authenticated and should be treated as sensitive.
E2E tests don't use this script: they build their own authenticated URL via the JWT/REST flow in
test/e2e/lib/framework/buildSalesforceLwcUrl.ts, and inject the RUM configuration on the page as
window.RUM_CONFIGURATION.
Build the SDK and test apps, then run the Salesforce scenario:
yarn build
yarn build:apps --app sf-lwc-app
yarn test:e2e --project=chromium --grep salesforce