diff options
| author | eunhhu <[email protected]> | 2026-09-26 11:23:52 +0100 |
|---|---|---|
| committer | eunhhu <[email protected]> | 2026-09-26 11:23:52 +0100 |
| commit | 3b3e4a221fa47d0109c6ab99be65b5ba48bae254 (patch) | |
| tree | b589055590c135ef1dad07d7797f7e32b90e39c5 /tests/browser.mjs | |
| parent | f0a37de5bc9cf924494878e4ab8d3023ddbb27bd (diff) | |
| download | vega-3b3e4a221fa47d0109c6ab99be65b5ba48bae254.tar.gz vega-3b3e4a221fa47d0109c6ab99be65b5ba48bae254.zip | |
Count the open tasks in the todo example
The left field said how many tasks there were; it now says how many are
still open, "2 of 3", with aup's count(t in tasks where !t.done), which
Pure runs as a fold over the list on every surface. The reference model
counts the same, and in the browser the field follows a task marked done.
Diffstat (limited to 'tests/browser.mjs')
| -rw-r--r-- | tests/browser.mjs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/browser.mjs b/tests/browser.mjs index 87ad584..32cf65f 100644 --- a/tests/browser.mjs +++ b/tests/browser.mjs @@ -71,7 +71,7 @@ try { }; await until('three tasks, the last focused', `document.querySelectorAll('li').length === 3 && ${selected} === 2`); - await until('title and field', `document.querySelector('h1').textContent === 'To do' && document.querySelector('dd').textContent === '3 tasks'`); + await until('title and field', `document.querySelector('h1').textContent === 'To do' && document.querySelector('dd').textContent === '3 of 3'`); await key('ArrowUp', 'ArrowUp', 38); await until('ArrowUp moves the focus', `${selected} === 1`); const box = await evaluate(`(() => { const r = document.querySelectorAll('li')[0].getBoundingClientRect(); return [r.x + r.width / 2, r.y + r.height / 2]; })()`); @@ -80,6 +80,7 @@ try { await until('a click focuses its row', `${selected} === 0`); await key('Space', ' ', 32, ' '); await until('Space marks it done, muted', `document.querySelectorAll('li')[0].classList.contains('muted') && document.querySelector('li .badge')?.textContent === 'done'`); + await until('the count of open tasks follows', `document.querySelector('dd').textContent === '2 of 3'`); await evaluate(`document.getElementById('entry').focus()`); await send('Input.insertText', { text: '브라우저' }); await key('Enter', 'Enter', 13, '\r'); |
