Design: Dialog-Baustein (Esc, Sperre waehrend Speichern, Fokus, Bottom-Sheet)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
769ec70847
commit
988934552f
5 files changed
+77
No files matched your search
@@ -0,0 +1,12 @@
|
||||
import test from 'node:test'
|
||||
import assert from 'node:assert/strict'
|
||||
import { loadModule } from './load.mjs'
|
||||
|
||||
const { shouldCloseOnKey } = await loadModule('src/lib/dialogKeys.js')
|
||||
|
||||
test('Esc schliesst nur ohne Sperre und ohne vorherige Behandlung', () => {
|
||||
assert.equal(shouldCloseOnKey({ key: 'Escape', defaultPrevented: false }, false), true)
|
||||
assert.equal(shouldCloseOnKey({ key: 'Escape', defaultPrevented: true }, false), false)
|
||||
assert.equal(shouldCloseOnKey({ key: 'Escape', defaultPrevented: false }, true), false)
|
||||
assert.equal(shouldCloseOnKey({ key: 'Enter', defaultPrevented: false }, false), false)
|
||||
})
|
||||
Reference in new issue
Block a user