Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix!(testing): puppeteer v10 support (#2934)
- Update puppeteer to v10.0.0 - Remove @types/puppeteer from root package.json file - Update programmatic library checks - Remove @types/puppeteer - Make puppeteer@10 the recommended version - Replace @types/puppeteer instances of PageCloseOptions - This interface was originally defined in v5.4.3 of the DefinitelyTyped type declaration file for Puppeteer https://github.com/DefinitelyTyped/DefinitelyTyped/blob/34edf5fb8fdf54f57ed6584f77f1611767af7f6b/types/puppeteer/index.d.ts#L1423 - It has since been removed, and replace with an object literal of the same shape https://github.com/puppeteer/puppeteer/blob/main/src/common/Page.ts#L2097 - Replace usages of NavigationOptions for WaitForOptions - WaitForOptions is structurally the same as @types/puppeteer's [NavigationOptions](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/34edf5fb8fdf54f57ed6584f77f1611767af7f6b/types/puppeteer/index.d.ts#L616) and is used as a drop in replacement - The page#goTo method in Puppeteer's definition in both v5.4.3 and v10 allow an optional 'referer' string. Since it was omitted in the original implementation, I did not include it in this update - Replace Response with HTTPResponse - Update ElementHandle#press to use KeyInput instead of string - Make typings of executionContext.evaluate explicit - Migrate EmulateOptions - Puppeteer no longer exports a type of name EmulateOptions, in favor of an object literal. BREAKING CHANGE: Requires Puppeteer v10.0.0
- Loading branch information