test: cover validation of valid and invalid publiccode.yml files
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 75/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- playwright, typescript, wasm
Research direction
Start with e2e/specs/usecases/validate.spec.ts, then read the referenced spec sections §2 and §6.5 and the existing canary in e2e/specs/usecases/canary.spec.ts. Add the validation cases and reusable EditorPage helpers for notification and field errors, comparing keys only. Done means the valid, invalid, warning, and WASM canary cases pass in CI and the helpers are ready for T10.
Written by the indexing model from the issue text.
Description
Context
Sub-task T6 of #655. See specs/add-e2e/spec.md §6.5, and §2 for the constraints (errors only after Validate, false pass without the WASM, keys only).
Scope
e2e/specs/usecases/validate.spec.ts.
- Canary on import: an imported invalid file produces errors, which proves the WASM is active. This complements the existing canary on an empty form (
e2e/specs/usecases/canary.spec.ts). - Valid file: import, then Validate (
toolbar-submit), then the success notification. - Invalid file: import, then Validate:
- the "Validation errors" notification appears;
field-error-*appears on the expected field, when that field is visible;- errors without a key appear as items in the notification.
- File with warnings: Validate succeeds and the
warning-items stay visible. - Assertions compare keys only, never line and column.
- Validation helpers in
EditorPage(reading errors from the notification and fromfield-error-*), so that T10 (conformance) can reuse them.
Acceptance criteria
- All cases pass in CI with the WASM loaded
- The validation helpers are part of
EditorPageand ready for T10
Related
- Parent: #655
- Depends on: #682, #683
- Blocks: T10 (conformance over the NoNetwork fixtures)
- 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 4/5 3-5 days Newbie friendliness 45/100
italia/publiccode-editor#702 ·
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 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