Skip to content

✅ Add Salesforce E2E tests#4761

Merged
BeltranBulbarellaDD merged 64 commits into
mainfrom
beltran.bulbarella/salesforce/add-e2e-test-setup
Jul 3, 2026
Merged

✅ Add Salesforce E2E tests#4761
BeltranBulbarellaDD merged 64 commits into
mainfrom
beltran.bulbarella/salesforce/add-e2e-test-setup

Conversation

@BeltranBulbarellaDD

@BeltranBulbarellaDD BeltranBulbarellaDD commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Motivation

4757 adds the Salesforce LWC testing application with configurable init thru query params.

This PR wires up the full CI pipeline:

  • Deploy the app
  • get the deployed url
  • authenticate in tests
  • replace the rum slim static resource from the deployed application by the local one

Changes

  • scripts/salesforce-lwc-app.ts: has 2 commands. deploy-app which redeploys the test application and get-url which prints the authenticated salesforce url.
  • Adds the required secrets and documents them in the secrets page in confluence.
  • Simplifies datadogInit.js by only injecting the init configuration as page.addInitScript.
  • Creates test helper buildSalesforceLwcUrl that authenticates at test time using the Salesforce API, so we don't import the scripts in the test.
  • withSalesforceApp creates the Salesforce Authenticated URL, overwrites the deployed bundle with the local one and injects the initScript dd_RUM_CONFIGURATION.
  • salesforceLWC.scenario skips non chromium tests because the --disable-web-security is chromium only and we need it so we can use our intake proxy to test. And the file tests initial view, custom action and route change.

Test instructions

  1. Ensure you have credentials set (see test/apps/sf-lwc-app/README.md — Authentication section), then:
    yarn test:e2e --grep salesforce
  2. Verify that the test navigates to Salesforce, finds the home view, clicks custom action 1, navigates to Product Explorer, and asserts view/action events in the intake registry.

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

@BeltranBulbarellaDD BeltranBulbarellaDD changed the title Beltran.bulbarella/salesforce/add e2e test setup ✅ Add Salesforce hashed bundle uploads Jun 10, 2026
@datadog-prod-us1-4

datadog-prod-us1-4 Bot commented Jun 10, 2026

Copy link
Copy Markdown

Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

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

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

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Jun 10, 2026

Copy link
Copy Markdown

Bundles Sizes Evolution

📦 Bundle Name Base Size Local Size 𝚫 𝚫% Status
Rum 172.75 KiB 172.75 KiB 0 B 0.00%
Rum Profiler 8.22 KiB 8.22 KiB 0 B 0.00%
Rum Recorder 21.14 KiB 21.14 KiB 0 B 0.00%
Logs 54.44 KiB 54.44 KiB 0 B 0.00%
Rum Slim 130.27 KiB 130.27 KiB 0 B 0.00%
Worker 22.96 KiB 22.96 KiB 0 B 0.00%

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f3942acb3d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread test/e2e/lib/framework/buildSalesforceLwcUrl.ts
Comment thread scripts/salesforce-lwc-app.ts Outdated
Comment thread package.json Outdated
Comment thread test/apps/sf-lwc-app/README.md Outdated
Comment thread test/e2e/lib/framework/createTest.ts Outdated
Comment thread test/e2e/lib/framework/buildSalesforceLwcUrl.ts
Comment thread scripts/salesforce-lwc-app.ts Outdated
Comment thread test/apps/sf-lwc-app/force-app/main/default/lwc/datadogInit/datadogInit.js Outdated
@BeltranBulbarellaDD BeltranBulbarellaDD marked this pull request as ready for review July 2, 2026 09:56
@BeltranBulbarellaDD BeltranBulbarellaDD marked this pull request as draft July 2, 2026 10:10
@BeltranBulbarellaDD BeltranBulbarellaDD marked this pull request as ready for review July 2, 2026 10:18
Comment thread test/e2e/lib/framework/createTest.ts
launchOptions: { args: ['--disable-web-security'] },
})

createTest('salesforce')

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Could you split this test into multiple tests?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah! I think I could also improve the coverage to resources, auto actions and etc. The only drawback is that for every test we generate a new url because each url is single use.

Comment thread scripts/salesforce-lwc-app.ts Outdated
Comment thread test/e2e/lib/framework/createTest.ts Outdated
Comment thread test/apps/sf-lwc-app/force-app/main/default/lwc/datadogInit/datadogInit.js Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c60250763d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread test/apps/sf-lwc-app/README.md
Comment thread test/apps/sf-lwc-app/force-app/main/default/lwc/datadogInit/datadogInit.js Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2d97301961

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread test/e2e/scenario/salesforce/salesforceLwc.scenario.ts
Comment thread test/apps/sf-lwc-app/README.md Outdated
Comment thread test/apps/sf-lwc-app/README.md Outdated
Comment thread package.json Outdated
Comment thread test/e2e/scenario/salesforce/salesforceLwc.scenario.ts Outdated
Comment thread test/apps/sf-lwc-app/README.md Outdated
Comment thread scripts/salesforce-lwc-app.ts Outdated
Comment thread scripts/salesforce-lwc-app.ts Outdated
Comment thread test/apps/sf-lwc-app/README.md Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5e23daa45a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread package.json Outdated
Comment thread test/e2e/scenario/salesforce/salesforceLwc.scenario.ts
@BeltranBulbarellaDD BeltranBulbarellaDD merged commit d0883f6 into main Jul 3, 2026
31 checks passed
@BeltranBulbarellaDD BeltranBulbarellaDD deleted the beltran.bulbarella/salesforce/add-e2e-test-setup branch July 3, 2026 08:29
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 3, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants