nissy-dev / blog

blog
https://blog.nissy.dev
MIT License
5 stars 0 forks source link

chore(deps): update dependency playwright to v1.41.2 #276

Closed nissy-dev closed 6 months ago

nissy-dev commented 6 months ago

This PR contains the following updates:

Package Type Update Change
playwright (source) devDependencies minor 1.38.1 -> 1.41.2

Release Notes

microsoft/playwright (playwright) ### [`v1.41.2`](https://togithub.com/microsoft/playwright/releases/tag/v1.41.2) [Compare Source](https://togithub.com/microsoft/playwright/compare/v1.41.1...v1.41.2) ##### Highlights [https://github.com/microsoft/playwright/issues/29123](https://togithub.com/microsoft/playwright/issues/29123) - \[REGRESSION] route.continue: Protocol error (Fetch.continueRequest): Invalid InterceptionId. #### Browser Versions - Chromium 121.0.6167.57 - Mozilla Firefox 121.0 - WebKit 17.4 This version was also tested against the following stable channels: - Google Chrome 120 - Microsoft Edge 120 ### [`v1.41.1`](https://togithub.com/microsoft/playwright/releases/tag/v1.41.1) [Compare Source](https://togithub.com/microsoft/playwright/compare/v1.41.0...v1.41.1) ##### Highlights [https://github.com/microsoft/playwright/issues/29067](https://togithub.com/microsoft/playwright/issues/29067) - \[REGRESSION] Codegen/Recorder: not all clicks are being actioned nor recorded[https://github.com/microsoft/playwright/issues/29028](https://togithub.com/microsoft/playwright/issues/29028)8 - \[REGRESSION] React component tests throw type error when passing null/undefined to componen[https://github.com/microsoft/playwright/issues/29027](https://togithub.com/microsoft/playwright/issues/29027)27 - \[REGRESSION] React component tests not passing Date prop valu[https://github.com/microsoft/playwright/issues/29023](https://togithub.com/microsoft/playwright/issues/29023)023 - \[REGRESSION] React component tests not rendering children p[https://github.com/microsoft/playwright/issues/29019](https://togithub.com/microsoft/playwright/issues/29019)9019 - \[REGRESSION] trace.playwright.dev does not currently support the loading from URL #### Browser Versions - Chromium 121.0.6167.57 - Mozilla Firefox 121.0 - WebKit 17.4 This version was also tested against the following stable channels: - Google Chrome 120 - Microsoft Edge 120 ### [`v1.41.0`](https://togithub.com/microsoft/playwright/releases/tag/v1.41.0) [Compare Source](https://togithub.com/microsoft/playwright/compare/v1.40.1...v1.41.0) #### New APIs - New method [page.unrouteAll(\[options\])](https://playwright.dev/docs/api/class-page#page-unroute-all) removes all routes registered by [page.route(url, handler, handler\[, options\])](https://playwright.dev/docs/api/class-page#page-route) and [page.routeFromHAR(har\[, options\])](https://playwright.dev/docs/api/class-page#page-route-from-har). Optionally allows to wait for ongoing routes to finish, or ignore any errors from them. - New method [browserContext.unrouteAll(\[options\])](https://playwright.dev/docs/api/class-browsercontext#browser-context-unroute-all) removes all routes registered by [browserContext.route(url, handler, handler\[, options\])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route) and [browserContext.routeFromHAR(har\[, options\])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route-from-har). Optionally allows to wait for ongoing routes to finish, or ignore any errors from them. - New option `style` in [page.screenshot(\[options\])](https://playwright.dev/docs/api/class-page#page-screenshot) and [locator.screenshot(\[options\])](https://playwright.dev/docs/api/class-locator#locator-screenshot) to add custom CSS to the page before taking a screenshot. - New option `stylePath` for methods [expect(page).toHaveScreenshot(name\[, options\])](https://playwright.dev/docs/api/class-pageassertions#page-assertions-to-have-screenshot-1) and [expect(locator).toHaveScreenshot(name\[, options\])](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-have-screenshot-1) to apply a custom stylesheet while making the screenshot. - New `fileName` option for [Blob reporter](https://playwright.dev/docs/test-reporters#blob-reporter), to specify the name of the report to be created. #### Browser Versions - Chromium 121.0.6167.57 - Mozilla Firefox 121.0 - WebKit 17.4 This version was also tested against the following stable channels: - Google Chrome 120 - Microsoft Edge 120 ### [`v1.40.1`](https://togithub.com/microsoft/playwright/releases/tag/v1.40.1) [Compare Source](https://togithub.com/microsoft/playwright/compare/v1.40.0...v1.40.1) ##### Highlights [https://github.com/microsoft/playwright/issues/28319](https://togithub.com/microsoft/playwright/issues/28319) - \[REGRESSION]: Version 1.40.0 Produces corrupted traces[https://github.com/microsoft/playwright/issues/28371](https://togithub.com/microsoft/playwright/issues/28371)1 - \[BUG] The color of the 'ok' text did not change to green in the vs code test results sectio[https://github.com/microsoft/playwright/issues/28321](https://togithub.com/microsoft/playwright/issues/28321)21 - \[BUG] Ambiguous test outcome and status for serial mo[https://github.com/microsoft/playwright/issues/28362](https://togithub.com/microsoft/playwright/issues/28362)362 - \[BUG] Merging blobs ends up in Error: Cannot create a string longer than 0x1fffffe8 charact[https://github.com/microsoft/playwright/pull/28239](https://togithub.com/microsoft/playwright/pull/28239)8239 - fix: collect all errors in removeFolders ##### Browser Versions - Chromium 120.0.6099.28 - Mozilla Firefox 119.0 - WebKit 17.4 This version was also tested against the following stable channels: - Google Chrome 119 - Microsoft Edge 119 ### [`v1.40.0`](https://togithub.com/microsoft/playwright/releases/tag/v1.40.0) [Compare Source](https://togithub.com/microsoft/playwright/compare/v1.39.0...v1.40.0) #### Test Generator Update ![Playwright Test Generator](https://togithub.com/microsoft/playwright/assets/9881434/e8d67e2e-f36d-4301-8631-023948d3e190) New tools to generate assertions: - "Assert visibility" tool generates [expect(locator).toBeVisible()](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-be-visible). - "Assert value" tool generates [expect(locator).toHaveValue(value)](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-have-value). - "Assert text" tool generates [expect(locator).toContainText(text)](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-contain-text). Here is an example of a generated test with assertions: ```js import { test, expect } from '@​playwright/test'; test('test', async ({ page }) => { await page.goto('https://playwright.dev/'); await page.getByRole('link', { name: 'Get started' }).click(); await expect(page.getByLabel('Breadcrumbs').getByRole('list')).toContainText('Installation'); await expect(page.getByLabel('Search')).toBeVisible(); await page.getByLabel('Search').click(); await page.getByPlaceholder('Search docs').fill('locator'); await expect(page.getByPlaceholder('Search docs')).toHaveValue('locator'); }); ``` #### New APIs - Option `reason` in [page.close()](https://playwright.dev/docs/api/class-page#page-close), [browserContext.close()](https://playwright.dev/docs/api/class-browsercontext#browser-context-close) and [browser.close()](https://playwright.dev/docs/api/class-browser#browser-close). Close reason is reported for all operations interrupted by the closure. - Option `firefoxUserPrefs` in [browserType.launchPersistentContext(userDataDir)](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-persistent-context). #### Other Changes - Methods [download.path()](https://playwright.dev/docs/api/class-download#download-path) and [download.createReadStream()](https://playwright.dev/docs/api/class-download#download-create-read-stream) throw an error for failed and cancelled downloads. - Playwright [docker image](https://playwright.dev/docs/docker) now comes with Node.js v20. #### Browser Versions - Chromium 120.0.6099.28 - Mozilla Firefox 119.0 - WebKit 17.4 This version was also tested against the following stable channels: - Google Chrome 119 - Microsoft Edge 119 ### [`v1.39.0`](https://togithub.com/microsoft/playwright/releases/tag/v1.39.0) [Compare Source](https://togithub.com/microsoft/playwright/compare/v1.38.1...v1.39.0) #### Add custom matchers to your expect You can extend Playwright assertions by providing custom matchers. These matchers will be available on the expect object. ```js import { expect as baseExpect } from '@​playwright/test'; export const expect = baseExpect.extend({ async toHaveAmount(locator: Locator, expected: number, options?: { timeout?: number }) { // ... see documentation for how to write matchers. }, }); test('pass', async ({ page }) => { await expect(page.getByTestId('cart')).toHaveAmount(5); }); ``` See the documentation [for a full example](https://playwright.dev/docs/test-configuration#add-custom-matchers-using-expectextend). #### Merge test fixtures You can now merge test fixtures from multiple files or modules: ```js import { mergeTests } from '@​playwright/test'; import { test as dbTest } from 'database-test-utils'; import { test as a11yTest } from 'a11y-test-utils'; export const test = mergeTests(dbTest, a11yTest); ``` ```js import { test } from './fixtures'; test('passes', async ({ database, page, a11y }) => { // use database and a11y fixtures. }); ``` #### Merge custom expect matchers You can now merge custom expect matchers from multiple files or modules: ```js import { mergeTests, mergeExpects } from '@​playwright/test'; import { test as dbTest, expect as dbExpect } from 'database-test-utils'; import { test as a11yTest, expect as a11yExpect } from 'a11y-test-utils'; export const test = mergeTests(dbTest, a11yTest); export const expect = mergeExpects(dbExpect, a11yExpect); ``` ```js import { test, expect } from './fixtures'; test('passes', async ({ page, database }) => { await expect(database).toHaveDatabaseUser('admin'); await expect(page).toPassA11yAudit(); }); ``` #### Hide implementation details: box test steps You can mark a [`test.step()`](https://playwright.dev/docs/api/class-test#test-step) as "boxed" so that errors inside it point to the step call site. ```js async function login(page) { await test.step('login', async () => { // ... }, { box: true }); // Note the "box" option here. } ``` ```txt Error: Timed out 5000ms waiting for expect(locator).toBeVisible() ... error details omitted ... 14 | await page.goto('https://github.com/login'); > 15 | await login(page); | ^ 16 | }); ``` See [`test.step()`](https://playwright.dev/docs/api/class-test#test-step) documentation for a full example. #### New APIs - [`expect(locator).toHaveAttribute(name)`](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-have-attribute-2) #### Browser Versions - Chromium 119.0.6045.9 - Mozilla Firefox 118.0.1 - WebKit 17.4 This version was also tested against the following stable channels: - Google Chrome 118 - Microsoft Edge 118

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

â™» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.



This PR has been generated by Renovate Bot.

vercel[bot] commented 6 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
blog ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 17, 2024 1:41pm