test(sw): align regression tests with current components
This commit is contained in:
1 parent
3cbe879910
commit
b01ccaca01
5 files changed
+282
-31
No files matched your search
@@ -60,10 +60,11 @@ const only = (map, expected) => Object.keys(map).length > 0 && Object.keys(map).
|
||||
const fmt = map => Object.entries(map).map(([family, count]) => `${count}× ${family}`).join(' | ') || 'no text'
|
||||
|
||||
// More (2026-10-21): the header shows More only when its measured room runs out (full → icons → More). The Story's
|
||||
// 1000px header fits as icons, so the header is narrowed for this check (as text-weight does), then restored.
|
||||
// 1000px header fits as icons, so the header is narrowed for this check, then restored. 2026-11-10: 480px, since
|
||||
// cabd2f6 (2026-10-26) the viewer header keeps every menu down to about 520px and shows More only below that.
|
||||
async function openMore(page, area) {
|
||||
const header = page.locator(`${area} .hm-sw-viewer-header`)
|
||||
await header.evaluate(element => { element.style.width = "700px" })
|
||||
await header.evaluate(element => { element.style.width = "480px" })
|
||||
await page.locator(`${area} .hm-sw-viewer-header button[aria-label="추가 도구"]`).click()
|
||||
}
|
||||
const restoreWidth = (page, area) => page.locator(`${area} .hm-sw-viewer-header`).evaluate(element => { element.style.width = "" })
|
||||
|
||||
Reference in new issue
Block a user