You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/apps/sf-lwc-app/README.md
+13-14Lines changed: 13 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ This app is Lightning-only.
15
15
16
16
The Salesforce flow uses the Salesforce CLI. Authenticate once, then deploy/open/test through the CLI alias.
17
17
18
-
Credentials are set as CI variables.
18
+
Credentials are set as CI variables.
19
19
20
20
For local overrides, set the matching environment variables from the repository root:
21
21
@@ -32,8 +32,6 @@ Then authenticate the default `sf-lwc-ci` alias:
32
32
node scripts/salesforce-lwc-app.ts auth
33
33
```
34
34
35
-
All Salesforce commands default to `sf-lwc-ci`. To use another authenticated alias, set `SF_TARGET_ORG` for the command.
36
-
37
35
## Initial App Deploy
38
36
39
37
The full app deploy is only needed when Salesforce metadata changes or the org is being prepared from scratch:
@@ -44,21 +42,21 @@ yarn salesforce:deploy-app
44
42
45
43
This builds the local RUM slim bundle, copies it to the stable `datadog_rum_slim` static resource, deploys the app metadata, and assigns the `SF_LWC_App` permission set.
46
44
47
-
## Bundle Deploy
45
+
## Local Bundle
48
46
49
-
After the app exists in the org, deploy only the current RUM slim bundle with:
47
+
After the app exists in the org, regular test runs do not deploy the current SDK bundle to Salesforce.
48
+
Build the test apps from the repository root instead:
50
49
51
50
```sh
52
-
yarn salesforce:deploy-bundle
51
+
yarn build:apps --app sf-lwc-app
53
52
```
54
53
55
-
This builds the local RUM slim bundle, deploys it as a content-hashed static resource, for example `datadog_rum_slim_012345abcdef`, and writes that resource name to `.sf-e2e/resource-name`.
56
-
57
-
Tests can load a different deployed bundle by opening Salesforce with `c__datadogResourceName=<resourceName>` in the query string. If the query parameter is absent, `c:datadogInit` falls back to the stable `datadog_rum_slim` static resource.
54
+
This copies the locally built RUM slim bundle into the ignored stable `datadog_rum_slim` static resource file.
55
+
Playwright fulfills Salesforce static resource requests with this local file during E2E tests.
58
56
59
57
## Open The App
60
58
61
-
Open the app with the current hashed resource:
59
+
Open the app with the E2E RUM configuration:
62
60
63
61
```sh
64
62
yarn salesforce:open
@@ -67,7 +65,7 @@ yarn salesforce:open
67
65
The printed URL is authenticated and should be treated as sensitive. It opens the app with RUM query parameters shaped like:
The `salesforce-e2e` job retrieves Salesforce credentials through `scripts/lib/secrets.ts`, authenticates `sf-lwc-ci`, deploys only the generated hashed bundle, and runs the `@salesforce`Playwright scenario. The regular `e2e` matrix excludes `@salesforce`.
89
+
The regular `e2e` job runs the Salesforce scenario in the Chromium matrix entry only. It authenticates `sf-lwc-ci`, opens the deployed Salesforce app, and serves the locally built SDK bundle through Playwright route fulfillment instead of deploying a bundle to Salesforce for each run.
0 commit comments