Skip to content

Add e2e coverage for Local, Playground, .wpress and existing-site imports#4057

Merged
youknowriad merged 4 commits into
trunkfrom
add-import-formats-e2e
Jul 7, 2026
Merged

Add e2e coverage for Local, Playground, .wpress and existing-site imports#4057
youknowriad merged 4 commits into
trunkfrom
add-import-formats-e2e

Conversation

@youknowriad

@youknowriad youknowriad commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Related issues

  • Related to the manual pre-release test sheet (Import / Export section — rows "Imports new site from Jetpack Backup file", "Imports new site from Local backup file", "Imports new site from Playground backup file", "Imports new site from .wpress backup file", and "Imports backup file to existing site")

How AI was used in this PR

Claude Code identified the remaining Import/Export rows of the manual pre-release test sheet with no automated coverage, wrote the tests, and iterated against a real packaged build until all five pass. Early iterations surfaced two behaviors that shaped the tests: imports replace the destination's wp-content (so fixtures must carry the active theme), and macOS AppleDouble entries in a tarball are picked up as SQL files (the committed tarball is built without them).

Proposed Changes

Adds automated end-to-end coverage for backup imports across all supported formats — previously manual-only (or, for Jetpack, skipped unless a privately shared file is provisioned):

  • Jetpack, Local (by Flywheel), Playground, and All-in-One WP Migration (.wpress) imports each create a new site from a committed fixture archive.
  • Import into an existing site exercises the Import/Export tab drop-zone flow, including the overwrite confirmation dialog.
  • After every import, the test verifies the site boots and serves the fixture's content: frontend title, the fixture's posts and pages in wp-admin, and its custom theme installed and active — proving a real database + wp-content round trip rather than a fresh install.

The fixtures (~1.5 MB total, under e2e/fixtures/backups/) were generated from a demo Studio site with a small custom theme and a few posts/pages; they contain no personal data (single admin <admin@localhost.com> user). The Jetpack fixture mimics the real per-table layout (sql/wp_*.sql + meta.json), exercising the multi-file SQL import path; the release-time test against a genuine WordPress.com backup remains in import.test.ts. fixtures/backups/readme.md documents provenance and structure.

Test-only change, cross-platform.

Testing Instructions

  • npm run cli:build
  • npm run package -w apps/studio
  • npx playwright test apps/studio/e2e/import-formats.test.ts
  • Passes locally against a packaged build (5 tests).

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors? (eslint + typecheck clean for the added file)

@youknowriad youknowriad force-pushed the add-import-formats-e2e branch from 1b88912 to a7d998c Compare July 6, 2026 11:34
@youknowriad youknowriad enabled auto-merge (squash) July 6, 2026 11:34
@youknowriad youknowriad disabled auto-merge July 7, 2026 14:22
@youknowriad youknowriad merged commit 8f898c2 into trunk Jul 7, 2026
11 checks passed
@youknowriad youknowriad deleted the add-import-formats-e2e branch July 7, 2026 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant