extension-e2e-test

Automate Chrome Manifest V3 extension end-to-end tests with Playwright.

1|Updated May 6, 2022
One-click install
npx skills add https://github.com/cloud-native-tools/cws-lib-bash --skill extension-e2e-test
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: extension-e2e-test
Source: https://github.com/cloud-native-tools/cws-lib-bash/tree/main/.specify/skills/extension-e2e-test
Command: npx skills add https://github.com/cloud-native-tools/cws-lib-bash --skill extension-e2e-test

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires playwright, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This skill solves the complexity of testing Chrome Manifest V3 extensions by providing a structured, reliable environment to automate the entire extension lifecycle, including service workers, popups, and content scripts.

Core Features & Use Cases

  • Full Lifecycle Automation: Load unpacked extensions into Chrome for Testing to verify service worker behavior, popup UI, and options pages.
  • Reliable Content Script Testing: Verify on-demand script injection and message-protocol logic across different web platforms.
  • Use Case: Use this skill to ensure your extension's service worker correctly handles background tasks and that content scripts inject properly on target websites without manual browser interaction.

Quick Start

Use the extension-e2e-test skill to run the Playwright test template against the extension build in the dist directory.

Frequently Asked Questions about extension-e2e-test

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate E2E testing for a Chrome Manifest V3 extension?

To automate E2E testing for a Chrome Manifest V3 extension, use this skill to load unpacked builds into Chrome for Testing via Playwright. It validates service worker lifecycles, popup rendering, and content script injection.

Does Playwright support testing service worker lifecycles in MV3 extensions?

Yes, Playwright supports testing service worker lifecycles in MV3 extensions. This skill automates verification of background task handling and ensures service workers correctly manage lifecycle events using Chrome for Testing.

What is the best way to test content script injection on target web pages?

The best way to test content script injection is using this skill to automate on-demand script injection verification. It validates message-protocol logic and ensures scripts inject properly on target websites without manual browser interaction.

Can I verify popup and options page rendering without manual browser interaction?

Yes, you can verify popup and options page rendering without manual browser interaction. This skill automates the entire extension lifecycle, loading unpacked extensions into Chrome for Testing to validate UI rendering programmatically.

Do I need a specific environment to run Playwright scripts for extension testing?

Yes, you need a configured browser-utils environment to run Playwright scripts for extension testing. This environment manages persistent browser contexts and executes the automated tests against your extension build in the dist directory.

Why does my Chrome extension E2E test require Chrome for Testing?

Chrome extension E2E testing requires Chrome for Testing to provide a reliable, structured environment for Playwright automation. It ensures consistent validation of service workers, popups, and content scripts across persistent browser contexts.