github.com/Automattic/newspack-e2e-tests

E2E tests suite for the Newspack project

Open this visualization on its own page →

Contributors

6

Lines of Code

230

From

2020-02-13

To

2025-07-18

About Automattic/newspack-e2e-tests

Newspack E2E Tests is an end-to-end testing suite for the Newspack project, built with TypeScript and Playwright. The suite validates the functionality of Newspack, which is a WordPress-based publishing platform, by automating browser interactions across key user workflows including reader registration, donations, and e-commerce features.

The project supports both local development testing and continuous integration pipelines through CircleCI. Developers can run tests locally against a Docker-based test site, while CI systems can execute tests against remote Atomic-hosted environments. The suite includes utilities for resetting test state, managing payment gateway configurations with Stripe, and generating test code through Playwright's codegen tool. A notable feature is snapshot switching, which allows tests to validate both vanilla Newspack installations and versions configured with WooCommerce functionality.

Setup requires configuration files, credentials management through environment variables, and integration with external services like Stripe for payment testing and Slack for CI notifications. The project maintains automated test reports published to GitHub Pages and emphasizes careful state management, requiring developers to add reset commands for any tests that modify persistent database items.

Share this video