Commit graph

1343 commits

Author SHA1 Message Date
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
Max Schmitt 9569cb5c1e
feat: support client certificates (#31529)
Signed-off-by: Max Schmitt <max@schmitt.mx>
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
2024-07-12 11:42:24 +02:00
Max Schmitt 89eef55dc7
chore: use own socks5 server for tests (#31639) 2024-07-11 14:12:48 +02:00
Matvey Chernyshov ba62f83454
chore: add android keys for channels switching (#31619) 2024-07-10 13:15:45 -07:00
Playwright Service 1ea55acab3
chore(driver): roll driver to recent Node.js LTS version (#31609)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-07-09 12:07:34 +02:00
Max Schmitt 1132667ffe
chore: bump TypeScript to v5.5 (#31532) 2024-07-05 16:31:08 +02:00
Dmitry Gozman 1c69d3e175
chore: update flakiness metadata for better ui presentation (#31528) 2024-07-03 08:39:53 -07:00
Max Schmitt 2b974f2139
docs(clock): update time types in Python/.NET (#31511) 2024-07-03 10:46:33 +02:00
Playwright Service a6b6b243d0
chore(driver): roll driver to recent Node.js LTS version (#31432)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-06-25 12:16:36 +02:00
Pavel Feldman 122818c62c
feat: allow boxing and titling fixtures, simulate context fixture deps (#31423)
Fixes https://github.com/microsoft/playwright/issues/31411
2024-06-24 21:43:43 -07:00
Max Schmitt 1ebd20a47b
chore: .NET generator fixes (#31401) 2024-06-20 23:33:46 +02:00
Yury Semikhatsky f6972c1e23
docs: use long for time in milliseconds (#31369)
In Java and .NET int is not enough to store millis since epoch.
2024-06-18 10:47:29 -07:00
Max Schmitt c6aab05bd5
devops: make Android driver compile (#31360)
Fixes https://github.com/microsoft/playwright/issues/31355

All changes were done with the Android Studio upgrade assistant. It
updates it to the latest Gradle to make it compatible with recent Java
while keeping the `targetSdkVersion` unchanged.
2024-06-18 18:23:29 +02:00
Dmitry Gozman fce2874796
feat(types): export PageAssertionsToHaveScreenshotOptions type (#31319)
Fixes #31089.
2024-06-14 09:39:21 -07:00
dependabot[bot] b24fd0dd27
chore(deps): bump @azure/identity from 4.1.0 to 4.2.1 in /utils/flakiness-dashboard (#31261) 2024-06-11 15:37:43 -07:00
Pavel Feldman 826343b8a0
chore: rename fakeTimers to clock (#31193) 2024-06-06 15:56:13 -07:00
Pavel Feldman 384eed65ea
chore: organize fake timers (#31156) 2024-06-05 09:25:12 -07:00
Max Schmitt 2c6fd722dd
feat: support Ubuntu 24.04 (#30826) 2024-06-03 12:47:16 +02:00
Pavel Feldman 170c457a61
feat(timers): a stab at fake timers (#31075) 2024-05-30 09:38:27 -07:00
Playwright Service b3ee52659d
chore(driver): roll driver to recent Node.js LTS version (#31087) 2024-05-30 12:15:49 +02:00
Yury Semikhatsky 9884c851ff
feat(expect): expose expect timeout (#30969)
Fixes https://github.com/microsoft/playwright/issues/30583
2024-05-24 08:56:43 -07:00
Yury Semikhatsky 2cbd7b78ea
chore: change expect.getState() return type to unknown (#30989)
Eventually we would like to remove this method altogether.
2024-05-23 14:06:59 -07:00
Dmitry Gozman b67b9634c1
chore: remove support for "experimental" from documentation (#30880)
Also add support for "hidden" and make `generate_types/index` actually
pass tsc checks.
2024-05-20 10:30:32 -07:00
Max Schmitt 162c18f586
feat(roll): roll Firefox to r1450 (#30865)
Fixes
https://github.com/microsoft/playwright/actions/runs/9120975643/job/25079367394
2024-05-19 16:28:32 +02:00
Playwright Service d3d2275922
chore(driver): roll driver to recent Node.js LTS version (#30782)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-05-14 11:08:01 +01:00
Max Schmitt f2441eb4b5
docs(dotnet): roll fixes (#30771) 2024-05-13 15:56:14 -07:00
Playwright Service 7e494fdfb0
chore(driver): roll driver to recent Node.js LTS version (#30723) 2024-05-09 13:05:28 +01:00
Dmitry Gozman a5d384c1f6
docs: add section explaining scrolling (#30719)
Fixes #30643.
2024-05-08 21:04:05 -07:00
Viktor Szépe 150cbcbdf3
chore: fix typos (#30645) 2024-05-08 19:40:03 +01:00
Rui Figueira cf3ff6531a
chore: make NodeSnapshot type recursive and more (#30619)
Also, deviceDescriptors are now imported with ESM import instead of require()
2024-05-08 11:08:40 -07:00
Yury Semikhatsky d1cdf6826d
chore: do not render args in method signature in release notes (#30682) 2024-05-06 16:00:24 -07:00
Dmitry Gozman 59689c9c97
feat(addLocatorHandler): various improvements (#30494)
- Automatically waiting for the overlay locator to be hidden, with
`allowStayingVisible` opt-out.
- `times: 1` option.
- `removeLocatorHandler(locator, handler)` method.
- Passing `locator` as first argument to `handler`.

Fixes #30471. Fixes #30424. Fixes #29779.
2024-04-24 15:19:12 -07:00
Yury Semikhatsky f1f3929a67
chore: get rid of ConfigInWorker, use FullConfig instead (#30517)
Addressing API review feedback.
2024-04-24 14:14:05 -07:00
Max Schmitt d5ade91a92
devops: change flakiness-dashboard auth to be secret-less (#30488) 2024-04-24 22:23:28 +02:00
Dmitry Gozman 8fc7723f22
fix(types): allow any return type from event handlers (#30492)
Closes #29353.
2024-04-24 09:25:43 -07:00
Rui Figueira c80b851422
fix(codegen): prevent csp directive violations (#30366) 2024-04-23 07:33:12 -07:00
Max Schmitt 3f8bd5ffd1
devops: updated auth mode follow-ups (#30440) 2024-04-19 21:23:39 +02:00
Max Schmitt ed0e1909e5
devops: change auth mode for flakiness/docker/driver uploads (#30405) 2024-04-19 20:36:15 +02:00
Mateusz Burzyński 82aefd24db
types: allow readonly tuples to be used as ReporterDescription (#30387)
This makes it easier to create helper functions like:
```ts
function createReporter(options: MyOptions) {
  return ['my-reporter', options] as const
}
```

At the moment, such functions can't be passed to `reporters` because a
readonly array is not assignable to the expected mutable array.
Playwirght certainly doesn't require those arrays to be mutable so it
would make sense to relax this.
2024-04-16 17:39:11 -07:00
Playwright Service 15c29f4a91
chore(driver): roll driver to recent Node.js LTS version (#30332)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-04-11 12:14:29 +02:00
Yury Semikhatsky 01d4293803
chore: class link generation in release notes (#30324) 2024-04-10 10:05:54 -07:00
Playwright Service f67ad68bd2
chore(driver): roll driver to recent Node.js LTS version (#30306)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-04-09 12:37:26 +02:00
Max Schmitt 108b250d86
fix(docker): set default shell encoding (#30288)
This seems to be common practise, as per
[here](https://github.com/search?q=org%3Amicrosoft%20%2FENV%20LANG%3DC.UTF-8%2F&type=code).

Fixes https://github.com/microsoft/playwright/issues/30245
Fixes https://github.com/microsoft/playwright/issues/28642
2024-04-09 09:14:35 +02:00
Dmitry Gozman d5907f4b13
feat(junit): includeProjectInTestName option (#30233)
Fixes #30246.
2024-04-04 11:04:51 -07:00
Yury Semikhatsky 5c5f0d77e4
chore: move implementation of Config and Project to TestConfig and TestProject (#30212)
Reference https://github.com/microsoft/playwright/issues/29768
2024-04-03 10:47:32 -07:00
Max Schmitt 010bc29a3c
chore: harden markdown link validation (#30221) 2024-04-03 17:51:32 +02:00
Yury Semikhatsky 63f876a335
chore: remove overrides for type and status (#30211)
Reference https://github.com/microsoft/playwright/issues/29768
2024-04-02 17:42:13 -07:00
Yury Semikhatsky 81bcf2a53b
docs: document FullReporter API (#30186)
* FullConfig split into FullConfig and ConfigInWorker
* FullProject split into FullProject and ProjectInWorker
* Tests can only access {Config, Project}InWorker, while reporters can
only access Full{Config,Project}. This will allow in the future to
change the reporter API independently from the tests.
* Added documentation for the 4 classes.
2024-04-02 16:15:02 -07:00
Yury Semikhatsky 3001c9ac73
fix: preserve test declaration order in html and merged report (#30159)
* Add `Suite.entries` that returns tests and suites in their declaration
order
* Exposed `Suite.type` and `TestCase.type` for discriminating between
different entry types.
* Blob report format is updated to store entries instead of separate
lists for suites and tests.
* Bumped blob format version to 2, added modernizer.

Fixes https://github.com/microsoft/playwright/issues/29984
2024-03-29 10:12:33 -07:00
Pavel Feldman 5912362089
chore: export MatcherReturnType type (#30139)
Fixes https://github.com/microsoft/playwright/issues/30131
2024-03-27 08:33:00 -07:00
Max Schmitt 3d4e0061bc
devops: fix roll_browser script
Signed-off-by: Max Schmitt <max@schmitt.mx>
2024-03-21 13:39:24 +01:00
Max Schmitt 2bd3e104ab
chore: remove run-driver wrapper in driver (#30027) 2024-03-20 21:15:46 +01:00
dependabot[bot] 980fa90d3c
chore(deps): bump black from 23.3.0 to 24.3.0 in /utils/doclint/linting-code-snippets/python (#30022) 2024-03-20 19:10:19 +01:00
Max Schmitt 0db1d40abc
fix(types): evaluate should not unpack return unions (#29971) 2024-03-18 16:42:33 +01:00
Pavel Feldman 94348bb3c5
chore: align test tree with vscode (#29864) 2024-03-14 15:44:35 -07:00
Max Schmitt 40b8bcb6ad
devops: mark Docker images as EOL (#29847)
As per https://github.com/microsoft/playwright-dotnet/pull/2879.
2024-03-07 20:18:24 +01:00
Renan Greca 4e0bd6286e
docs: Improved JSDoc for expect.toPass (#29722) 2024-03-01 10:51:23 -08:00
Stevan Freeborn 52b803ecf5
feat(trace mode): add on-first-failure mode for traces (#29647)
Implements the changes suggested in #29531
2024-02-28 14:39:18 -08:00