Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/tasks.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRaimund Schlüßler <raimund.schluessler@mailbox.org>2019-11-02 22:06:13 +0300
committerRaimund Schlüßler <raimund.schluessler@mailbox.org>2019-11-03 09:46:13 +0300
commit6344344f86b87805f3ef96a6639d1d44acf3f8f4 (patch)
tree54a2051a812909533c15476488493f304c306b88 /tests
parent1ac8a278e33c4eeca1be489331d206effb6a8ed3 (diff)
Improve tests for starred and current view
Signed-off-by: Raimund Schlüßler <raimund.schluessler@mailbox.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/javascript/unit/components/TheCollections/General.spec.js4
-rw-r--r--tests/javascript/unit/setupStore.js30
2 files changed, 34 insertions, 0 deletions
diff --git a/tests/javascript/unit/components/TheCollections/General.spec.js b/tests/javascript/unit/components/TheCollections/General.spec.js
index e8cbc099..213eb5d3 100644
--- a/tests/javascript/unit/components/TheCollections/General.spec.js
+++ b/tests/javascript/unit/components/TheCollections/General.spec.js
@@ -51,6 +51,8 @@ describe('General.vue', () => {
expect(wrapper.find('li[task-id="pwen4kz20g.ics"]').exists()).toBe(true) // Has an important subsubtask --> shown
expect(wrapper.find('li[task-id="pwen4kz24g.ics"]').exists()).toBe(true) // Important subsubtask --> shown
expect(wrapper.find('li[task-id="pwen4kz25g.ics"]').exists()).toBe(false) // Has an important sibling, but no important child --> hidden
+ // Not important, has important subtask which is completed --> hidden
+ expect(wrapper.find('li[task-id="pwen4kz30g.ics"]').exists()).toBe(false)
})
/*
@@ -74,6 +76,8 @@ describe('General.vue', () => {
expect(wrapper.find('li[task-id="pwen4kz20g.ics"]').exists()).toBe(true) // Start date in the future, but current subsubtask --> shown
expect(wrapper.find('li[task-id="pwen4kz24g.ics"]').exists()).toBe(true) // Current subsubtask --> shown
expect(wrapper.find('li[task-id="pwen4kz25g.ics"]').exists()).toBe(false) // Start date in the future and no current child --> hidden
+ // Not current, has current subtask which is completed --> hidden
+ expect(wrapper.find('li[task-id="pwen4kz30g.ics"]').exists()).toBe(false)
})
/*
diff --git a/tests/javascript/unit/setupStore.js b/tests/javascript/unit/setupStore.js
index b10d672f..9f8a3c2e 100644
--- a/tests/javascript/unit/setupStore.js
+++ b/tests/javascript/unit/setupStore.js
@@ -111,6 +111,36 @@ UID:pwen4kz24g\n
SUMMARY:Calendar 1 - Task 3 - Subtask 1 - Subsubtask 1\n
PRIORITY:1\n
END:VTODO\n
+END:VCALENDAR`,
+`
+BEGIN:VCALENDAR\n
+VERSION:2.0\n
+PRODID:-//Nextcloud Tasks 0.11.3\n
+BEGIN:VTODO\n
+CREATED:20181119T183919\n
+DTSTAMP:20190918T095816\n
+LAST-MODIFIED:20190918T095816\n
+UID:pwen4kz30g\n
+SUMMARY:Calendar 1 - Task 4\n
+DTSTART:20190918T095816\n
+END:VTODO\n
+END:VCALENDAR`,
+`
+BEGIN:VCALENDAR\n
+VERSION:2.0\n
+PRODID:-//Nextcloud Tasks 0.11.3\n
+BEGIN:VTODO\n
+CREATED:20181119T183919\n
+DTSTAMP:20190918T095816\n
+LAST-MODIFIED:20190918T095816\n
+RELATED-TO:pwen4kz30g\n
+UID:pwen4kz31g\n
+SUMMARY:Calendar 1 - Task 4 - Subtask 1\n
+PRIORITY:1\n
+PERCENT-COMPLETE:100\n
+STATUS:COMPLETED\n
+COMPLETED:20190918T095816\n
+END:VTODO\n
END:VCALENDAR`
],
},