Skip to content

test(artifacts): fix CI-breaking fixture gap + post-merge review findings - #125

Merged
bermudas merged 1 commit into
mainfrom
tests/artifacts-module-postmerge-fixes
Jul 6, 2026
Merged

test(artifacts): fix CI-breaking fixture gap + post-merge review findings#125
bermudas merged 1 commit into
mainfrom
tests/artifacts-module-postmerge-fixes

Conversation

@bermudas

@bermudas bermudas commented Jul 6, 2026

Copy link
Copy Markdown
Owner

Summary

Post-merge review follow-up on the artifacts module (TC-030..043, merged in #123). Fixes a CI-breaking gap plus several review findings — no new test cases, no rescoping.

Critical — CI could never actually run this suite:

  • tests/artifacts.spec.ts sourced its 24 fixture files from the gitignored, local-only Elitea-testing-WebQAPreExecuted/Elitea_test_data/artifacts/ directory — every fixturePath() call resolved to a path that doesn't exist on a fresh checkout, so @artifacts could never run in CI at all.
  • .gitignore also carried a case typo (webQAPreExecuted vs. the real WebQAPreExecuted) — harmless on macOS (case-insensitive git config) but the pattern was wrong regardless; fixed.
  • Fix: established tests/fixtures/artifacts/ as this project's first committed-binary-fixture convention, copied the 24 needed files there (SHA-256-verified byte-identical to the originals), and updated fixturePath()/FIXTURES_DIR to point at it. actions/checkout alone now makes them available in CI — no separate provisioning step needed.
  • test-large-image.png (27MB, TC-033 only) was not committed — replaced with an in-memory buildOversizedImagePayload() helper that pads the already-committed test-image-small.png to 4MB and hands Playwright a FilePayload buffer directly (the app's size-limit check is confirmed client-side/byte-length-based, so this is functionally identical to the original fixture for this test's purpose).

Important fixes:

  • Strengthened 5 assistant-reply-content assertions (TC-030/035/039/040/041) that only checked toBeVisible() or a trivial /\S/ regex, to match what their own AFS documents as "the strongest available proof the model genuinely processed the image" — using the literal text embedded in each fixture (generate_test_images.py) as the assertion target.
  • TC-035's chat-modal GH#114 check compared an <img src="blob:..."> attribute before/after a wait, which can never detect GIF frame animation (a blob URL doesn't mutate on frame change). Replaced with the same .screenshot() pixel-diff technique the sibling Artifacts-bucket-panel check two steps later already uses correctly.
  • TC-034: implemented the AFS's claimed size/bounding-box comparison (modal image genuinely renders larger than the inline thumbnail) instead of a bare toBeVisible().
  • ArtifactsPage.messageThumbnail() is now row-scoped via an optional messageText param, matching its siblings assistantReply()/attachmentFileCard() — previously page-wide, only safe because startNewConversation() happens to guarantee a cleared thread.
  • TC-036: added the AFS's download.failure()null assertion, and added the assistant-reply wait that two sibling doc comments already (incorrectly) claimed TC-036 performed.
  • TC-043 previously leaked 10 files into the shared bucket every run with no cleanup. Added real teardown (same deleteArtifactAndVerify() pattern as TC-042) and amended the AFS's Cleanup section to document why the original "no cleanup" call doesn't transfer to a real storage footprint.

Nits:

  • Added the previously-missing attachCounterText() check to TC-032 (matches its own AFS).
  • Standardized the // Known defect: GH#NN source-comment convention for TC-034/GH#119 and TC-035/GH#114 (previously only in the assert message/step title).
  • Deferred: TC-030's attachCounterText() (would require touching the shared attachFileAndSend() helper used by 4 other tests) and TC-033's bucket-totals corroborating check (low value given the network-level proof already covers it).

Test plan

  • npx playwright test tests/artifacts.spec.ts run locally at least twice — all fixes verified functioning; TC-034/TC-035 fail for the known, already-filed, non-blocking product defects GH#119/GH#114 (expect.soft(), unchanged from the merged baseline)
  • CI run triggered via gh workflow run playwright.yml --ref tests/artifacts-module-postmerge-fixes — confirms the fixture-provisioning fix specifically (fixtures load from the committed tests/fixtures/artifacts/ path, no missing-file errors)

…ings (PR #123 follow-up)

The @artifacts suite (TC-030..043) could never actually run in CI: its 24
fixture files lived only under the gitignored, local-only
Elitea-testing-WebQAPreExecuted/Elitea_test_data/artifacts/ directory, so
every fixturePath() call resolved to a path absent on a fresh checkout.
Established tests/fixtures/artifacts/ as this project's first committed-
binary-fixture convention and copied the 24 needed files there (SHA-256
verified byte-identical). test-large-image.png (27MB) is generated
in-memory instead of committed (buildOversizedImagePayload()). Also fixed
the .gitignore case-typo that made this invisible locally.

Also addresses post-merge review findings: strengthened 5 assertions that
only checked toBeVisible()/a trivial regex where their own AFS calls for
real content-specific proof; fixed TC-035's GH#114 chat-modal check (a
src-attribute comparison that could never detect GIF animation) to use the
same screenshot-diff technique its sibling check already uses; implemented
TC-034's claimed size/bounding-box comparison; row-scoped
messageThumbnail() to match its siblings; added TC-036's missing
download.failure() assertion and its own assistant-reply wait; and added
real teardown to TC-043 (was permanently leaking 10 files/run).
@bermudas
bermudas merged commit f86beb0 into main Jul 6, 2026
0 of 3 checks passed
@bermudas
bermudas deleted the tests/artifacts-module-postmerge-fixes branch July 6, 2026 14:08
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