This repository was archived by the owner on Jan 3, 2023. It is now read-only.
Update dependency @playwright/test to v1.28.0 (master) #430
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
1.21.1->1.28.0Release Notes
Microsoft/playwright
v1.28.0: v1.28Compare Source
Playwright Tools
Test Runner
Configure retries and test timeout for a file or a test with
test.describe.configure([options]).Use
testProject.snapshotPathTemplateandtestConfig.snapshotPathTemplateto configure a template controlling location of snapshots generated byexpect(page).toHaveScreenshot(name[, options])andexpect(screenshot).toMatchSnapshot(name[, options]).New APIs
locator.blur([options])locator.clear([options])android.launchServer([options])andandroid.connect(wsEndpoint[, options])androidDevice.on('close')Browser Versions
This version was also tested against the following stable channels:
v1.27.1Compare Source
Highlights
This patch release includes the following bug fixes:
https://github.com/microsoft/playwright/pull/18010 - fix(generator): generate nice locators for arbitrary selectors
https://github.com/microsoft/playwright/pull/17999 - chore: don't fail on undefined video/trace
https://github.com/microsoft/playwright/issues/17955 - [Question] Github Actions test compatibility check failed mitigation?https://github.com/microsoft/playwright/issues/179600 - [BUG] Codegen 1.27 creates NUnit code that does not compilhttps://github.com/microsoft/playwright/pull/1795252 - fix: fix typo in treeitem role typing
Browser Versions
This version was also tested against the following stable channels:
v1.27.0Compare Source
Locators
With these new APIs, inspired by Testing Library, writing locators is a joy:
page.getByText(text, options)to locate by text content.page.getByRole(role, options)to locate by ARIA role, ARIA attributes and accessible name.page.getByLabel(label, options)to locate a form control by associated label's text.page.getByPlaceholder(placeholder, options)to locate an input by placeholder.page.getByAltText(altText, options)to locate an element, usually image, by its text alternative.page.getByTitle(title, options)to locate an element by its title.All the same methods are also available on Locator, FrameLocator and Frame classes.
Other highlights
workersoption in theplaywright.config.tsnow accepts a percentage string to use some of the available CPUs. You can also pass it in the command line:npx playwright test --workers=20%New options
hostandportfor the html reporter.New field
FullConfig.configFileis available to test reporters, specifying the path to the config file if any.As announced in v1.25, Ubuntu 18 will not be supported as of Dec 2022. In addition to that, there will be no WebKit updates on Ubuntu 18 starting from the next Playwright release.
Behavior Changes
expect(locator).toHaveAttribute(name, value, options)with an empty value does not match missing attribute anymore. For example, the following snippet will succeed whenbuttondoes not have adisabledattribute.Command line options
--grepand--grep-invertpreviously incorrectly ignoredgrepandgrepInvertoptions specified in the config. Now all of them are applied together.JSON reporter path resolution is performed relative to the config directory instead of the current working directory:
Browser Versions
This version was also tested against the following stable channels:
v1.26.1Compare Source
Highlights
This patch includes the following bug fixes:
https://github.com/microsoft/playwright/issues/17500 - [BUG] No tests found using the test explorer - pw/[email protected]
Browser Versions
This version was also tested against the following stable channels:
v1.26.0Compare Source
Assertions
expect(locator).toBeEnabled([options]).expect(locator).toHaveText(expected[, options])now pierces open shadow roots.expect(locator).toBeEditable([options]).expect(locator).toBeVisible([options]).Other Highlights
maxRedirectsforapiRequestContext.get(url[, options])and others to limit redirect count.--pass-with-no-teststhat allows the test suite to pass when no files are found.--ignore-snapshotsto skip snapshot expectations, such asexpect(value).toMatchSnapshot()andexpect(page).toHaveScreenshot().Behavior Change
A bunch of Playwright APIs already support the waitUntil: 'domcontentloaded' option. For example:
Prior to 1.26, this would wait for all iframes to fire the
DOMContentLoadedevent.To align with web specification, the
'domcontentloaded'value only waits for the target frame to fire the'DOMContentLoaded'event. UsewaitUntil: 'load'to wait for all iframes.Browser Versions
This version was also tested against the following stable channels:
v1.25.2Compare Source
Highlights
This patch includes the following bug fixes:
https://github.com/microsoft/playwright/issues/16937 - [REGRESSION]: session storage failing >= 1.25.0 in firefoxhttps://github.com/microsoft/playwright/issues/169555 - Not using channel on config file when Show and Reuse browser is checked
Browser Versions
This version was also tested against the following stable channels:
v1.25.1Compare Source
Highlights
This patch includes the following bug fixes:
https://github.com/microsoft/playwright/issues/16319 - [BUG] webServer.command esbuild fails with ESM and Yarnhttps://github.com/microsoft/playwright/issues/164600 - [BUG] Component test fails on 2nd run when SSL is usehttps://github.com/microsoft/playwright/issues/1666565 - [BUG] custom selector engines don't work when running in debug mode
Browser Versions
This version was also tested against the following stable channels:
v1.25.0Compare Source
VSCode Extension
New Playwright actions view
Pick selector
You can pick selector right from a live page, before or after running a test
Record new test
Start recording where you left off with the new 'Record new test' feature.
Show & reuse browser
Watch your tests running live & keep devtools open. Develop while continuously running tests.
Test Runner
test.step(title, body)now returns the value of the step function:Added
test.describe.fixme(title, callback).New
'interrupted'test status.Enable tracing via CLI flag:
npx playwright test --trace=on.New property
testCase.idthat can be use in reporters as a history ID.Announcements
mcr.microsoft.com/playwright:v1.25.0-jammy.Browser Versions
This version was also tested against the following stable channels:
v1.24.2Compare Source
Highlights
This patch includes the following bug fixes:
https://github.com/microsoft/playwright/issues/15977 - [BUG] test.use of storage state regression in 1.24
Browser Versions
This version was also tested against the following stable channels:
v1.24.1Compare Source
Highlights
This patch includes the following bug fixes:
https://github.com/microsoft/playwright/issues/15898 - [BUG] Typescript error: The type for webServer config property (TestConfigWebServer) is not typed correctlyhttps://github.com/microsoft/playwright/issues/159133 - [BUG] hooksConfig is required for mount fixturhttps://github.com/microsoft/playwright/issues/1593232 - [BUG] - Install MS Edge on CI Fails
Browser Versions
This version was also tested against the following stable channels:
v1.24.0Compare Source
🌍 Multiple Web Servers in
playwright.config.tsLaunch multiple web servers, databases, or other processes by passing an array of configurations:
🐂 Debian 11 Bullseye Support
Playwright now supports Debian 11 Bullseye on x86_64 for Chromium, Firefox and WebKit. Let us know
if you encounter any issues!
Linux support looks like this:
🕵️ Anonymous Describe
It is now possible to call
test.describe(callback)to create suites without a title. This is useful for giving a group of tests a common option withtest.use(options).🧩 Component Tests Update
Playwright 1.24 Component Tests introduce
beforeMountandafterMounthooks.Use these to configure your app for tests.
Vue + Vue Router
For example, this could be used to setup App router in Vue.js:
React + Next.js
A similar configuration in Next.js would look like this:
Browser Versions
This version was also tested against the following stable channels:
v1.23.4Compare Source
Highlights
This patch includes the following bug fix:
https://github.com/microsoft/playwright/issues/15717 - [REGRESSION]: Suddenly stopped working despite nothing having changed (
experimentalLoader.js:loaddid not call the next hook in its chain and did not explicitly signal a short circuit)Browser Versions
This version was also tested against the following stable channels:
v1.23.3Compare Source
Highlights
This patch includes the following bug fixes:
https://github.com/microsoft/playwright/issues/15557 - [REGRESSION]: Event Listeners not being removed if same handler is used for different events
Browser Versions
This version was also tested against the following stable channels:
v1.23.2Compare Source
Highlights
This patch includes the following bug fixes:
https://github.com/microsoft/playwright/issues/15273 - [BUG] LaunchOptions config has no effect after update to v1.23.0https://github.com/microsoft/playwright/issues/153511 - [REGRESSION]: Component testing project does not compile anymorhttps://github.com/microsoft/playwright/issues/1543131 - [BUG] Regression: page.on('console') is ignored in 1.23
Browser Versions
This version was also tested against the following stable channels:
v1.23.1Compare Source
Highlights
This patch includes the following bug fixes:
https://github.com/microsoft/playwright/issues/15219 - [REGRESSION]: playwright-core 1.23.0 issue with 'TypeError [ERR_INVALID_ARG_TYPE]: The "listener" argument'
Browser Versions
This version was also tested against the following stable channels:
v1.23.0Compare Source
Network Replay
Now you can record network traffic into a HAR file and re-use the data in your tests.
To record network into HAR file:
Alternatively, you can record HAR programmatically:
Use the new methods
page.routeFromHAR()orbrowserContext.routeFromHAR()to serve matching responses from the HAR file:Read more in our documentation.
Advanced Routing
You can now use
route.fallback()to defer routing to other handlers.Consider the following example:
Note that the new methods
page.routeFromHAR()andbrowserContext.routeFromHAR()also participate in routing and could be deferred to.Web-First Assertions Update
expect(locator).toHaveValues()that asserts all selected values of<select multiple>element.expect(locator).toContainText()andexpect(locator).toHaveText()now acceptignoreCaseoption.Component Tests Update
@playwright/experimental-ct-vue2package..jsfiles.Read more about component testing with Playwright.
Miscellaneous
serviceWorkers:.zippath forrecordHarcontext option automatically zips the resulting HAR:"minimal"HAR recording modethat only records information that is essential for replaying:
mcr.microsoft.com/playwright:v1.23.0-focal.WebServer is now considered "ready" if request to the specified port has any of the following HTTP status codes:
200-299300-399(new)400,401,402,403(new)v1.22.2Compare Source
Highlights
This patch includes the following bug fixes:
https://github.com/microsoft/playwright/issues/14254 - [BUG] focus() function in version 1.22 closes dropdown (not of select type) instead of just focus on the option
Browser Versions
This version was also tested against the following stable channels:
v1.22.1Compare Source
Highlights
This patch includes the following bug fixes:
https://github.com/microsoft/playwright/issues/14186 - [BUG] expect.toHaveScreenshot() generates an argument error
Browser Versions
This version was also tested against the following stable channels:
v1.22.0Compare Source
Introducing Component Testing (preview)
Playwright Test can now test your React, Vue.js or Svelte components. You can use all the features of Playwright Test (such as parallelization, emulation & debugging) while running components in real browsers.
Here is what a typical component test looks like:
Read more in our documentation.
Locators Update
Role selectors allow selecting elements by their ARIA role, ARIA attributes and accessible name.
Read more in our documentation.
New
locator.filter([options])API to filter an existing locatorScreenshots Update
New web-first assertions
expect(page).toHaveScreenshot()andexpect(locator).toHaveScreenshot()that wait for screenshot stabilization and enhances test reliability.The new assertions has screenshot-specific defaults, such as:
The new
expect(page).toHaveScreenshot()saves screenshots at the same location asexpect(screenshot).toMatchSnapshot().Browser Versions
This version was also tested against the following stable channels:
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ 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 Mend Renovate. View repository job log here.