pytest-given 0.5.1__tar.gz → 0.5.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pytest_given-0.5.1 → pytest_given-0.5.2}/AGENTS.md +1 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/CHANGELOG.md +16 -1
- pytest_given-0.5.2/GLOSSARY.md +116 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/PKG-INFO +10 -1
- {pytest_given-0.5.1 → pytest_given-0.5.2}/README.md +9 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/pyproject.toml +2 -4
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/.agents/skills/pytest-given-authoring/references/glossaries.md +2 -2
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/.agents/skills/pytest-given-authoring/references/parameter-tables.md +4 -2
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/.agents/skills/pytest-given-reviewing/SKILL.md +2 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/.agents/skills/pytest-given-reviewing/references/completeness.md +1 -1
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/.agents/skills/pytest-given-reviewing/references/hygiene.md +1 -1
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/model/errors.py +5 -3
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/plugin/case_ids.py +25 -15
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/plugin/fixtures.py +5 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/report/html_renderer.py +22 -1
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/report/templates/_macros.html.j2 +2 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/report/templates/report.html.j2 +6 -1
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/report/templates/styles.css +56 -5
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/integration/test_plugin.py +67 -65
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/capture/test_glossary.py +30 -26
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/capture/test_kind_inference.py +47 -18
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/capture/test_step_descriptor.py +11 -32
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/capture/test_story.py +13 -24
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/capture/test_template.py +11 -19
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/report/test_coverage.py +15 -37
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/report/test_html_renderer.py +57 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/report/test_story_view.py +14 -19
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/test_plugin.py +34 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/uv.lock +230 -218
- pytest_given-0.5.1/GLOSSARY.md +0 -116
- {pytest_given-0.5.1 → pytest_given-0.5.2}/.gitignore +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/LICENSE.md +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/THIRD-PARTY-LICENSES +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/conftest.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/docs/site/configuration/narration-lint.md +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/noxfile.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/.agents/skills/pytest-given-authoring/SKILL.md +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/.agents/skills/pytest-given-authoring/references/api.md +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/.agents/skills/pytest-given-authoring/references/lint.md +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/.agents/skills/pytest-given-authoring/references/scenarios.md +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/.agents/skills/pytest-given-authoring/references/stories.md +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/.agents/skills/pytest-given-citing/SKILL.md +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/.agents/skills/pytest-given-citing/references/repair.md +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/.agents/skills/pytest-given-navigating/SKILL.md +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/.agents/skills/pytest-given-navigating/references/report-json.md +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/.agents/skills/pytest-given-reviewing/references/story-coverage.md +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/__init__.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/capture/__init__.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/capture/collector.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/capture/discovery.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/capture/file_glossary.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/capture/glossary.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/capture/kind_inference.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/capture/markdown_glossary.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/capture/process_state.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/capture/scenario.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/capture/source.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/capture/steps.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/capture/story.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/capture/template.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/capture/traceback.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/citations/__init__.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/citations/check.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/citations/markdown_links.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/citations/narrated.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/citations/targets.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/cli/__init__.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/cli/citations.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/cli/report.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/cli/skills.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/grouping/__init__.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/grouping/attachments.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/grouping/checks.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/grouping/columns.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/grouping/context.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/grouping/group.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/grouping/percase.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/grouping/templatize.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/lint/__init__.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/lint/ast_rules.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/lint/base.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/lint/config.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/lint/runner.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/lint/runtime_rules.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/lint/summary.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/markdown/__init__.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/markdown/blocks.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/markdown/plain_text.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/markdown/spans.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/model/__init__.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/model/narration.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/model/report_url.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/model/runtime.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/model/schema.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/model/serde.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/model/steps.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/model/text.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/plugin/__init__.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/plugin/collection.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/plugin/options.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/plugin/runtest.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/plugin/session.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/plugin/state.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/py.typed +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/report/__init__.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/report/citation_index.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/report/console.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/report/coverage.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/report/function_source.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/report/glossary_view.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/report/inline_markdown.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/report/link_text.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/report/markdown_writer.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/report/md_renderer.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/report/palette.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/report/sinks.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/report/slugs.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/report/source_link.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/report/staged_write.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/report/story_view.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/report/templates/alpine.min.js +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/report/templates/app.js +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/report/templates/fonts/source-code-pro-latin-wght-normal.woff2 +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/report/templates/fonts/source-sans-3-latin-wght-normal.woff2 +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/report/templates/logo.svg +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/report/text.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/src/pytest_given/report/theme.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/__init__.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/conftest.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/integration/__init__.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/integration/test_cli.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/integration/test_cli_citations.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/integration/test_lazy_imports.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/integration/test_plugin_file_glossary.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/integration/test_plugin_lint.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/integration/test_plugin_session_isolation.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/integration/test_skills_cli.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/ubiquitous_language.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/__init__.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/capture/__init__.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/capture/test_collector.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/capture/test_discovery.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/capture/test_file_glossary.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/capture/test_markdown_glossary.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/capture/test_rootdir_isolation.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/capture/test_source.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/capture/test_traceback_parser.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/citation_reports.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/citations/__init__.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/citations/fixtures/citation-forms.md +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/citations/test_check.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/citations/test_markdown_links.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/citations/test_markdown_links_oracle.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/citations/test_narrated.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/citations/test_targets.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/lint/__init__.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/lint/test_ast_rules.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/lint/test_config.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/lint/test_runtime_rules.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/lint/test_summary.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/markdown/__init__.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/markdown/test_blocks.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/markdown/test_plain_text.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/markdown/test_spans.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/model/__init__.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/model/test_errors.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/model/test_narration.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/model/test_report_url.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/model/test_schema.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/model/test_serde.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/model/test_steps.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/model/test_text.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/report/__init__.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/report/app_data.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/report/test_citation_index.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/report/test_function_source.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/report/test_glossary_view.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/report/test_inline_markdown.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/report/test_link_text.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/report/test_markdown_writer.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/report/test_md_renderer.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/report/test_palette.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/report/test_sinks.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/report/test_slugs.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/report/test_source_link.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/report/test_staged_write.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/report/test_theme.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/test_grouping.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/test_percase.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/test_plugin_traceback.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/test_project_glossary.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/test_quickstart.py +0 -0
- {pytest_given-0.5.1 → pytest_given-0.5.2}/tests/unit/test_skills_data.py +0 -0
|
@@ -33,6 +33,7 @@ uv sync --group dev
|
|
|
33
33
|
- `uv run nox -s docs_build` builds the documentation site under `site/` with `zensical build --strict`; run it after changing anything under `docs/site/` (a broken cross-page link fails it) and preview with `uv run --group docs zensical serve`. `docs_deploy` is the CI-only counterpart that publishes with mike — see [docs/releasing.md](docs/releasing.md#documentation-site).
|
|
34
34
|
- Zensical builds every file in `docs/site/` and cannot exclude any, so a file single-sourced elsewhere gets in by a copy the build stages into a gitignored spot (listed in `_build_docs`) or by a `pymdownx.snippets` include — never by a committed second copy.
|
|
35
35
|
- `docs/pytest-given-diagram.svg`, the README's diagram and the Home page's full-size view, is derived with the font embedded and the colour tokens resolved: after editing the source SVG (`docs/site/assets/pytest-given-diagram.svg`) or its tokens, run `uv run nox -s diagram` and commit the result.
|
|
36
|
+
- `docs/site/assets/report-screenshot-{light,dark}.png`, shown on the README and the Home page, are captured by hand: the Hotel booking report at a 1120×588 viewport and device scale 2, with *Cancelling a paid booking refunds it and notifies the guest* expanded, one capture per setting of the report's theme switch. Retake both when the report's look changes.
|
|
36
37
|
- The site self-hosts its fonts so a visitor's browser contacts no third party — keep `font = false` in `zensical.toml` and don't `@import` a font CDN. Only the italics live in `docs/site/assets/fonts/` (latin subsets from Fontsource); a new face gets its `.woff2` there and its copyright line in that folder's `LICENSES.txt`.
|
|
37
38
|
|
|
38
39
|
## Releasing
|
|
@@ -11,6 +11,20 @@ form `## [x.y.z] - YYYY-MM-DD`.
|
|
|
11
11
|
|
|
12
12
|
<!-- --8<-- [start:site] -->
|
|
13
13
|
|
|
14
|
+
## [0.5.2] - 2026-11-07
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- The HTML report is visually tidied: scrolled content now stops short of the tab rule, a step's attachments no longer crowd the step below, and a scenario's source link shares its last step's line when there is room.
|
|
19
|
+
- An HTML report's parameter table keeps the whitespace in its values, and shows a column narrated with `!r` or `!a` in a monospace font, in its cells and when a hovered row fills in its steps.
|
|
20
|
+
- The bundled `pytest-given-authoring` and `pytest-given-reviewing` skills hold glossary terms and definitions to concepts instead of implementation details.
|
|
21
|
+
- The bundled `pytest-given-authoring` and `pytest-given-reviewing` skills move a trivial control row out of a parameter table when it complicates the narration.
|
|
22
|
+
|
|
23
|
+
### Fixed
|
|
24
|
+
|
|
25
|
+
- A parameter table no longer shows an id column for a long value that pytest 9.2's `parametrize_long_str_id_strategy = sha256` names by its digest.
|
|
26
|
+
- An HTML report Glossary entry now says when no scenario uses its term, so one without stories or forms no longer opens to an empty panel.
|
|
27
|
+
|
|
14
28
|
## [0.5.1] - 2026-10-24
|
|
15
29
|
|
|
16
30
|
### Added
|
|
@@ -465,7 +479,8 @@ First public release.
|
|
|
465
479
|
- Bundled authoring, navigating, and reviewing skills for AI agents, shipped in
|
|
466
480
|
the wheel and version-matched to the plugin.
|
|
467
481
|
|
|
468
|
-
[Unreleased]: https://github.com/nwilbert/pytest-given/compare/v0.5.
|
|
482
|
+
[Unreleased]: https://github.com/nwilbert/pytest-given/compare/v0.5.2...HEAD
|
|
483
|
+
[0.5.2]: https://github.com/nwilbert/pytest-given/compare/v0.5.1...v0.5.2
|
|
469
484
|
[0.5.1]: https://github.com/nwilbert/pytest-given/compare/v0.5.0...v0.5.1
|
|
470
485
|
[0.5.0]: https://github.com/nwilbert/pytest-given/compare/v0.4.1...v0.5.0
|
|
471
486
|
[0.4.1]: https://github.com/nwilbert/pytest-given/compare/v0.4.0...v0.4.1
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# Glossary
|
|
2
|
+
|
|
3
|
+
Canonical vocabulary for pytest-given. Use these terms in code, docs, commit messages, and conversation; flag inconsistencies in review.
|
|
4
|
+
|
|
5
|
+
This glossary covers pytest-given's own bounded context. The terminology a *user's* test suite adopts (the domain the user is testing — e.g., the coffee domain in `examples/coffeeshop/test_coffeeshop.py`) is a separate concern.
|
|
6
|
+
|
|
7
|
+
**Update rule:** rename or repurpose a term → update this file in the same commit.
|
|
8
|
+
|
|
9
|
+
## Core test model
|
|
10
|
+
|
|
11
|
+
| Term | Meaning |
|
|
12
|
+
|---|---|
|
|
13
|
+
| **Scenario** | A test that narrates the rule it demonstrates, marked with `@scenario`. Tests without the mark stay out of the report. |
|
|
14
|
+
| **Scenario title** | The statement of the rule a *Scenario* demonstrates. Not the test function's name, which the *Node ID* carries. |
|
|
15
|
+
| **Step** | A unit of narration in one *Phase*. Steps nest and may carry *Attachments*, but have no status or error of their own: a failure belongs to the *Scenario*, and to its *Case* in a *Parameter table*. |
|
|
16
|
+
| **Narration** | The human-readable text on a step or scenario title, which may mix plain text with values, placeholders and *term refs*. |
|
|
17
|
+
| **Phase** | The category of a step: `given`, `when`, or `then`. A step has exactly one phase. |
|
|
18
|
+
| **when_then** | One block that narrates a `when` action and its `then` outcome as two sibling steps. Used mainly to narrate an expected raise, so the action and its outcome stay distinct steps. |
|
|
19
|
+
| **Tag** | A free-form label on a scenario. A `/` nests it: `ticket/ABC-123` sits under `ticket`. |
|
|
20
|
+
| **Attachment** | A labeled piece of text or JSON bound to the step being narrated. |
|
|
21
|
+
|
|
22
|
+
## Parametrization
|
|
23
|
+
|
|
24
|
+
| Term | Meaning |
|
|
25
|
+
|---|---|
|
|
26
|
+
| **Parametrized scenario** | A *Scenario* whose test is parametrized, so it runs once per *Case*. pytest-given groups the results. |
|
|
27
|
+
| **Case** | One row of a parametrized scenario: its node ID, its parameter values, its status and any error. |
|
|
28
|
+
| **Case ID** | A *Case*'s pytest ID: its *Node ID*'s parametrize tail without the brackets (`touching-edges`), as the terminal prints it. *Custom* when it is more than its values' generated parts, as from `pytest.param(..., id=...)` or `ids=`. |
|
|
29
|
+
| **Parameter table** | The per-scenario table of cases and columns. A column is a `param` (a parametrize input), a `derived` (a narrated value that varies across cases) or an `attachment` (an attachment whose payload varies). |
|
|
30
|
+
| **Group** | Collapsing the cases of a parametrized scenario into one logical scenario carrying a *Parameter table*. Cases group when they share both the same name and the same *Node ID* without its parametrize tail — one test function; two same-named scenarios on different test functions stay separate. `@scenario(group_parametrized=False)` declines the merge, so each case lives on as its own scenario. |
|
|
31
|
+
| **Templatize** | Derive the grouped-template step text by comparing every comparable case: what all of them share stays inline, and anything that varies points at a parameter-table column. The baseline comes from the first passed case, and every other passed case must narrate that same template — a failed case too, over the steps it shares with the baseline. |
|
|
32
|
+
|
|
33
|
+
## Fixtures and recording
|
|
34
|
+
|
|
35
|
+
| Term | Meaning |
|
|
36
|
+
|---|---|
|
|
37
|
+
| **Step fixture** | A pytest fixture that narrates its setup as a `given` *Step*. A fixture cannot narrate `when` or `then`. |
|
|
38
|
+
| **Plain fixture** | A pytest fixture without a pytest-given decorator. It produces no step in the report unless a *Given annotation* on the test's parameter narrates it. |
|
|
39
|
+
| **Given annotation** | A `given(...)` in a test parameter's `Annotated[...]` type: `def test(room: Annotated[int, given('a room')])`. On a parametrize value or a *Plain fixture* it adds a childless `given` step; on a *Step fixture* it replaces the fixture's root label and its pins. Only `given` is allowed, and a `Template` in it may only hold a bare parametrize column. |
|
|
40
|
+
| **Fixture recording** | The steps and attachments a step fixture narrates during setup. A generator fixture's teardown records nothing — it refuses steps and attachments. |
|
|
41
|
+
| **Graft** | Attaching a fixture recording into the active scenario's step tree at the moment its host test starts. |
|
|
42
|
+
|
|
43
|
+
## Collector state
|
|
44
|
+
|
|
45
|
+
| Term | Meaning |
|
|
46
|
+
|---|---|
|
|
47
|
+
| **Collector** | What gathers a session's scenarios, fixture recordings and parameter info. |
|
|
48
|
+
| **Active scenario** | The scenario currently being recorded into. |
|
|
49
|
+
| **Node ID** | A pytest test identifier (e.g., `tests/test_x.py::test_y[a-b]`). |
|
|
50
|
+
| **Step stack** | The chain of currently-open steps. Opening a step adds it, and leaving its block removes it. |
|
|
51
|
+
|
|
52
|
+
## Report
|
|
53
|
+
|
|
54
|
+
| Term | Meaning |
|
|
55
|
+
|---|---|
|
|
56
|
+
| **Report** | The output artifact: a JSON data file and optional self-contained HTML and Markdown renderings derived from it. The JSON is the source of truth. |
|
|
57
|
+
| **Renderer** | Converts a JSON report into a rendering — a self-contained HTML page or a Markdown document. |
|
|
58
|
+
| **Parameter coloring** | Each parametrize column gets a stable highlight color; placeholders and matching values share that color wherever they appear in step text and the parameter table. |
|
|
59
|
+
| **Value highlight** | A neutral highlight applied to t-string interpolation values that don't correspond to a parametrize column and are constant across every case (e.g., a computed expression like `price * 1.2`). One that varies becomes a `derived` column instead. |
|
|
60
|
+
| **Source link** | A link to a file and line: a scenario's test function, or the declaration of a *Story* or *Term*. |
|
|
61
|
+
| **Report link** | A Markdown link to a scenario, tag or story in the HTML *Report*. Without a glyph it is a plain one, which claims only that its target exists. |
|
|
62
|
+
| **Citation** | A *Report link* led by its target's status glyph, citing a scenario, tag or story from a Markdown document: `✅ [title](<report URL>#scenario=…)`. A tag or story citation adds a summary after it, `(5 ✅ · 2 🔵)`. A target the *Report* lacks reads `❓`. |
|
|
63
|
+
| **Narrated citation** | A *Citation* of a scenario written as a collapsible block, the citation as its summary and the scenario's Markdown narration as its body. |
|
|
64
|
+
| **Citation finding** | One problem `pytest-given citations check` reports on one *Report link*: its kind (`stale`, `missing`, `failed`, `mistyped`, …), the document location and a message. |
|
|
65
|
+
| **Theme** | The HTML report's colour scheme — `light`, `dark`, or `auto` (follow the viewer's system). |
|
|
66
|
+
|
|
67
|
+
## Narration lint
|
|
68
|
+
|
|
69
|
+
| Term | Meaning |
|
|
70
|
+
|---|---|
|
|
71
|
+
| **Narration lint** | The `--given-lint` pass that checks recorded scenarios against the *Lint rule* catalog. It enforces the structural subset of the narration conventions — it cannot check whether a *Step*'s text is semantically true. |
|
|
72
|
+
| **Lint rule** | One named check, carrying a surface and a default *Severity*. A `runtime` rule reads the recorded scenarios; an `ast` rule parses the step bodies' source. |
|
|
73
|
+
| **Lint finding** | One *Lint rule* firing on one subject: the rule id, the *Severity* it fired at, the subject, a *Source link* location and a message naming the offender. |
|
|
74
|
+
| **Severity** | A *Lint rule*'s level — `off`, `warn` or `error`. Only `error` fails the run, `warn` reports in the terminal summary, and an `off` rule is not evaluated at all. |
|
|
75
|
+
|
|
76
|
+
## Domain Storytelling
|
|
77
|
+
|
|
78
|
+
The Domain-Driven Design layer atop the core surface. All terms here are optional features: a test suite can use none, some, or all.
|
|
79
|
+
|
|
80
|
+
Terms follow [Domain Storytelling](https://domainstorytelling.org/quick-start-guide)'s own, where actors and work objects connected by activities form sentences.
|
|
81
|
+
|
|
82
|
+
| Term | Meaning |
|
|
83
|
+
|---|---|
|
|
84
|
+
| **Glossary** | The shared vocabulary a domain speaks in: its Ubiquitous Language. |
|
|
85
|
+
| **File glossary** | A glossary loaded from the GFM pipe tables of a Markdown file. |
|
|
86
|
+
| **Deferred term** | A term handed over before its kind is settled: what `g('foo')` and `g['foo']` on a code glossary return, and a *file glossary* lookup of a row with no declared kind. *Kind inference* settles it later. |
|
|
87
|
+
| **Term** | A glossary entry: an Actor, Work Object, Activity, or kindless term. Each carries an id (slug), a canonical name, a kind unless kindless, and an optional definition. |
|
|
88
|
+
| **Handle** | What a glossary hands back for a *term*, the same from every accessor (`g.actor(...)`, `g('foo')`, `g['Guest']`, a captured `guest = ...`). It is what steps, scenario titles and sentences interpolate, in one of four surface forms: **bare** (`room` — the canonical display), **`.l`** (`room.l` — capitalized words lowercased, acronyms kept), **`.s`** (`room.s` — the *S-form*), or **called** (`room('Deluxe Suite')` — an *instance* on an Actor or Work Object, an inflection on an *Activity*). `.l` and `.s` also apply to a called form and chain (`room.l.s` reads *rooms*). Each form renders as a *term ref*. A story hands out a **sentence handle** the same way: `book_a_room['cancel']` by name or `book_a_room[3]` by number, which `pins=` takes. |
|
|
89
|
+
| **S-form** | A term's name with the regular English -s ending, from the `.s` handle form: the plural of an Actor or Work Object (*rooms*), the third person singular of an Activity (*books*). It adds -s to the last word, -es after s, x, z, ch or sh, and turns a consonant + y into -ies, but an acronym takes a plain -s (*APIs*); anything else, such as *people* or *checks in*, needs the called form. An S-form reference, in any case, is a reference to the term itself — not an *instance* or an *inflection*. |
|
|
90
|
+
| **Actor** | A glossary term for a participant in the domain (e.g., *Guest*). |
|
|
91
|
+
| **Work Object** | A glossary term for a thing acted on (e.g., *Room*, *Booking*). |
|
|
92
|
+
| **Activity** | A glossary term for what an actor does (e.g., *book*, *confirm*), which Domain Storytelling draws as an arrow labelled with a verb. Activities accept inflections: calling `search('searches for')` records *searches for* as a surface form of the canonical *search*. |
|
|
93
|
+
| **Term ref** | An occurrence of a term inside narration or a clause. |
|
|
94
|
+
| **Instance** | A named refinement of an Actor or Work Object (e.g., `guest('Alice')` is an instance of the *Guest* actor). |
|
|
95
|
+
| **Inflection** | A surface form of an Activity term other than its canonical name or *S-form* (e.g., *searches for* as an inflection of *search*). |
|
|
96
|
+
| **Story** | A named flow modeled as a sequence of sentences. Stories are the unit of coverage. |
|
|
97
|
+
| **Sentence** | What Domain Storytelling calls a sentence: an actor, an activity and its work objects, plus connective words. One row in a story, numbered by its position and optionally named, a name that stays put when rows are inserted. Usually one clause; several when the sentence has several arrows under one number. |
|
|
98
|
+
| **Clause part** | A piece of a clause's prose: a *term ref*, or a bare clause word. A bare clause word — a node label or edge connective — carries no kind or id, is never classified by inference, and never reaches the glossary. That last is what separates it from a kindless term, which has an id and is tracked. |
|
|
99
|
+
| **Clause** | One linear walk through a sentence's arrows, a node/edge alternation starting actor → verb → noun. A sentence with several arrow chains under one number, such as an actor handing a work object to two recipients, takes one clause per chain. Domain Storytelling names no such unit. |
|
|
100
|
+
| **Slot** | A position role in a clause, from its node/edge alternation: position 0 is the actor slot, odd positions are verb slots, and even positions ≥ 2 are noun slots. |
|
|
101
|
+
| **Scenario↔sentence binding** | The link between a scenario (or step) and story sentences. `@scenario(stories=...)` names the stories a scenario is narration-matched against; a *pin* (`pins=` on `@scenario` or on `given`/`when`/`then`) binds sentences explicitly, in any story, whether `stories=` names it or not. |
|
|
102
|
+
| **Pin** | What a *sentence handle* passed to `pins=` is recorded as, the way a term handle in narration is recorded as a *term ref*: a reference to a story and a sentence number. A pin binds explicitly and replaces narration matching — a step pin for that step, a scenario pin (`@scenario(pins=...)`) for every step of the scenario, which then covers its own pins plus its steps'. `pins=[]` pins nothing but still opts out of narration matching. A pin reaches under-anchored sentences too. |
|
|
103
|
+
| **Coverage** | The "did this scenario touch that sentence" relation. A sentence is covered when the set of terms it references is a subset of the terms a single step references — matching is per step, not against the union across steps, and on terms, not surface forms: an *instance* or *inflection* counts as its term. A *pin* covers its sentences directly instead, regardless of narration or term count. |
|
|
104
|
+
| **Kind inference** | The pass that assigns each undeclared term a kind from the *slot* positions it occupies across all story sentences; declared kinds are verified against observed positions instead. A term used in incompatible slots (or conflicting with its declared kind) raises. A term never referenced by any sentence stays *kindless*. |
|
|
105
|
+
| **Kindless** | A term with no kind, because *kind inference* finds no story *slot* to infer from (a term used only in t-string steps, never in a sentence). |
|
|
106
|
+
| **Undefined** | A term with no definition. Orthogonal to *kindless*. |
|
|
107
|
+
|
|
108
|
+
## Collaboration
|
|
109
|
+
|
|
110
|
+
The people and machines collaborating on a pytest-given test suite — the cast of the project's own domain story (defined in `tests/ubiquitous_language.py`).
|
|
111
|
+
|
|
112
|
+
| Term | Meaning |
|
|
113
|
+
|---|---|
|
|
114
|
+
| **Developer** | Person who writes the application code and — together with the *Agent* — the scenarios; curates the glossary with the *Domain Expert*. |
|
|
115
|
+
| **Domain Expert** | Person who owns the domain knowledge and the ubiquitous language; source of domain stories and reviewer of scenarios and reports. A stakeholder in the broad sense. |
|
|
116
|
+
| **Agent** | AI coding agent that authors and maintains scenarios alongside the *Developer*, guided by the pytest-given skills. |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: pytest-given
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.2
|
|
4
4
|
Summary: A pytest plugin that generates interactive HTML reports from Given/When/Then annotated tests.
|
|
5
5
|
Project-URL: Homepage, https://github.com/nwilbert/pytest-given
|
|
6
6
|
Project-URL: Repository, https://github.com/nwilbert/pytest-given
|
|
@@ -43,6 +43,15 @@ Inspired by [JGiven](https://jgiven.org/) (Java).
|
|
|
43
43
|
|
|
44
44
|
**Documentation: <https://nwilbert.github.io/pytest-given/latest/>**
|
|
45
45
|
|
|
46
|
+
<p align="center">
|
|
47
|
+
<a href="https://nwilbert.github.io/pytest-given/latest/examples/hotel-booking.html#scenario=examples/hotel-booking/test_hotel_booking.py::test_cancel_booking">
|
|
48
|
+
<picture>
|
|
49
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/nwilbert/pytest-given/main/docs/site/assets/report-screenshot-dark.png">
|
|
50
|
+
<img src="https://raw.githubusercontent.com/nwilbert/pytest-given/main/docs/site/assets/report-screenshot-light.png" alt="The HTML report of the Hotel booking example: a sidebar of status filters and browse options beside a list of scenarios, one expanded to its Given, When and Then steps with glossary terms underlined." width="840">
|
|
51
|
+
</picture>
|
|
52
|
+
</a>
|
|
53
|
+
</p>
|
|
54
|
+
|
|
46
55
|
Live examples:
|
|
47
56
|
- **[Coffeeshop](https://nwilbert.github.io/pytest-given/latest/examples/coffeeshop.html)**: a tour of the core features.
|
|
48
57
|
- **[Hotel booking](https://nwilbert.github.io/pytest-given/latest/examples/hotel-booking.html)**: a glossary and domain stories, with story coverage.
|
|
@@ -12,6 +12,15 @@ Inspired by [JGiven](https://jgiven.org/) (Java).
|
|
|
12
12
|
|
|
13
13
|
**Documentation: <https://nwilbert.github.io/pytest-given/latest/>**
|
|
14
14
|
|
|
15
|
+
<p align="center">
|
|
16
|
+
<a href="https://nwilbert.github.io/pytest-given/latest/examples/hotel-booking.html#scenario=examples/hotel-booking/test_hotel_booking.py::test_cancel_booking">
|
|
17
|
+
<picture>
|
|
18
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/nwilbert/pytest-given/main/docs/site/assets/report-screenshot-dark.png">
|
|
19
|
+
<img src="https://raw.githubusercontent.com/nwilbert/pytest-given/main/docs/site/assets/report-screenshot-light.png" alt="The HTML report of the Hotel booking example: a sidebar of status filters and browse options beside a list of scenarios, one expanded to its Given, When and Then steps with glossary terms underlined." width="840">
|
|
20
|
+
</picture>
|
|
21
|
+
</a>
|
|
22
|
+
</p>
|
|
23
|
+
|
|
15
24
|
Live examples:
|
|
16
25
|
- **[Coffeeshop](https://nwilbert.github.io/pytest-given/latest/examples/coffeeshop.html)**: a tour of the core features.
|
|
17
26
|
- **[Hotel booking](https://nwilbert.github.io/pytest-given/latest/examples/hotel-booking.html)**: a glossary and domain stories, with story coverage.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "pytest-given"
|
|
3
|
-
version = "0.5.
|
|
3
|
+
version = "0.5.2"
|
|
4
4
|
description = "A pytest plugin that generates interactive HTML reports from Given/When/Then annotated tests."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
# PEP 639: an SPDX expression plus the files it refers to. Deliberately no
|
|
@@ -61,7 +61,7 @@ coverage = ["coverage>=7.14.0"]
|
|
|
61
61
|
test = ["pytest-xdist>=3.8.0"]
|
|
62
62
|
audit = ["pip-audit>=2.10.0"]
|
|
63
63
|
# only for the example:
|
|
64
|
-
bdd = ["pytest-bdd>=9.0.
|
|
64
|
+
bdd = ["pytest-bdd>=9.0.1"]
|
|
65
65
|
build = ["library-skills>=0.0.19", { include-group = "nox" }]
|
|
66
66
|
docs = [
|
|
67
67
|
"zensical>=0.0.61",
|
|
@@ -115,8 +115,6 @@ include = [
|
|
|
115
115
|
|
|
116
116
|
[tool.uv]
|
|
117
117
|
exclude-newer = "7d"
|
|
118
|
-
# CVE fixes younger than the cooldown, exempted until they age past it.
|
|
119
|
-
exclude-newer-package = { certifi = false, filelock = false, virtualenv = false }
|
|
120
118
|
|
|
121
119
|
[tool.ruff]
|
|
122
120
|
# Generated by gen_large_scenarios.py and gitignored; the generator is linted.
|
|
@@ -65,7 +65,7 @@ Every handle offers the same four forms, whether you captured it (`guest = g.act
|
|
|
65
65
|
|
|
66
66
|
## Naming terms
|
|
67
67
|
|
|
68
|
-
- **Term names are natural language, not class names.** Name the concept the way a person would say it (`File glossary`, `Clause part`)
|
|
68
|
+
- **Term names are natural language, not class names.** Name the concept the way a person would say it (`File glossary`, `Clause part`). A one-word term may match its class name only when the class name is already the natural word. A multi-word CamelCase name never is.
|
|
69
69
|
- **Renaming or removing a term is a code change, not just a doc edit.** A term's slug is its lookup key: the name in lowercase, with each run of non-alphanumeric characters replaced by `-`. So `File glossary` and `FileGlossary` are *different* keys, and a rename breaks every `g['Old name']` reference. Search for the old name, update the references, and re-render the reports. Rename the implementation too: if the code keeps the old name, you create exactly the language drift the vocabulary rule forbids (see [scenarios.md](scenarios.md)). Adding a term is always safe.
|
|
70
70
|
|
|
71
71
|
## Kinds
|
|
@@ -81,5 +81,5 @@ Each term is an actor, an activity or a work object. A term gets its kind in one
|
|
|
81
81
|
|
|
82
82
|
- **Don't dilute the glossary.** A term deserves its row when the team really uses the word: someone would look it up, and its meaning is specific to the domain. Never add a term just to get more term refs or to satisfy the lint, and never without asking the user. A generic word stays a bare string. When a row doesn't deserve its place, delete it instead of inventing a reference to it.
|
|
83
83
|
- **Watch the size. A glossary is read as a whole, never in samples.** Reading every term in one pass is how you notice a near-duplicate before you add it. A glossary too long to read comfortably in one sitting probably covers more than one bounded context. Raise that with the user as a design question: one glossary per context means splitting the suite too.
|
|
84
|
-
- **A
|
|
84
|
+
- **A glossary names concepts and avoids implementation details.** Which component handles a term, where a screen or report shows it and how the code stores it belong in the docs. A behavior that does define the term, such as "must be unique" or "produces no step", makes a claim and is part of the spec. Back it with a scenario, and update the row when the behavior changes.
|
|
85
85
|
- **A term that nothing references is normal.** A glossary documents the domain, not the suite's coverage, which is why `dead-term` is off by default. If you turn it on, treat a lint finding as a reason to look at the term. If an undecorated test already shows its behavior, decorate that test. If a step uses the term as plain text, add the term ref.
|
|
@@ -4,9 +4,11 @@ A parametrized scenario renders as one narrated tree above a parameter table. A
|
|
|
4
4
|
|
|
5
5
|
- **Step structure must not depend on parameter values.** Every row is shown against the step structure of the first case, so a `with given/when/then(...)` inside an `if` on a parametrize value fails the run. When the steps really differ per case, decline the merge with `@scenario(..., group_parametrized=False)`. When the cases are different behaviors, not one behavior narrated two ways, split them into separate scenarios.
|
|
6
6
|
- **Narrate what varies with a t-string that interpolates a bare name.** `when(t'the drink costs {price} euros')` puts a `{price}` token in the step and adds a column with each case's value. Keep everything else the same across cases: the sentence, the `attach` labels, the term refs. To narrate an input derived from a column, bind it to its own local first (`price = cup_size * 0.01`, then `{price}`); an expected outcome is a column of its own (see the last rule).
|
|
7
|
+
- **Narrate a value with `{name!r}` when its exact form matters.** A padded or an empty string can't be seen otherwise. The column then shows each value's repr with its quotes, and the HTML report sets it in a monospace font.
|
|
7
8
|
- **A column must make sense on its own.** Sometimes the outcome depends on how a varied input relates to a fixed one. Then the column holds the relation (`hours_later`, `same_room`), not the varied input's raw value. `existing_start=50` or `existing_room='B'` only make sense next to a new booking that another step fixes in room A at hours 10 to 20. Merged tables fall into this too: parametrizing the value an old step text happened to name produces such columns. Arrange the fixed side first, so the relation has something to refer to. Whole objects as columns fail the same way, because a reader can't compare two `Booking(...)` reprs at a glance. A list or a tuple reads no better.
|
|
8
9
|
- **Never turn a label back into data.** The body may unpack a relation column the way its narration says (`'A' if same_room else 'B'` under "same room: {same_room}"). It never maps a descriptive label to the input (`{'40 hours later': 40}[shift]`). Nor does a label column sit next to the data it describes. A case ID is not such a column, because the body never reads it. Either way, the report shows a claim that nothing checks against the input. A document is the exception, because it can't be shown as a column: parametrize a label, look the document up, and `attach` it, so the row shows both.
|
|
9
|
-
- **Contrast rows show what decides.** For each input that decides the outcome, include a row that changes only that input and flips the outcome. Put it at the boundary if there is one: moved 10 hours later, a booking still shares an hour; 11 hours later, it doesn't. A table whose rows all have the same outcome can't show which column matters, even when another scenario has the flipped case.
|
|
10
|
+
- **Contrast rows show what decides.** For each input that decides the outcome, include a row that changes only that input and flips the outcome. Put it at the boundary if there is one: moved 10 hours later, a booking still shares an hour; 11 hours later, it doesn't. A table whose rows all have the same outcome can't show which column matters, even when another scenario has the flipped case. Three exceptions need no flip: a column that lists forms the rule treats alike, a flip that would need other steps, which stays in its own scenario, and a trivial control row (next rule).
|
|
11
|
+
- **Move a trivial control row out of the table.** A control row shows the case the rule isn't about, such as the one accepted input in a table of refusals. Cover it with a plain test instead when a reader would assume its outcome and it complicates the narration: it adds a Boolean saying whether the feature applies, an `accepted` or `refused` column, a filler value, or a `then` that only applies to the other rows.
|
|
10
12
|
- **A complex row can carry a custom ID.** When a row's values don't say what it is for, as with a boundary or a named edge case, `pytest.param(..., id='touching-edges')` annotates it. The table then starts with a `case ID` column, and `test_overlap[touching-edges]` in a failure points at its row. Leave plain rows to pytest's ids, and name the row's purpose, never a value the columns show (`start-10`).
|
|
11
|
-
- **A refusal is a row too.** When accepted and refused inputs share the steps, catch the refusal in the `when` (see [Expected raises](scenarios.md#expected-raises)).
|
|
13
|
+
- **A refusal is a row too.** When a table keeps accepted and refused inputs and they share the steps, catch the refusal in the `when`. A table of refusals alone narrates them with `when_then` (see [Expected raises](scenarios.md#expected-raises)).
|
|
12
14
|
- **Outcomes are columns, and the `then` asserts against them.** An outcome that varies gets a parametrize column of its own, each row's expected value written out. A `then` names it and holds for every row (`assert (0 in result.clashes) == clashes` under "it clashes: {clashes}"). Never derive the expected value from an input column, whether by an `if` in the step or an expression (`assert items == ([1, 2] if enabled else [])`): the reader must then evaluate it to learn each row's outcome. The main outcome gets its own column even when another column implies it: `settled_by=None` implies "no clash", but a reader looks for the clash. Columns follow the order in which the narration first shows them, so an input narrated in a `given` comes before an outcome in a `then`.
|
|
@@ -89,9 +89,11 @@ Parameter tables are part of the document too. Flag these:
|
|
|
89
89
|
- A column that only makes sense next to a value another step fixes.
|
|
90
90
|
- A column that no step narrates.
|
|
91
91
|
- A column of Python reprs, such as objects or lists.
|
|
92
|
+
- A padded or empty string narrated without `!r`, which the table can't show.
|
|
92
93
|
- A label column that the body turns back into data, with no attachment showing the data.
|
|
93
94
|
- A case ID that misnames its row, or only repeats a column's value.
|
|
94
95
|
- An outcome that varies but has no column of its own, or that the body derives from an input column.
|
|
96
|
+
- A trivial control row: a reader would assume its outcome, and it adds a Boolean, an `accepted` or `refused` column, a filler value, or a `then` that only applies to the other rows.
|
|
95
97
|
- Sibling scenarios that should be one table: the same steps with one arrangement varied, or titles that negate each other.
|
|
96
98
|
|
|
97
99
|
The fixes are in the authoring skill's [parameter-tables.md](../pytest-given-authoring/references/parameter-tables.md). Report all legibility problems as one combined finding, not one per instance. A wording you would simply have chosen differently is out of scope.
|
|
@@ -19,4 +19,4 @@ Start from what the project promises, then from the implementation, and ask what
|
|
|
19
19
|
In a large suite the first list is long: read the test names for rules a user would recognize, and skip the edge cases. In the second, a file that drives a user-facing surface end to end, such as a command line or a configuration option, is the likelier gap.
|
|
20
20
|
|
|
21
21
|
For the code itself, compare the code coverage of `pytest -m pytest_given` with a full run's. Lines only the full run covers are behavior only plain tests reach.
|
|
22
|
-
- **Parameter tables that can't show what decides.** For each input that decides a parametrized scenario's outcome, some row should change only that input and flip the outcome. Without such a row, the table only lists examples, and the rule that decides between them stays unnarrated. Ask for the contrast row, at the boundary if there is one, instead of splitting the table into one scenario per row. A refusal can be a contrast row too. A sibling scenario with the flipped outcome doesn't replace a missing row.
|
|
22
|
+
- **Parameter tables that can't show what decides.** For each input that decides a parametrized scenario's outcome, some row should change only that input and flip the outcome. Without such a row, the table only lists examples, and the rule that decides between them stays unnarrated. Ask for the contrast row, at the boundary if there is one, instead of splitting the table into one scenario per row. A refusal can be a contrast row too. A sibling scenario with the flipped outcome doesn't replace a missing row, unless that row would be a [trivial control row](../../pytest-given-authoring/references/parameter-tables.md).
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
- A **dead term** (the opt-in `dead-term` lint rule) is a finding when it describes behavior nobody implemented: then it misleads. First check whether an undecorated test covers the row's behavior, or a step uses the term as plain text. If so, decorate the test or add the term ref. Otherwise, deleting the term is as often the fix as adding a reference. Don't accept references invented just to satisfy the rule. A term that is real vocabulary but that no scenario narrates is **not** a finding: the glossary documents the domain, not the suite's coverage.
|
|
4
4
|
- **Dilution** is the opposite finding: a row nobody would miss. Examples are a generic verb added to fill a story slot (a bare word belongs there), a concept listed twice under two names, or a term added only to render as a term ref. A small, precise glossary is better than one that just looks impressive.
|
|
5
|
-
- **
|
|
5
|
+
- **Implementation detail** in a term or definition is a finding: which component handles the term, where a screen or report shows it, how the code stores it. That belongs in the docs. A definition keeps only the behavior that defines the term.
|
|
6
6
|
- A **missing term** is a word that recurs across titles and steps for one domain concept but has no glossary row. Check first whether the glossary has the concept under another name; then the finding is drift (layer 2). Otherwise propose the term with a draft definition, and leave adding it to the user.
|
|
7
7
|
- An **oversized glossary** is a structural finding. A glossary only works when it is read as a whole, so one too long to read comfortably in one sitting probably covers more than one bounded context. Raise it as a design question: a suite supports only one glossary, so splitting by context means splitting the suite. Don't reduce the size by removing good terms.
|
|
8
8
|
- A `tag-shadows-term` lint finding is fixed by removing the tag. Tags carry only what the glossary can't (behavior, mechanism), so few tags is usually right; don't report it. A tag missing from some of the scenarios it describes is a finding, because filtering by it misses them. A work-item tag (`ticket/…`, `spec/…`) is the exception: it marks only what one piece of work added.
|
|
@@ -32,15 +32,17 @@ class PytestGivenLookupError(PytestGivenError, LookupError):
|
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
def placeholder_mismatch(
|
|
35
|
-
name: str, param_names: Sequence[str], *, where: str = ''
|
|
35
|
+
name: str, param_names: Sequence[str], *, where: str = '', fix: str = ''
|
|
36
36
|
) -> PytestGivenError:
|
|
37
37
|
"""The error for a `Template` placeholder naming no parametrize column.
|
|
38
38
|
|
|
39
39
|
Collection and grouping both reach this condition and say the same
|
|
40
|
-
sentence. `where` names the site when the caller knows it
|
|
40
|
+
sentence. `where` names the site when the caller knows it, and `fix` the
|
|
41
|
+
remedy when it is specific to that site.
|
|
41
42
|
"""
|
|
42
43
|
location = f' {where}' if where else ''
|
|
44
|
+
remedy = f' {fix}' if fix else ''
|
|
43
45
|
return PytestGivenError(
|
|
44
46
|
f"pytest_given.Template placeholder '{{{name}}}'{location} does not "
|
|
45
|
-
f'match any parametrize column (have: {sorted(param_names)}).'
|
|
47
|
+
f'match any parametrize column (have: {sorted(param_names)}).{remedy}'
|
|
46
48
|
)
|
|
@@ -8,6 +8,7 @@ copied, as pytest exports none of it; tests pin each rule.
|
|
|
8
8
|
"""
|
|
9
9
|
|
|
10
10
|
import enum
|
|
11
|
+
import hashlib
|
|
11
12
|
import re
|
|
12
13
|
from collections.abc import Mapping
|
|
13
14
|
|
|
@@ -52,14 +53,14 @@ def _token(config: pytest.Config, value: object, argname: str) -> re.Pattern[str
|
|
|
52
53
|
is not known here, and the fallback also names an empty parameter set.
|
|
53
54
|
A trailing counter is what pytest appends to tell duplicate ids apart,
|
|
54
55
|
after a `_` where the id ends in a digit."""
|
|
55
|
-
|
|
56
|
-
if
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
return re.compile(
|
|
56
|
+
hook_text = _hook_token(config, value, argname)
|
|
57
|
+
texts = [hook_text] if hook_text is not None else _value_tokens(config, value)
|
|
58
|
+
alternatives = []
|
|
59
|
+
for text in texts:
|
|
60
|
+
counter = '_' if text[-1:].isdigit() else ''
|
|
61
|
+
alternatives.append(f'{re.escape(text)}(?:{counter}\\d+)?')
|
|
62
|
+
alternatives.append(f'{re.escape(argname)}\\d+(?:_\\d+)?')
|
|
63
|
+
return re.compile('|'.join(alternatives))
|
|
63
64
|
|
|
64
65
|
|
|
65
66
|
def _hook_token(config: pytest.Config, value: object, argname: str) -> str | None:
|
|
@@ -74,21 +75,30 @@ def _hook_token(config: pytest.Config, value: object, argname: str) -> str | Non
|
|
|
74
75
|
return token
|
|
75
76
|
|
|
76
77
|
|
|
77
|
-
def
|
|
78
|
+
def _value_tokens(config: pytest.Config, value: object) -> list[str]:
|
|
79
|
+
"""A str or bytes over 100 long may also be named by its sha256 digest
|
|
80
|
+
(pytest 9.2's `parametrize_long_str_id_strategy`). The option goes unread,
|
|
81
|
+
as pytest 9.0 has none. A custom id equal to the digest is no real risk."""
|
|
78
82
|
if isinstance(value, str | bytes):
|
|
79
83
|
if isinstance(value, str) and config.getini(
|
|
80
84
|
'disable_test_id_escaping_and_forfeit_all_rights_to_community_support'
|
|
81
85
|
):
|
|
82
|
-
|
|
83
|
-
|
|
86
|
+
text = value
|
|
87
|
+
else:
|
|
88
|
+
text = _ascii_escaped(value)
|
|
89
|
+
texts = [text]
|
|
90
|
+
if len(value) > 100:
|
|
91
|
+
encoded = value.encode('utf-8') if isinstance(value, str) else value
|
|
92
|
+
texts.append(hashlib.sha256(encoded).hexdigest())
|
|
93
|
+
return texts
|
|
84
94
|
if value is None or isinstance(value, float | int | bool | complex):
|
|
85
|
-
return str(value)
|
|
95
|
+
return [str(value)]
|
|
86
96
|
if isinstance(value, re.Pattern):
|
|
87
|
-
return _ascii_escaped(value.pattern)
|
|
97
|
+
return [_ascii_escaped(value.pattern)]
|
|
88
98
|
if isinstance(value, enum.Enum):
|
|
89
|
-
return str(value)
|
|
99
|
+
return [str(value)]
|
|
90
100
|
name = getattr(value, '__name__', None)
|
|
91
|
-
return name if isinstance(name, str) else
|
|
101
|
+
return [name] if isinstance(name, str) else []
|
|
92
102
|
|
|
93
103
|
|
|
94
104
|
def _ascii_escaped(value: str | bytes) -> str:
|
|
@@ -157,6 +157,11 @@ def _check_template_annotations(
|
|
|
157
157
|
part.name,
|
|
158
158
|
param_names,
|
|
159
159
|
where=f'in the given annotation on parameter {parameter!r}',
|
|
160
|
+
fix=(
|
|
161
|
+
'A given annotation reads only parametrize columns, not '
|
|
162
|
+
'fixture values. To show a fixture value, narrate it in a '
|
|
163
|
+
't-string in the test body.'
|
|
164
|
+
),
|
|
160
165
|
)
|
|
161
166
|
|
|
162
167
|
|
|
@@ -180,6 +180,7 @@ def _build_env(
|
|
|
180
180
|
env.filters['param_color_class'] = _make_param_color_class(param_color_map)
|
|
181
181
|
env.filters['phase_blocks'] = _phase_blocks
|
|
182
182
|
env.filters['column_phase_blocks'] = _column_phase_blocks
|
|
183
|
+
env.filters['repr_columns'] = _repr_columns
|
|
183
184
|
env.filters['case_id'] = case_id
|
|
184
185
|
env.globals['data_url'] = _data_url
|
|
185
186
|
return env
|
|
@@ -237,6 +238,25 @@ def _column_phase_blocks(scenario: Scenario) -> dict[ColumnId, int]:
|
|
|
237
238
|
return blocks
|
|
238
239
|
|
|
239
240
|
|
|
241
|
+
_REPR_CONVERSIONS = ('r', 'a')
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
def _repr_columns(scenario: Scenario) -> set[ColumnId]:
|
|
245
|
+
"""The columns a slot shows as a repr, which its author narrated that way
|
|
246
|
+
because the exact value matters: a padded string, an empty one."""
|
|
247
|
+
step_narrations = (step.narration for step in iter_steps(scenario.steps))
|
|
248
|
+
return {
|
|
249
|
+
part.column_id
|
|
250
|
+
for narration in (scenario.narration, *step_narrations)
|
|
251
|
+
for part in narration.parts
|
|
252
|
+
if isinstance(part, NarrationPlaceholder) and _shows_repr(part)
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
def _shows_repr(part: NarrationPlaceholder) -> bool:
|
|
257
|
+
return part.conversion in _REPR_CONVERSIONS
|
|
258
|
+
|
|
259
|
+
|
|
240
260
|
def _render_context(
|
|
241
261
|
report: ReportData, param_color_map: ParamColorMap, theme: Theme
|
|
242
262
|
) -> dict[str, object]:
|
|
@@ -554,8 +574,9 @@ def _render_narration_piece(
|
|
|
554
574
|
# would be an injection, since Alpine compiles a directive's
|
|
555
575
|
# *decoded* attribute text as JS.
|
|
556
576
|
safe_id = escape(column_id)
|
|
577
|
+
repr_class = ' param-repr' if _shows_repr(part) else ''
|
|
557
578
|
return (
|
|
558
|
-
f'<span class="param-color-{color_idx}" '
|
|
579
|
+
f'<span class="param-color-{color_idx}{repr_class}" '
|
|
559
580
|
f'data-param="{safe_id}" '
|
|
560
581
|
f'data-subst="{safe_id}"'
|
|
561
582
|
f'>{escape(label)}</span>'
|
|
@@ -192,6 +192,7 @@
|
|
|
192
192
|
</div>
|
|
193
193
|
{%- endif -%}
|
|
194
194
|
{%- if step.attachments -%}
|
|
195
|
+
<div class="step-attachments">
|
|
195
196
|
{%- for att in step.attachments -%}
|
|
196
197
|
{%- if att is attachment_ref -%}
|
|
197
198
|
<div>
|
|
@@ -203,5 +204,6 @@
|
|
|
203
204
|
</div>
|
|
204
205
|
{%- endif -%}
|
|
205
206
|
{%- endfor -%}
|
|
207
|
+
</div>
|
|
206
208
|
{%- endif -%}
|
|
207
209
|
{%- endmacro -%}
|
|
@@ -312,6 +312,7 @@
|
|
|
312
312
|
narration and its columns together. The id and status columns share
|
|
313
313
|
one of their own: they frame the row, at its two ends. -#}
|
|
314
314
|
{%- set col_blocks = scenario | column_phase_blocks %}
|
|
315
|
+
{%- set repr_cols = scenario | repr_columns %}
|
|
315
316
|
<div class="param-table-scroll">
|
|
316
317
|
<table class="param-table">
|
|
317
318
|
<thead>
|
|
@@ -342,7 +343,7 @@
|
|
|
342
343
|
substituting that blank would erase the step's {token} instead of
|
|
343
344
|
replacing it. A `param` cell always substitutes — `None` there is
|
|
344
345
|
a real parametrize value. #}
|
|
345
|
-
<td data-param="{{ col.id }}"{% if col.id in col_blocks %} data-block="{{ col_blocks[col.id] }}"{% endif %}{% if col.kind == 'param' or val is not none %} data-subst="{{ col.id }}"{% endif %}>{% if col.kind == 'param' %}{{ val }}{% else %}{{ val if val is not none else '' }}{% endif %}</td>
|
|
346
|
+
<td {% if col.id in repr_cols %}class="param-repr" {% endif %}data-param="{{ col.id }}"{% if col.id in col_blocks %} data-block="{{ col_blocks[col.id] }}"{% endif %}{% if col.kind == 'param' or val is not none %} data-subst="{{ col.id }}"{% endif %}>{% if col.kind == 'param' %}{{ val }}{% else %}{{ val if val is not none else '' }}{% endif %}</td>
|
|
346
347
|
{% endif %}
|
|
347
348
|
{% endfor %}
|
|
348
349
|
{% if show_status %}<td class="param-status" data-block="frame">{{ status_dot(case.status) }}</td>{% endif %}
|
|
@@ -648,6 +649,10 @@
|
|
|
648
649
|
Show {{ scn_ids | length | plural('scenario') }} using this term
|
|
649
650
|
</a>
|
|
650
651
|
</div>
|
|
652
|
+
{% else %}
|
|
653
|
+
{#- Also what keeps an otherwise empty entry open: the source
|
|
654
|
+
link alone is out of flow, so the panel would clip it. -#}
|
|
655
|
+
<div class="refs-line refs-none">No scenario uses this term.</div>
|
|
651
656
|
{% endif %}
|
|
652
657
|
{% if term.source %}
|
|
653
658
|
<div class="scenario-source">{{ source_link(term.source) }}</div>
|
|
@@ -188,8 +188,8 @@ body {
|
|
|
188
188
|
the report title's edge while leaving room for the rows' bleed and the
|
|
189
189
|
focus rings, which the scroll box would otherwise clip. The top matches
|
|
190
190
|
`.view-main`, so the first control and the view heading stay level. */
|
|
191
|
-
margin
|
|
192
|
-
padding: var(--space-
|
|
191
|
+
margin: var(--scroll-gap) 0 0 -6px;
|
|
192
|
+
padding: calc(var(--space-xl) - var(--scroll-gap)) var(--space-lg) var(--space-lg) 6px;
|
|
193
193
|
flex-shrink: 0;
|
|
194
194
|
overflow-y: auto;
|
|
195
195
|
max-height: 100vh;
|
|
@@ -524,7 +524,19 @@ body.resizing-sidebar { cursor: col-resize; user-select: none; }
|
|
|
524
524
|
#view-stories,
|
|
525
525
|
#view-glossary { flex: 1; min-height: 0; display: flex; }
|
|
526
526
|
.view-layout { display: flex; flex: 1; min-height: 0; }
|
|
527
|
-
|
|
527
|
+
/* The scroll boxes start `--scroll-gap` below the tab rule, so scrolled
|
|
528
|
+
content is cut off short of the rule and the active tab's underline rather
|
|
529
|
+
than against them. Gap and padding together put the view heading as far
|
|
530
|
+
below the rule as the content column is inset from the seam. */
|
|
531
|
+
.view-layout { --scroll-gap: var(--space-md); }
|
|
532
|
+
.view-main {
|
|
533
|
+
flex: 1;
|
|
534
|
+
min-width: 0;
|
|
535
|
+
min-height: 0;
|
|
536
|
+
margin-top: var(--scroll-gap);
|
|
537
|
+
padding: calc(var(--space-xl) - var(--scroll-gap)) var(--space-xl) var(--space-xl);
|
|
538
|
+
overflow-y: auto;
|
|
539
|
+
}
|
|
528
540
|
/* Nearer its own list than the tab rule above it. */
|
|
529
541
|
.header { margin-bottom: var(--space-lg); }
|
|
530
542
|
.header-context {
|
|
@@ -828,6 +840,21 @@ body.resizing-sidebar { cursor: col-resize; user-select: none; }
|
|
|
828
840
|
color: var(--text-secondary);
|
|
829
841
|
border-top: 1px solid var(--border);
|
|
830
842
|
}
|
|
843
|
+
/* A value keeps every character it holds: a padded string differs from an
|
|
844
|
+
unpadded one only by its whitespace. A cell with nothing to substitute is
|
|
845
|
+
blank, so `data-subst` selects every value cell. */
|
|
846
|
+
.param-table td[data-subst] { white-space: pre-wrap; }
|
|
847
|
+
.param-table td.param-repr {
|
|
848
|
+
font-family: var(--font-mono);
|
|
849
|
+
font-size: var(--font-size-sm);
|
|
850
|
+
}
|
|
851
|
+
/* The value a hovered row substitutes into a step reads as its cell does; the
|
|
852
|
+
{token} it replaces stays in the step's own font. */
|
|
853
|
+
.param-repr.param-substituted {
|
|
854
|
+
font-family: var(--font-mono);
|
|
855
|
+
font-size: 0.9em;
|
|
856
|
+
white-space: pre-wrap;
|
|
857
|
+
}
|
|
831
858
|
/* No width here — a percentage width on a cell stretches an auto-width table
|
|
832
859
|
to the full card. */
|
|
833
860
|
.param-table .param-status { text-align: center; }
|
|
@@ -952,6 +979,11 @@ span.param-highlight {
|
|
|
952
979
|
}
|
|
953
980
|
|
|
954
981
|
/* Attachments */
|
|
982
|
+
/* More room below a step's attachments than above them, so they read as
|
|
983
|
+
belonging to the step they hang off rather than the one that follows. */
|
|
984
|
+
.step-attachments { padding-bottom: var(--space-sm); }
|
|
985
|
+
/* At a phase's end the gap between phases already does that. */
|
|
986
|
+
.phase-steps:last-child > .step-attachments:last-child { padding-bottom: 0; }
|
|
955
987
|
.attachment-badge {
|
|
956
988
|
color: var(--text-muted);
|
|
957
989
|
font-size: var(--font-size-sm);
|
|
@@ -1042,11 +1074,26 @@ span.param-highlight {
|
|
|
1042
1074
|
text-decoration: underline;
|
|
1043
1075
|
text-underline-offset: 2px;
|
|
1044
1076
|
}
|
|
1045
|
-
/* In a scenario card the link stays in flow
|
|
1046
|
-
|
|
1077
|
+
/* In a scenario card the link stays in flow: anchored to the corner it
|
|
1078
|
+
fought every full-width last element,
|
|
1047
1079
|
covering a parameter table's rightmost cells and needing its own chip to
|
|
1048
1080
|
stay legible over an error box. A refs panel ends in short chip lines that
|
|
1049
1081
|
never reach the corner, so there the anchor still pays for itself. */
|
|
1082
|
+
/* After narration the link shares the last line when the steps leave room for
|
|
1083
|
+
it, and wraps under them only when they don't. A flex line breaks on the
|
|
1084
|
+
steps' widest line, collapsed sub-steps included, so a fit never overlaps. */
|
|
1085
|
+
.scenario-body-inner:has(> .steps + .scenario-source) {
|
|
1086
|
+
display: flex;
|
|
1087
|
+
flex-wrap: wrap;
|
|
1088
|
+
align-items: last baseline;
|
|
1089
|
+
}
|
|
1090
|
+
.scenario-body-inner:has(> .steps + .scenario-source) > * { flex: 1 0 100%; }
|
|
1091
|
+
/* The padding is the room the last phase's hover outline reaches below it. */
|
|
1092
|
+
.scenario-body-inner:has(> .steps + .scenario-source) > .steps {
|
|
1093
|
+
flex: 1 1 auto;
|
|
1094
|
+
padding-bottom: calc(var(--space-sm) / 2);
|
|
1095
|
+
}
|
|
1096
|
+
.scenario-body-inner > .steps + .scenario-source { flex: 0 0 auto; margin-left: auto; }
|
|
1050
1097
|
.refs-content > .scenario-source {
|
|
1051
1098
|
position: absolute;
|
|
1052
1099
|
right: 0;
|
|
@@ -1592,6 +1639,10 @@ span.param-highlight {
|
|
|
1592
1639
|
font-weight: 500;
|
|
1593
1640
|
white-space: nowrap;
|
|
1594
1641
|
}
|
|
1642
|
+
.refs-none {
|
|
1643
|
+
font-size: var(--font-size-sm);
|
|
1644
|
+
color: var(--text-muted);
|
|
1645
|
+
}
|
|
1595
1646
|
|
|
1596
1647
|
/* === Term filter chip (active term filter displayed in Scenarios header) === */
|
|
1597
1648
|
.filter-chip {
|