Merge remote-tracking branch 'origin/feat/cua-basic-onboarding' into feat/cua-permission-onboarding

This commit is contained in:
creatixchu committed 2026-10-19 13:01:17 +08:00
commit b3031bcf8d
1 file changed
+10 -1
+10 -1
View File
@@ -106,7 +106,16 @@ it.skipIf(process.platform !== 'darwin')('keeps system requests pending until fr
for (const colorScheme of ['light', 'dark'] as const) {
await page.emulateMedia({ colorScheme })
await expect.poll(() => page.evaluate(() => document.body.hasAttribute('data-ds-dark-theme'))).toBe(colorScheme === 'dark')
expect(await panel.evaluate(element => element.scrollWidth <= element.clientWidth)).toBe(true)
const measure = () => panel.evaluate(element => ({
clientWidth: element.clientWidth, scrollWidth: element.scrollWidth,
overflowing: [...element.querySelectorAll('*')].filter(child =>
child.getBoundingClientRect().right > element.getBoundingClientRect().right + 1,
).map(child => ({ tag: child.tagName, className: child.className, text: child.textContent?.slice(0, 80) })),
}))
await expect.poll(async () => {
const layout = await measure()
return layout.scrollWidth <= layout.clientWidth ? true : { width, colorScheme, ...layout }
}).toBe(true)
if (webSnapshotMode() === 'refresh') {
const directory = fileURLToPath(new URL('../../../.artifacts', import.meta.url))
await mkdir(directory, { recursive: true })