refactor(sw): simplify storybook navigation and examples
This commit is contained in:
1 parent
47972c55ff
commit
2b0e1a2262
19 files changed
+438
-92
No files matched your search
@@ -8,7 +8,7 @@ import { execFileSync } from 'node:child_process'
|
||||
import path from 'node:path'
|
||||
import http from 'node:http'
|
||||
import { parse } from '@babel/parser'
|
||||
import { swStoryEntries, retiredUnusedDemoIds, integratedStoryIds, integratedChangedFiles } from './storybook-inventory.mjs'
|
||||
import { swStoryEntries, retiredUnusedDemoIds, integratedStoryIds, integratedChangedFiles, movedToPopupIds } from './storybook-inventory.mjs'
|
||||
|
||||
const out = path.resolve(process.argv[2] ?? 'docs/sw/storybook-unused-story-removal-qa/verify')
|
||||
const qa = 'docs/sw/storybook-unused-story-removal-qa/before'
|
||||
@@ -92,7 +92,10 @@ try {
|
||||
check('removed URL renders no SW Story', await page.locator('.hm-sw-header, .hm-sw-theme').count() === 0)
|
||||
report.errors.length = 0 // the missing-story error above is expected; start the regression clean
|
||||
|
||||
for (const entry of afterSW) {
|
||||
// 2026-10-20: Property Panel · 4개 비교 moved to SW/Popup (same sw-header-- ID), so it is added to the render pass.
|
||||
const moved = movedToPopupIds.map(id => afterIndex.entries[id]).filter(Boolean)
|
||||
check('inventory: moved Popup Story keeps its sw-header-- ID under SW/Popup', moved.length === movedToPopupIds.length && moved.every(e => e.title === 'SW/Popup'), moved.map(e => [e.id, e.title]))
|
||||
for (const entry of [...afterSW, ...moved]) {
|
||||
await goto(entry.id.replace('sw-header--', ''))
|
||||
check(`render ${entry.id}`, !(await page.locator('.sb-errordisplay').isVisible()))
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user