summaryrefslogtreecommitdiff
path: root/tests/todo-app.spec.ts
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2023-08-13 18:35:31 +0530
committerAkshay Nair <phenax5@gmail.com>2023-08-13 18:35:31 +0530
commit2f3de513168ac8a912e4b6540907492437a5f834 (patch)
tree957c286eb8b0806d82279d7596f5f47425d3a9a8 /tests/todo-app.spec.ts
parent95602d1b1ac5668772d5d400270b4209ee19057b (diff)
downloadcss-everything-2f3de513168ac8a912e4b6540907492437a5f834.tar.gz
css-everything-2f3de513168ac8a912e4b6540907492437a5f834.zip
feat: adds checked test case + implements pure actions flag + minor changes
Diffstat (limited to '')
-rw-r--r--tests/todo-app.spec.ts14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/todo-app.spec.ts b/tests/todo-app.spec.ts
index 7fe7d2f..6595bbf 100644
--- a/tests/todo-app.spec.ts
+++ b/tests/todo-app.spec.ts
@@ -49,5 +49,19 @@ describe('todo-app example', () => {
'Kill all the non-believers',
)
})
+
+ // TODO: Add toggle state after implementing conditionals
+ it('should check item when clicked', async () => {
+ expect(
+ getComputedStyle($taskItems[0]).getPropertyValue('--checked'),
+ ).toBe(`'0'`)
+
+ $taskItems[0].click()
+ await delay(100)
+
+ expect(
+ getComputedStyle($taskItems[0]).getPropertyValue('--checked'),
+ ).toBe(`"1"`) // TODO: look into the quotes issue
+ })
})
})