test(sw): align browser tests and theme story with Noto Sans KR and Bold
Font expectations move back to Noto Sans KR (Dotum becomes the theme inheritance verification value), viewer labels expect 700, and the new text-weight.browser.mjs checks the requested Bold scope and outlines.
This commit is contained in:
1 parent
033e24246a
commit
ef69f5143b
9 files changed
+205
-38
No files matched your search
@@ -1,7 +1,7 @@
|
||||
// 2026-10-20 SW hover position stability + header field text + footer command ellipsis / tooltip.
|
||||
// Hover (and Active / Selected) may change only color, background and the hover ring: the icon, the text, their gap
|
||||
// and the item box stay where they are (Header Home Menu tiles, Footer command slots in every story and category,
|
||||
// including the ▲ panel). Also: Header field values are Dotum 400 and not cut; long footer commands end in an
|
||||
// including the ▲ panel). Also: SWHeader field values are Noto Sans KR 400 and not cut; long footer commands end in an
|
||||
// ellipsis inside the unchanged 68 × 47 slot and show their full name on hover.
|
||||
// Usage: build Storybook first, then node packages/sw/tests/hover-stability.browser.mjs [evidence-dir] [chromium|firefox]
|
||||
import { createRequire } from 'node:module'
|
||||
@@ -79,7 +79,7 @@ function judge(name, c) {
|
||||
return { name, ok: Object.keys(moved).length === 0, moved, colorChanged: c.d0.color !== c.h1.color, iconSwap: c.d0.iconSrc !== c.h1.iconSrc, default: c.d0, hover: c.h1, active: c.a }
|
||||
}
|
||||
|
||||
// ---------- 1. Header field values: Dotum 400, nothing cut ----------
|
||||
// ---------- 1. Header field values: Noto Sans KR 400, nothing cut ----------
|
||||
// Full-width headers (1800 / 1920px) show every field; narrower ones move the aux fields into More.
|
||||
const fields = []
|
||||
for (const id of ['sw-header--interactive-states', 'sw-header--document-open', 'sw-header--responsive-more']) {
|
||||
@@ -92,7 +92,7 @@ for (const id of ['sw-header--interactive-states', 'sw-header--document-open', '
|
||||
}
|
||||
}
|
||||
report.headerFields = fields
|
||||
check('Header: every field value is Dotum 400 / 14px / 0.56px', fields.length >= 6 && fields.every(f => f.weight === '400' && f.size === '14px' && f.spacing === '0.56px' && /dotum/i.test(f.family)), fields)
|
||||
check('Header: every field value is Noto Sans KR 400 / 14px / 0.56px', fields.length >= 6 && fields.every(f => f.weight === '400' && f.size === '14px' && f.spacing === '0.56px' && /noto sans kr/i.test(f.family)), fields)
|
||||
for (const want of ['Standard', '0_Layer_Cludmark', '1.00', '255,229,0']) {
|
||||
const f = fields.filter(x => x.text === want)
|
||||
check(`Header: "${want}" is shown whole (text width ≤ box)`, f.length > 0 && f.every(x => !x.cut), f)
|
||||
|
||||
Reference in new issue
Block a user