Commit graph

2508 commits

Author SHA1 Message Date
Yury Semikhatsky aebceb345e
chore: expose expect error details on TestError (#33183) 2024-10-21 11:15:55 -07:00
Max Schmitt 36d3a6764e
docs: set minimal Ubuntu version to 22 and Debian to 12 (#33207) 2024-10-21 18:41:27 +02:00
Max Schmitt e866e3306e
devops: stop publishing Ubuntu 20.04 (#33203) 2024-10-21 17:00:10 +02:00
Simon Knott 0d63df4875
feat(test runner): allow multiple global setups (#32955)
Signed-off-by: Simon Knott <info@simonknott.de>
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
2024-10-18 11:03:00 +02:00
Amaechi Hope 7af9e93304
docs(api): fix code snippets for locator ele (#33153) 2024-10-17 09:11:53 +02:00
Debbie O'Brien 9848ebec5a
docs: add video to release notes (#33147) 2024-10-16 18:36:46 +02:00
Pengoose d10a5e5693
feat(testType): add support for test.fail.only method (#33001) 2024-10-16 06:47:23 -07:00
Pavel Feldman 94321fef1c
chore: implement locator.ariaSnapshot (#33125) 2024-10-15 18:47:26 -07:00
Pavel Feldman b421bd8b0d
chore: add a basic snapshot generator test (#33123) 2024-10-15 15:21:45 -07:00
Anand M Cherian d40425ea58
docs: update to "Matching one of the two alternative locators" section (#33079)
Signed-off-by: Anand M Cherian <63868951+Anand-M-Cherian@users.noreply.github.com>
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
2024-10-15 12:45:03 -07:00
Dmitry Gozman 8a275e5a5b
docs: improve docs for WebSocketRoute (#33097) 2024-10-15 02:07:03 -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
Dmitry Gozman 25dd9b5cd4
feat: config.build.tsconfig (#33026)
Allows to specify `tsconfig` in the configuration file, which applies to
test files but not the config file itself.

Fixes #32808.
2024-10-10 01:37:46 -07:00
Dmitry Gozman c2cbf26497
docs: refresh timeouts doc (#33025)
After changes a few releases ago, specify that `afterEach` hooks are
included in a separate timeout.

Fixes #32851.
2024-10-09 05:10:10 -07:00
Pavel Feldman dbe881cfdc
docs: add a section on balancing shards (#33011)
Closes https://github.com/microsoft/playwright/issues/32922
2024-10-08 08:35:02 -07:00
Yury Semikhatsky 4fe33db392
docs(route): header override propagation (#32971)
Fix https://github.com/microsoft/playwright/issues/32939
2024-10-07 13:52:55 -07:00
Simon Knott d3fbf1aaeb
fix(clock): amend setSystemTime docs (#32901)
As discussed yesterday over
https://github.com/microsoft/playwright/issues/32807. Adds some words to
differentiate `setSystemTime` from `setFixedTime`.

---------

Signed-off-by: Simon Knott <info@simonknott.de>
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
2024-10-07 12:12:12 +02:00
Bruno 317ddd4117
docs(best practices): tabs with yarn and pnpm commands added (#32980) 2024-10-07 10:48:30 +02:00
Simon Knott 40670e6ffd
fix(emulate media): document "no-preference" as deprecated (#32881)
Closes https://github.com/microsoft/playwright/issues/32862.

`prefers-color-scheme: no-preference` was removed from browsers. This PR
marks it as deprecated in our docs and removes all mentions.

---------

Signed-off-by: Simon Knott <info@simonknott.de>
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
2024-10-04 16:49:32 +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
Simon Knott 6be97f34dd
docs(test-reporters): replace reporter showcase with list of interesting OSS implementations (#32896)
As discussed yesterday, this PR replaces the "reporter showcase" with a
list of interesting implementations for folks who are writing their own
custom reporters.

---------

Signed-off-by: Simon Knott <info@simonknott.de>
2024-10-04 16:29:13 +02:00
Max Schmitt 895be9f8de
chore: lint java docs snippets (#32945) 2024-10-04 11:34:04 +02:00
Max Schmitt 6373fe703d
docs: fix Java/.NET types for docs rolling (#32924) 2024-10-02 13:27:56 +02:00
Max Schmitt 67c37cf813
docs(ci): recommend noble instead of jammy (#32923) 2024-10-02 13:12:11 +02:00
Viet Nguyen Duc dbf7976dd8
docs(selenium): update docker image tag in feat Playwright connect Selenium Grid (#32777) 2024-10-02 11:34:05 +02:00
Simon Knott 6ccaad3a1b
chore: call out that that the vscode extension is for Node.js (#32882)
In https://github.com/microsoft/playwright/issues/32861, an interested
.NET user wanted to try Playwright and found the VS Code Getting Started
guide. It didn't work for them because the VS Code Extension is for
usage with Node.js, and they don't have NPM installed. We can reduce
confusion by mentioning that VS Code Getting started is for Node.js.

---------

Signed-off-by: Simon Knott <info@simonknott.de>
2024-10-02 11:19:51 +02:00
Simon Knott 4bcfa56a13
chore(test runner): mention different timeout (#32883)
In https://github.com/microsoft/playwright/issues/32872, a user notes
that we document `.focus()` to not timeout by default, but in practice
when used without the test runner, it defaults to a 30s timeout.

I've discussed this with Dima, and he noted that our JS documentation
focuses on usage with the Playwright test runner, not with the library.
The test runner disables timeouts for operations in favour of timeouts
for test cases. In the library, we default to a 30s timeouts. This PR
adds this to the "key differences" table.
2024-10-01 11:46:42 +02:00
Dmitry Gozman 6bc5c9ca84
docs: release notes for 1.48 (#32857) 2024-09-27 11:06:11 -07:00
Dmitry Gozman a395fb22c4
feat(routeWebSocket): address api review feedback (#32850) 2024-09-27 04:01:31 -07:00
Yury Semikhatsky e8d08e8d1e
docs: more prominent note on tags being read-only (#32836)
Reference https://github.com/microsoft/playwright/issues/32828
2024-09-26 09:41:38 -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 a9d5c39d40
chore: address api review for page.forceGarbageCollection (#32824)
- Renamed to `page.requestGC`.
- Added a useful snippet to the docs.

References #32278.

---------

Signed-off-by: Dmitry Gozman <dgozman@gmail.com>
Co-authored-by: Max Schmitt <max@schmitt.mx>
2024-09-26 05:08:33 -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 b01dd55697
docs: use node-version: lts/* in GHA examples (#32789) 2024-09-24 12:23:47 +02:00
Max Schmitt 26dc8955d3
docs: explain glob patterns (#32728) 2024-09-23 22:22:57 +02:00
Mathias Leppich 281eff1209
docs(trial): note that modifier keys are pressed regardless of trial option (#32734) 2024-09-23 22:17:47 +02:00
Dmitry Gozman cdcaa7fab6
feat: routeWebSocket (#32675)
This introduces `WebSocketRoute` class and
`page/context.routeWebSocket()` methods.
2024-09-20 03:20:06 -07:00
Pavel Feldman 2f4acbb001
chore: use contentFrame() as a canonical locator representation (#32697) 2024-09-18 20:15:01 -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
Simon Knott f6219e6e79
Revert "feat(tracing): add .pwtrace to trace file extension" (#32648)
Reverts microsoft/playwright#32581
Relates
https://github.com/microsoft/playwright/issues/32226#issuecomment-2351164727
2024-09-17 15:32:30 +02:00
Ana Margarida Silva b23edf5137
fix(docs): remove todo in ci intro docs (#32643) 2024-09-17 10:36:43 +02:00
Max Schmitt 21d162c945
feat(client-certificates): add support for proxies (#32611)
Fixes https://github.com/microsoft/playwright/issues/32370
2024-09-16 17:57:33 +02:00
Max Schmitt b335b00a86
docs: add reference to locator strictness if or resolves to multiple elements (#32633) 2024-09-16 17:30:14 +02:00
Max Schmitt c24ad36f86
docs(docker): fix Docker container permissions (#32621) 2024-09-16 07:39:36 +02:00
Simon Knott aeb4d182f7
feat(tracing): add .pwtrace to trace file extension (#32581)
Closes https://github.com/microsoft/playwright/issues/32226

I've updated every mention of `.trace.zip` except for the release notes.
2024-09-14 10:17:07 +02:00
Matthew Jee f2a974b045
feat(api): add method to force garbage collection (#32383) 2024-09-13 23:09:36 +02:00
Simon Knott 48c7fb6b06
feat(library): accept FormData in fetch (#32602)
Closes https://github.com/microsoft/playwright/issues/26520 by accepting
`FormData`, which became stable in Node.js in v21.
2024-09-13 13:21:02 +02:00
Max Schmitt 491678ada6
docs: release note fixes for 1.47 (#32589) 2024-09-12 12:51:30 +02:00
Dmitry Gozman 1981989aef
docs: mention variability of media codecs between platforms (#32569)
References #32558.
2024-09-11 13:35:17 -07:00
Yury Semikhatsky a4bd551597
docs: TestInfo.titlePath does not include project (#32548) 2024-09-10 16:52:12 -07:00
Pavel Feldman 6d5889a52c
chore: revert the matcherResult in API (#32524) 2024-09-09 16:44:32 -07:00
Max Schmitt 728083b435
chore: allow query as string in Python/.NET (#32516)
https://github.com/microsoft/playwright-python/issues/2497
2024-09-09 15:49:59 +02:00
Sander 4a53973fd0
docs(ct): vue + jsx and general improvements (#32212)
partial fix for:
https://github.com/microsoft/playwright/issues/31927#issuecomment-2267065378

---------

Signed-off-by: Sander <info@mesander.com>
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
2024-09-09 05:09:18 -07:00
Max Schmitt a8f67a42b8
docs(dotnet): fix wrong snippets (#32484)
Fixes https://github.com/microsoft/playwright-dotnet/issues/2994
2024-09-06 11:27:35 +02:00
Simon Knott 5d4a65b318
docs: update release notes for 1.47 to our changes from yesterday (#32482)
I'll also cherry-pick this into the release branch and update
playwright.dev.
2024-09-06 10:28:17 +02:00
Pavel Feldman a52eb0c9a0
chore: expose matcherResult on TestError (#32455) 2024-09-05 21:36:51 -07:00
Yury Semikhatsky 1989589edd
docs: update browsers version in release notes (#32475) 2024-09-05 13:59:54 -07:00
Simon Knott 0a49c05e2d
chore(test runner): document that --only-changed on CI needs history (#32461)
Closes https://github.com/microsoft/playwright/issues/32452

`--only-changed=$GITHUB_BASE_REF` needs the base ref available locally
to work properly. `fetch-depth: 0` does that, see
https://github.com/actions/checkout?tab=readme-ov-file#fetch-all-history-for-all-tags-and-branches.

---------

Signed-off-by: Simon Knott <info@simonknott.de>
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
2024-09-05 12:13:09 +02:00
Simon Knott a8139b5d77
docs: add release notes for 1.47 (#32463) 2024-09-05 11:57:14 +02:00
Pavel Feldman 446ed72878
docs: revert typo (#32433) 2024-09-03 10:18:40 -07:00
Yury Semikhatsky b75483bbb4
Revert "docs: deprecate: Request.serviceWorker() (#32136)" (#32432)
This reverts commit b7ed4d7b9e.
2024-09-03 10:18:20 -07:00
Przemyslaw Malolepszy b8c4a477ff
chore(docs): fix APIResponse.headersArray() desc (#32375) 2024-09-03 09:01:01 +02:00
Kevin Jagodic 787da9b5a5
docs(mock): fix routeFromHAR() arguments for Java (#32409) 2024-09-03 08:57:57 +02:00
Simon Knott 0a40862bc8
chore(docs): fix typo (#32372) 2024-08-29 14:16:29 -07:00
Yury Semikhatsky 896190edbb
Revert feat(addInitScript): support cjs modules (#32364)
Reverting https://github.com/microsoft/playwright/pull/32282 and
https://github.com/microsoft/playwright/pull/32240.
2024-08-28 15:39:48 -07:00
Yury Semikhatsky d8137f228f
docs: update snippets to fix typescript errors (#32363)
Reference: https://github.com/microsoft/playwright/issues/9468
2024-08-28 14:24:01 -07:00
Yury Semikhatsky acd2a4ddad
docs: global beforeEach/beforeAll hooks (#32348)
Fixes https://github.com/microsoft/playwright/issues/9468
2024-08-27 17:04:53 -07:00
Yury Semikhatsky 888a5b53e7
docs: avoid confustion with incognito mode (#32327)
Fixes https://github.com/microsoft/playwright/issues/32321
2024-08-26 11:02:41 -07:00
Pavel Feldman 4340d153df
chore: deprecate locator.frameLocator() (#32306) 2024-08-26 10:28:54 -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
Dmitry Gozman abe6c04a54
chore: remove noWaitAfter from selectOption (#32283)
This follows removing this option from other methods in v1.46. The two
methods still supporting `noWaitAfter` are `click` and `press`.
2024-08-23 14:50:43 -07:00
Max Schmitt 787f20c920
chore: fix doclint (#32294) 2024-08-23 16:26:39 +02:00
Max Schmitt 1b220c5289
chore: remove Chromium Windows proxy hacks (#31724)
Fixes https://github.com/microsoft/playwright/issues/17252
2024-08-23 15:17:00 +02:00
Dmitry Gozman 3a75f23ea1
fix(addInitScript): require non-undefined arg to trigger commonjs module (#32282) 2024-08-23 02:48:56 -07:00
Dmitry Gozman dc4a8e48eb
docs(fixtures): explain an option array value edge case (#32261)
Closes #32033.
2024-08-22 05:47:19 -07:00
Dmitry Gozman d5a7495041
feat(addInitScript): support cjs modules when passing both path and arg (#32240)
This works with scripts bundled by:
- `esbuild entrypoint.ts --bundle --format=cjs --outfile=injected.js`
- webpack with a typical config
  ```js
  module.exports = {
    entry: { 'injected': './entrypoint.js', },
    output: {
      path: require('path').resolve(__dirname),
      filename: '[name].js',
      libraryTarget: 'commonjs2',
    },
  };
  ```
2024-08-21 09:46:38 -07:00
Guillaume M 837e2a883b
docs(browsers): fix typo (#32250) 2024-08-21 17:35:47 +02:00
Max Schmitt 6512bccffd
docs(best-practises): add note about tsc (#32245) 2024-08-21 11:37:53 +02:00
Dmitry Gozman b66cb6caaa
docs(evaluate): improve the guide (#32222) 2024-08-21 01:31:41 -07:00
Simon Knott 244761a3a2
chore(docs): Rework CI docs (#31988)
This PR moves around some of our CI docs. It moves the GitHub actions
docs from `ci-intro.md` to `ci.md`, reduces `ci-intro.md` to be an
introduction, adds a mention of Sharding to the best practices, and adds
a section on `--only-changed` called "Fail-Fast". Each of those changes
is a separate commit, to make this a little easier to review. If we find
any of those to commits to be contentious, i'll pull them out into
individual PRs.

While rolling this to playwright.dev, we'll also make the following
changes to its sidebar:
- move the `ci.md` document from the "Integrations" section to the
"Playwright Test" section
- make "Best Practices" the last item of the "Getting Started" section

---------

Signed-off-by: Simon Knott <info@simonknott.de>
Co-authored-by: Yury Semikhatsky <yurys@chromium.org>
2024-08-20 09:03:02 +02:00
Max Schmitt 010778f6c5
feat(client-certificates): allow passing certificates from memory (#32210) 2024-08-19 09:24:32 +02:00
Debbie O'Brien f927495791
docs: release video and trace viewer video (#32164) 2024-08-14 23:20:19 +02:00
Bryant Ung 3280ec5ee3
doc(release notes): Fix 1.46 release notes typos (#32145) 2024-08-13 15:24:47 -07:00
Kuba Janik 0588834307
feat: allow URLSearchParams and string as params in APIRequestContext (follow-up) (#32143)
Follow-up to https://github.com/microsoft/playwright/pull/32120

I made some changes suggested by @yury-s in the previous PR that make a
lot of sense:
- added an example to the documentation
- improved tests
  - check params on the client and server end
  - reverted to non-English characters being used as params
2024-08-13 10:39:56 -07:00
Max Schmitt b7ed4d7b9e
docs: deprecate: Request.serviceWorker() (#32136) 2024-08-13 15:59:30 +02:00
Kuba Janik 308381eeae
feat: allow URLSearchParams and string as params in APIRequestContext (#32120) 2024-08-12 14:22:03 -07: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 98a6e14e9d
docs: remove redundant TOC usages (#32096) 2024-08-09 12:44:01 +02:00
Yury Semikhatsky 7f60f284c6
docs(auth): use abs path, difference between storage locations (#32037)
Reference: https://github.com/microsoft/playwright/issues/31987
2024-08-06 11:36:49 -07:00
Yury Semikhatsky 43e852334b
docs: route.fallback() vs. route.continue() (#32035)
Fixes https://github.com/microsoft/playwright/issues/31983
2024-08-06 11:35:53 -07:00
Dmitry Gozman a54ed48b42
feat(test runner): --tsconfig cli option (#31932)
Introduce `--tsconfig` to specify a single config to be used for all
imported files, instead of looking up tsconfig for each file separately.

Fixes #12829.
2024-08-06 06:55:15 -07:00
Meir Blachman 5a015b0d6e
docs(release-notes): fix typo in .NET release notes (#32015) 2024-08-06 07:19:55 +02:00
Pavel Feldman 3c87f217df
feat(events): allow waiting for removeAllListeners (#31941) 2024-08-05 21:14:35 -07:00
Yury Semikhatsky 193013c9ee
docs(har): default update mode is minimal (#32016)
Update the documentation to match actual behavior.

The actual behavior today:
* Default mode is `full` when `recordHar` is passed to
`browser.newContext`
* Default mode is `minimal` when calling `context.routeFromHAR` and
`page.routeFromHAR`

Reference https://github.com/microsoft/playwright/issues/31983
2024-08-05 11:29:43 -07:00
Dmitry Gozman 32ee09dbe6
docs: release notes for 1.46 update (#32010) 2024-08-05 05:35:46 -07:00
Max Schmitt d0c840f639
fix(clock): mock time in Event.prototype.timeStamp (#31986)
Ideally we generate the timestamp when the Event gets created. This
patch adds a best-effort logic, since we can't override the constructor
of natively created events, e.g. `MouseEvent`.

Fixes https://github.com/microsoft/playwright/issues/31924
2024-08-02 15:27:54 +02:00
Sander c9a12e4ca1
docs(ct): fix component.update example for vue and svelte (#31889) 2024-07-31 13:40:19 +02:00
Max Schmitt 55187207e4
chore: various roll fixes for .NET (#31914) 2024-07-30 19:09:20 +02:00
Max Schmitt ac0a3fb275
docs(best-practises): make trace icon location more clear (#31909) 2024-07-30 11:19:07 +02:00
Max Schmitt f45cf65921
chore: add maxRetries to APIRequestContext.delete (#31893) 2024-07-29 14:39:30 +02:00
Max Schmitt 57c7d9e9bb
docs: add release notes for 1.46 (#31875)
Signed-off-by: Max Schmitt <max@schmitt.mx>
Signed-off-by: Dmitry Gozman <dgozman@gmail.com>
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
2024-07-26 08:34:26 -07:00
Dmitry Gozman 9227d1c598
docs: explain a bit more about fixture boxing and custom titles (#31877) 2024-07-26 07:43:58 -07:00
Max Schmitt b214941a01
chore: make it more clear that --only-changed is per file (#31874) 2024-07-26 12:41:33 +02:00
Max Schmitt 7570c25b3d
chore: remove glob from client-certificate matching (#31846)
Signed-off-by: Max Schmitt <max@schmitt.mx>
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
2024-07-24 19:13:03 +02:00
Elio Struyf 1e94abb683
docs: added MS Teams and mail reporter (#31579) 2024-07-24 11:55:45 +02:00
Yury Semikhatsky 13b5510d57
docs(webkit): supprot for non-core features may differ between OSes (#31831)
Fixes: https://github.com/microsoft/playwright/issues/31017
2024-07-23 17:35:02 -07:00
Max Schmitt c4862c022c
chore: client certificates api review (#31826) 2024-07-23 22:56:36 +02:00
Yury Semikhatsky 383e4b3c73
Revert "feat: introduce touchscreen.touch() for dispatching raw touch… (#31823)
… events (#31457)"

This reverts commit a3e31fd2c4.
2024-07-23 10:29:37 -07:00
Simon Knott f23d02a211
feat(test runner): --only-changed option (#31727)
Introduces an `--only-changed [base ref]` option.

`playwright test --only-changed` filters the test run to only run test
suites that have uncommitted changes.
`playwright test --only-changed=foo` runs only tests that were changed
since commit `foo`.

In pull request CI, this can be used to run changed tests first and fail
fast: `--only-changed=$GITHUB_BASE_REF`.
During local development, it can be used to quickly filter down to the
touched set of tests suites.
In some rare usecases, this can also help to cut down on CI usage for
pull requests. Tread with caution though.

File dependencies are taken into account to ensure that if you touched a
utility file, all relevant tests are still executed.

Closes https://github.com/microsoft/playwright/issues/15075
2024-07-23 18:04:17 +02:00
Simon Knott 2cc4e14756
fix(core): update maxRetries docs (#31810) 2024-07-23 08:27:27 -07:00
Dmitry Gozman e86c8af599
chore: rename route fixture in ct (#31817)
Addresses review feedback.
2024-07-23 07:43:28 -07:00
Yury Semikhatsky e269092ef9
Revert "fix: add 'window-management' to chromium browser (#31687)" (#31801)
This reverts commit 0aa2f06f68.

Discussed the new permission in the API review and decided not to
proceed with the feature as we are not ready to commit to supporting it
yet:
* the API is Chromium specific
* the API is still experimental
* there is no clarity to what extend the screen manipulation APIs will
work in old headless which is our main test environment

We'll keep an eye on the demand for the feature and may get back to
implementing it in the future.

Reference: https://github.com/microsoft/playwright/issues/27198
2024-07-22 11:27:12 -07:00
Josh Soref 7abbbd0c84
docs: spelling (#31779)
Fixes misspellings identified by the [check-spelling
action](https://github.com/marketplace/actions/check-spelling).

The misspellings have been reported at
https://github.com/jsoref/playwright/actions/runs/10015023629#summary-27685777352

The action will report that the changes in this PR would make it happy:
https://github.com/jsoref/playwright/actions/runs/10015023971#summary-27685778305

---

I understand that the commit messages will need to be reworded to match
house style. For the time being, these are merely noting the changes
they contain so that when I rebase or need to drop things, I can. --
I've already rebased once as someone fixed one of the items that my
draft work was going to fix.

---

## Testing
* The tests _mostly_ passed when I managed to trigger them, but there
were a handful of things that I didn't quite understand
* There are a large number of warnings relating to a bad interaction
between any workflow that uses this local action
b535139b32/.github/actions/run-test/action.yml (L74-L80)
and the action it calls -- I've opened Azure/login#474 asking them to
refactor their action so that it doesn't cause so much noise while
running this repository's tests
* I'm vaguely curious as to why this repository has a `branch`
constraint for its `pull_request` events in its workflows -- that
constraint gave me a number of additional headaches while trying to
prepare this branch for this PR.

---------

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2024-07-22 06:45:22 -07:00
Dmitry Gozman 6491e5b415
chore: deprecate/remove noWaitAfter from some actions (#31739)
The following actions keep `noWaitAfter` option: `click`, `selectOption`
and `press`.

All other actions that used to have `noWaitAfter` now behave like it was
set to true, not waiting for follow-up navigations. In the docs, this
option is marked as completely ignored.

A small logic change was made to compensate for this behavior: when
waiting for the `hitTargetInterceptor`, we now race it against
navigations to avoid stalling when navigation stalls. Previously,
waiting for the interceptor was disabled when `noWaitAfter` was passed,
and since it's impossible to pass this option now, we mitigate by never
stalling instead.

Fixes #31469.
2024-07-18 00:19:08 -07:00
Max Schmitt ed6abf86c7
fix(expect): throw unsupported error when using this.equals() in expect (#31723) 2024-07-17 13:22:00 +02:00
Max Schmitt f66f5b800e
docs: fix broken anchor links (#31707) 2024-07-16 16:11:20 +02:00
damar Zaky 96e0a96ac1
docs: fix grammar and typos in various files (#31678)
- docs/src/best-practices-js.md
- docs/src/codegen.md
- docs/src/debug.md
- docs/src/events.md
- docs/src/library-js.md
- docs/src/locators.md
- docs/src/other-locators.md
- docs/src/test-components-js.md
- docs/src/trace-viewer.md

---------

Signed-off-by: damar Zaky <damzaky@gmail.com>
2024-07-16 06:15:25 -07:00
Ismael Onilearan 0aa2f06f68
fix: add 'window-management' to chromium browser (#31687) 2024-07-15 14:34:57 -07:00
Jorge Caridad fb59e6372b
docs: fix typos in various documentation files (#31656) 2024-07-12 10:24:52 -07: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
Yury Semikhatsky 01e2c8ab06
docs: document numeric values of PLAYWRIGHT_FORCE_TTY (#31653)
Fixes https://github.com/microsoft/playwright/issues/31647
2024-07-11 14:02:47 -07:00
Daniel Flores b13bd66d20
docs: add missing pytest-playwright installation command (#31645) 2024-07-11 21:27:54 +02:00
Max Schmitt 5c8fe5c33c
docs: make x/y more clear (#31606)
Fixes https://github.com/microsoft/playwright/issues/31567
2024-07-09 12:52:51 +02:00
Michael Render 1d930542e1
docs(clock): Fix C# version of clock documentation (#31560) 2024-07-08 19:01:04 +02:00
Dmitry Gozman 369a1eca48
feat(ct): experimental route fixture (#31554)
This fixture accepts the same arguments as `context.route()`, but also
supports request handlers compatible with msw syntax.
2024-07-06 09:35:20 -07:00
Debbie O'Brien b2bda9fce2
docs: update vs code projects explanation (#31571) 2024-07-05 17:37:00 +02:00
Max Schmitt b79f3076ee
doc(clock): fix code snippets (#31568)
Fixes https://github.com/microsoft/playwright/issues/31566
2024-07-05 13:20:54 +02:00
Max Schmitt 2b974f2139
docs(clock): update time types in Python/.NET (#31511) 2024-07-03 10:46:33 +02:00
Vitaliy Potapov 1e55a084bc
feat(html-reporter): hide annotations started with "_" (#31489)
Fixes: https://github.com/microsoft/playwright/issues/30179
2024-07-02 16:46:24 -07:00
Noah Mayerhofer f62121548a
docs(ci): typo (#31508) 2024-07-01 20:57:16 +02:00
KeisukeYamashita 1f92376508
docs(ci): added Drone CI docs for Node.js (#31499) 2024-07-01 19:44:17 +02:00
Max Schmitt d1e76d9a92
docs(release-notes): fix .NET snippets (#31496) 2024-07-01 18:32:23 +02:00
Debbie O'Brien ea33137a0e
docs: improve clock guide (#31487) 2024-06-28 13:04:39 -07:00
Debbie O'Brien 93d147cf28
docs: add release video (#31482) 2024-06-28 20:04:31 +02:00
Yury Semikhatsky a3e31fd2c4
feat: introduce touchscreen.touch() for dispatching raw touch events (#31457) 2024-06-27 14:37:36 -07:00
Yury Semikhatsky 111876d526
docs: improve addCookies.cookie parameter description (#31456) 2024-06-26 15:39:43 -07:00
Max Schmitt dad305478a
docs: remove unnecessary html card (#31444) 2024-06-26 14:34:05 +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
Dmitry Gozman de723f39e9
docs: release notes for 1.45 (#31421) 2024-06-24 12:23:46 -07:00
Dmitry Gozman 114b6f0de6
docs: deprecate handle option in exposeBinding (#31419) 2024-06-24 11:29:40 -07:00
Yury Semikhatsky 865f0d8221
docs(java): correctly parse time (#31420) 2024-06-24 11:28:43 -07:00
Himanshu 74976b1da8
docs: Fixes minor typo. Changes These image -> This image (#31413)
Fixes a minor typo in the docker doc in `These image`
2024-06-24 09:04:42 -07:00
Romario Nijim 136fb996d1
docs: added more explanation to sharding to make it more understandable. (#31399)
* added more explanation to the sharding section for it to be more
understandable what it is and what it's purpose.
* because from the explanation in the docs. - it sound like that a
"shard" is a machine that is provided by playwright in addition to the
current setup , like a managed machine, but in reality it is simply a
separate job in the CI, dividing tests to separate jobs is sharding,
which sounds a lot easier when you think about it this way because it
could be confusing at the beginning IMO.
2024-06-21 10:20:56 -07:00
Yury Semikhatsky 95fc2b8a8b
feat(fetch): maxRetries for fetch (#31386)
Fixes https://github.com/microsoft/playwright/issues/30978
2024-06-19 18:10:14 -07:00
Max Schmitt 6d38525119
docs: add guide for print dialogs (#31340)
https://github.com/microsoft/playwright-internal/issues/211
Relates https://github.com/microsoft/playwright/issues/6543
2024-06-19 18:04:22 +02:00
Max Schmitt 951040185d
docs(test-parameterize): improve forEach example (#31331) 2024-06-19 17:45:27 +02:00