From 2f3de513168ac8a912e4b6540907492437a5f834 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Sun, 13 Aug 2023 18:35:31 +0530 Subject: feat: adds checked test case + implements pure actions flag + minor changes --- tests/todo-app.spec.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'tests/todo-app.spec.ts') 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 + }) }) }) -- cgit v1.3.1