Agent skill

Playwright E2E

by forcedotcom in forcedotcom/salesforcedx-vscode

writing, running, and debugging Playwright tests; creating and recreating scratch orgs (Dreamhouse, minimal, non-tracking); working with their output from github actions

BSD-3-ClauseAuto-check passedTesting & QA

Install Playwright E2E

skills CLI
$ npx skills add forcedotcom/salesforcedx-vscode --skill playwright-e2e -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install forcedotcom/salesforcedx-vscode playwright-e2e --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/forcedotcom/salesforcedx-vscode.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/playwright-e2e .claude/skills/playwright-e2e && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
playwright-e2e
GitHub stars
1k
Token cost
~3k tokens
SKILL.md length
1,311 words
Files
6 (incl. references)
Skills in repo
37
Repo updated
First seen
Licence
BSD-3-Clause

At a glance

writing, running, and debugging Playwright tests; creating and recreating scratch orgs (Dreamhouse, minimal, non-tracking); working with their output from github actions

  • Works in 2 steps: O11y spans — produced by services Effect… → AppInsights events — produced by…
  • Tasks that involve Browser testing
  • SKILL.md covers Required Reading, Span files (when debugging…, Telemetry inspection… and Checking for Scratch Orgs, plus 8 more sections
  • Calls sf, jq and pnpm

What it does

Playwright E2E is an agent skill from forcedotcom/salesforcedx-vscode. writing, running, and debugging Playwright tests; creating and recreating scratch orgs (Dreamhouse, minimal, non-tracking); working with their output from github actions

Its SKILL.md is about 3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including reference files (for example `references/analyze-e2e.md`, `references/coding-playwright-tests.md` and `references/full-suite-execution.md`).

It sits in Testing & QA, covering Browser testing, End-to-end testing and CI/CD. It works with Playwright, Salesforce, GitHub Actions and Visual Studio Code. The repository describes itself as: Salesforce Extensions for VS Code. The licence is BSD-3-Clause.

When your agent uses it

  • Tasks that involve Browser testing
  • Tasks that involve End-to-end testing
  • Tasks that involve CI/CD

Example prompts

  • “/playwright-e2e”

Workflow steps

2 steps, taken from the first numbered list in SKILL.md.

  1. O11y spans — produced by services Effect pipeline; written to ~/.sf/vscode-spans/*.jsonl (auto-enabled)
  2. AppInsights events — produced by class-based TelemetryFile reporter when localTelemetryLogging is enabled; written to…

What it can do on your machine

Read from SKILL.md and the folder at commit f7bb6fe. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • sf
    • jq
    • pnpm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • playwright.dev

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Playwright E2E loads about 3k tokens when it runs, and up to ~11k if it reads all its reference files. Until then it costs about 46 tokens; SKILL.md has 1,311 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~46
When it runs · the whole SKILL.md, loaded when a task matches
~3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~11k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from forcedotcom/salesforcedx-vscode at commit f7bb6fe, republished under its BSD-3-Clause licence (© forcedotcom). 1,311 words, ~2,966 tokens.

Download SKILL.mdSave it as .claude/skills/playwright-e2e/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
playwright-e2e
description
writing, running, and debugging Playwright tests; creating and recreating scratch orgs (Dreamhouse, minimal, non-tracking); working with their output from github actions
review
always

Playwright E2E Tests

Guidelines for writing and iterating on Playwright tests for VS Code extensions.

Required Reading

Read ALL before responding:

  • references/coding-playwright-tests.md - Writing tests
  • references/local-setup.md - Scratch org setup (Dreamhouse, minimal, non-tracking)
  • references/iterating-playwright-tests.md - Iterating on tests ("Things to ignore" for failure analysis)
  • references/analyze-e2e.md - Analyzing E2E test results from CI

Use playwright-vscode-ext

Shared code (helpers, locators, configuration) for tests.

Desktop workspace shapes (pick one per test):

  • No folder open — fixture opens a Salesforce project, then call prepareNoFolderOpenForPaletteTests(page) (runs Workspaces: Close Workspace + workbench wait). Or use closeWorkspaceToEmptyWindow if UI is already prepared.
  • Folder open, no sfdx-project.json — createDesktopTest({ emptyWorkspace: true }); workspace path comes from createEmptyTestWorkspace() (also exported from the package).
  • Default org in workspace — pass orgAlias: '…' (e.g. MINIMAL_ORG_ALIAS / NON_TRACKING_ORG_ALIAS / DREAMHOUSE_ORG_ALIAS) so .sfdx/config.json gets target-org. Omit orgAlias or use undefined for no config.json (no org).
  • Multi-package directory, no org — multiPackageNoOrgDesktopTest (extend noOrgDesktopTest); creates a temp workspace with sfdx-project.json listing multiple packageDirectories (force-app, extra-pkg). Use multiPackageNoOrgTest from fixtures/index.ts in test files.

VSIX mode (useVsix option):

  • createDesktopTest({ useVsix: true }) — installs built VSIXs into a hash-keyed cache dir (.vscode-test/ext-<hash>/) and launches VS Code with --extensions-dir instead of --extensionDevelopmentPath. Exercises real shipping artifact (bundled dist/, .vscodeignore, packageUpdates).
  • Installs requested local VSIX dirs in extensionDependencies order (from each local package.json), so local dependency VSIXs install before dependents.
  • Default: process.env.E2E_FROM_VSIX === '1' — set in CI to enable without code changes.
  • Requires vscode:package to have run first (produces .vsix in package dir). test:desktop depends on vscode:package for this reason.
  • Idempotent across parallel workers: atomic rename; second worker skips if cache exists.

Code Builder container mode (createContainerConfig, createContainerTest):

  • createContainerConfig({ testDir: '…' }) — config for driving tests against a running Code Builder container. Container lifecycle (run, extension swap, health checks) managed by orchestrator/CI, not Playwright. Tests drive a browser-client to the container URL (like web mode) while the workbench runs the desktop extension build. Use env CODE_BUILDER_URL (defaults to http://localhost:8123).
  • createContainerTest() — fixture that navigates a plain Chromium page to the container workbench and waits for readiness. Specs reuse existing page objects (commands, helpers, locators) unchanged.
  • Seeding: seedWorkspace (exported from the toolkit) handles post-boot writes (coder.json path + workspace-trust setting). Works with fixture projects mounted into the container (e.g. test/playwright/fixtures/container-workspace/). Call after workbench readiness, before extension swap/restart.

Span files (when debugging traces)

Available local + CI/GHA.

  • Output: ~/.sf/vscode-spans/ — web-*.jsonl (test:web), node-*.jsonl (test:desktop)
  • Auto-enabled (no manual enable needed)
  • CI runs: copied into package test-results/spans/ artifacts (see workflow upload/download in references/analyze-e2e.md)
  • Latest: ls -lt ~/.sf/vscode-spans/
  • Clear before run for fresh output: rm -rf ~/.sf/vscode-spans/
  • Format: JSONL; parse each line with JSON.parse
  • Fields: name, traceId, spanId, parentSpanId, durationMs, status, startTime, attributes

See .claude/skills/span-file-export/SKILL.md for enable/OTLP vs file.

Telemetry inspection (diagnostic tests)

Desktop tests can inspect both telemetry pipelines on-disk for diagnostic/integration testing:

  1. O11y spans — produced by services Effect pipeline; written to ~/.sf/vscode-spans/*.jsonl (auto-enabled)
  2. AppInsights events — produced by class-based TelemetryFile reporter when localTelemetryLogging is enabled; written to {workspace}/salesforcedx-vscode-core-telemetry.json (AppInsights shape, real client inert in dev/test)

Fixture setup: Enable both pipelines by passing additionalExtensionDirs: ['salesforcedx-vscode-core'] (for core extension + TelemetryFile reporter) and userSettings: { 'telemetry.telemetryLevel': 'all', 'salesforcedx-vscode-core.advanced.localTelemetryLogging': 'true' } to createDesktopTest. Launch against a real scratch org (e.g., orgAlias: MINIMAL_ORG_ALIAS) so org-identity attributes populate in both pipelines.

Reading artifacts:

  • Spans: parse ~/.sf/vscode-spans/*.jsonl line-by-line with JSON.parse
  • AppInsights events: file contains comma-separated pretty JSON objects; wrap in [] and strip trailing comma to parse: JSON.parse([${raw.trim().replace(/,\s*$/, '')}])

Pattern: Run command, capture artifacts, reload window to flush TelemetryFile buffer (fires deactivationEvent), then assert event/span presence + attributes. See packages/salesforcedx-vscode-lightning/test/playwright/specs/telemetryOutput.desktop.spec.ts for example.

Checking for Scratch Orgs

If you aren't sure if orgs are set up locally,

bash
sf org list

Look for the required org aliases (e.g., minimalTestOrg, nonTrackingTestOrg, orgBrowserDreamhouseTestOrg). If missing, create them using the appropriate setup commands from references/local-setup.md.

Pro tip: Use sf org list --json | jq '.result.scratchOrgs[] | select(.alias) | .alias' to list only scratch org aliases.

Running tests (AI behavior)

When running Playwright tests (pnpm … test:web, test:desktop, etc.), never block >30s. Use is_background: true so tests run while the AI continues. Check terminal output or output_file later.

Apex OAS E2E Tests

Playwright desktop tests live in packages/salesforcedx-vscode-apex-oas/test/playwright/specs/ with dedicated CI workflow .github/workflows/apexOasE2E.yml (macOS + ubuntu, desktop only). Specs share one MINIMAL_ORG_ALIAS scratch org and are serialized via workers: 1 in playwright.config.desktop.ts. Tests that deploy ESR metadata requiring API >=66 call setWorkspaceApiVersion() to bump the fixture's default sourceApiVersion (64.0 → 66.0). Specs that click modal-dialog buttons require window.dialogStyle: custom in the fixture's userSettings. The OAS REST generation path requires an LLM service registered with the VS Code service provider — supplied at runtime by A4V (salesforce.salesforcedx-einstein-gpt), which is no longer a declared extensionDependency. The AuraEnabled path needs only an active org. Specs exercising REST generation install A4V via the desktop fixture's pre-launch step; obtaining the LLM service is fail-fast, so waitForA4VAndOasCommands calls waitForExtensionsActivated to ensure the provider has registered its command before generation runs.

A4V LLM rate limit = skip, not fail (pre-migration): the shared Core model exhausting its monthly quota is an infra outage, not a product bug — it can hit any spec that triggers a generation LLM call (all composed/decomposed/context-menu specs), not just manual-merge. The extension surfaces it as a real error notification (/monthly rate limit/, from the llm_monthly_rate_limit i18n message) instead of the old generic "LLM did not return any content", so specs detect it straight from the UI — no span-file scan. Wrap the generation success signal with assertGenerationOrSkipOnRateLimit(test, page, success) (oasHelpers): success is the success assertion (expect(tab).toBeVisible() or waitForEsrFile(...)); it races the rate-limit notification and test.skips if that wins, else resolves/rethrows. The eligibility-failure specs (ineligibleClass, mixedFrameworksClass, restResourceNoHttpMethod) fail before any LLM call and need no guard.

Show full SKILL.md (412 more words)Show less

Don't use the clipboard to set editor content

navigator.clipboard.writeText + Paste is a shared global resource — desktop Electron clipboard is the system OS clipboard (electronjs.org/docs/latest/api/clipboard), so parallel workers (fullyParallel: true) race: worker B's write between A's write and A's Paste makes A paste B's text. Flaky, hard to diagnose.

Set content directly instead:

  • type via page.keyboard.type(text) after focusMonacoInput + Select All + Delete (editor selection), or
  • write the file on disk (desktop fs / web memfs), or
  • set the editor model value through a VS Code command.

Note: "keyboard shortcut can miss on web" comments refer to shortcut keystrokes (Cmd+A/Cmd+V) not landing — fix is command-palette Select All/Paste, not clipboard. Clipboard ≠ required for that.

Running Full E2E Test Suite

See references/full-suite-execution.md for complete guide on running all E2E tests locally across all 9 packages in correct dependency order with failure analysis.

Disable/reenable other E2E when iterating

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, 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

Test Controller Native Surfaces

When testing native Test Controller surfaces (Test Explorer, Test Results panel):

  • Test Results panel: Wait for tab visibility, then assert Pass Rate text (e.g., getByText(/Pass Rate/i))
  • Tree items: Assert aria-label contains expected decoration (e.g., toHaveAttribute('aria-label', /Passed/i) for completed tests)
  • Locators: Use TEST_RESULTS_TAB = 'a.action-label[aria-label="Test Results"]' to target panel tab reliably
  • Test run completion: Call verifyNoTestRunInProgress (playwright-vscode-ext) after every Apex test run — sidebar, code lens, palette, suite, debug. Results/tree decorations/Ended … sentinel appear while TestRun still open; absence of 'Test: Cancel Test Run' command proves run ended. Sidebar (Test Explorer) runs: call before dismissing/clicking the success toast—that would end a run blocked on it, masking regressions. Palette/code lens runs have no TestRun tied to the toast, so order vs. toast doesn't matter.

Reliable Assertions for Async Operations

For desktop-only tests, prefer durable success signals over flaky UI assertions:

  • Avoid: vscode.window.showInformationMessage toasts auto-dismiss in seconds; notification-list-item assertions are racy
  • Prefer: Poll on-disk artifacts (e.g., generated files) with exponential backoff. Example: waitForEsrFile checks fs.access repeatedly until artifact appears or timeout.
  • Pattern: Create a helper that polls fs.access or fs.stat with Date.now() < deadline loop; throw on timeout with clear error message

References

© forcedotcom, BSD-3-Clause. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files (references) in .claude/skills/playwright-e2e of forcedotcom/salesforcedx-vscode.

  • SKILL.md
  • references/analyze-e2e.md
  • references/coding-playwright-tests.md
  • references/full-suite-execution.md
  • references/iterating-playwright-tests.md
  • references/local-setup.md

Open the folder on GitHubat commit f7bb6fe

Compare with similar skills

Playwright E2E next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Playwright E2E compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Playwright E2E this skillforcedotcom/salesforcedx-vscode1k—~3kAutomated safety check: PassBSD-3-Clause
Debug Playwrightquay/quay2.8k—~1.2kAutomated safety check: PassApache-2.0
Playwright Testmizchi/skills356—~4.7kAutomated safety check: NotesNone
Testing Test Automation Engineerchendongqi/OPB-Skills125—~3.1kAutomated safety check: PassNone
Debug Playwright Prowquay/quay2.8k—~2.2kAutomated safety check: PassApache-2.0
RStudio Selenium to Playwright Migrationrstudio/rstudio5.1k—~3.6kAutomated safety check: PassCustom licence

Similar skills

  • Debug Playwright E2E test failures from GitHub Actions CI runs.

    2.8k GitHub stars~1.2k tokensUpdated today
    Testing & QAAuto-check passed
  • Playwright Test

    mizchi/skills

    Best practices and reference for Playwright Test (E2E). An agent skill from mizchi/skills.

    356 GitHub stars~4.7k tokensUpdated 5 days ago
    Testing & QAAuto-check: notes
  • 自动化测试助手 - 专业的测试自动化设计与实现专家。适用场景: (1) 自动化测试框架选型与搭建(Selenium/Cypress/Playwright/Appium) (2) 自动化测试脚本编写(Web/API/Mobile) (3) 测试数据管理与Mock设计 (4) CI/CD测试集成(Jenkins/GitLab CI/GitHub Actions) (5) Page…

    125 GitHub stars~3.1k tokensUpdated 7 mo ago
    Testing & QAAuto-check passed
  • Deep-dive diagnosis of a Playwright test failure already isolated to one Quay Prow/OpenShift CI run: downloads its GCS artifacts (results.json, JUnit, build/pod logs, Jaeger traces), classifies real…

    2.8k GitHub stars~2.2k tokensUpdated today
    Testing & QAAuto-check passed
  • Converts RStudio Python Selenium electron tests into TypeScript Playwright tests, checking each against a live RStudio before counting it as migrated.

    5.1k GitHub stars~3.6k tokensUpdated today
    Testing & QAAuto-check passed
  • Promotion Branches E2E Test

    hardisgroupcom/sfdx-hardis

    Runs a full end-to-end test of sfdx-hardis promotion branches and backpromote against real Salesforce orgs and a throwaway repository, then writes a report.

    400 GitHub stars~4.7k tokensUpdated today
    Testing & QAAuto-check: notes

More from forcedotcom/salesforcedx-vscode

All 37 skills in this repo
  • Command UI

    forcedotcom/salesforcedx-vscode

    Command palette, CodeLens, context menus, package.nls titles, and NotificationModeService.

    1k GitHub stars~1.4k tokensUpdated today
    Auto-check passed
  • Services Extension Consumption

    forcedotcom/salesforcedx-vscode

    Consume the salesforcedx-vscode-services extension API. An agent skill from forcedotcom/salesforcedx-vscode.

    1k GitHub stars~5k tokensUpdated today
    Auto-check passed
  • Changelog

    forcedotcom/salesforcedx-vscode

    Polish the automated CHANGELOG on develop before the next stable build.

    1k GitHub stars~3.3k tokensUpdated today
    Auto-check passed
  • Core Extension API

    forcedotcom/salesforcedx-vscode

    Public API exported by salesforcedx-vscode-core activate(). An agent skill from forcedotcom/salesforcedx-vscode.

    1k GitHub stars~842 tokensUpdated today
    Auto-check passed
  • Drivable Vscode

    forcedotcom/salesforcedx-vscode

    Operate a real VS Code instance through drivable-vscode. An agent skill from forcedotcom/salesforcedx-vscode.

    1k GitHub stars~1k tokensUpdated today
    Auto-check passed
  • Effect Best Practices

    forcedotcom/salesforcedx-vscode

    Enforces Effect-TS patterns for services, errors, layers, atoms, and Effect.pipe composition.

    1k GitHub stars~6.2k tokensUpdated today
    Auto-check passed

Categories

Questions about Playwright E2E

What does Playwright E2E do?

writing, running, and debugging Playwright tests; creating and recreating scratch orgs (Dreamhouse, minimal, non-tracking); working with their output from github actions. Playwright E2E is an agent skill from forcedotcom/salesforcedx-vscode.

When should I use Playwright E2E?

Playwright E2E fits situations like: tasks that involve Browser testing; tasks that involve End-to-end testing; tasks that involve CI/CD.

How do I install Playwright E2E in Claude Code?

Run `npx skills add forcedotcom/salesforcedx-vscode --skill playwright-e2e -a claude-code`. Or copy the skill folder (.claude/skills/playwright-e2e in forcedotcom/salesforcedx-vscode) into .claude/skills/playwright-e2e in your project. Claude Code loads it when a task matches its description.

How do I install Playwright E2E in Codex?

Run `npx skills add forcedotcom/salesforcedx-vscode --skill playwright-e2e -a codex`. Or copy the skill folder (.claude/skills/playwright-e2e in forcedotcom/salesforcedx-vscode) into .agents/skills/playwright-e2e in your project. Codex loads it when a task matches its description.

Can I use Playwright E2E in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add forcedotcom/salesforcedx-vscode --skill playwright-e2e -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/playwright-e2e, .gemini/skills/playwright-e2e, .github/skills/playwright-e2e and .opencode/skills/playwright-e2e in your project.

What does Playwright E2E need to run?

Going by SKILL.md and its folder, Playwright E2E needs the command-line tools its instructions call (sf, jq and pnpm).

Does Playwright E2E access the network?

SKILL.md names 1 domain. As links in the text: playwright.dev. This is read from the text; nothing was executed.

Is Playwright E2E safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Playwright E2E use?

Playwright E2E is published under the BSD-3-Clause licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Playwright E2E use?

About 3k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 8.2k tokens, read only when the agent opens those files.

What are the alternatives to Playwright E2E?

Skills that share tags, products or a category with Playwright E2E: Debug Playwright (quay/quay, 2.8k stars), Playwright Test (mizchi/skills, 356 stars), Testing Test Automation Engineer (chendongqi/OPB-Skills, 125 stars) and Debug Playwright Prow (quay/quay, 2.8k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Playwright E2E?

forcedotcom (a GitHub organization) maintains it in forcedotcom/salesforcedx-vscode, which has 1,035 GitHub stars. The repository holds 37 skills in this directory. The repository was last updated on October 7, 2026.

Source: forcedotcom/salesforcedx-vscode on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.