Compare commits
10 commits
main
...
release-1.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ea963a8e86 | ||
|
|
8da3502df5 | ||
|
|
1aabc97379 | ||
|
|
c104ddb2c3 | ||
|
|
b64516e146 | ||
|
|
2ca4cd018f | ||
|
|
0d61e314f6 | ||
|
|
64bca2269b | ||
|
|
9a3c4e45e3 | ||
|
|
adef765405 |
4
.github/workflows/publish_release_npm.yml
vendored
4
.github/workflows/publish_release_npm.yml
vendored
|
|
@ -23,10 +23,10 @@ jobs:
|
|||
- run: npm run build
|
||||
- run: npx playwright install-deps
|
||||
- run: utils/publish_all_packages.sh --release-candidate
|
||||
if: github.event.release.prerelease
|
||||
if: "github.event.release.prerelease"
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
- run: utils/publish_all_packages.sh --release
|
||||
if: !github.event.release.prerelease
|
||||
if: "!github.event.release.prerelease"
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
|
|
|
|||
|
|
@ -86,6 +86,12 @@ npx playwright test
|
|||
|
||||
See our doc on [Running Tests](./running-tests.md) to learn more about running tests in headed mode, running multiple tests, running specific tests etc.
|
||||
|
||||
Run your tests with [UI Mode](./test-ui-mode.md) for a better developer experience with time travel debugging, watch mode and more.
|
||||
|
||||
```bash
|
||||
npx playwright test --ui
|
||||
```
|
||||
|
||||
## HTML Test Reports
|
||||
|
||||
Once your test has finished running a [HTML Reporter](./test-reporters.md#html-reporter) will have been created which shows you a full report of your tests allowing you to filter the report by browsers, passed tests, failed tests, skipped tests and flaky tests. You can click on each test and explore the test's errors as well as each step of the test. By default, the HTML report is opened automatically if some of the tests failed.
|
||||
|
|
|
|||
|
|
@ -4,6 +4,61 @@ title: "Release notes"
|
|||
toc_max_heading_level: 2
|
||||
---
|
||||
|
||||
## Version 1.33
|
||||
|
||||
### Locators Update
|
||||
|
||||
* Use [`method: Locator.or`] to create a locator that matches either of the two locators.
|
||||
Consider a scenario where you'd like to click on a "New email" button, but sometimes a security settings dialog shows up instead.
|
||||
In this case, you can wait for either a "New email" button, or a dialog and act accordingly:
|
||||
|
||||
```csharp
|
||||
var newEmail = Page.GetByRole(AriaRole.Button, new() { Name = "New email" });
|
||||
var dialog = Page.GetByText("Confirm security settings");
|
||||
await Expect(newEmail.Or(dialog)).ToBeVisibleAsync();
|
||||
if (await dialog.IsVisibleAsync())
|
||||
await Page.GetByRole(AriaRole.Button, new() { Name = "Dismiss" }).ClickAsync();
|
||||
await newEmail.ClickAsync();
|
||||
```
|
||||
* Use new options [`option: hasNot`] and [`option: hasNotText`] in [`method: Locator.filter`]
|
||||
to find elements that **do not match** certain conditions.
|
||||
|
||||
```csharp
|
||||
var rowLocator = Page.Locator("tr");
|
||||
await rowLocator
|
||||
.Filter(new() { HasNotText = "text in column 1" })
|
||||
.Filter(new() { HasNot = Page.GetByRole(AriaRole.Button, new() { Name = "column 2 button" })})
|
||||
.ScreenshotAsync();
|
||||
```
|
||||
* Use new web-first assertion [`method: LocatorAssertions.toBeAttached`] to ensure that the element
|
||||
is present in the page's DOM. Do not confuse with the [`method: LocatorAssertions.toBeVisible`] that ensures that
|
||||
element is both attached & visible.
|
||||
|
||||
### New APIs
|
||||
|
||||
- [`method: Locator.or`]
|
||||
- New option [`option: hasNot`] in [`method: Locator.filter`]
|
||||
- New option [`option: hasNotText`] in [`method: Locator.filter`]
|
||||
- [`method: LocatorAssertions.toBeAttached`]
|
||||
- New option [`option: timeout`] in [`method: Route.fetch`]
|
||||
|
||||
### ⚠️ Breaking change
|
||||
|
||||
* The `mcr.microsoft.com/playwright/dotnet:v1.33.0` now serves a Playwright image based on Ubuntu Jammy.
|
||||
To use the focal-based image, please use `mcr.microsoft.com/playwright/dotnet:v1.33.0-focal` instead.
|
||||
|
||||
### Browser Versions
|
||||
|
||||
* Chromium 113.0.5672.53
|
||||
* Mozilla Firefox 112.0
|
||||
* WebKit 16.4
|
||||
|
||||
This version was also tested against the following stable channels:
|
||||
|
||||
* Google Chrome 112
|
||||
* Microsoft Edge 112
|
||||
|
||||
|
||||
## Version 1.32
|
||||
|
||||
### New APIs
|
||||
|
|
|
|||
|
|
@ -4,6 +4,67 @@ title: "Release notes"
|
|||
toc_max_heading_level: 2
|
||||
---
|
||||
|
||||
## Version 1.33
|
||||
|
||||
### Locators Update
|
||||
|
||||
* Use [`method: Locator.or`] to create a locator that matches either of the two locators.
|
||||
Consider a scenario where you'd like to click on a "New email" button, but sometimes a security settings dialog shows up instead.
|
||||
In this case, you can wait for either a "New email" button, or a dialog and act accordingly:
|
||||
|
||||
```java
|
||||
Locator newEmail = page.getByRole(AriaRole.BUTTON, new Page.GetByRoleOptions().setName("New email"));
|
||||
Locator dialog = page.getByText("Confirm security settings");
|
||||
assertThat(newEmail.or(dialog)).isVisible();
|
||||
if (dialog.isVisible())
|
||||
page.getByRole(AriaRole.BUTTON, new Page.GetByRoleOptions().setName("Dismiss")).click();
|
||||
newEmail.click();
|
||||
```
|
||||
* Use new options [`option: hasNot`] and [`option: hasNotText`] in [`method: Locator.filter`]
|
||||
to find elements that **do not match** certain conditions.
|
||||
|
||||
```java
|
||||
Locator rowLocator = page.locator("tr");
|
||||
rowLocator
|
||||
.filter(new Locator.FilterOptions().setHasNotText("text in column 1"))
|
||||
.filter(new Locator.FilterOptions().setHasNot(
|
||||
page.getByRole(AriaRole.BUTTON,
|
||||
new Page.GetByRoleOptions().setName("column 2 button" ))))
|
||||
.screenshot();
|
||||
```
|
||||
* Use new web-first assertion [`method: LocatorAssertions.toBeAttached`] to ensure that the element
|
||||
is present in the page's DOM. Do not confuse with the [`method: LocatorAssertions.toBeVisible`] that ensures that
|
||||
element is both attached & visible.
|
||||
|
||||
### New APIs
|
||||
|
||||
- [`method: Locator.or`]
|
||||
- New option [`option: hasNot`] in [`method: Locator.filter`]
|
||||
- New option [`option: hasNotText`] in [`method: Locator.filter`]
|
||||
- [`method: LocatorAssertions.toBeAttached`]
|
||||
- New option [`option: timeout`] in [`method: Route.fetch`]
|
||||
|
||||
### Other highlights
|
||||
|
||||
- Native support for Apple Silicon - Playwright now runs without Rosetta
|
||||
- Added Ubuntu 22.04 (Jammy) Docker image
|
||||
|
||||
### ⚠️ Breaking change
|
||||
|
||||
* The `mcr.microsoft.com/playwright/java:v1.33.0` now serves a Playwright image based on Ubuntu Jammy.
|
||||
To use the focal-based image, please use `mcr.microsoft.com/playwright/java:v1.33.0-focal` instead.
|
||||
|
||||
### Browser Versions
|
||||
|
||||
* Chromium 113.0.5672.53
|
||||
* Mozilla Firefox 112.0
|
||||
* WebKit 16.4
|
||||
|
||||
This version was also tested against the following stable channels:
|
||||
|
||||
* Google Chrome 112
|
||||
* Microsoft Edge 112
|
||||
|
||||
## Version 1.32
|
||||
|
||||
### New APIs
|
||||
|
|
|
|||
|
|
@ -6,11 +6,66 @@ toc_max_heading_level: 2
|
|||
|
||||
import LiteYouTube from '@site/src/components/LiteYouTube';
|
||||
|
||||
## Version 1.33
|
||||
|
||||
### Locators Update
|
||||
|
||||
* Use [`method: Locator.or`] to create a locator that matches either of the two locators.
|
||||
Consider a scenario where you'd like to click on a "New email" button, but sometimes a security settings dialog shows up instead.
|
||||
In this case, you can wait for either a "New email" button, or a dialog and act accordingly:
|
||||
|
||||
```js
|
||||
const newEmail = page.getByRole('button', { name: 'New email' });
|
||||
const dialog = page.getByText('Confirm security settings');
|
||||
await expect(newEmail.or(dialog)).toBeVisible();
|
||||
if (await dialog.isVisible())
|
||||
await page.getByRole('button', { name: 'Dismiss' }).click();
|
||||
await newEmail.click();
|
||||
```
|
||||
* Use new options [`option: hasNot`] and [`option: hasNotText`] in [`method: Locator.filter`]
|
||||
to find elements that **do not match** certain conditions.
|
||||
|
||||
```js
|
||||
const rowLocator = page.locator('tr');
|
||||
await rowLocator
|
||||
.filter({ hasNotText: 'text in column 1' })
|
||||
.filter({ hasNot: page.getByRole('button', { name: 'column 2 button' }) })
|
||||
.screenshot();
|
||||
```
|
||||
* Use new web-first assertion [`method: LocatorAssertions.toBeAttached`] to ensure that the element
|
||||
is present in the page's DOM. Do not confuse with the [`method: LocatorAssertions.toBeVisible`] that ensures that
|
||||
element is both attached & visible.
|
||||
|
||||
### New APIs
|
||||
|
||||
- [`method: Locator.or`]
|
||||
- New option [`option: hasNot`] in [`method: Locator.filter`]
|
||||
- New option [`option: hasNotText`] in [`method: Locator.filter`]
|
||||
- [`method: LocatorAssertions.toBeAttached`]
|
||||
- New option [`option: timeout`] in [`method: Route.fetch`]
|
||||
- [`method: Reporter.onExit`]
|
||||
|
||||
### ⚠️ Breaking change
|
||||
|
||||
* The `mcr.microsoft.com/playwright:v1.33.0` now serves a Playwright image based on Ubuntu Jammy.
|
||||
To use the focal-based image, please use `mcr.microsoft.com/playwright:v1.33.0-focal` instead.
|
||||
|
||||
### Browser Versions
|
||||
|
||||
* Chromium 113.0.5672.53
|
||||
* Mozilla Firefox 112.0
|
||||
* WebKit 16.4
|
||||
|
||||
This version was also tested against the following stable channels:
|
||||
|
||||
* Google Chrome 112
|
||||
* Microsoft Edge 112
|
||||
|
||||
## Version 1.32
|
||||
|
||||
### Introducing UI Mode (preview)
|
||||
|
||||
New UI Mode lets you explore, run and debug tests. Comes with a built-in watch mode.
|
||||
New [UI Mode](./test-ui-mode.md) lets you explore, run and debug tests. Comes with a built-in watch mode.
|
||||
|
||||

|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,61 @@ title: "Release notes"
|
|||
toc_max_heading_level: 2
|
||||
---
|
||||
|
||||
## Version 1.33
|
||||
|
||||
### Locators Update
|
||||
|
||||
* Use [`method: Locator.or`] to create a locator that matches either of the two locators.
|
||||
Consider a scenario where you'd like to click on a "New email" button, but sometimes a security settings dialog shows up instead.
|
||||
In this case, you can wait for either a "New email" button, or a dialog and act accordingly:
|
||||
|
||||
```python
|
||||
new_email = page.get_by_role("button", name="New email")
|
||||
dialog = page.get_by_text("Confirm security settings")
|
||||
expect(new_email.or_(dialog)).is_visible()
|
||||
if (dialog.is_visible())
|
||||
page.get_by_role("button", name="Dismiss").click()
|
||||
new_email.click()
|
||||
```
|
||||
* Use new options [`option: hasNot`] and [`option: hasNotText`] in [`method: Locator.filter`]
|
||||
to find elements that **do not match** certain conditions.
|
||||
|
||||
```python
|
||||
row_locator = page.locator("tr")
|
||||
row_locator
|
||||
.filter(has_not_text="text in column 1")
|
||||
.filter(has_not=page.get_by_role("button", name="column 2 button"))
|
||||
.screenshot()
|
||||
```
|
||||
* Use new web-first assertion [`method: LocatorAssertions.toBeAttached`] to ensure that the element
|
||||
is present in the page's DOM. Do not confuse with the [`method: LocatorAssertions.toBeVisible`] that ensures that
|
||||
element is both attached & visible.
|
||||
|
||||
### New APIs
|
||||
|
||||
- [`method: Locator.or`]
|
||||
- New option [`option: hasNot`] in [`method: Locator.filter`]
|
||||
- New option [`option: hasNotText`] in [`method: Locator.filter`]
|
||||
- [`method: LocatorAssertions.toBeAttached`]
|
||||
- New option [`option: timeout`] in [`method: Route.fetch`]
|
||||
|
||||
### ⚠️ Breaking change
|
||||
|
||||
* The `mcr.microsoft.com/playwright/python:v1.33.0` now serves a Playwright image based on Ubuntu Jammy.
|
||||
To use the focal-based image, please use `mcr.microsoft.com/playwright/python:v1.33.0-focal` instead.
|
||||
|
||||
### Browser Versions
|
||||
|
||||
* Chromium 113.0.5672.53
|
||||
* Mozilla Firefox 112.0
|
||||
* WebKit 16.4
|
||||
|
||||
This version was also tested against the following stable channels:
|
||||
|
||||
* Google Chrome 112
|
||||
* Microsoft Edge 112
|
||||
|
||||
|
||||
## Version 1.32
|
||||
|
||||
### New APIs
|
||||
|
|
|
|||
|
|
@ -11,9 +11,14 @@ You can run a single test, a set of tests or all tests. Tests can be run on one
|
|||
- [How to debug tests](/running-tests.md#debugging-tests)
|
||||
- [How to open the HTML test reporter](/running-tests.md#test-reports)
|
||||
|
||||
:::note
|
||||
For a better debugging experience check out the [VS Code Extension](./getting-started-vscode.md) for Playwright where you can run tests, add breakpoints and debug your tests right from the VS Code editor.
|
||||
:::
|
||||
|
||||
## Run tests in UI Mode
|
||||
|
||||
Run your tests with [UI Mode](./test-ui-mode.md) for a better developer experience with time travel debugging, watch mode and more.
|
||||
|
||||
```bash
|
||||
npx playwright test --ui
|
||||
```
|
||||
|
||||
## Command Line
|
||||
|
||||
|
|
|
|||
77
docs/src/test-ui-mode-js.md
Normal file
77
docs/src/test-ui-mode-js.md
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
---
|
||||
id: test-ui-mode
|
||||
title: "UI Mode"
|
||||
---
|
||||
|
||||
import LiteYouTube from '@site/src/components/LiteYouTube';
|
||||
|
||||
UI Mode let's you explore, run and debug tests with a time travel experience complete with watch mode. All test files are loaded into the testing sidebar where you can expand each file and describe block to individually run, view, watch and debug each test. Filter tests by **text** or **@tag** or by **passed**, **failed** and **skipped** tests as well as by [**projects**](./test-projects) as set in your `playwright.config` file. See a full trace of your tests and hover back and forward over each action to see what was happening during each step and pop out the DOM snapshot to a separate window for a better debugging experience.
|
||||
|
||||
<LiteYouTube
|
||||
id="d0u6XhXknzU"
|
||||
title="Playwrights UI Mode"
|
||||
/>
|
||||
|
||||
## Running tests in UI Mode
|
||||
|
||||
To open UI mode, run the following command:
|
||||
|
||||
```bash
|
||||
npx playwright test --ui
|
||||
```
|
||||
|
||||
### Filtering tests
|
||||
|
||||
Filter tests by text or `@tag` or by passed, failed or skipped tests. You can also filter by [projects](./test-projects) as set in your `playwright.config` file. If you are using project dependencies make sure to run your setup tests first before running the tests that depend on them. The UI mode will not take into consideration the setup tests and therefore you will have to manually run them first.
|
||||
|
||||

|
||||
|
||||
### Running your tests
|
||||
|
||||
Once you launch UI Mode you will see a list of all your test files. You can run all your tests by clicking the triangle icon in the sidebar. You can also run a single test file, a block of tests or a single test by hovering over the name and clicking on the triangle next to it.
|
||||
|
||||

|
||||
|
||||
### Viewing test traces
|
||||
|
||||
Traces are shown for each test that has been run, so to see the trace, click on one of the test names. Note that you won't see any trace results if you click on the name of the test file or the name of a describe block.
|
||||
|
||||

|
||||
|
||||
### Actions and metadata
|
||||
|
||||
In the Actions tab you can see what locator was used for every action and how long each one took to run. Hover over each action of your test and visually see the change in the DOM snapshot. Go back and forward in time and click an action to inspect and debug. Use the Before and After tabs to visually see what happened before and after the action. Next to the Actions tab you will find the Metadata tab which will show you more information on your test such as the Browser, viewport size, test duration and more.
|
||||
|
||||

|
||||
|
||||
### Source, console, log and network
|
||||
|
||||
As you hover over each action of your test the source code for the test is highlighted below. Click on the source tab to see the source code for the entire test. Click on the console tab to see the console logs for each action. Click on the log tab to see the logs for each action. Click on the network tab to see the network logs for each action.
|
||||
|
||||

|
||||
|
||||
### Pop out and inspect the DOM
|
||||
|
||||
Pop out the DOM snapshot into it's own window for a better debugging experience by clicking on the pop out icon above the DOM snapshot. From there you can open the browser DevTools and inspect the HTML, CSS, Console etc. Go back to UI Mode and click on another action and pop that one out to easily compare the two side by side or debug each individually.
|
||||
|
||||

|
||||
|
||||
|
||||
### Timeline view
|
||||
|
||||
At the top of the trace you can see a timeline view of each action of your test. Hover back and forth to see an image snapshot for each action.
|
||||
|
||||

|
||||
|
||||
|
||||
### Pick locator
|
||||
|
||||
Click on the pick locator button and hover over the DOM snapshot to see the locator for each element highlighted as you hover. Click on an element to save the locator into the pick locator field. You can then copy the locator and paste it into your test.
|
||||
|
||||

|
||||
|
||||
### Watch mode
|
||||
|
||||
Next to the name of each test in the sidebar you will find an eye icon. Clicking on the icon will activate watch mode which will re-run the test when you make changes to it. You can watch a number of tests at the same time be clicking the eye icon next to each one or all tests by clicking the eye icon at the top of the sidebar. If you are using VS Code then you can easily open your test by clicking on the file icon next to the eye icon. This will open your test in VS Code right at the line of code that you clicked on.
|
||||
|
||||

|
||||
78
package-lock.json
generated
78
package-lock.json
generated
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "playwright-internal",
|
||||
"version": "1.33.0-next",
|
||||
"version": "1.33.0",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "playwright-internal",
|
||||
"version": "1.33.0-next",
|
||||
"version": "1.33.0",
|
||||
"license": "Apache-2.0",
|
||||
"workspaces": [
|
||||
"packages/*"
|
||||
|
|
@ -6161,11 +6161,11 @@
|
|||
}
|
||||
},
|
||||
"packages/playwright": {
|
||||
"version": "1.33.0-next",
|
||||
"version": "1.33.0",
|
||||
"hasInstallScript": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"playwright-core": "1.33.0-next"
|
||||
"playwright-core": "1.33.0"
|
||||
},
|
||||
"bin": {
|
||||
"playwright": "cli.js"
|
||||
|
|
@ -6175,11 +6175,11 @@
|
|||
}
|
||||
},
|
||||
"packages/playwright-chromium": {
|
||||
"version": "1.33.0-next",
|
||||
"version": "1.33.0",
|
||||
"hasInstallScript": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"playwright-core": "1.33.0-next"
|
||||
"playwright-core": "1.33.0"
|
||||
},
|
||||
"bin": {
|
||||
"playwright": "cli.js"
|
||||
|
|
@ -6189,7 +6189,7 @@
|
|||
}
|
||||
},
|
||||
"packages/playwright-core": {
|
||||
"version": "1.33.0-next",
|
||||
"version": "1.33.0",
|
||||
"license": "Apache-2.0",
|
||||
"bin": {
|
||||
"playwright": "cli.js"
|
||||
|
|
@ -6200,10 +6200,10 @@
|
|||
},
|
||||
"packages/playwright-ct-core": {
|
||||
"name": "@playwright/experimental-ct-core",
|
||||
"version": "1.33.0-next",
|
||||
"version": "1.33.0",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@playwright/test": "1.33.0-next",
|
||||
"@playwright/test": "1.33.0",
|
||||
"vite": "^4.2.1"
|
||||
},
|
||||
"bin": {
|
||||
|
|
@ -6215,10 +6215,10 @@
|
|||
},
|
||||
"packages/playwright-ct-react": {
|
||||
"name": "@playwright/experimental-ct-react",
|
||||
"version": "1.33.0-next",
|
||||
"version": "1.33.0",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@playwright/experimental-ct-core": "1.33.0-next",
|
||||
"@playwright/experimental-ct-core": "1.33.0",
|
||||
"@vitejs/plugin-react": "^3.1.0"
|
||||
},
|
||||
"bin": {
|
||||
|
|
@ -6230,10 +6230,10 @@
|
|||
},
|
||||
"packages/playwright-ct-react17": {
|
||||
"name": "@playwright/experimental-ct-react17",
|
||||
"version": "1.33.0-next",
|
||||
"version": "1.33.0",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@playwright/experimental-ct-core": "1.33.0-next",
|
||||
"@playwright/experimental-ct-core": "1.33.0",
|
||||
"@vitejs/plugin-react": "^3.1.0"
|
||||
},
|
||||
"bin": {
|
||||
|
|
@ -6245,10 +6245,10 @@
|
|||
},
|
||||
"packages/playwright-ct-solid": {
|
||||
"name": "@playwright/experimental-ct-solid",
|
||||
"version": "1.33.0-next",
|
||||
"version": "1.33.0",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@playwright/experimental-ct-core": "1.33.0-next",
|
||||
"@playwright/experimental-ct-core": "1.33.0",
|
||||
"vite-plugin-solid": "^2.6.1"
|
||||
},
|
||||
"bin": {
|
||||
|
|
@ -6263,10 +6263,10 @@
|
|||
},
|
||||
"packages/playwright-ct-svelte": {
|
||||
"name": "@playwright/experimental-ct-svelte",
|
||||
"version": "1.33.0-next",
|
||||
"version": "1.33.0",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@playwright/experimental-ct-core": "1.33.0-next",
|
||||
"@playwright/experimental-ct-core": "1.33.0",
|
||||
"@sveltejs/vite-plugin-svelte": "^2.0.3"
|
||||
},
|
||||
"bin": {
|
||||
|
|
@ -6281,10 +6281,10 @@
|
|||
},
|
||||
"packages/playwright-ct-vue": {
|
||||
"name": "@playwright/experimental-ct-vue",
|
||||
"version": "1.33.0-next",
|
||||
"version": "1.33.0",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@playwright/experimental-ct-core": "1.33.0-next",
|
||||
"@playwright/experimental-ct-core": "1.33.0",
|
||||
"@vitejs/plugin-vue": "^4.1.0"
|
||||
},
|
||||
"bin": {
|
||||
|
|
@ -6332,10 +6332,10 @@
|
|||
},
|
||||
"packages/playwright-ct-vue2": {
|
||||
"name": "@playwright/experimental-ct-vue2",
|
||||
"version": "1.33.0-next",
|
||||
"version": "1.33.0",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@playwright/experimental-ct-core": "1.33.0-next",
|
||||
"@playwright/experimental-ct-core": "1.33.0",
|
||||
"@vitejs/plugin-vue2": "^2.2.0"
|
||||
},
|
||||
"bin": {
|
||||
|
|
@ -6349,11 +6349,11 @@
|
|||
}
|
||||
},
|
||||
"packages/playwright-firefox": {
|
||||
"version": "1.33.0-next",
|
||||
"version": "1.33.0",
|
||||
"hasInstallScript": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"playwright-core": "1.33.0-next"
|
||||
"playwright-core": "1.33.0"
|
||||
},
|
||||
"bin": {
|
||||
"playwright": "cli.js"
|
||||
|
|
@ -6364,11 +6364,11 @@
|
|||
},
|
||||
"packages/playwright-test": {
|
||||
"name": "@playwright/test",
|
||||
"version": "1.33.0-next",
|
||||
"version": "1.33.0",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@types/node": "*",
|
||||
"playwright-core": "1.33.0-next"
|
||||
"playwright-core": "1.33.0"
|
||||
},
|
||||
"bin": {
|
||||
"playwright": "cli.js"
|
||||
|
|
@ -6381,11 +6381,11 @@
|
|||
}
|
||||
},
|
||||
"packages/playwright-webkit": {
|
||||
"version": "1.33.0-next",
|
||||
"version": "1.33.0",
|
||||
"hasInstallScript": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"playwright-core": "1.33.0-next"
|
||||
"playwright-core": "1.33.0"
|
||||
},
|
||||
"bin": {
|
||||
"playwright": "cli.js"
|
||||
|
|
@ -7179,28 +7179,28 @@
|
|||
"@playwright/experimental-ct-core": {
|
||||
"version": "file:packages/playwright-ct-core",
|
||||
"requires": {
|
||||
"@playwright/test": "1.33.0-next",
|
||||
"@playwright/test": "1.33.0",
|
||||
"vite": "^4.2.1"
|
||||
}
|
||||
},
|
||||
"@playwright/experimental-ct-react": {
|
||||
"version": "file:packages/playwright-ct-react",
|
||||
"requires": {
|
||||
"@playwright/experimental-ct-core": "1.33.0-next",
|
||||
"@playwright/experimental-ct-core": "1.33.0",
|
||||
"@vitejs/plugin-react": "^3.1.0"
|
||||
}
|
||||
},
|
||||
"@playwright/experimental-ct-react17": {
|
||||
"version": "file:packages/playwright-ct-react17",
|
||||
"requires": {
|
||||
"@playwright/experimental-ct-core": "1.33.0-next",
|
||||
"@playwright/experimental-ct-core": "1.33.0",
|
||||
"@vitejs/plugin-react": "^3.1.0"
|
||||
}
|
||||
},
|
||||
"@playwright/experimental-ct-solid": {
|
||||
"version": "file:packages/playwright-ct-solid",
|
||||
"requires": {
|
||||
"@playwright/experimental-ct-core": "1.33.0-next",
|
||||
"@playwright/experimental-ct-core": "1.33.0",
|
||||
"solid-js": "^1.7.0",
|
||||
"vite-plugin-solid": "^2.6.1"
|
||||
}
|
||||
|
|
@ -7208,7 +7208,7 @@
|
|||
"@playwright/experimental-ct-svelte": {
|
||||
"version": "file:packages/playwright-ct-svelte",
|
||||
"requires": {
|
||||
"@playwright/experimental-ct-core": "1.33.0-next",
|
||||
"@playwright/experimental-ct-core": "1.33.0",
|
||||
"@sveltejs/vite-plugin-svelte": "^2.0.3",
|
||||
"svelte": "^3.55.1"
|
||||
}
|
||||
|
|
@ -7216,7 +7216,7 @@
|
|||
"@playwright/experimental-ct-vue": {
|
||||
"version": "file:packages/playwright-ct-vue",
|
||||
"requires": {
|
||||
"@playwright/experimental-ct-core": "1.33.0-next",
|
||||
"@playwright/experimental-ct-core": "1.33.0",
|
||||
"@vitejs/plugin-vue": "^4.1.0"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
@ -7250,7 +7250,7 @@
|
|||
"@playwright/experimental-ct-vue2": {
|
||||
"version": "file:packages/playwright-ct-vue2",
|
||||
"requires": {
|
||||
"@playwright/experimental-ct-core": "1.33.0-next",
|
||||
"@playwright/experimental-ct-core": "1.33.0",
|
||||
"@vitejs/plugin-vue2": "^2.2.0",
|
||||
"vue": "^2.7.14"
|
||||
}
|
||||
|
|
@ -7260,7 +7260,7 @@
|
|||
"requires": {
|
||||
"@types/node": "*",
|
||||
"fsevents": "2.3.2",
|
||||
"playwright-core": "1.33.0-next"
|
||||
"playwright-core": "1.33.0"
|
||||
}
|
||||
},
|
||||
"@sindresorhus/is": {
|
||||
|
|
@ -9555,13 +9555,13 @@
|
|||
"playwright": {
|
||||
"version": "file:packages/playwright",
|
||||
"requires": {
|
||||
"playwright-core": "1.33.0-next"
|
||||
"playwright-core": "1.33.0"
|
||||
}
|
||||
},
|
||||
"playwright-chromium": {
|
||||
"version": "file:packages/playwright-chromium",
|
||||
"requires": {
|
||||
"playwright-core": "1.33.0-next"
|
||||
"playwright-core": "1.33.0"
|
||||
}
|
||||
},
|
||||
"playwright-core": {
|
||||
|
|
@ -9570,13 +9570,13 @@
|
|||
"playwright-firefox": {
|
||||
"version": "file:packages/playwright-firefox",
|
||||
"requires": {
|
||||
"playwright-core": "1.33.0-next"
|
||||
"playwright-core": "1.33.0"
|
||||
}
|
||||
},
|
||||
"playwright-webkit": {
|
||||
"version": "file:packages/playwright-webkit",
|
||||
"requires": {
|
||||
"playwright-core": "1.33.0-next"
|
||||
"playwright-core": "1.33.0"
|
||||
}
|
||||
},
|
||||
"postcss": {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "playwright-internal",
|
||||
"private": true,
|
||||
"version": "1.33.0-next",
|
||||
"version": "1.33.0",
|
||||
"description": "A high-level API to automate web browsers",
|
||||
"repository": "github:Microsoft/playwright",
|
||||
"homepage": "https://playwright.dev",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "playwright-chromium",
|
||||
"version": "1.33.0-next",
|
||||
"version": "1.33.0",
|
||||
"description": "A high-level API to automate Chromium",
|
||||
"repository": "github:Microsoft/playwright",
|
||||
"homepage": "https://playwright.dev",
|
||||
|
|
@ -28,6 +28,6 @@
|
|||
"install": "node install.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"playwright-core": "1.33.0-next"
|
||||
"playwright-core": "1.33.0"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "playwright-core",
|
||||
"version": "1.33.0-next",
|
||||
"version": "1.33.0",
|
||||
"description": "A high-level API to automate web browsers",
|
||||
"repository": "github:Microsoft/playwright",
|
||||
"homepage": "https://playwright.dev",
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@ export class PlaywrightConnection {
|
|||
this._ws = ws;
|
||||
this._preLaunched = preLaunched;
|
||||
this._options = options;
|
||||
options.launchOptions = filterLaunchOptions(options.launchOptions);
|
||||
if (clientType === 'reuse-browser' || clientType === 'pre-launched-browser-or-android')
|
||||
assert(preLaunched.playwright);
|
||||
if (clientType === 'pre-launched-browser-or-android')
|
||||
|
|
@ -271,6 +272,21 @@ function launchOptionsHash(options: LaunchOptions) {
|
|||
return JSON.stringify(copy);
|
||||
}
|
||||
|
||||
function filterLaunchOptions(options: LaunchOptions) {
|
||||
return {
|
||||
channel: options.channel,
|
||||
args: options.args,
|
||||
ignoreAllDefaultArgs: options.ignoreAllDefaultArgs,
|
||||
ignoreDefaultArgs: options.ignoreDefaultArgs,
|
||||
timeout: options.timeout,
|
||||
headless: options.headless,
|
||||
proxy: options.proxy,
|
||||
chromiumSandbox: options.chromiumSandbox,
|
||||
firefoxUserPrefs: options.firefoxUserPrefs,
|
||||
slowMo: options.slowMo,
|
||||
};
|
||||
}
|
||||
|
||||
const defaultLaunchOptions: LaunchOptions = {
|
||||
ignoreAllDefaultArgs: false,
|
||||
handleSIGINT: false,
|
||||
|
|
|
|||
|
|
@ -41,7 +41,6 @@ export const chromiumSwitches = [
|
|||
'--disable-popup-blocking',
|
||||
'--disable-prompt-on-repost',
|
||||
'--disable-renderer-backgrounding',
|
||||
'--disable-sync',
|
||||
'--force-color-profile=srgb',
|
||||
'--metrics-recording-only',
|
||||
'--no-first-run',
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@playwright/experimental-ct-core",
|
||||
"version": "1.33.0-next",
|
||||
"version": "1.33.0",
|
||||
"description": "Playwright Component Testing Helpers",
|
||||
"repository": "github:Microsoft/playwright",
|
||||
"homepage": "https://playwright.dev",
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"vite": "^4.2.1",
|
||||
"@playwright/test": "1.33.0-next"
|
||||
"@playwright/test": "1.33.0"
|
||||
},
|
||||
"bin": {
|
||||
"playwright": "./cli.js"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@playwright/experimental-ct-react",
|
||||
"version": "1.33.0-next",
|
||||
"version": "1.33.0",
|
||||
"description": "Playwright Component Testing for React",
|
||||
"repository": "github:Microsoft/playwright",
|
||||
"homepage": "https://playwright.dev",
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@playwright/experimental-ct-core": "1.33.0-next",
|
||||
"@playwright/experimental-ct-core": "1.33.0",
|
||||
"@vitejs/plugin-react": "^3.1.0"
|
||||
},
|
||||
"bin": {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@playwright/experimental-ct-react17",
|
||||
"version": "1.33.0-next",
|
||||
"version": "1.33.0",
|
||||
"description": "Playwright Component Testing for React",
|
||||
"repository": "github:Microsoft/playwright",
|
||||
"homepage": "https://playwright.dev",
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@playwright/experimental-ct-core": "1.33.0-next",
|
||||
"@playwright/experimental-ct-core": "1.33.0",
|
||||
"@vitejs/plugin-react": "^3.1.0"
|
||||
},
|
||||
"bin": {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@playwright/experimental-ct-solid",
|
||||
"version": "1.33.0-next",
|
||||
"version": "1.33.0",
|
||||
"description": "Playwright Component Testing for Solid",
|
||||
"repository": "github:Microsoft/playwright",
|
||||
"homepage": "https://playwright.dev",
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@playwright/experimental-ct-core": "1.33.0-next",
|
||||
"@playwright/experimental-ct-core": "1.33.0",
|
||||
"vite-plugin-solid": "^2.6.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@playwright/experimental-ct-svelte",
|
||||
"version": "1.33.0-next",
|
||||
"version": "1.33.0",
|
||||
"description": "Playwright Component Testing for Svelte",
|
||||
"repository": "github:Microsoft/playwright",
|
||||
"homepage": "https://playwright.dev",
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@playwright/experimental-ct-core": "1.33.0-next",
|
||||
"@playwright/experimental-ct-core": "1.33.0",
|
||||
"@sveltejs/vite-plugin-svelte": "^2.0.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@playwright/experimental-ct-vue",
|
||||
"version": "1.33.0-next",
|
||||
"version": "1.33.0",
|
||||
"description": "Playwright Component Testing for Vue",
|
||||
"repository": "github:Microsoft/playwright",
|
||||
"homepage": "https://playwright.dev",
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@playwright/experimental-ct-core": "1.33.0-next",
|
||||
"@playwright/experimental-ct-core": "1.33.0",
|
||||
"@vitejs/plugin-vue": "^4.1.0"
|
||||
},
|
||||
"bin": {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@playwright/experimental-ct-vue2",
|
||||
"version": "1.33.0-next",
|
||||
"version": "1.33.0",
|
||||
"description": "Playwright Component Testing for Vue2",
|
||||
"repository": "github:Microsoft/playwright",
|
||||
"homepage": "https://playwright.dev",
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@playwright/experimental-ct-core": "1.33.0-next",
|
||||
"@playwright/experimental-ct-core": "1.33.0",
|
||||
"@vitejs/plugin-vue2": "^2.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "playwright-firefox",
|
||||
"version": "1.33.0-next",
|
||||
"version": "1.33.0",
|
||||
"description": "A high-level API to automate Firefox",
|
||||
"repository": "github:Microsoft/playwright",
|
||||
"homepage": "https://playwright.dev",
|
||||
|
|
@ -28,6 +28,6 @@
|
|||
"install": "node install.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"playwright-core": "1.33.0-next"
|
||||
"playwright-core": "1.33.0"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@playwright/test",
|
||||
"version": "1.33.0-next",
|
||||
"version": "1.33.0",
|
||||
"description": "A high-level API to automate web browsers",
|
||||
"repository": "github:Microsoft/playwright",
|
||||
"homepage": "https://playwright.dev",
|
||||
|
|
@ -36,7 +36,7 @@
|
|||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@types/node": "*",
|
||||
"playwright-core": "1.33.0-next"
|
||||
"playwright-core": "1.33.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"fsevents": "2.3.2"
|
||||
|
|
|
|||
|
|
@ -34,13 +34,26 @@ export class Runner {
|
|||
}
|
||||
|
||||
async listTestFiles(projectNames: string[] | undefined): Promise<any> {
|
||||
type ProjectConfigWithFiles = {
|
||||
name: string;
|
||||
testDir: string;
|
||||
use: { testIdAttribute?: string };
|
||||
files: string[];
|
||||
};
|
||||
|
||||
type ConfigListFilesReport = {
|
||||
projects: ProjectConfigWithFiles[];
|
||||
};
|
||||
|
||||
const projects = filterProjects(this._config.projects, projectNames);
|
||||
const report: any = {
|
||||
const report: ConfigListFilesReport = {
|
||||
projects: []
|
||||
};
|
||||
for (const project of projects) {
|
||||
report.projects.push({
|
||||
...sanitizeConfigForJSON(project, new Set()),
|
||||
name: project.project.name,
|
||||
testDir: project.project.testDir,
|
||||
use: { testIdAttribute: project.project.use.testIdAttribute },
|
||||
files: await collectFilesForProject(project)
|
||||
});
|
||||
}
|
||||
|
|
@ -99,32 +112,3 @@ export class Runner {
|
|||
return await runUIMode(config);
|
||||
}
|
||||
}
|
||||
|
||||
function sanitizeConfigForJSON(object: any, visited: Set<any>): any {
|
||||
const type = typeof object;
|
||||
if (type === 'function' || type === 'symbol')
|
||||
return undefined;
|
||||
if (!object || type !== 'object')
|
||||
return object;
|
||||
|
||||
if (object instanceof RegExp)
|
||||
return String(object);
|
||||
if (object instanceof Date)
|
||||
return object.toISOString();
|
||||
|
||||
if (visited.has(object))
|
||||
return undefined;
|
||||
visited.add(object);
|
||||
|
||||
if (Array.isArray(object))
|
||||
return object.map(a => sanitizeConfigForJSON(a, visited));
|
||||
|
||||
const result: any = {};
|
||||
const keys = Object.keys(object).slice(0, 100);
|
||||
for (const key of keys) {
|
||||
if (key.startsWith('_'))
|
||||
continue;
|
||||
result[key] = sanitizeConfigForJSON(object[key], visited);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "playwright-webkit",
|
||||
"version": "1.33.0-next",
|
||||
"version": "1.33.0",
|
||||
"description": "A high-level API to automate WebKit",
|
||||
"repository": "github:Microsoft/playwright",
|
||||
"homepage": "https://playwright.dev",
|
||||
|
|
@ -28,6 +28,6 @@
|
|||
"install": "node install.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"playwright-core": "1.33.0-next"
|
||||
"playwright-core": "1.33.0"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "playwright",
|
||||
"version": "1.33.0-next",
|
||||
"version": "1.33.0",
|
||||
"description": "A high-level API to automate web browsers",
|
||||
"repository": "github:Microsoft/playwright",
|
||||
"homepage": "https://playwright.dev",
|
||||
|
|
@ -28,6 +28,6 @@
|
|||
"install": "node install.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"playwright-core": "1.33.0-next"
|
||||
"playwright-core": "1.33.0"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -576,6 +576,19 @@ for (const kind of ['launchServer', 'run-server'] as const) {
|
|||
expect(entry.request.url).toBe(server.EMPTY_PAGE);
|
||||
});
|
||||
|
||||
test('should filter launch options', async ({ connect, startRemoteServer, server, browserType }, testInfo) => {
|
||||
const tracesDir = testInfo.outputPath('traces');
|
||||
const oldTracesDir = (browserType as any)._defaultLaunchOptions.tracesDir;
|
||||
(browserType as any)._defaultLaunchOptions.tracesDir = tracesDir;
|
||||
const remoteServer = await startRemoteServer(kind);
|
||||
const browser = await connect(remoteServer.wsEndpoint());
|
||||
const page = await browser.newPage();
|
||||
await page.goto(server.EMPTY_PAGE);
|
||||
await browser.close();
|
||||
(browserType as any)._defaultLaunchOptions.tracesDir = oldTracesDir;
|
||||
expect(fs.existsSync(tracesDir)).toBe(false);
|
||||
});
|
||||
|
||||
test('should record trace with sources', async ({ connect, startRemoteServer, server, trace }, testInfo) => {
|
||||
test.skip(trace === 'on');
|
||||
const remoteServer = await startRemoteServer(kind);
|
||||
|
|
|
|||
|
|
@ -91,6 +91,9 @@ async function run() {
|
|||
// Patch docker version in docs
|
||||
{
|
||||
for (const filePath of getAllMarkdownFiles(path.join(PROJECT_DIR, 'docs'))) {
|
||||
// Do not patch docker versions in the release notes; these are always handcrafted.
|
||||
if (filePath.includes('release-notes-'))
|
||||
continue;
|
||||
let content = fs.readFileSync(filePath).toString();
|
||||
content = content.replace(new RegExp('(mcr.microsoft.com/playwright[^:]*):([\\w\\d-.]+)', 'ig'), (match, imageName, imageVersion) => {
|
||||
const [version, distroName] = imageVersion.split('-');
|
||||
|
|
|
|||
Loading…
Reference in a new issue