mirror of
https://github.com/tbabej/taskwiki.git
synced 2025-08-19 06:43:06 +02:00
tests: Add initial test coverate for TaskWikiRedo
This commit is contained in:
parent
886b90df67
commit
1dd6d45016
1 changed files with 30 additions and 0 deletions
|
@ -141,6 +141,36 @@ class TestAnnotateActionRange(IntegrationTest):
|
|||
assert annotation[0]['description'] == "This is annotation."
|
||||
|
||||
|
||||
class TestAnnotateActionRedo(IntegrationTest):
|
||||
|
||||
viminput = """
|
||||
* [ ] test task 1 #{uuid}
|
||||
* [ ] test task 2 #{uuid}
|
||||
"""
|
||||
|
||||
tasks = [
|
||||
dict(description="test task 1"),
|
||||
dict(description="test task 2"),
|
||||
]
|
||||
|
||||
def execute(self):
|
||||
# Annotate the first task
|
||||
self.command(
|
||||
"TaskWikiAnnotate This is annotation.",
|
||||
regex="Task \"test task 1\" annotated.$",
|
||||
lines=1)
|
||||
|
||||
self.tasks[0].refresh()
|
||||
annotation = self.tasks[0]['annotations']
|
||||
assert annotation != []
|
||||
assert annotation[0]['description'] == "This is annotation."
|
||||
|
||||
# Now also annotate the second task
|
||||
self.client.type('j')
|
||||
self.command("TaskWikiRedo", regex="Task \"test task 2\" annotated.$",
|
||||
lines=1)
|
||||
|
||||
|
||||
class TestDeleteAction(IntegrationTest):
|
||||
|
||||
viminput = """
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue