diff --git a/bin/do_epic/test_findings.py b/bin/do_epic/test_findings.py index 0f34197e..2654e4c3 100644 --- a/bin/do_epic/test_findings.py +++ b/bin/do_epic/test_findings.py @@ -91,6 +91,8 @@ class FilingAFinding(FindingsTest): self.assertEqual((code, out, filed.labels), (0, f"Filed {filed.key} in the epic ABC-12.\n", ("twu-4",))) code, _, err, _ = self.run_with(["ABC-12", "--file", "Retry", "--label", "twu-4", "--label", "repo:api"]) self.assertEqual((code, err), (1, "cannot file the finding in the epic ABC-12: twu-4 and repo:api each say who works it; write one of them\n")) + _, _, err, _ = self.run_with(["ABC-12", "--file", "Retry", "--label", "twu"]) + self.assertTrue(err.endswith("or `do-epic-human` for a task of the human's (or the team's `twu-4`)\n"), err) def test_a_release_review_takes_its_label_beside_its_repo(self) -> None: code, out, _, _ = self.run_with(["ABC-12", "--file", "Review api", "--label", "repo:api", "--label", "do-epic-release-review"]) diff --git a/bin/do_epic/test_planning.py b/bin/do_epic/test_planning.py index bab1228d..f6c5eb00 100644 --- a/bin/do_epic/test_planning.py +++ b/bin/do_epic/test_planning.py @@ -162,6 +162,14 @@ class Planning(DoEpicTest): args = fake.made("claude")[0][0] self.assertEqual(args[args.index("--add-dir") + 1], str(checkout)) + def test_asks_for_one_of_the_teams_labels_too_and_takes_it(self) -> None: + with (self.home / ".claude-projects/do-epic/config.toml").open("a", encoding="utf-8") as config: + config.write('\n[label-repos]\nbackend = "api"\n') + self.issues = [issue("ABC-20")] + fake = FakeEffects(claude=[says({"parts": []}), says({"pick": "unclear", "question": "Is the importer in api or in web?"})], inputs=["backend"]) + found, _, _ = self.plan(fake) + self.assertEqual((found, fake.made("input")), ([issue("ABC-20", "repo:api")], ["The label that says where ABC-20 is worked, `repo:`, `do-epic-claude` or `do-epic-human` (or the team's `backend`), or Enter alone to leave it waiting: "])) + def test_asks_the_human_for_the_label_of_an_issue_the_rule_leaves_unclear_until_one_is_typed(self) -> None: self.issues = [issue("ABC-20")] fake = FakeEffects(claude=[says({"parts": []}), says({"pick": "unclear", "question": "Is the importer in api or in web?"})], inputs=["api", "a b", " repo:web "])