mirror of
https://github.com/tbabej/taskwiki.git
synced 2025-08-18 21:33:07 +02:00
tests: Add test for viewport inspection
This commit is contained in:
parent
b61d606eca
commit
98d8716192
1 changed files with 33 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
||||||
from tests.base import IntegrationTest
|
from tests.base import IntegrationTest
|
||||||
|
from time import sleep
|
||||||
|
|
||||||
|
|
||||||
class TestViewportsTaskGeneration(IntegrationTest):
|
class TestViewportsTaskGeneration(IntegrationTest):
|
||||||
|
@ -103,3 +104,35 @@ class TestViewportDefaultsRemoval(IntegrationTest):
|
||||||
assert task['status'] == 'pending'
|
assert task['status'] == 'pending'
|
||||||
assert task['project'] == None
|
assert task['project'] == None
|
||||||
assert task['tags'] == ['home']
|
assert task['tags'] == ['home']
|
||||||
|
|
||||||
|
|
||||||
|
class TestViewportInspection(IntegrationTest):
|
||||||
|
|
||||||
|
viminput = """
|
||||||
|
=== Work tasks | +work ===
|
||||||
|
* [ ] tag work task #{uuid}
|
||||||
|
"""
|
||||||
|
|
||||||
|
vimoutput = """
|
||||||
|
ViewPort inspection:
|
||||||
|
--------------------
|
||||||
|
Name: Work tasks
|
||||||
|
Filter used: -DELETED +work
|
||||||
|
Defaults used: tags:['work']
|
||||||
|
Matching taskwarrior tasks: 1
|
||||||
|
Displayed tasks: 1
|
||||||
|
Tasks to be added:
|
||||||
|
Tasks to be deleted:
|
||||||
|
"""
|
||||||
|
|
||||||
|
tasks = [
|
||||||
|
dict(description="tag work task", tags=['work']),
|
||||||
|
]
|
||||||
|
|
||||||
|
def execute(self):
|
||||||
|
self.command("w", regex="written$", lines=1)
|
||||||
|
self.client.feedkeys('1gg')
|
||||||
|
self.client.feedkeys(r'\<CR>')
|
||||||
|
sleep(0.5)
|
||||||
|
|
||||||
|
assert self.command(":py print vim.current.buffer", regex="<buffer taskwiki.")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue