Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude/agents/playwright-e2e-monitor.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Monitor running e2e playwright tests, download artifacts on failure, provide ana
**Running workflow → failure:**

1. Branch: `feature/my-branch`
2. Find "Metadata E2E (Playwright)" `in_progress`
2. Find "Metadata E2E (Playwright)" or "LWC E2E (Playwright)" `in_progress`
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

don't need to doc every one, the example is the same

3. Monitor until `failure`
4. Download to `.e2e-artifacts/feature/my-branch/<run-id>-Metadata-E2E-Playwright/`
5. Report failure with artifact location, offer HTML report
Expand Down
3 changes: 2 additions & 1 deletion .claude/settings.local.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"Bash(WIREIT_CACHE=none npm run *)",
"Bash(sf org:*)",
"WebFetch(domain:github.com)",
"WebFetch(domain:code.visualstudio.com)"
"WebFetch(domain:code.visualstudio.com)",
"Bash(find .vscode-test-web/ -name *.json)"
],
"autoApprove": [
"PostToolUse",
Expand Down
2 changes: 1 addition & 1 deletion .claude/skills/playwright-e2e/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ See `references/full-suite-execution.md` for complete guide on running all E2E t

To run only your new test in CI while iterating:

1. **Disable other workflows** — add your branch to `branches-ignore` in `.github/workflows/*.yml` that have `push: branches-ignore: [main, develop]` (e.g. `testCommitExceptMain.yml`, `coreE2E.yml`, `orgBrowserE2E.yml`, etc.)
1. **Disable other workflows** — add your branch to `branches-ignore` in `.github/workflows/*.yml` that have `push: branches-ignore: [main, develop]` (e.g. `testCommitExceptMain.yml`, `coreE2E.yml`, `orgBrowserE2E.yml`, `lwcPlaywrightE2E.yml`, etc.)
2. **Filter target workflow** — add `--grep "Your Test Title"` to the test run command in the workflow you care about
3. **Optional** — skip org setup steps not needed for your test (e.g. minimal/non-tracking orgs)
4. **Restore** — remove branch from `branches-ignore`, remove `--grep`, uncomment skipped steps
Expand Down
2 changes: 1 addition & 1 deletion .claude/skills/playwright-e2e/references/analyze-e2e.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ PY

## Workflow Detection

Filter `workflowName` containing "(Playwright)". Examples: Metadata E2E, Services E2E, OrgBrowser E2E.
Filter `workflowName` containing "(Playwright)". Examples: Metadata E2E, Services E2E, OrgBrowser E2E, LWC E2E.

## Finding video

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,19 @@ One test per file. Many steps allowed.

**Use UI interactions:**

- `Control+p` - Quick Open
- Quick Open: `@salesforce/playwright-vscode-ext` `openFileByName` — palette "Go to File…" (web + desktop); VS Code 1.116+ rows often `basename` + segments + trailing `file results` — match logic `packages/playwright-vscode-ext/src/utils/fileHelpers.ts`
- `Control+Home`, `Control+s` - navigate and save
- `page.keyboard.type()` - edit content
- Monaco editor selectors - interact with editor

Tests must work identically in web and desktop.

## Web headless (`createHeadlessServer`)

- Virtual `folderPath` mount: Node `fs` does not see project files; use `folderUri` (`file://…`) or `.vscode/vscode-extension-test-disk-root.txt` (disk root) when services must resolve `SfProject` — see JSDoc on `packages/playwright-vscode-ext/src/web/createHeadlessServer.ts`
- Load extra extensions via `additionalExtensionDirs` (e.g. metadata for LWC create). **Web** `headlessServer` + **desktop** fixture: empty `lwc/` + CustomLabels + empty `snippetsE2E` (snippet specs); other bundles via **SFDX: Create Lightning Web Component**.
- LWC LSP ready (`waitForLwcLspReady` in `salesforcedx-vscode-lwc` `test/playwright/utils/lwcUtils.ts`): **web** — `LWC Extension` output line `LWC Language Server: indexing complete`; **desktop** — Editor Language Status / legacy status text `Indexing complete` (language status item often missing on web)

## Virtualized DOM

VS Code API (tree views, editors, output panels) only contains visible DOM lines (rest not present until scrolled into view).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,4 @@ https://github.com/redhat-developer/vscode-extension-tester - pageObject/Selecto

- TS extension activation: `Error: Activating extension 'vscode.typescript-language-features'`
- **All installed extensions temporarily disabled** (other extensions, not ours) - expected notification
- VS Code 1.116+ / `@vscode/test-electron`: `cannot change enablement of github copilot chat extension` — workbench Copilot Chat toggle in test env; non-critical (`helpers.ts` `NON_CRITICAL_ERROR_PATTERNS`)
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Salesforce project resolution. Accessor pattern: call methods directly.
Check if workspace is Salesforce project (sfdx-project.json exists):

```typescript
const isProject = yield* api.services.ProjectService.isSalesforceProject();
const isProject = yield * api.services.ProjectService.isSalesforceProject();
```

Side effect: sets `sf:project_opened` context.
Expand All @@ -19,7 +19,7 @@ Side effect: sets `sf:project_opened` context.
Get SfProject (fails if not Salesforce project):

```typescript
const project = yield* api.services.ProjectService.getSfProject();
const project = yield * api.services.ProjectService.getSfProject();
```

Returns `SfProject` from `@salesforce/core`. Side effect: sets `sf:project_opened` context.
Expand All @@ -34,18 +34,20 @@ Returns `SfProject` from `@salesforce/core`. Side effect: sets `sf:project_opene
From `salesforcedx-vscode-metadata`:

```typescript
const packageDirs = (yield* api.services.ProjectService.getSfProject()).getPackageDirectories();
const packageDirs = (yield * api.services.ProjectService.getSfProject()).getPackageDirectories();
```

From `salesforcedx-vscode-org-browser`:

```typescript
const dirs = (yield* api.services.ProjectService.getSfProject()).getPackageDirectories();
const dirs = (yield * api.services.ProjectService.getSfProject()).getPackageDirectories();
```

## Notes

- Cached globally (10 min TTL)
- Cache key: workspace `fsPath`
- Cache key: workspace `fsPath`; `vscode-test-web://` workspaces with `.vscode/vscode-extension-test-disk-root.txt` (E2E headless): file body = disk path for `@salesforce/core` `SfProject` cache
- `SfProject.resolve` fails (e.g. virtual mount): `isSalesforceProject` may still true via root `sfdx-project.json` `vscode.workspace.fs` stat; `getSfProject` no that fallback—can fail while flag true
- `isSalesforceProject` cache `tapError` sets `sf:project_opened` false on resolve/cache errors; `FailedToResolveSfProjectError` then `catchTag` fallback may set context again from manifest stat
- Requires `WorkspaceService`
- Use `getSfProject()` for project methods (getPackageDirectories, etc.)
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const packageDirs = (yield* api.services.ProjectService.getSfProject()).getPacka

## Notes

- `isEmpty` - workspace folders exist
- `isEmpty` — no workspace folders
- `isVirtualFs` - non-file scheme (e.g., memfs://)
- `fsPath` normalized (backslashes → forward slashes for virtual FS)
- Cached globally
- Cached globally; web: memo on first `yield*` (not import), so folders exist before snapshot
20 changes: 1 addition & 19 deletions .github/workflows/lspE2E.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@ on:
required: false
default: true
type: boolean
lwcLsp:
description: 'LWC LSP'
required: false
default: true
type: boolean
vscodeVersion:
description: 'VSCode Version'
required: false
Expand All @@ -30,11 +25,6 @@ on:
required: false
default: true
type: boolean
lwcLsp:
description: 'LWC LSP'
required: false
default: true
type: boolean
vscodeVersion:
description: 'VSCode Version'
required: false
Expand All @@ -55,13 +45,5 @@ jobs:
vscodeVersion: ${{ inputs.vscodeVersion }}
runId: ${{ inputs.runId }}

lwcLSP:
if: ${{ inputs.lwcLsp }}
uses: ./.github/workflows/runE2ETest.yml
secrets: inherit
with:
testToRun: 'lwcLsp.e2e.js'
vscodeVersion: ${{ inputs.vscodeVersion }}
runId: ${{ inputs.runId }}

# lwcLSP: migrated to Playwright in lwcPlaywrightE2E.yml
# visualforceLSP: migrated to Playwright in visualforceE2E.yml
Loading
Loading