test(artifacts): fix CI-breaking fixture gap + post-merge review findings - #125
Merged
Merged
Conversation
…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).
6 tasks
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Post-merge review follow-up on the
artifactsmodule (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.tssourced its 24 fixture files from the gitignored, local-onlyElitea-testing-WebQAPreExecuted/Elitea_test_data/artifacts/directory — everyfixturePath()call resolved to a path that doesn't exist on a fresh checkout, so@artifactscould never run in CI at all..gitignorealso carried a case typo (webQAPreExecutedvs. the realWebQAPreExecuted) — harmless on macOS (case-insensitive git config) but the pattern was wrong regardless; fixed.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 updatedfixturePath()/FIXTURES_DIRto point at it.actions/checkoutalone 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-memorybuildOversizedImagePayload()helper that pads the already-committedtest-image-small.pngto 4MB and hands Playwright aFilePayloadbuffer 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:
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.<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.toBeVisible().ArtifactsPage.messageThumbnail()is now row-scoped via an optionalmessageTextparam, matching its siblingsassistantReply()/attachmentFileCard()— previously page-wide, only safe becausestartNewConversation()happens to guarantee a cleared thread.download.failure()→nullassertion, and added the assistant-reply wait that two sibling doc comments already (incorrectly) claimed TC-036 performed.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:
attachCounterText()check to TC-032 (matches its own AFS).// Known defect: GH#NNsource-comment convention for TC-034/GH#119 and TC-035/GH#114 (previously only in the assert message/step title).attachCounterText()(would require touching the sharedattachFileAndSend()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.tsrun 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)gh workflow run playwright.yml --ref tests/artifacts-module-postmerge-fixes— confirms the fixture-provisioning fix specifically (fixtures load from the committedtests/fixtures/artifacts/path, no missing-file errors)