feat: page.waitForTimeout (#6268)

This commit is contained in:
Jack Franklin
2020-07-28 09:37:49 +01:00
committed by GitHub
parent 3a15c06cf5
commit 21552f8fe7
12 changed files with 296 additions and 3 deletions

View File

@@ -15,6 +15,7 @@
*/
import expect from 'expect';
import sinon from 'sinon';
import {
getTestState,
setupTestBrowserHooks,
@@ -388,7 +389,10 @@ describe('ElementHandle specs', function () {
expect(element).toBeDefined();
});
it('should wait correctly with waitFor', async () => {
/* page.waitFor is deprecated so we silence the warning to avoid test noise */
sinon.stub(console, 'warn').callsFake(() => {});
const { page, puppeteer } = getTestState();
puppeteer.__experimental_registerCustomQueryHandler('getByClass', {
queryOne: (element, selector) => element.querySelector(`.${selector}`),