Skip to content

Rewire import e2e test to a hosted Jetpack backup#4186

Open
gcsecsey wants to merge 3 commits into
gcsecsey/stu-1866-add-fixture-prep-scriptfrom
gcsecsey/stu-1870-import-test-hosted-backup
Open

Rewire import e2e test to a hosted Jetpack backup#4186
gcsecsey wants to merge 3 commits into
gcsecsey/stu-1866-add-fixture-prep-scriptfrom
gcsecsey/stu-1870-import-test-hosted-backup

Conversation

@gcsecsey

@gcsecsey gcsecsey commented Jul 13, 2026

Copy link
Copy Markdown
Member

Related issues

How AI was used in this PR

Claude Code seeded the source site's content, pre-flighted the artifact through real CLI imports (which surfaced a platform drop-in bug — Linear issue incoming), and implemented the rewire under my direction; I reviewed the result.

Proposed Changes

import.test.ts — the release-time test that imports a genuine WordPress.com Jetpack backup — has silently skipped in CI since it was written: its archive had to be fetched by hand from an internal P2, and the files there went stale. The minimal fixture in import-formats.test.ts covers the format's shape; this test's distinct job is catching drift in what customer backups actually contain, so it needs a real, current artifact.

  • The test consumes test-fixtures/downloads/coolbeans-jetpack-backup-2026-07.tar.gz, fetched by the Add manifest-driven prep script for hosted data-heavy e2e fixtures #4152 pipeline from the fixtures site. Locally it still skips with an actionable message when the file is absent; in CI the prep step hard-fails first, so the silent-skip era ends.
  • The backup is a genuine Jetpack Cloud export (149 MB, 51 per-table SQL files incl. WooCommerce tables, full uploads tree, wpcomsh mu-plugins, __wp__ core dir) of Cool Beans (gcsecseywoa11.wpcomstaging.com), a purpose-built public test site whose content is self-describing: a hero post stating the site's purpose, encoding-test posts (ASCII and UTF-8/emoji), a long-form truncation canary, media/taxonomy/comment-thread tests, and nested pages.
  • Assertions verify the imported site really serves the backup: blog name + tagline in the page title, the custom theme's landing page rendering, and the hero post resolving at its pretty permalink (which also proves the permalink structure imported).
  • One sanitization, documented in the manifest: the archive's wp-content/object-cache.php (WP.com platform Memcached drop-in) is removed — importing it fatals the local site. That importer gap is being filed separately; once fixed, an unsanitized copy should become the regression fixture. Everything else, including wpcomsh and the core tree, is kept for realism.
  • The stale apps/studio/e2e/imports/ directory, its P2-pointing readme, and its .gitignore entries are removed.

Verified end to end

  • npm run e2e:fixtures downloads the wrapper from the live fixtures site, verifies both SHA-256 hashes, unwraps; a second run verified-skips both fixtures.
  • Pre-flight of this exact artifact through the real CLI: import exits 0, wp option get blognameCool Beans, started site serves HTTP 200 with the full title, theme landing renders, hero permalink returns 200 with the checklist text — i.e., every assertion in this PR's test, validated against the shipped artifact.

Testing Instructions

  1. npm run e2e:fixtures — downloads + verifies both hosted fixtures (~150 MB).
  2. This PR's e2e CI runs import.test.ts for real for the first time — the E2E jobs are the authoritative proof (note: they now download the artifact; mac/windows cache it keyed on the manifest, Linux fetches per run).

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

@gcsecsey gcsecsey changed the title Rewire import e2e test to a hosted real Jetpack backup Rewire import e2e test to a hosted Jetpack backup Jul 13, 2026
@gcsecsey gcsecsey marked this pull request as ready for review July 13, 2026 18:14
@gcsecsey gcsecsey requested a review from gavande1 July 13, 2026 18:14
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