diff options
| author | Akshay Nair <phenax5@gmail.com> | 2023-08-13 14:50:26 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2023-08-13 14:50:26 +0530 |
| commit | 1f147a779114a641b4abe5e47ac0b05433ec02fb (patch) | |
| tree | d27845a0ac2deee6bd5ba652da692e733c0cf589 /tests/todo-app.spec.ts | |
| parent | 48455e6caaa7ad98316bbb4896b59f4487ad8650 (diff) | |
| download | css-everything-1f147a779114a641b4abe5e47ac0b05433ec02fb.tar.gz css-everything-1f147a779114a641b4abe5e47ac0b05433ec02fb.zip | |
feat: finalizes component system. it fucking works holy shit.
Diffstat (limited to '')
| -rw-r--r-- | tests/todo-app.spec.ts | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/todo-app.spec.ts b/tests/todo-app.spec.ts new file mode 100644 index 0000000..1e0cd72 --- /dev/null +++ b/tests/todo-app.spec.ts @@ -0,0 +1,33 @@ +import { getByTestId, prettyDOM } from '@testing-library/dom' +import '@testing-library/jest-dom' +import { delay, loadHTMLFixture } from './util' + +describe('todo-app example', () => { + describe('Add new task', () => { + beforeAll(async () => { + await loadHTMLFixture('todo-app') + }) + + it('should add new unchecked task', async () => { + const $textInput = getByTestId<HTMLInputElement>( + document.body, + 'add-task-input', + ) + $textInput.value = 'Buy Milk' + + const $addBtn = getByTestId<HTMLButtonElement>( + document.body, + 'add-task-btn', + ) + $addBtn.click() + + await delay(100) + + console.log(prettyDOM(document.body)) + console.log() + console.log() + console.log() + console.log() + }) + }) +}) |
