Skip to content
Agentmart
Submit a tool

e2e-testing

Playwright visual regression testing for the assistant Flutter SPA.

Skill by cedricziel

IndexedMIT★ 6
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/cedricziel-e2e-testing

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Playwright visual regression testing for the assistant Flutter SPA. Covers test structure, screenshot baselines, cross-platform diff tolerance, CI workflow with inline diff comments, and baseline management. Use when adding screens, changing layouts, or debugging visual test failures.

Use cases: testing, devops, productivity

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/e2e-testing

What's inside

Skill name
e2e-testing
Description
Playwright visual regression testing for the assistant Flutter SPA. Covers test structure, screenshot baselines, cross-platform diff tolerance, CI workflow with inline diff comments, and baseline management. Use when adding screens, changing layouts, or debugging visual test failures.
License
MIT
Instructions
206 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# E2E Testing (Playwright Visual Regression)

The assistant frontend is a Flutter web app embedded in the Rust binary.
Playwright captures screenshots of the compiled Flutter SPA at three viewport
sizes (desktop, tablet, mobile) and compares them against committed baselines.

The binary serves the Flutter web build at `/`. The `webServer` config in
`playwright.config.ts` builds the binary (which embeds `flutter build web`)
and starts it with `--auth-token test-token --listen 127.0.0.1:8787`.

## Directory Layout

```text
crates/web-ui/e2e/
  playwright.config.ts     # Config: viewports, server, reporters
  package.json             # Dependencies (playwright, @playwright/test)
  tests/
    visual-regression.spec.ts   # All visual tests
  screenshots/                  # Committed baselines (PNG)
    tests/visual-regression.spec.ts/
      login-desktop-chrome.png
      login-tablet-chrome.png
      login-mobile-chrome.png
      ...
  test-results/            # Generated on failure (diff, actual, expected PNGs)
  playwright-report/       # HTML report (gitignored)
```

## Running Tests

```bash
# From the e2e directory
cd crates/web-ui/e2e

# Run all visual tests (starts server automatically via webServer config)
npx playwright test

# Update baselines after intentional changes
npx playwright test --update-snapshots
# or use the npm script:
npm run test:update

# Run a single test
npx playwright test -g "traces page"

# Run only desktop viewport
npx playwright test --project=desktop-chrome

# Show HTML report after failure
npx playwright show-report
```

The `webServer` config in `playwright.config.ts` automatically builds and
starts the web-ui binary with `--auth-token test-token --listen 127.0.0.1:8787`.
Set `E2E_BASE_URL` to skip the auto-start and use a running server instead.

## Writing Tests

### Test Structure

```typescript
import { test, expect, Page } from "@playwright/test";

const AUTH_TOKEN = "test-token";
const MAX_DIFF_RATIO = 0.03; // 3% tolerance for cross-platform fonts
const CSS_SETTLE_MS = 300; // Wait for CSS transitions

// Authenticate via the login form
async function login(page: Page) {
  await page.goto("/login");
  await page.fill('input[name="token"]', AUTH_TOKEN);
  await page.click('button[type="submit"]');
  await page.waitForURL((url) => !url.pathname.includes("/login"));
}

// Navigate and wait for network idle + CSS settle
async function navigateAndSettle(page: Page, path: string) {
  await page.goto(path, { waitUntil: "networkidle" });
  await page.waitForTimeout(CSS_SETTLE_MS);
}
```

### Adding a New Page Test

```typescript
test("my new page (empty state)", async ({ page }) => {
  await navigateAndSettle(page, "/my-page");
  await expect(page).toHaveScreenshot("my-page-empty.png", {
    fullPage: true,
    maxDiffPixelRatio: MAX_DIFF_RATIO,
  });
});
```

Then generate baselines:

```bash
npx playwright test --update-snapshots -g "my new page"
```

This creates three files in `screenshots/` (one per project/viewport).

### Unauthenticated vs Authenticated Pages

- **Login page:** Test without calling `login()` first
- **All other pages:** Use `test.beforeEach` with `login(page)`:

```typescript
test.describe("Authenticated pages", () => {
  test.beforeEach(async ({ page }) => {
    await login(page);
  });

  test("page name", async ({ page }) => { ... });
});
```

## Cross-Platform Tolerance

From cedricziel/assistant, MIT.

More from cedricziel/assistant

Signals

Stars
6
Forks
1
Open issues
14
Last commit (this folder)
Apr 7, 2026 (6 months ago)
Last release
May 26, 2026 (5 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from cedricziel

Cite this page

e2e-testing skill. Agent Mart. https://agentmart.dev/skills/cedricziel-e2e-testing (last updated 2026-10-24)