update puppeteer to use setContent with wait and housekeeping the declaration files

This commit is contained in:
Yanzhen Yu
2018-12-03 10:07:38 +08:00
parent 8da0989710
commit af44982a79
4 changed files with 6 additions and 44 deletions

View File

@@ -214,7 +214,12 @@ describe('record integration tests', () => {
it('can record node mutations', async () => {
const page: puppeteer.Page = await this.browser.newPage();
await page.goto(`data:text/html,${getHtml.call(this, 'select2.html')}`, {
await page.goto('about:blank');
// FIXME: use setContent directly when @types/puppeteer update
const setContent = async (html: string, options: any) => {
return page.setContent.call(page, html, options);
};
await setContent(getHtml.call(this, 'select2.html'), {
waitUntil: 'networkidle0',
});