-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
The page.waitForTimeout() method has been removed from Puppeteer starting with version v22.0.0.
This project requires "puppeteer": "^24.11.2".
When running e2e tests, they fail with the error Property 'waitForTimeout' does not exist on type 'Page'.
The fix is to refactor the tests to wait for specific conditions using waitForSelector, waitForXPath, waitForFunction and other similar methods.
❯ npm run test:e2e
> formedible@0.3.12 test:e2e
> jest --config jest.config.js
ts-jest[config] (WARN) message TS151001: If you have issues related to imports, you should consider setting `esModuleInterop` to `true` in your TypeScript configuration file (usually `tsconfig.json`). See https://blogs.msdn.microsoft.com/typescript/2018/01/31/announcing-typescript-2-7/#easier-ecmascript-module-interoperability for more information.
FAIL tests/survey-form.test.ts
● Test suite failed to run
tests/utils/form-helpers.ts:24:27 - error TS2339: Property 'waitForTimeout' does not exist on type 'Page'.
24 await this.page.waitForTimeout(500);
~~~~~~~~~~~~~~
tests/utils/form-helpers.ts:73:23 - error TS2339: Property 'waitForTimeout' does not exist on type 'Page'.
73 await this.page.waitForTimeout(300);
~~~~~~~~~~~~~~
tests/utils/form-helpers.ts:94:25 - error TS2339: Property 'waitForTimeout' does not exist on type 'Page'.
94 await this.page.waitForTimeout(200);
~~~~~~~~~~~~~~
tests/utils/form-helpers.ts:119:25 - error TS2339: Property 'waitForTimeout' does not exist on type 'Page'.
119 await this.page.waitForTimeout(200);Versions:
❯ node --version
v25.6.1
❯ npm --version
11.10.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels