CtrlK
BlogDocsLog inGet started
Tessl Logo
PluginPublic

testland/playwright-extension-fixtures

Use when writing or debugging Playwright tests for a Chromium browser extension: the persistent-context fixture that loads the extension and finds its ID, why an edit seems to have no effect (reload matrix), and popup, content-script, storage and MV3 service-worker tests.

Quality

87%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Passed

No findings from the security scan

Overview
Quality
Evals
Security
Files

reload-matrix.mdreferences/

Extension reload matrix - what a code edit re-evaluates

Companion reference for playwright-extension-fixtures. Consult when an edit appears to have no effect and you need to know which extension surface requires an explicit reload - the manual chrome://extensions card-refresh gesture this fixture automates.

Per the Chrome Extensions "Hello World" tutorial:

Component editedReload action required
manifest.jsonClick refresh on the extension card
Service worker (background.service_worker)Click refresh on the extension card
Content scriptsClick refresh on the extension card plus refresh the host page
Popup HTML / JSNone, next open re-evaluates
Options pageNone, next open re-evaluates
Other extension HTML pagesNone

An automated harness reproduces the "click refresh on the card" gesture either by toggling chrome.management.setEnabled(id, false) then setEnabled(id, true) (requires the "management" permission per the chrome.management reference; management.getSelf is the no-permission exception), or by closing and re-launching the persistent browser context.

Anti-patterns the matrix prevents:

  • Editing a content script and expecting the next page load to pick it up - content scripts need the card refresh and a host-page refresh per cr-hello.
  • Reloading the card after a popup-only edit - the popup re-evaluates on next open per cr-hello; the reload is wasted time and resets service-worker state.

SKILL.md

tile.json