Problem/Feature
When multiple tests share a dev store, earlier test failures can leave state (installed apps, modified config) that causes later tests to fail. Shared stores also prevent true parallel execution since app dev binds to a specific store.
Proposed Solution
- Per-test dev store creation:
storeTestFixture (test-scoped, not worker-scoped) creates a fresh dev store per test via browser automation on admin.shopify.com/store-create/organization/{orgId}
- Handles shadow DOM form elements (
s-internal-text-field, s-internal-select) using chained Playwright locators
- Selects a random plan from available options
- Waits for redirect to confirm store creation, extracts FQDN
- Robust teardown with escalating retry (
setup/teardown.ts):
- Phase 1: Uninstall app from store (verified via "Add apps to your store" empty state)
- Phase 2: Delete store (verified via "Your plan was canceled" page). Escalates to phase 1 on failure (re-uninstall before retrying delete)
- Phase 3: Delete app from dev dashboard (always runs, even if phases 1-2 fail)
- Each phase is independent — failure never prevents later phases
- Safety check:
deleteStoreFromAdmin refuses to delete if apps are still installed (prevents orphaned app installs)
- Cleanup scripts for manual/CI use:
scripts/cleanup-stores.ts — find and delete leftover E2E stores (uninstall apps first)
scripts/cleanup-apps.ts — find and delete leftover E2E apps from dev dashboard
pnpm test:e2e-cleanup runs both (stores first, then apps)
- Tagged logging:
[e2e][w0][browser], [e2e][w1][cli] etc. with section headers (----- SETUP: store ... -----, ----- TEARDOWN: app ... -----) for debugging parallel output
Expected result: Each test is fully isolated — no shared store state, no cross-test interference, safe cleanup even on failure.
Problem/Feature
When multiple tests share a dev store, earlier test failures can leave state (installed apps, modified config) that causes later tests to fail. Shared stores also prevent true parallel execution since
app devbinds to a specific store.Proposed Solution
storeTestFixture(test-scoped, not worker-scoped) creates a fresh dev store per test via browser automation onadmin.shopify.com/store-create/organization/{orgId}s-internal-text-field,s-internal-select) using chained Playwright locatorssetup/teardown.ts):deleteStoreFromAdminrefuses to delete if apps are still installed (prevents orphaned app installs)scripts/cleanup-stores.ts— find and delete leftover E2E stores (uninstall apps first)scripts/cleanup-apps.ts— find and delete leftover E2E apps from dev dashboardpnpm test:e2e-cleanupruns both (stores first, then apps)[e2e][w0][browser],[e2e][w1][cli]etc. with section headers (----- SETUP: store ... -----,----- TEARDOWN: app ... -----) for debugging parallel outputExpected result: Each test is fully isolated — no shared store state, no cross-test interference, safe cleanup even on failure.