Skip to content

Commit

Permalink
feat(roll): roll to ToT Playwright (18-10-24) (#1567)
Browse files Browse the repository at this point in the history
  • Loading branch information
playwrightmachine authored Oct 18, 2024
1 parent 74ee03e commit 3216020
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 20 deletions.
12 changes: 6 additions & 6 deletions java/docs/ci.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
name: 'Playwright Tests'
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright/java:v1.47.0-noble
image: mcr.microsoft.com/playwright/java:v1.48.0-noble
options: --user 1001
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -165,7 +165,7 @@ trigger:
pool:
vmImage: ubuntu-latest
container: mcr.microsoft.com/playwright/java:v1.47.0-noble
container: mcr.microsoft.com/playwright/java:v1.48.0-noble
steps:
- task: JavaToolInstaller@0
Expand All @@ -188,7 +188,7 @@ Running Playwright on CircleCI is very similar to running on GitHub Actions. In
executors:
pw-noble-development:
docker:
- image: mcr.microsoft.com/playwright/java:v1.47.0-noble
- image: mcr.microsoft.com/playwright/java:v1.48.0-noble
```

Note: When using the docker agent definition, you are specifying the resource class of where playwright runs to the 'medium' tier [here](https://circleci.com/docs/configuration-reference?#docker-execution-environment). The default behavior of Playwright is to set the number of workers to the detected core count (2 in the case of the medium tier). Overriding the number of workers to greater than this number will cause unnecessary timeouts and failures.
Expand All @@ -199,7 +199,7 @@ Jenkins supports Docker agents for pipelines. Use the [Playwright Docker image](

```groovy
pipeline {
agent { docker { image 'mcr.microsoft.com/playwright/java:v1.47.0-noble' } }
agent { docker { image 'mcr.microsoft.com/playwright/java:v1.48.0-noble' } }
stages {
stage('e2e-tests') {
steps {
Expand All @@ -216,7 +216,7 @@ pipeline {
Bitbucket Pipelines can use public [Docker images as build environments](https://confluence.atlassian.com/bitbucket/use-docker-images-as-build-environments-792298897.html). To run Playwright tests on Bitbucket, use our public Docker image ([see Dockerfile](./docker.mdx)).
```yml
image: mcr.microsoft.com/playwright/java:v1.47.0-noble
image: mcr.microsoft.com/playwright/java:v1.48.0-noble
```
### GitLab CI
Expand All @@ -229,7 +229,7 @@ stages:
tests:
stage: test
image: mcr.microsoft.com/playwright/java:v1.47.0-noble
image: mcr.microsoft.com/playwright/java:v1.48.0-noble
script:
...
```
Expand Down
14 changes: 7 additions & 7 deletions java/docs/docker.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ This Docker image is intended to be used for testing and development purposes on
### Pull the image

```bash
docker pull mcr.microsoft.com/playwright/java:v1.47.0-noble
docker pull mcr.microsoft.com/playwright/java:v1.48.0-noble
```

### Run the image
Expand All @@ -34,15 +34,15 @@ By default, the Docker image will use the `root` user to run the browsers. This
On trusted websites, you can avoid creating a separate user and use root for it since you trust the code which will run on the browsers.

```bash
docker run -it --rm --ipc=host mcr.microsoft.com/playwright/java:v1.47.0-noble /bin/bash
docker run -it --rm --ipc=host mcr.microsoft.com/playwright/java:v1.48.0-noble /bin/bash
```

#### Crawling and scraping

On untrusted websites, it's recommended to use a separate user for launching the browsers in combination with the seccomp profile. Inside the container or if you are using the Docker image as a base image you have to use `adduser` for it.

```bash
docker run -it --rm --ipc=host --user pwuser --security-opt seccomp=seccomp_profile.json mcr.microsoft.com/playwright/java:v1.47.0-noble /bin/bash
docker run -it --rm --ipc=host --user pwuser --security-opt seccomp=seccomp_profile.json mcr.microsoft.com/playwright/java:v1.48.0-noble /bin/bash
```

[`seccomp_profile.json`](https://github.com/microsoft/playwright/blob/main/utils/docker/seccomp_profile.json) is needed to run Chromium with sandbox. This is a [default Docker seccomp profile](https://github.com/docker/engine/blob/d0d99b04cf6e00ed3fc27e81fc3d94e7eda70af3/profiles/seccomp/default.json) with extra user namespace cloning permissions:
Expand Down Expand Up @@ -75,10 +75,10 @@ See our [Continuous Integration guides](./ci.mdx) for sample configs.
See [all available image tags].

We currently publish images with the following tags:
- `:v1.47.0` - Playwright v1.47.0 release docker image based on Ubuntu 24.04 LTS (Noble Numbat).
- `:v1.47.0-noble` - Playwright v1.47.0 release docker image based on Ubuntu 24.04 LTS (Noble Numbat).
- `:v1.47.0-jammy` - Playwright v1.47.0 release docker image based on Ubuntu 22.04 LTS (Jammy Jellyfish).
- `:v1.47.0-focal` - Playwright v1.47.0 release docker image based on Ubuntu 20.04 LTS (Focal Fossa).
- `:v1.48.0` - Playwright v1.48.0 release docker image based on Ubuntu 24.04 LTS (Noble Numbat).
- `:v1.48.0-noble` - Playwright v1.48.0 release docker image based on Ubuntu 24.04 LTS (Noble Numbat).
- `:v1.48.0-jammy` - Playwright v1.48.0 release docker image based on Ubuntu 22.04 LTS (Jammy Jellyfish).
- `:v1.48.0-focal` - Playwright v1.48.0 release docker image based on Ubuntu 20.04 LTS (Focal Fossa).

:::note

Expand Down
2 changes: 1 addition & 1 deletion java/docs/intro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public class App {
<dependency>
<groupId>com.microsoft.playwright</groupId>
<artifactId>playwright</artifactId>
<version>1.47.0</version>
<version>1.48.0</version>
</dependency>
</dependencies>
<build>
Expand Down
4 changes: 2 additions & 2 deletions java/docs/test-runners.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ repositories {
}
dependencies {
implementation 'com.microsoft.playwright:playwright:1.47.0'
implementation 'com.microsoft.playwright:playwright:1.48.0'
}
application {
Expand Down Expand Up @@ -231,7 +231,7 @@ repositories {
}
dependencies {
implementation("com.microsoft.playwright:playwright:1.47.0")
implementation("com.microsoft.playwright:playwright:1.48.0")
}
application {
Expand Down
8 changes: 4 additions & 4 deletions nodejs/docs/api/class-testconfig.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ export default defineConfig({

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.10</font><x-search>testConfig.globalSetup</x-search>

Path to the global setup file. This file will be required and run before all the tests. It must export a single function that takes a [FullConfig] argument.
Path to the global setup file. This file will be required and run before all the tests. It must export a single function that takes a [FullConfig] argument. Pass an array of paths to specify multiple global setup files.

Learn more about [global setup and teardown](../test-global-setup-teardown.mdx).

Expand All @@ -190,15 +190,15 @@ export default defineConfig({
```

**Type**
- [string]
- [string] | [Array]&lt;[string]&gt;

---

### globalTeardown {#test-config-global-teardown}

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.10</font><x-search>testConfig.globalTeardown</x-search>

Path to the global teardown file. This file will be required and run after all the tests. It must export a single function. See also [testConfig.globalSetup](/api/class-testconfig.mdx#test-config-global-setup).
Path to the global teardown file. This file will be required and run after all the tests. It must export a single function. See also [testConfig.globalSetup](/api/class-testconfig.mdx#test-config-global-setup). Pass an array of paths to specify multiple global teardown files.

Learn more about [global setup and teardown](../test-global-setup-teardown.mdx).

Expand All @@ -213,7 +213,7 @@ export default defineConfig({
```

**Type**
- [string]
- [string] | [Array]&lt;[string]&gt;

---

Expand Down

0 comments on commit 3216020

Please sign in to comment.