test: vendor the NoNetwork fixtures from publiccode-parser-go
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- go, typescript
Research direction
Start with src/wasm/go.mod, specs/add-e2e/spec.md sections 2.7, 5.1, and 5.2, and the existing fixture guard pattern in src/app/contents/publiccode.spec.ts. Then implement the fixture fetch script, Jest guard, and contributor bump procedure described in the issue; verify the acceptance criteria, including byte-for-byte reproduction at v5.4.3 and detection of a version mismatch.
Written by the indexing model from the issue text.
Description
Context
Sub-task T9 of #655. See specs/add-e2e/spec.md §5.1 and §5.2, and §2.7 (parser version drift: fixtures must be pinned to the parser version compiled into the WASM, currently v5.4.3 in src/wasm/go.mod).
Scope
Fixtures (e2e/fixtures/)
Committed at v5.4.3, keeping the source tree layout under testdata/v0/, including the assets/ folders:
| Path | Files | Go test |
|---|---|---|
valid/no-network/ |
valid.yml, valid_with_supports.yml |
TestValidTestcasesV0_NoNetwork |
invalid/no-network/ |
landingURL_invalid, localisation_localisationReady_yaml11_{yes,no,on,off}, logo_invalid_png, logo_missing_file, monochromeLogo_invalid_png, supports_unknown_alias |
TestInvalidTestcasesV0_NoNetwork |
valid_with_warnings/no-network/ |
authorsFile.yml |
TestValidWithWarningTestcasesV0_NoNetwork |
invalid/ (optional) |
description_en_screenshots_missing_file.yml, logo_missing_url.yml |
TestRelativePathsOrURLsNoNetworkRemoteChecks |
Plus SOURCE.json (repo, ref, resolved commit SHA, fetchedAt), LICENSE.EUPL-1.2 and NOTICE.md (origin and attribution).
Excluded: TestRelativePathsOrURLsNoNetwork, because it checks paths on the local filesystem, which the browser does not have.
scripts/fetchFixtures.ts + npm run e2e:fixtures
- Arguments:
--repo(defaultitalia/publiccode-parser-go),--ref(default: the version read fromsrc/wasm/go.mod). - Shallow, sparse, blob-filtered clone into a temp dir → sparse-checkout of the paths above → replace
e2e/fixtures/testdata/v0/→ copyLICENSE→ writeNOTICE.mdandSOURCE.json. - No authentication, touches nothing outside
e2e/fixtures/. CI never downloads fixtures.
Guard
scripts/fixtures-source.spec.ts (Jest) fails if SOURCE.json.ref differs from the publiccode-parser-go version in src/wasm/go.mod, following the pattern of src/app/contents/publiccode.spec.ts.
Docs
Bump procedure in CONTRIBUTING.md:
npm run e2e:fixtures -- --ref vX.Y.Z;- review
e2e/expectations.jsonagainst the new_NoNetworktables; - commit together with the parser bump.
Open decisions
- Include the optional
TestRelativePathsOrURLsNoNetworkRemoteCheckspair? Recommended: yes, it is the only parser test that reproduces the WASM's exact condition. - Licence: redistributing EUPL-1.2 test data, with attribution, inside this AGPL-3.0 repository. Maintainers to confirm.
Side effect
Dependabot / parser bump PRs fail the guard until the fixtures are refreshed. This is intended.
Acceptance criteria
-
npm run e2e:fixturesreproduces the committed tree byte for byte atv5.4.3 -
SOURCE.json,LICENSE.EUPL-1.2andNOTICE.mdare present - The Jest guard passes now and fails when
go.modandSOURCE.jsondiverge - The bump procedure is documented in
CONTRIBUTING.md
Related
- Parent: #655
- No technical blocker; can proceed in parallel with T1–T8
- Blocks: T10 (conformance), T11 (differential filling)
- Dominant language
- TypeScript
- Stars
- 33
- Forks
- 34
- Avg merge
- 10h 50m
- Merged PRs (30d)
- 13
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from italia/publiccode-editor
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
italia/publiccode-editor#509 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
italia/publiccode-editor#701 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 3/5 1-2 days Newbie friendliness 75/100
italia/publiccode-editor#691 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 35/100
italia/publiccode-editor#666 ·
Maintainers usually reply within 1 day
-
Add end-to-end test coveragePossibly taken @valeriocomo claimed this 3 days ago. Openenhancement
Difficulty 4/5 3-5 days Newbie friendliness 48/100
italia/publiccode-editor#655 · 1 assignee ·
Maintainers usually reply within 1 day
All issues in italia/publiccode-editor
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
melgarafael/DeskcommCRM#5614 · 1 comment ·
Maintainers usually reply within 1 day
-
documentation
Difficulty 1/5 Under an hour Newbie friendliness 76/100
slackapi/slack-health-score#253 ·
Maintainers usually reply within 1 day
-
feature needs triage site
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
owid/owid-grapher#8019 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
simstudioai/sim#10710 ·
Maintainers usually reply within 1 day
-
via-triage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day