Move an epic's issue to done in Jira when its chunk finishes
CI / tests (pull_request) Successful in 4m20s
CI / tests (pull_request) Successful in 4m20s
This commit is contained in:
@@ -124,6 +124,23 @@ class EpicStoreContract:
|
||||
self.assertIsInstance(store.add_label("ZZZ-1", "repo:log"), Failure)
|
||||
self.assertEqual([issue.labels for issue in self.issues(store)], [(), ()])
|
||||
|
||||
def test_finishes_a_child_issue_so_it_reads_as_done_and_leaves_one_that_is_done_as_it_is(self) -> None:
|
||||
store = self.new_store()
|
||||
key = self.filed(store, store.epic_key, "Count the runs.")
|
||||
other = self.filed(store, store.epic_key, "Ship the later thing.")
|
||||
closed = self.filed(store, store.epic_key, "Close the old thing.")
|
||||
self.close(store, closed, "Done")
|
||||
self.assertEqual([store.finish(key), store.finish(closed)], [None, None])
|
||||
self.assertEqual({issue.key: issue.done for issue in self.issues(store)}, {key: True, other: False, closed: True})
|
||||
|
||||
def test_refuses_to_finish_a_sub_task_or_an_issue_outside_the_epic(self) -> None:
|
||||
store = self.new_store()
|
||||
child = self.filed(store, store.epic_key, "Count the runs.")
|
||||
task = self.filed(store, child, "Count them in the api.")
|
||||
self.assertEqual(store.finish(task), Failure(f"{task} is not one of the child issues of the epic {store.epic_key}, so it cannot be finished"))
|
||||
self.assertIsInstance(store.finish("ZZZ-1"), Failure)
|
||||
self.assertEqual([issue.done for issue in self.issues(store)], [False, False])
|
||||
|
||||
def test_posts_comments_on_a_child_issue_in_order(self) -> None:
|
||||
store = self.new_store()
|
||||
key = self.filed(store, store.epic_key, "Count the runs.")
|
||||
|
||||
Reference in New Issue
Block a user