test: cover country-specific sections
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 55/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- playwright, typescript, vite
Research direction
Read specs/add-e2e/spec.md sections 2.6 and 6.7, then inspect e2e/specs/usecases/country-default.spec.ts and e2e/specs/usecases/country-italy.spec.ts plus the Playwright project configuration. Cover the listed default and import/reset behaviors, including uppercase IT in generated YAML. The countrySpecific=none expectation depends on a maintainer decision about B5, so confirm that decision before finalizing the test.
Written by the indexing model from the issue text.
Description
Context
Sub-task T8 of #655. See specs/add-e2e/spec.md §6.7, and §2.6: VITE_DEFAULT_COUNTRY_SECTIONS is read at build time, while ?countrySpecific= is read at runtime and only accepts all and italy.
Scope
e2e/specs/usecases/country-default.spec.ts (project default) and e2e/specs/usecases/country-italy.spec.ts (project country-italy, built with VITE_DEFAULT_COUNTRY_SECTIONS=italy into dist-italy).
default project (none)
- No Italy section by default.
?countrySpecific=italyand?countrySpecific=allshow it.- Importing a file with an
ITsection:- the Italy section appears;
- the query param becomes
countrySpecific=italy; - the output YAML has uppercase
IT, because the file's version is 0.5 or later.
- Reset (
toolbar-reset→reset-confirm-submit): the section disappears and the query param is removed.
country-italy project
- The Italy section is visible by default.
?countrySpecific=nonecurrently does not hide it (B5). Depending on the decision below, this is eithertest.fail()linked to the B5 issue, or an assertion that documents the current behaviour.
Open decision
Is ?countrySpecific=none being ignored when the build default is italy a bug (B5)? Owner: product / maintainers. If yes, open the B5 issue before merging so test.fail() can link to it.
Acceptance criteria
- Both projects pass in CI;
country-italy*specs run only in thecountry-italyproject - Query param sync is covered on import and on reset
- Uppercase
ITis checked in the generated YAML - The B5 behaviour is covered according to the decision (
test.fail()+ issue link, or a documenting assertion)
Related
- Parent: #655
- Depends on: #682, #683
- Linked bug: B5 (to be opened if judged a bug)
- 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
-
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