mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
feat: page.waitForTimeout (#6268)
This commit is contained in:
@@ -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}`),
|
||||
|
||||
Reference in New Issue
Block a user