Skip to content

Commit

Permalink
chore(deps): update dependency @playwright/test to v1.44.0 (#10618)
Browse files Browse the repository at this point in the history
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@playwright/test](https://playwright.dev)
([source](https://togithub.com/microsoft/playwright)) | [`1.42.1` ->
`1.44.0`](https://renovatebot.com/diffs/npm/@playwright%2ftest/1.42.1/1.44.0)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@playwright%2ftest/1.44.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@playwright%2ftest/1.44.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@playwright%2ftest/1.42.1/1.44.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@playwright%2ftest/1.42.1/1.44.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>microsoft/playwright (@&#8203;playwright/test)</summary>

###
[`v1.44.0`](https://togithub.com/microsoft/playwright/releases/tag/v1.44.0)

[Compare
Source](https://togithub.com/microsoft/playwright/compare/v1.43.1...v1.44.0)

#### New APIs

**Accessibility assertions**

-
[expect(locator).toHaveAccessibleName()](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-have-accessible-name)
checks if the element has the specified accessible name:

    ```js
    const locator = page.getByRole('button');
    await expect(locator).toHaveAccessibleName('Submit');
    ```

-
[expect(locator).toHaveAccessibleDescription()](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-have-accessible-description)
checks if the element has the specified accessible description:

    ```js
    const locator = page.getByRole('button');
    await expect(locator).toHaveAccessibleDescription('Upload a photo');
    ```

-
[expect(locator).toHaveRole()](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-have-role)
checks if the element has the specified ARIA role:

    ```js
    const locator = page.getByTestId('save-button');
    await expect(locator).toHaveRole('button');
    ```

**Locator handler**

- After executing the handler added with
[page.addLocatorHandler()](https://playwright.dev/docs/api/class-page#page-add-locator-handler),
Playwright will now wait until the overlay that triggered the handler is
not visible anymore. You can opt-out of this behavior with the new
`noWaitAfter` option.
- You can use new `times` option in
[page.addLocatorHandler()](https://playwright.dev/docs/api/class-page#page-add-locator-handler)
to specify maximum number of times the handler should be run.
- The handler in
[page.addLocatorHandler()](https://playwright.dev/docs/api/class-page#page-add-locator-handler)
now accepts the locator as argument.
- New
[page.removeLocatorHandler()](https://playwright.dev/docs/api/class-page#page-remove-locator-handler)
method for removing previously added locator handlers.

```js
const locator = page.getByText('This interstitial covers the button');
await page.addLocatorHandler(locator, async overlay => {
  await overlay.locator('#close').click();
}, { times: 3, noWaitAfter: true });
// Run your tests that can be interrupted by the overlay.
// ...
await page.removeLocatorHandler(locator);
```

**Miscellaneous options**

-
[`multipart`](https://playwright.dev/docs/api/class-apirequestcontext#api-request-context-fetch-option-multipart)
option in `apiRequestContext.fetch()` now accepts
[`FormData`](https://developer.mozilla.org/en-US/docs/Web/API/FormData)
and supports repeating fields with the same name.

    ```js
    const formData = new FormData();
formData.append('file', new File(['let x = 2024;'], 'f1.js', { type:
'text/javascript' }));
formData.append('file', new File(['hello'], 'f2.txt', { type:
'text/plain' }));
    context.request.post('https://example.com/uploadFiles', {
      multipart: formData
    });
    ```

- `expect(callback).toPass({ intervals })` can now be configured by
`expect.toPass.inervals` option globally in
[testConfig.expect](https://playwright.dev/docs/api/class-testconfig#test-config-expect)
or per project in
[testProject.expect](https://playwright.dev/docs/api/class-testproject#test-project-expect).

- `expect(page).toHaveURL(url)` now supports `ignoreCase`
[option](https://playwright.dev/docs/api/class-pageassertions#page-assertions-to-have-url-option-ignore-case).

-
[testProject.ignoreSnapshots](https://playwright.dev/docs/api/class-testproject#test-project-ignore-snapshots)
allows to configure per project whether to skip screenshot expectations.

**Reporter API**

- New method
[suite.entries()](https://playwright.dev/docs/api/class-suite#suite-entries)
returns child test suites and test cases in their declaration order.
[suite.type](https://playwright.dev/docs/api/class-suite#suite-type) and
[testCase.type](https://playwright.dev/docs/api/class-testcase#test-case-type)
can be used to tell apart test cases and suites in the list.
- [Blob](https://playwright.dev/docs/test-reporters#blob-reporter)
reporter now allows overriding report file path with a single option
`outputFile`. The same option can also be specified as
`PLAYWRIGHT_BLOB_OUTPUT_FILE` environment variable that might be more
convenient on CI/CD.
- [JUnit](https://playwright.dev/docs/test-reporters#junit-reporter)
reporter now supports `includeProjectInTestName` option.

**Command line**

- `--last-failed` CLI option for running only tests that failed in the
previous run.

    First run all tests:

    ```sh
    $ npx playwright test

    Running 103 tests using 5 workers
    ...
    2 failed
[chromium] › my-test.spec.ts:8:5 › two
─────────────────────────────────────────────────────────
[chromium] › my-test.spec.ts:13:5 › three
──────────────────────────────────────────────────────
    101 passed (30.0s)
    ```

Now fix the failing tests and run Playwright again with `--last-failed`
option:

    ```sh
    $ npx playwright test --last-failed

    Running 2 tests using 2 workers
      2 passed (1.2s)
    ```

#### Browser Versions

-   Chromium 125.0.6422.14
-   Mozilla Firefox 125.0.1
-   WebKit 17.4

This version was also tested against the following stable channels:

-   Google Chrome 124
-   Microsoft Edge 124

###
[`v1.43.1`](https://togithub.com/microsoft/playwright/releases/tag/v1.43.1)

[Compare
Source](https://togithub.com/microsoft/playwright/compare/v1.43.0...v1.43.1)

##### Highlights


[microsoft/playwright#30300
- \[REGRESSION]: UI mode restarts if keep storage
state[microsoft/playwright#30339
- \[REGRESSION]: Brand new install of playwright, unable to run chromium
with show browser using vscode

##### Browser Versions

-   Chromium 124.0.6367.29
-   Mozilla Firefox 124.0
-   WebKit 17.4

This version was also tested against the following stable channels:

-   Google Chrome 123
-   Microsoft Edge 123

###
[`v1.43.0`](https://togithub.com/microsoft/playwright/releases/tag/v1.43.0)

[Compare
Source](https://togithub.com/microsoft/playwright/compare/v1.42.1...v1.43.0)

#### New APIs

- Method
[browserContext.clearCookies()](https://playwright.dev/docs/api/class-browsercontext#browser-context-clear-cookies)
now supports filters to remove only some cookies.

    ```js
    // Clear all cookies.
    await context.clearCookies();
    // New: clear cookies with a particular name.
    await context.clearCookies({ name: 'session-id' });
    // New: clear cookies for a particular domain.
    await context.clearCookies({ domain: 'my-origin.com' });
    ```

- New mode `retain-on-first-failure` for
[testOptions.trace](https://playwright.dev/docs/api/class-testoptions#test-options-trace).
In this mode, trace is recorded for the first run of each test, but not
for retires. When test run fails, the trace file is retained, otherwise
it is removed.

    ```js title=playwright.config.ts
    import { defineConfig } from '@&#8203;playwright/test';

    export default defineConfig({
      use: {
        trace: 'retain-on-first-failure',
      },
    });
    ```

- New property
[testInfo.tags](https://playwright.dev/docs/api/class-testinfo#test-info-tags)
exposes test tags during test execution.

    ```js
    test('example', async ({ page }) => {
      console.log(test.info().tags);
    });
    ```

- New method
[locator.contentFrame()](https://playwright.dev/docs/api/class-locator#locator-content-frame)
converts a `Locator` object to a `FrameLocator`. This can be useful when
you have a `Locator` object obtained somewhere, and later on would like
to interact with the content inside the frame.

    ```js
    const locator = page.locator('iframe[name="embedded"]');
    // ...
    const frameLocator = locator.contentFrame();
    await frameLocator.getByRole('button').click();
    ```

- New method
[frameLocator.owner()](https://playwright.dev/docs/api/class-framelocator#frame-locator-owner)
converts a `FrameLocator` object to a `Locator`. This can be useful when
you have a `FrameLocator` object obtained somewhere, and later on would
like to interact with the `iframe` element.

    ```js
    const frameLocator = page.frameLocator('iframe[name="embedded"]');
    // ...
    const locator = frameLocator.owner();
    await expect(locator).toBeVisible();
    ```

#### UI Mode Updates

![Playwright UI
Mode](https://togithub.com/microsoft/playwright/assets/9881434/61ca7cfc-eb7a-4305-8b62-b6c9f098f300)

-   See tags in the test list.
-   Filter by tags by typing `@fast` or clicking on the tag itself.
-   New shortcuts:
    -   <kbd>F5</kbd> to run tests.
    -   <kbd>Shift</kbd> <kbd>F5</kbd> to stop running tests.
    -   <kbd>Ctrl</kbd> <kbd>\`</kbd> to toggle test output.

#### Browser Versions

-   Chromium 124.0.6367.29
-   Mozilla Firefox 124.0
-   WebKit 17.4

This version was also tested against the following stable channels:

-   Google Chrome 123
-   Microsoft Edge 123

</details>

---

### 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.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/redwoodjs/redwood).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNjMuNSIsInVwZGF0ZWRJblZlciI6IjM3LjM2My41IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
  • Loading branch information
renovate[bot] committed May 16, 2024
1 parent 2d6b45f commit 84864d5
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"@babel/runtime-corejs3": "7.24.1",
"@faker-js/faker": "8.4.1",
"@npmcli/arborist": "7.4.0",
"@playwright/test": "1.42.1",
"@playwright/test": "1.44.0",
"@testing-library/jest-dom": "6.4.5",
"@testing-library/react": "14.3.1",
"@testing-library/user-event": "14.5.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/ogimage-gen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"react-dom": "19.0.0-beta-04b058868c-20240508"
},
"devDependencies": {
"@playwright/test": "1.42.1",
"@playwright/test": "1.44.0",
"@redwoodjs/framework-tools": "workspace:*",
"ts-toolbelt": "9.6.0",
"tsx": "4.10.3",
Expand Down
32 changes: 16 additions & 16 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6661,14 +6661,14 @@ __metadata:
languageName: node
linkType: hard

"@playwright/test@npm:1.42.1":
version: 1.42.1
resolution: "@playwright/test@npm:1.42.1"
"@playwright/test@npm:1.44.0":
version: 1.44.0
resolution: "@playwright/test@npm:1.44.0"
dependencies:
playwright: "npm:1.42.1"
playwright: "npm:1.44.0"
bin:
playwright: cli.js
checksum: 10c0/e5d7c1ffedabb934643edb010038edcb70d51d224fb6444844a854d94365a6179d4407a83da176cae37ccd42b62c148843e0b6f9b4c6506048e06558c00d4267
checksum: 10c0/34c48b18f64f1be6ccba3e27fa4691aa9f7f8ea1eb1555ac4ae8e4bfc9136d61923a4376d8a711390c95401e4cfd77a15b18aab6a507bddd9925e6dab3acb9e1
languageName: node
linkType: hard

Expand Down Expand Up @@ -8684,7 +8684,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@redwoodjs/ogimage-gen@workspace:packages/ogimage-gen"
dependencies:
"@playwright/test": "npm:1.42.1"
"@playwright/test": "npm:1.44.0"
"@redwoodjs/framework-tools": "workspace:*"
"@redwoodjs/internal": "workspace:*"
"@redwoodjs/project-config": "workspace:*"
Expand Down Expand Up @@ -26013,27 +26013,27 @@ __metadata:
languageName: node
linkType: hard

"playwright-core@npm:1.42.1":
version: 1.42.1
resolution: "playwright-core@npm:1.42.1"
"playwright-core@npm:1.44.0":
version: 1.44.0
resolution: "playwright-core@npm:1.44.0"
bin:
playwright-core: cli.js
checksum: 10c0/9bb0be6defa32eb1b01429615f10c2ad17dcf701656c081a250369c1eb3b0dcc2a0ee21188cd653cdd2303ca73ff94df0d270b178fe3897eba274793dab368ce
checksum: 10c0/e1220371a76cdf145f6aaefb2dd6c5194531d1c1e2b67712c56dbc1d589dffb66fd4fc0168be60cd2115aca40660aa13c572e14be47674c0542bc879705b9fb3
languageName: node
linkType: hard

"playwright@npm:1.42.1":
version: 1.42.1
resolution: "playwright@npm:1.42.1"
"playwright@npm:1.44.0":
version: 1.44.0
resolution: "playwright@npm:1.44.0"
dependencies:
fsevents: "npm:2.3.2"
playwright-core: "npm:1.42.1"
playwright-core: "npm:1.44.0"
dependenciesMeta:
fsevents:
optional: true
bin:
playwright: cli.js
checksum: 10c0/91dcbfe92d75ca9eb4bfff69bb1ec28007b5a96f6187f48e52aa0f6acf8c24f6039ed6467c152964cc92f4ab64b85dc665b13c52b2fb9f7b9182ddb9db404e37
checksum: 10c0/dcbee9022623dd9e219e9867983789262e80339f0c3601219930883e5a304ce75e1397715c0f378a2bab0a799cf88a73ea4b58fe595cfd9058bd7a82f5d8e3b6
languageName: node
linkType: hard

Expand Down Expand Up @@ -28197,7 +28197,7 @@ __metadata:
"@babel/runtime-corejs3": "npm:7.24.1"
"@faker-js/faker": "npm:8.4.1"
"@npmcli/arborist": "npm:7.4.0"
"@playwright/test": "npm:1.42.1"
"@playwright/test": "npm:1.44.0"
"@testing-library/jest-dom": "npm:6.4.5"
"@testing-library/react": "npm:14.3.1"
"@testing-library/user-event": "npm:14.5.2"
Expand Down

0 comments on commit 84864d5

Please sign in to comment.