Merge remote-tracking branch 'origin/feat/cua-basic-onboarding' into feat/cua-permission-onboarding
This commit is contained in:
commit
b3031bcf8d
1 file changed
+10
-1
@@ -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 })
|
||||
|
||||
Reference in new issue
Block a user