Skip to content

test(e2e): fix two stale CLI output expectations#403

Merged
UtkarshBhardwaj007 merged 1 commit into
mainfrom
fix/stale-e2e-test-expectations
Jun 16, 2026
Merged

test(e2e): fix two stale CLI output expectations#403
UtkarshBhardwaj007 merged 1 commit into
mainfrom
fix/stale-e2e-test-expectations

Conversation

@UtkarshBhardwaj007

Copy link
Copy Markdown
Member

What

Fixes two E2E assertions that drifted from current behavior and were failing independently of any feature work (red on main, e.g. the #401 merge run).

1. mod.test.tsdot mod — clone

The template repo (paritytech/Rock-Paper-Scissors) updated its setup.sh: it no longer prints [setup] Rock Paper Scissors tutorial. Its progress lines are now ==>-prefixed (e.g. ==> Installing npm dependencies...).

expected '==> Installing npm dependencies...' to contain '[setup]'

Now asserts the ==> prefix — robust to the upstream template tweaking its individual step messages, while still proving setup.sh ran and produced output.

2. build.test.ts — no build strategy

The contracts-only fixture has only foundry.toml (no package.json). src/utils/build/detect.ts checks for a missing package.json before the generic no-strategy hint, so it emits the more specific, more helpful message:

expected '✖ No package.json found in /tmp/dot…' to contain 'No build strategy detected'

Now asserts No package.json found (the message that fixture actually produces). Renamed the test to "exits non-zero when there's nothing to build" to match.

Why these are correct (not guesses)

  • The ==> output was verified against the live setup.sh on the template repo's default branch.
  • The No package.json found message was verified against src/utils/build/detect.ts and the contracts-only fixture (only foundry.toml, no package.json). The unit test src/utils/build/detect.test.ts already asserts both branches.

Notes

  • Test-only change; no changeset (per repo convention).
  • These E2E cells require testnet to run, so the assertions were matched to verified current output rather than re-run locally.

Both assertions drifted from current behavior:

- mod clone: the template (paritytech/Rock-Paper-Scissors) setup.sh no
  longer prints "[setup] …"; its progress lines are now "==>"-prefixed
  (e.g. "==> Installing npm dependencies..."). Match the "==>" prefix so
  the check is robust to upstream wording.

- build no-strategy: the contracts-only fixture has only foundry.toml
  and no package.json, so detect.ts now reports the more specific
  "No package.json found" guidance rather than the generic
  "No build strategy detected". Assert the message the fixture actually
  produces.
@github-actions

Copy link
Copy Markdown
Contributor

Dev build ready — try this branch:

curl -fsSL https://raw.githubusercontent.com/paritytech/playground-cli/main/install.sh | VERSION=dev/fix/stale-e2e-test-expectations bash

@UtkarshBhardwaj007 UtkarshBhardwaj007 merged commit 9689929 into main Jun 16, 2026
19 of 20 checks passed
@UtkarshBhardwaj007 UtkarshBhardwaj007 deleted the fix/stale-e2e-test-expectations branch June 16, 2026 16:52
@github-actions

github-actions Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

E2E Test Pass · ❌ FAIL

Tag: e2e-ci-pr · Branch: fix/stale-e2e-test-expectations · Commit: 09ff08d · Run logs

Cell Result Time
pr-deploy-frontend ❌ FAIL 14m04s
${{ matrix.cell }} ⏭️ SKIP -11m-29s
pr-install ✅ PASS 0m48s
pr-mod ✅ PASS 1m29s
pr-login-session ✅ PASS 1m49s
pr-deploy-foundry ✅ PASS 0m45s
${{ matrix.cell }} ⏭️ SKIP -11m-36s
pr-preflight ✅ PASS 3m43s
pr-deploy-cdm ✅ PASS 3m52s

Sentry traces: view spans for this run

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