Buchungskalender: Abschluss – Widget-CSS ohne @layer, alles unter .wku-root, Reset, Fenster 600 Tage, Serverfehlertexte
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2df56eccc5
commit
a071e57fb7
3 files changed
+105
-55
No files matched your search
@@ -17,9 +17,8 @@ test('kein innerHTML, outerHTML, insertAdjacentHTML, document.write, eval, new F
|
||||
assert.doesNotMatch(OHNE_KOMMENTARE, /innerHTML|outerHTML|insertAdjacentHTML|document\.write|\beval\s*\(|new Function/)
|
||||
})
|
||||
|
||||
test('API-Pfad, Praefix .wku-, @layer wku, Style-Id, kein Storage, keine Cookies, keine Fremdadressen', () => {
|
||||
test('API-Pfad, Praefix .wku-, Style-Id, kein Storage, keine Cookies, keine Fremdadressen', () => {
|
||||
assert.ok(OHNE_KOMMENTARE.includes('/api/public/unterkunft/v1/'))
|
||||
assert.ok(OHNE_KOMMENTARE.includes('@layer wku'))
|
||||
assert.ok(OHNE_KOMMENTARE.includes('wku-style'))
|
||||
assert.match(OHNE_KOMMENTARE, /\.wku-root/)
|
||||
assert.doesNotMatch(OHNE_KOMMENTARE, /localStorage|sessionStorage|document\.cookie|https?:\/\//)
|
||||
@@ -29,3 +28,18 @@ test('Pflichttexte und Honeypot', () => {
|
||||
for (const t of ['Anfragen gerne per Telefon oder E-Mail.', 'Bitte wählen Sie Anreise und Abreise im Kalender.', 'Anfrage senden', 'kontakt_url', 'formToken']) assert.ok(QUELLE.includes(t), t)
|
||||
assert.match(QUELLE, /Danke! Ihre Anfrage/)
|
||||
})
|
||||
|
||||
// F1 (Abschluss): kein @layer (Seitenregeln wuerden gewinnen), jede Regel unter .wku-root, Reset der Formularelemente.
|
||||
test('CSS-Isolation: kein @layer, jeder Selektor beginnt mit .wku-root, all:revert fuer Elemente, Fenster +600 Tage', () => {
|
||||
assert.doesNotMatch(OHNE_KOMMENTARE, /@layer/)
|
||||
const m = QUELLE.match(/var CSS = \[([\s\S]*?)\]\.join\(''\)/)
|
||||
assert.ok(m)
|
||||
const css = [...m[1].matchAll(/'((?:[^'\\]|\\.)*)'/g)].map((x) => x[1]).join('')
|
||||
const flach = css.replace(/@(container|media|supports)[^{]*\{/g, '')
|
||||
const regeln = [...flach.matchAll(/([^{}]+)\{[^{}]*\}/g)].map((x) => x[1])
|
||||
assert.ok(regeln.length > 40)
|
||||
for (const sel of regeln) for (const teil of sel.split(/,(?![^(]*\))/)) assert.match(teil.trim(), /^\.wku-root(?![\w-])/, teil)
|
||||
assert.match(css, /\.wku-root :is\(button,input,select,textarea[^)]*\)\{all:revert/)
|
||||
assert.match(css, /\.wku-root\{[^}]*width:100%/)
|
||||
assert.ok(OHNE_KOMMENTARE.includes('plusTage(von, 600)'))
|
||||
})
|
||||
Reference in new issue
Block a user