From 94205fb4ba7ec77884873e63b55748871dfd9aa7 Mon Sep 17 00:00:00 2001 From: Tomas Babej Date: Thu, 27 Aug 2015 06:50:28 +0200 Subject: [PATCH] tests: Add tests for the VISIBLE meta tag --- tests/test_viewport.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/tests/test_viewport.py b/tests/test_viewport.py index 12fd186..ab64dc7 100644 --- a/tests/test_viewport.py +++ b/tests/test_viewport.py @@ -397,3 +397,29 @@ class TestViewportsSpecificSortingCombined(TestViewportsSpecificSorting): * [ ] home task 2 (2015-08-02 00:00) #{uuid} * [ ] work task 2 (2015-08-02 00:00) #{uuid} """ + +class TestViewportsVisibleMetaTag(IntegrationTest): + + viminput = """ + === Home tasks | project:Home -VISIBLE === + + === Chores | project:Home.Chores === + """ + + vimoutput = """ + === Home tasks | project:Home -VISIBLE === + * [ ] home task #{uuid} + + === Chores | project:Home.Chores === + * [ ] chore task #{uuid} + """ + + tasks = [ + dict(description="home task", project='Home.Random'), + dict(description="chore task", project='Home.Chores'), + ] + + def execute(self): + # Currently, two saves are necessary for VISIBLE to take effect + self.command("w", regex="written$", lines=1) + self.command("w", regex="written$", lines=1)