Overview of @element-hq/element-web-playwright-common
developThe @element-hq/element-web-playwright-common package provides a set of Playwright and testcontainers utilities designed to simplify writing tests for Element Web, Element Web Modules, and Element Desktop.
It provides three main categories of tools:
- Playwright Fixtures & Assertions: The main export provides custom fixtures and assertions (documented via JSDoc) to extend Playwright's capabilities for Element-specific testing.
- Testcontainers: The
lib/testcontainersexport provides managed containers for essential Matrix infrastructure:SynapseContainer: Runs a Synapse homeserver.MatrixAuthenticationServiceContainer: Runs a Matrix Authentication Service (MAS).MailpitContainer: Runs a Mailpit SMTP server for testing email flows.
- Utilities: The
lib/utilsexport contains various helper functions for test orchestration and environment setup.