Skip to content

Fix e2e cleanup#7936

Merged
isaacroldan merged 2 commits into
mainfrom
06-26-fix_e2e_cleanup
Jun 26, 2026
Merged

Fix e2e cleanup#7936
isaacroldan merged 2 commits into
mainfrom
06-26-fix_e2e_cleanup

Conversation

@isaacroldan

@isaacroldan isaacroldan commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Why

The e2e tests create temporary Shopify apps in the Dev Dashboard. Each app name includes the GitHub Actions run token, for example E2E-scaf-rcyjrwc3a1-mqu8cgqh, so cleanup can find everything created by one run.

A previous run left apps behind even though the cleanup step ran. The per-test delete flow failed on a Dev Dashboard error page, then the fallback cleanup opened the apps list and saw 0 app cards. Because the script treated that as a real empty result, it exited successfully instead of retrying or failing.

What

This makes the fallback cleanup more reliable:

  • It opens the Dev Dashboard apps page with search_term=<run token>, so the page only returns apps from the current e2e run instead of scanning every app in the org.
  • It still checks the returned cards locally before deleting anything.
  • It accepts the dashboard's real empty-search state (No apps matched your search.) as a valid zero-result cleanup.
  • It rejects broken dashboard states, such as error pages or pages with no app cards and no empty-search message, and retries before failing.

Testing

  • pnpm --filter e2e exec tsx scripts/cleanup-apps.ts --list --pattern rcyjrwc3a1
  • pnpm --filter e2e exec tsx scripts/cleanup-apps.ts --list --pattern rcyjrwc3a1ss
  • pnpm --filter e2e type-check
  • git diff --check

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions github-actions Bot added the no-changelog This PR doesn't include a changeset entry. Is an internal only change not relevant to end users. label Jun 26, 2026
@isaacroldan isaacroldan marked this pull request as ready for review June 26, 2026 12:15
@isaacroldan isaacroldan requested a review from a team as a code owner June 26, 2026 12:15
Assisted-By: devx/6d93e11e-762b-48c5-9bcf-265de5035498
@isaacroldan isaacroldan added this pull request to the merge queue Jun 26, 2026
Merged via the queue into main with commit 2a5b3dc Jun 26, 2026
49 of 51 checks passed
@isaacroldan isaacroldan deleted the 06-26-fix_e2e_cleanup branch June 26, 2026 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog This PR doesn't include a changeset entry. Is an internal only change not relevant to end users.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants