1700 Commits

Author SHA1 Message Date
Simon Knott 3641e5984f chore: HMR for Trace Viewer (#33228) 2024-10-24 14:34:59 +02:00
Dmitry Gozman 2e01154bb5 feat: screenshot:on-first-failure (#33266) 2024-10-24 04:41:35 -07:00
Pavel Feldman 6bfdad068c chore: introduce accessibility tab in recorder (#33235) 2024-10-22 16:36:03 -07:00
Max Schmitt e866e3306e devops: stop publishing Ubuntu 20.04 (#33203) 2024-10-21 17:00:10 +02:00
Dmitry Gozman 2d150eec25 fix: correct types for things like test.describe.only (#33142) 2024-10-17 03:34:05 -07:00
Pengoose d10a5e5693 feat(testType): add support for test.fail.only method (#33001) 2024-10-16 06:47:23 -07:00
Lars Hanisch 183720b56a fix(docker): correct Ubuntu Noble name in name template (#33133) 2024-10-16 10:15:40 +02:00
Pavel Feldman 4b1fbde2ad chore: generate match snapshot (#33105) 2024-10-15 13:38:55 -07:00
Pavel Feldman a38ff6e0d8 chore: experimental toMatchAriaSnapshot (#33014) 2024-10-14 14:07:19 -07:00
Max Schmitt 9fcf60464d chore: various v1.48.0 roll fixes for .NET (#33096) 2024-10-14 16:32:11 +02:00
Playwright Service 5b29ead6f0 chore(driver): roll driver to recent Node.js LTS version (#33005)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-10-08 12:53:38 +02:00
Max Schmitt ddeabdf770 devops: speculative fix for flakiness dashboard data loss (#32963) 2024-10-04 18:47:35 +02:00
Simon Knott 80ff7c396a chore(docs): fix code highlighting (#32927)
Closes https://github.com/microsoft/playwright/issues/32921

This is the diff when rolling to `playwright.dev` locally:
<img width="1262" alt="Screenshot 2024-10-02 at 14 54 42"
src="https://github.com/user-attachments/assets/aade7ad4-420c-48c4-a2c9-03fe815a3959">

---------

Signed-off-by: Simon Knott <info@simonknott.de>
2024-10-04 16:38:13 +02:00
Max Schmitt 895be9f8de chore: lint java docs snippets (#32945) 2024-10-04 11:34:04 +02:00
Dmitry Gozman a395fb22c4 feat(routeWebSocket): address api review feedback (#32850) 2024-09-27 04:01:31 -07:00
Dmitry Gozman d07f6cfc5c docs: check that description has an empty line before it (#32830) 2024-09-26 06:31:42 -07:00
Max Schmitt 3b86a9c0e4 docs(markdown): parse :::note's text as children (#32510) 2024-09-26 15:16:26 +02:00
Dmitry Gozman a2bdb2fd79 docs: linkify params and options (#32823)
References https://github.com/microsoft/playwright/issues/32590.
2024-09-26 05:13:00 -07:00
Dmitry Gozman e5433d0576 chore(docs): validate params/options links (#32820)
Also supports fully-qualified links like this:
```
[`option: BrowserType.launch.headless`]
```

References https://github.com/microsoft/playwright/issues/32590.
2024-09-26 01:08:16 -07:00
Max Schmitt 057a3187fc devops: add logging for report name when uploading to flakiness dashboard (#32786) 2024-09-24 12:20:39 +02:00
Dmitry Gozman 59700aa9f1 chore: brush up documentation scripts (#32782)
References #32590.
2024-09-24 02:51:09 -07:00
Pavel Feldman 0cdc7ee1a3 chore: extract polling recorder (#32749)
We are reusing recorder in a snapshot tab, no need for the polling
harness to be there.
2024-09-23 08:42:18 -07:00
Dmitry Gozman cdcaa7fab6 feat: routeWebSocket (#32675)
This introduces `WebSocketRoute` class and
`page/context.routeWebSocket()` methods.
2024-09-20 03:20:06 -07:00
Max Schmitt 523ec83cad chore: move Location type from testReporter.d.ts to test.d.ts (#32687) 2024-09-18 16:57:11 +02:00
오소현 8761dafc73 feat(test runner): allow to pass arbitrary location to test.step (#32504)
Fixes https://github.com/microsoft/playwright/issues/30160

### Description:
This pull request introduces the ability to specify custom locations for
test steps in Playwright. By enabling the provision of arbitrary
locations to the test.step method, it resolves the limitation where
helper methods obfuscate the original call site, providing more accurate
and meaningful location data in test reports.

### Motivation:
To enhance the utility and clarity of test reports in Playwright.
Specifically, it addresses the need to trace test steps back to their
precise location in the code, which is especially important when steps
are abstracted in helper functions. This feature is crucial for
maintaining accurate documentation and facilitating debugging processes.

### Changes:
Added functionality to pass a custom location object to test.step.

### Expected Outcome:
This PR is expected to significantly improve the precision and
usefulness of diagnostic data in test reports by allowing specific
locations within helper functions to be accurately documented. It
facilitates better tracking of test executions and simplifies the
debugging process, making it easier for developers to understand and
address issues within complex tests.

### References:
Closes https://github.com/microsoft/playwright/issues/30160 -
"[Feature]: allow to pass arbitrary location to test.step"

**Code Check**
I conducted tests on this new feature by integrating it into some
existing test codes, and it worked well. I will attach the code used for
testing and a screenshot showing the successful outcome.

<details>
<summary>toggle dropdown</summary>
<div markdown="1">

```
import type { Location } from '../../../packages/playwright/types/testReporter'
...
test('should respect the back button', async ({ page }) => {
    await page.locator('.todo-list li .toggle').nth(1).check();
    await checkNumberOfCompletedTodosInLocalStorage(page, 1);
...
    await test.step('Showing active items', async () => {
      await page.getByRole('link', { name: 'Active' }).click();
    }, {location});
```

<img width="1109" alt="image"
src="https://github.com/user-attachments/assets/359feafa-0949-4c71-9426-46debef21bdd">
</div>
</details>
2024-09-17 08:11:21 -07:00
Pavel Feldman 6d5889a52c chore: revert the matcherResult in API (#32524) 2024-09-09 16:44:32 -07:00
Pavel Feldman 9a313eecc9 chore: roll expect and move it to third party (#32458) 2024-09-09 13:12:20 -07:00
Max Schmitt ed303208b3 test: update to android-35 SDK (Android 15) (#32430) 2024-09-06 14:27:56 +02:00
Pavel Feldman a52eb0c9a0 chore: expose matcherResult on TestError (#32455) 2024-09-05 21:36:51 -07:00
Yury Semikhatsky f0e13164d7 chore: split firefox and chromium bidi implementations (#32478) 2024-09-05 18:31:56 -07:00
Yury Semikhatsky 9a2c60a77c chore: identify largest gaps in Bidi API (#32434)
This pull request introduces initial support for the WebDriver BiDi
protocol in Playwright. The primary goal of this PR is not to fully
implement BiDi but to experiment with the current state of the
specification and its implementation. We aim to identify the biggest
gaps and challenges that need to be addressed before considering BiDi as
the main protocol for Playwright.
2024-09-04 11:36:52 -07:00
Yury Semikhatsky 565aed6c39 Revert "chore: enforce tags format via typescript types (#32384)" (#32431)
After API review we decided to revert it:
* VSCode extension and UI mode users already get the (runtime) error if
the tag is not prefixed
* The typescript error message is not very nice
* The type change would break those clients that generate tests with
tags passed as string

This reverts commit 90e7b9ebac.
2024-09-03 10:07:08 -07:00
Simon Knott f62f85ba51 fix(test runner): fix types to allow calling custom matchers on expect.poll (#32407)
The `'should support custom matchers'` test asserts that the
functionality works, but it was a type error. This PR updates the types
so that it's allowed.

Closes https://github.com/microsoft/playwright/issues/32408

---------

Signed-off-by: Simon Knott <info@simonknott.de>
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
2024-09-02 13:42:15 +02:00
Yury Semikhatsky 90e7b9ebac chore: enforce tags format via typescript types (#32384)
Leverage [template literal
types](https://www.typescriptlang.org/docs/handbook/2/template-literal-types.html).

Fixes https://github.com/microsoft/playwright/issues/32382
2024-08-29 14:16:49 -07:00
Pavel Feldman 3d9342aa77 chore: update removeAllListeners docs (#32305)
Closes https://github.com/microsoft/playwright/issues/31474
2024-08-26 09:29:02 -07:00
Playwright Service f74c6d77db chore(driver): roll driver to recent Node.js LTS version (#32264) 2024-08-22 12:07:44 +02:00
Max Schmitt 666a8f22cf chore: fix api.json serializer for language ports (#32260)
Fixes https://github.com/microsoft/playwright/issues/32241
2024-08-22 10:15:47 +02:00
Max Schmitt 74f5ce5489 docs: store parent type reference in documentation.js (#32215) 2024-08-19 09:11:20 +02:00
Yury Semikhatsky 2ae196f708 fix(docs): API types do not extend EventEmitter (#32124)
Fixes https://github.com/microsoft/playwright/issues/32097
2024-08-12 11:22:48 -07:00
Max Schmitt cae779b74f docs: recommend Ubuntu 24.04 in Docker images (#31435) 2024-08-12 16:39:56 +02:00
Max Schmitt ba8f94df56 chore(docs): remove unused generateToc function (#32111) 2024-08-12 10:56:59 +02:00
Simon Knott 45c2e8a3ed chore(recorder): update to React 18 (#32101)
Part of https://github.com/microsoft/playwright/issues/31863. Updates
`recorder` to use React 18.
2024-08-12 09:19:28 +02:00
Dmitry Gozman f24e46c367 fix(types): revert type changes made to support TS 5.5 (#32066)
Regressed in #31532. The TS5.5 changes broke chaining of `extend`s where
the first `extend` did not specify any type arguments.

Fixes #32056.
2024-08-08 05:21:48 -07:00
Pavel Feldman 3c87f217df feat(events): allow waiting for removeAllListeners (#31941) 2024-08-05 21:14:35 -07:00
Max Schmitt a47d2f998c chore(lint): bump Microsoft.CodeAnalysis for linting code snippets (#32012) 2024-08-05 14:30:38 +02:00
Max Schmitt 73e0e92a7e devops: retry download of upstream Node.js for drivers (#31962) 2024-08-01 19:45:25 +02:00
Max Schmitt 55187207e4 chore: various roll fixes for .NET (#31914) 2024-07-30 19:09:20 +02:00
Playwright Service 3ce948e972 chore(driver): roll driver to recent Node.js LTS version (#31854) 2024-07-25 12:52:50 +02:00
Max Schmitt bb2e9d1175 chore: make 'npm run clean' ignore .DS_Store (#31710) 2024-07-16 20:55:12 +02:00
Max Schmitt 950875f0db fix(docs): index all deeply nested types (#31690) 2024-07-15 16:35:15 +02:00