test: new project - Testabdeckung fuer die required-responsibility-Ablehnung (#126)
Files changed: - CHANGES.md - VERSION - tools/chemenu/tests/test_new_page.py
This commit is contained in:
1 parent
e4260fc2de
commit
6324024d7a
3 files changed
+24
-2
No files matched your search
+13
-1
@@ -59,7 +59,7 @@ concern - readable here, never shipped as something to parse.
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 7.0.0-beta.4 - 2026-09-20 - wikitool new project: Seite und Tracker-Projekt unter einem Namen
|
## 7.0.0-beta.5 - 2026-09-20 - new project: Testabdeckung fuer die required-responsibility-Ablehnung
|
||||||
|
|
||||||
**Author:** Torben Nehmer
|
**Author:** Torben Nehmer
|
||||||
|
|
||||||
@@ -68,10 +68,14 @@ concern - readable here, never shipped as something to parse.
|
|||||||
**Migration:** none required - no kb/ page content changes - the fix is the ordinary .template adoption every root:kb type already requires, not a data migration
|
**Migration:** none required - no kb/ page content changes - the fix is the ordinary .template adoption every root:kb type already requires, not a data migration
|
||||||
|
|
||||||
<!-- wikitool:bumps -->
|
<!-- wikitool:bumps -->
|
||||||
|
**Medium impact**
|
||||||
- Typ `project` und Collection `kb/gtd/`: das Vorhaben als eigene Seitenart
|
- Typ `project` und Collection `kb/gtd/`: das Vorhaben als eigene Seitenart
|
||||||
- Task-tracker provider layer, with a Super Productivity adapter
|
- Task-tracker provider layer, with a Super Productivity adapter
|
||||||
- wikitool review: the weekly GTD review as a read-time join
|
- wikitool review: the weekly GTD review as a read-time join
|
||||||
- wikitool new project: Seite und Tracker-Projekt unter einem Namen
|
- wikitool new project: Seite und Tracker-Projekt unter einem Namen
|
||||||
|
|
||||||
|
**Low impact**
|
||||||
|
- new project: Testabdeckung fuer die required-responsibility-Ablehnung
|
||||||
<!-- /wikitool:bumps -->
|
<!-- /wikitool:bumps -->
|
||||||
|
|
||||||
### Typ `project` und Collection `kb/gtd/`: das Vorhaben als eigene Seitenart
|
### Typ `project` und Collection `kb/gtd/`: das Vorhaben als eigene Seitenart
|
||||||
@@ -194,6 +198,14 @@ Ein erzwungener Fehlschlag der eigentlichen Seiten-Schreibaktion (Schritt 3) nac
|
|||||||
bestaetigtem Tracker-Projekt ist eigens getestet: die Meldung nennt, dass die Tracker-Seite schon
|
bestaetigtem Tracker-Projekt ist eigens getestet: die Meldung nennt, dass die Tracker-Seite schon
|
||||||
steht und nur die `kb/`-Seite fehlt, nie umgekehrt.
|
steht und nur die `kb/`-Seite fehlt, nie umgekehrt.
|
||||||
|
|
||||||
|
### new project: Testabdeckung fuer die required-responsibility-Ablehnung
|
||||||
|
|
||||||
|
Gitea #119 (Paket #126s eigenes AC): `--responsibility` ist Pflicht und ein Wert ausserhalb des
|
||||||
|
Enums wird abgelehnt - beides galt schon vorher generisch ueber `types/project.schema.yaml`s
|
||||||
|
`required:`/`enum:` (#123), ohne dass #126 dafuer neuen Code brauchte. Nachgetragen: ein Test,
|
||||||
|
der das fuer den fehlenden Fall (`--set responsibility=...` ganz weggelassen) tatsaechlich belegt,
|
||||||
|
statt es nur zu behaupten.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 6.2.0 - 2026-09-19 - Entity-Subtyp project nach codebase umbenannt
|
## 6.2.0 - 2026-09-19 - Entity-Subtyp project nach codebase umbenannt
|
||||||
|
|||||||
@@ -139,6 +139,16 @@ def test_new_project_creates_page_with_expected_frontmatter(monkeypatch, kb_dir)
|
|||||||
assert f"## {heading}" in body
|
assert f"## {heading}" in body
|
||||||
|
|
||||||
|
|
||||||
|
def test_new_project_requires_responsibility(monkeypatch, kb_dir):
|
||||||
|
"""Gitea #126's own AC: `--responsibility` (via `--set responsibility=...`)
|
||||||
|
is required. `types/project.schema.yaml` already lists it in `required:`
|
||||||
|
(#123) with no `default:`, so this needs no new code - only a test that
|
||||||
|
the generic schema-required refusal actually covers it for `project`."""
|
||||||
|
result = _invoke_new(monkeypatch, kb_dir, ["new", "project", "--name", "Ohne Bereich"])
|
||||||
|
assert result.exit_code == 1
|
||||||
|
assert not list(kb_dir.rglob("Ohne Bereich.md"))
|
||||||
|
|
||||||
|
|
||||||
def test_new_project_refuses_a_responsibility_outside_the_enum(monkeypatch, kb_dir):
|
def test_new_project_refuses_a_responsibility_outside_the_enum(monkeypatch, kb_dir):
|
||||||
result = _invoke_new(monkeypatch, kb_dir, [
|
result = _invoke_new(monkeypatch, kb_dir, [
|
||||||
"new", "project", "--name", "Badvorhaben", "--set", "responsibility=nichtexistent",
|
"new", "project", "--name", "Badvorhaben", "--set", "responsibility=nichtexistent",
|
||||||
|
|||||||
Reference in new issue
Block a user