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-03 22:21:56 +0300
committerRaimund Schlüßler <raimund.schluessler@mailbox.org>2019-11-03 22:21:56 +0300
commite75d7fd0ade43011888d4fe83a289dd9ef6cf961 (patch)
tree9bc8fbf8fefe71de0c2cd3d70b3111e4181eccb3 /tests
parenta80b78d9465b367d40ae1e39e02e36b367462123 (diff)
Improve test for today collection
Signed-off-by: Raimund Schlüßler <raimund.schluessler@mailbox.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/javascript/unit/components/TheCollections/General.spec.js7
-rw-r--r--tests/javascript/unit/setupStore.js1
2 files changed, 7 insertions, 1 deletions
diff --git a/tests/javascript/unit/components/TheCollections/General.spec.js b/tests/javascript/unit/components/TheCollections/General.spec.js
index 1c9e54cf..fad76e72 100644
--- a/tests/javascript/unit/components/TheCollections/General.spec.js
+++ b/tests/javascript/unit/components/TheCollections/General.spec.js
@@ -96,7 +96,12 @@ describe('General.vue', () => {
if (wrapper.vm.$route.params.collectionId !== 'today') {
router.push({ name: 'collections', params: { collectionId: 'today' } })
}
- expect(wrapper.find('li[task-id="pwen4kz18g.ics"]').exists()).toBe(true) // Already due --> shown
+ expect(wrapper.find('li[task-id="pwen4kz18g.ics"]').exists()).toBe(true) // Already due --> shown
+ expect(wrapper.find('li[task-id="pwen4kz19g.ics"]').exists()).toBe(false) // Start date in the future --> hidden
+ expect(wrapper.find('li[task-id="pwen4kz20g.ics"]').exists()).toBe(true) // Start date in the future, but due subsubtask --> shown
+ expect(wrapper.find('li[task-id="pwen4kz23g.ics"]').exists()).toBe(true) // Due subtask --> shown
+ // Not today, has today 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 4c76c2fc..232d1a22 100644
--- a/tests/javascript/unit/setupStore.js
+++ b/tests/javascript/unit/setupStore.js
@@ -83,6 +83,7 @@ LAST-MODIFIED:20190918T095816\n
RELATED-TO:pwen4kz20g\n
UID:pwen4kz23g\n
SUMMARY:Calendar 1 - Task 3 - Subtask 1\n
+DUE:20190101T123400\n
END:VTODO\n
END:VCALENDAR`,
`