mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-11-29 18:50:00 +08:00
chore: make puppeteer screenshot wait (#43978)
* chore: make puppeteer screenshot wait * chore: use waitForSelector * chore: update
This commit is contained in:
parent
8f2de9a9d7
commit
7829ff9f2c
@ -55,6 +55,9 @@ export default function imageTest(component: React.ReactElement) {
|
||||
</div>
|
||||
))}
|
||||
</App>
|
||||
<div id="end-of-screen" style={{ height: 0, margin: 0, padding: 0, overflow: 'hidden' }}>
|
||||
end of screen
|
||||
</div>
|
||||
</StyleProvider>
|
||||
);
|
||||
|
||||
@ -72,6 +75,8 @@ export default function imageTest(component: React.ReactElement) {
|
||||
styleStr,
|
||||
);
|
||||
|
||||
await page.waitForSelector('#end-of-screen');
|
||||
|
||||
const image = await page.screenshot({
|
||||
fullPage: true,
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user