Commit Graph

1014 Commits

Author SHA1 Message Date
Dmitry Gozman
89c16cbc8b
feat(runner): anonymous describes (#15424)
Useful to set some options without coming up with an artificial name.

```js
test.describe(() => {
  test.use({ colorScheme: 'dark' });

  test('my test', () => {});
})
```
2022-07-06 13:54:11 -07:00
Pavel Feldman
6181b0dcaf
docs: annotate since (#15386) 2022-07-05 17:24:50 -07:00
Dmitry Gozman
4eccb89a79
chore: do not serialize buffers into base64 in local mode (#15316) 2022-07-05 08:58:34 -07:00
Dmitry Gozman
82032be368
chore(server): validate/convert protocol both ways (#14811)
Previously, we only validated/converted on the way to the server,
but not from the server.

Validating both ways catches issues earlier, and allows us to
perform automatic conversions, for example only converting
buffers to base64 when sending over wire.
2022-07-01 09:58:07 -07:00
Max Schmitt
f6bdf3a3cc
chore: generate types always with LF (#15245) 2022-06-29 23:19:49 +02:00
Ross Wollman
3805e942a1
docs(java): fix pom.xml (and auto-generate) (#15192) 2022-06-28 11:37:53 -07:00
Andrey Lushnikov
857d46ca93
docs: add Java release notes (#15158) 2022-06-27 15:31:41 -07:00
Pavel Feldman
d60f84d06a
chore: fix api.json (#15093) 2022-06-23 16:15:14 -07:00
Dmitry Gozman
033c250f6d
fix(har): remove types/har.d.ts, update har.ts per spec (#15046)
Drive-by: typo fix in `notFound` option name.
2022-06-22 12:16:29 -07:00
Pavel Feldman
9525bedc1f
feat(har): re-add routeFromHAR (#15024) 2022-06-21 22:12:37 -07:00
Dmitry Gozman
e3da3ebfa4
feat(har): do not expose HAR types, remove HARResponse fulfill (#14992) 2022-06-20 15:19:54 -07:00
Dmitry Gozman
5397394653
feature(har): add testOptions.har (#14991)
Can now be used with `test.use({ har })`.
Also added more tests for latest har features.
2022-06-20 13:37:31 -07:00
Pavel Feldman
225ab68d1c
fix(test): fix the route test (#14890) 2022-06-15 16:15:45 -07:00
Yury Semikhatsky
e00a26a11d
feat(route): fulfill with HARResponse (#14865) 2022-06-14 15:07:22 -07:00
Max Schmitt
4f1ab2fa62 devops: fix Docker publishing 2022-06-14 11:20:29 +02:00
Ross Wollman
b76d3f2b40
chore: fix publish_docker.sh (#14851)
Started failing a few days ago (https://github.com/microsoft/playwright/runs/6871909784?check_suite_focus=true)
with:

```
./utils/docker/publish_docker.sh: line 82: syntax error near unexpected
token `else'
```
2022-06-13 18:19:57 -07:00
Pavel Feldman
76abb3a5be
chore: unify tab generation (#14802) 2022-06-10 17:34:31 -07:00
Max Schmitt
d1a7fa2901
chore: add Ubuntu 22 Docker image (#14755) 2022-06-09 23:19:54 +02:00
Andrey Lushnikov
b1aa295923
devops: fix canary publishing (#14746)
The first time a scoped package is published, it is considered to be
private.

See https://stackoverflow.com/a/44862841/314883
2022-06-09 07:22:05 -07:00
Max Schmitt
3853014fa7
chore: add ubuntu 22 support (#14588) 2022-06-09 13:20:18 +02:00
Ross Wollman
85d03714d9
feat: add allow/block serviceWorkers option (#14714)
Adds cross-browser support for easily allowing/blocking Service Workers via a Context option.

Includes plumbing for Playwright Test's `use`.

Resolves #14522.

Relates #1090.
Supercedes #14321.
2022-06-08 18:27:51 -04:00
Pavel Feldman
ca2afaaebd
chore: update babel (#14646) 2022-06-06 15:49:31 -07:00
Pavel Feldman
74b846270b
feat(ct): support Vue2 (#14600) 2022-06-02 17:37:43 -07:00
Dmitry Gozman
dbcf039717
chore: remove experimental types (#14560) 2022-06-01 15:22:43 -07:00
Max Schmitt
88ba9c2ff2
docs(dotnet): fix APIResponse.headers type (#14518) 2022-05-31 17:46:03 +02:00
Ross Wollman
cfc9aa64a6
chore: produce meaningful bundle notice diffs (#14396) 2022-05-24 22:19:54 -07:00
Max Schmitt
7f640d8a49
docs(dotnet): add API testing (#13889) 2022-05-23 22:12:57 +03:00
Max Schmitt
806b9c8764
chore(dotnet): generate object types from protocol (#14342) 2022-05-23 19:10:46 +03:00
Dmitry Gozman
ba0cfaeb2d
fix(chromium): work around about:blank issue on Chromium (#14068)
fix(chromium): work around about:blank issue on Chromium

We don't receive the `loaderId` which translates to `newDocumentId`,
so we expect the same-document navigation. Instead, we can wait
for any new-document navigation as a workaround, only for `about:blank`.

This also reverts commit f0f65fa247.
2022-05-10 20:32:19 +01:00
Pavel Feldman
cf89a36181
chore: serialize circular objects (#14045) 2022-05-09 18:51:53 -07:00
Pavel Feldman
f0f65fa247 Revert "feat(chromium): roll to r1005 (#13999)"
This reverts commit 56b3bca8db.
2022-05-09 18:28:39 -07:00
Pavel Feldman
e9378ba5fc
chore: hide plugins again (#14038) 2022-05-09 10:06:13 -07:00
github-actions[bot]
56b3bca8db
feat(chromium): roll to r1005 (#13999)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Max Schmitt <max@schmitt.mx>
2022-05-09 15:52:00 +01:00
Pavel Feldman
1bbefce9af
Revert "chore: use plugins for component testing again (#13977)" (#13998)
This reverts commit a2f9f15e3e.
2022-05-06 12:02:07 -07:00
Andrey Lushnikov
b07636d5a7
devops: fix flakiness dashboard (#13997)
These fields are crucial for report processing.
2022-05-06 10:58:15 -07:00
Pavel Feldman
a2f9f15e3e
chore: use plugins for component testing again (#13977) 2022-05-05 14:26:56 -07:00
Pavel Feldman
058f32caff
chore: fixtures-via-plugin implementation (#13950) 2022-05-05 10:14:00 -07:00
Andrey Lushnikov
bfafb2680d
fix: put browserVersion in the browsers.json (#13946)
This patch:
- adds `browserVersion` field to the `browsers.json`. This is
  updated every time we roll browser.
- starts using `browserVersion` to display browser version that's
  been downloaded.

The downloading output now looks like this:

```bash
Downloading Chromium 101.0.4951.41 (playwright build v1003) - 118.9 Mb [====================] 100% 0.0s
Chromium 101.0.4951.41 (playwright build v1003) downloaded to /Users/andreylushnikov/Library/Caches/ms-playwright/chromium-1003
Downloading FFMPEG playwright build v1007 - 1 Mb [====================] 100% 0.0s
FFMPEG playwright build v1007 downloaded to /Users/andreylushnikov/Library/Caches/ms-playwright/ffmpeg-1007
Downloading Firefox 99.0.1 (playwright build v1323) - 67.5 Mb [====================] 100% 0.0s
Firefox 99.0.1 (playwright build v1323) downloaded to /Users/andreylushnikov/Library/Caches/ms-playwright/firefox-1323
Downloading Webkit 15.4 (playwright build v1632) - 52.7 Mb [====================] 100% 0.0s
Webkit 15.4 (playwright build v1632) downloaded to /Users/andreylushnikov/Library/Caches/ms-playwright/webkit-1632
```

Fixes #13198
2022-05-05 04:17:13 -07:00
Ross Wollman
95f7acf1e4
chore: widen Metadata type (#13942) 2022-05-04 13:16:11 -07:00
Andrey Lushnikov
0dd8ab9c6d
devops: more compact commits for the flakiness dashboard (#13912)
- do not collect commit info since we don't use
- do not store CI plugin information
- do not store test timings
2022-05-04 09:43:07 -07:00
Ross Wollman
3b3cad7d69
feat: rewrite gitCommitInfo plugin, drop GlobalInfo & attachments (#13837) 2022-05-02 16:28:14 -07:00
Max Schmitt
2dafbfc2dc
chore(dotnet): do not rely on auto camel case for channel initializers (#13867) 2022-05-02 15:29:35 +01:00
Pavel Feldman
e756528ad2
feat(plugins): expose suite to plugin setup (#13807) 2022-04-28 08:16:17 -07:00
Dmitry Gozman
3aba94dbef
chore: remove unnecessary types from overrides-test (#13794) 2022-04-27 16:14:37 +01:00
Pavel Feldman
bc6f8e1f20
feat(poll): expose custom poll interval (#13776) 2022-04-26 21:32:38 -07:00
Dmitry Gozman
8e5854033a
fix: types generation for attach and GlobalInfo (#13727) 2022-04-25 13:56:37 +01:00
Ross Wollman
3eac9c694c
fix(test-runner): mark attach as async (#13687)
Also brings back generation of experimental types as part of lint.
2022-04-22 09:27:02 -07:00
Pavel Feldman
7989427ea6
chore: bundle core deps (#13621) 2022-04-18 20:20:49 -07:00
Pavel Feldman
58d79e5e4d
chore: add core utils bundle (#13615) 2022-04-18 13:47:23 -07:00
Pavel Feldman
4f0103fef0
chore: babel, expect, zip bundles (#13588) 2022-04-18 11:31:58 -07:00
Pavel Feldman
eafb92f6a3
chore: embed expect types (#13609) 2022-04-18 10:54:40 -07:00
Dmitry Gozman
02aa4fe617
chore: generate types for TestProject/TestConfig (#13574) 2022-04-15 10:27:38 -07:00
Dmitry Gozman
189a5fa0f8
chore: freez FullProject public type (#13570)
This is similar to FullConfig.
Properties `expect` and `fullyParallel` are not exposed.
2022-04-14 16:58:01 -07:00
Wojciech Jureczka
7ba527c65f
chore: expose JSON Reporter types (#13241)
Resolves #13208
2022-04-14 13:55:29 -07:00
Dmitry Gozman
c86c2e8762
feat: restore toHaveScreenshot as experimental feature (#13549)
- Restore docs.
- Make `TestConfig.expect` generated.
- Allow experimental properties with "e" marker: `- foo e<float>`.
2022-04-14 13:22:42 -07:00
Dmitry Gozman
20dcc45afa
feat: support experimental doc entries (#13446)
feat: support experimental doc entries

- Params/options/members are marked as experimental in the docs.
- `experimental.d.ts` is generated that contains all types and
  includes experimental features.
- `experimental.d.ts` is references in our tests so that we
  can test experimental features.
- `fonts` option is restored as experimental.
2022-04-13 16:13:30 -07:00
Dmitry Gozman
1e1df6395f
chore: generate expect types (#13439) 2022-04-11 10:42:19 -07:00
Ross Wollman
1af32e400f
feat(test-runner): introduce GlobalInfo (#13083) 2022-04-08 13:22:14 -07:00
Pavel Feldman
f0156d057e
chore: flatten supplements (#13437) 2022-04-08 12:52:40 -07:00
Max Schmitt
65395d651c
docs(dotnet): fix broken generated docs links (#13425) 2022-04-08 18:29:51 +02:00
Pavel Feldman
845e32cbb8
chore: use utils via index export (6) (#13417) 2022-04-07 21:48:41 -07:00
Dmitry Gozman
cef476b89f
docs: support optional methods (#13415)
So far, these are used in `Reporter`.
2022-04-07 18:51:05 -07:00
Andrey Lushnikov
e3450b86f9
devops: fix //utils/workspace.js --set-version script (#13409)
We use this script to update packages version across our repository.
It was broken because it did not account for the devDependencies.
2022-04-07 14:46:43 -07:00
Pavel Feldman
bde7bf4ea9
chore: move registry & dispatchers to under server (#13370) 2022-04-06 22:21:27 -07:00
Dmitry Gozman
c68f57d2d0
docs: mark optional properties/arguments explicitly with "?" (#13369)
Previously, we were guessing whether something is optional from the
comment (looking for stuff like "defaults to" or "optional").

To remove this error-prone technique, every optional property or
argument (but not option) is explicitly marked with "?".
2022-04-06 19:02:10 -07:00
Pavel Feldman
5ae2017a5b
chore: always import type (#13365) 2022-04-06 14:57:14 -07:00
Pavel Feldman
1c3db811f5
chore: move to folder-based deps lists (#13361) 2022-04-06 14:40:19 -07:00
Dmitry Gozman
4123a55be5
chore: generate more types (#13358)
As a result, fix documentation issues:
- Removed `TestStep.data` that is not a thing.
- Added `TestConfig.name` documentation.
- Refined a lot of optional types in the documentation.
- Aligned `test.fail()` and `test.slow()` docs with `test.skip()`.
- Strict set of docs vs types inconsistensies in the generator
2022-04-06 13:36:20 -07:00
Dmitry Gozman
e31a5b690a
chore: unrelease toHaveScreenshot and screenshotsDir (#13304) 2022-04-05 08:34:51 -07:00
Ross Wollman
16efbdef98
chore: remove/rename FullConfig._attachments (#13233)
This was originally introduced in #12734.

It will be replaced with GlobalInfo (#13083), but not before the 1.21
release.
2022-04-01 12:36:05 -07:00
Dmitry Gozman
a200fe3528
feat(screenshot): rename "size" option to "scale" (#13254)
Drive-by: fix `caret` handling in `toHaveScreenshot`.
2022-04-01 12:28:40 -07:00
Dmitry Gozman
ecc804d808
chore: prepare types to stricter checks in TS 4.7.0 (#13193) 2022-03-30 20:33:36 -07:00
Andrey Lushnikov
a9989852d5
feat(vrt): new option "caret" for taking screenshots (#13164)
This has two values:
- `"hide"` to hide input caret for taking screenshot
- `"initial"` to keep caret behavior unchanged

Defaults to `"hide"`.

Fixes #12643
2022-03-29 17:48:13 -07:00
Dmitry Gozman
eb09306db2
feat(connect): add connectOptions.timeout (#13163) 2022-03-29 15:03:43 -07:00
Pavel Feldman
1961959dcb
chore: migrate injected scripts to esbuild (#13143) 2022-03-28 23:10:17 -07:00
Pavel Feldman
8758cf8cbf
chore: migrate html reporter to vite (#13116) 2022-03-28 18:21:19 -07:00
Ross Wollman
ae365dda3b
chore: remove internal dep on FullConfig (#13074)
Resolves #13058.

This blocks adding #8206 since we don't want the new launch configs
publicly available on FullConfig.
2022-03-28 15:53:42 -07:00
Pavel Feldman
a454328c25
fix(test): follow up to tests refactoring (#13085) 2022-03-25 22:11:29 -07:00
Andrey Lushnikov
4ab4c0bda1
feat: detect docker version and Playwright version mismatch (#12806)
This patch prints a friendly instructions in case Docker image version
mismatches Playwright version and there are missing browser
dependencies.

With this patch, Playwright will yield the following error:

```
root@f0774d2b2097:~# node a.mjs
node:internal/process/promises:279
            triggerUncaughtException(err, true /* fromPromise */);
            ^

browserType.launch:
╔════════════════════════════════════════════════════════════════════════════════════════════╗
║ Host system is missing dependencies to run browsers.                                       ║
║ This is most likely due to docker image version not matching Playwright version:           ║
║ - Playwright: 1.22.0                                                                       ║
║ -     Docker: 1.21.0                                                                       ║
║                                                                                            ║
║ Either:                                                                                    ║
║ - (recommended) use docker image "mcr.microsoft.com/playwright:v1.22.0-focal"              ║
║ - (alternative 1) run the following command inside docker to install missing dependencies: ║
║                                                                                            ║
║     npx playwright install-deps                                                            ║
║                                                                                            ║
║ - (alternative 2) use Aptitude inside docker:                                              ║
║                                                                                            ║
║     apt-get install libgbm1                                                                ║
║                                                                                            ║
║ <3 Playwright Team                                                                         ║
╚════════════════════════════════════════════════════════════════════════════════════════════╝
    at file:///root/a.mjs:3:10 {
  name: 'Error'
}```

Fixes #12796

Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
2022-03-25 14:45:53 -07:00
Pavel Feldman
6b81e76c2b
chore: migrate trace-viewer and recorder to vite (#13076) 2022-03-25 14:12:00 -07:00
Max Schmitt
c8cc62a2e6
chore: add link validation for docs (#13047) 2022-03-25 19:30:45 +01:00
Pavel Feldman
07c1a27732
chore(deps): prepare deps for monorepo (#13057) 2022-03-25 08:43:29 -07:00
Pavel Feldman
71dd960fec
fix(watch): throttle / batch watch processing (#13054) 2022-03-24 17:38:03 -07:00
Max Schmitt
1797c5c249
chore(test-runner): support self signed certificate in webServer (#13032) 2022-03-24 17:30:52 +01:00
Ross Wollman
541fb39a51
feat(html-reporter): add report context header (#12734)
Resolves #11318.

* Adds `TestConfig.attachments` public API. (We opted to not implement an analog to the async `TestInfo.attach(…)` API.)
* Adds `TestConfig.attachments` to common reporters.
* Dogfoods some git and CI-info inference to generate useful atttachments
* Updates HTML Reporter to include a side bar to present a pre-defined set of attachments (a.k.a git/commit context sidebar)

Here's what it looks like:

<img width="1738" alt="Screen Shot 2022-03-21 at 3 23 28 PM" src="https://user-images.githubusercontent.com/11915034/159373291-8b937d30-fba3-472a-853a-766018f6b3e2.png">

See `tests/playwright-test/reporter-html.spec.ts` for an example of usage (for dogfood-ing only). In the future, if this becomes user-facing, there the Global Setup bit would likely become unnecessary (as would interaction with attachments array); there would likely just be a nice top-level config and/or CLI flag to enable collecting of info.
2022-03-22 16:28:04 -07:00
Dmitry Gozman
209bde5000
feat(test runner): descrbe.skip (#12865)
`describe.skip` declares a test group that is skipped.
2022-03-18 16:07:11 -07:00
Yury Semikhatsky
a8d80621b2
feat(chromium): large file uploads (#12860) 2022-03-18 09:00:52 -07:00
Max Schmitt
f3ffd328dd
chore: fix modification dates in driver (#12864) 2022-03-18 13:03:09 +01:00
Dmitry Gozman
25483452c0
feat(fixtures): per-fixture timeout (#12751)
By default, fixtures share timeout with the test they are instantiated for.
However, for more heavy fixtures, especially worker-scoped ones, it makes
sense to have a separate timeout.

This introduces `{ timeout: number }` option to the list of fixture options
that opts the fixture into a dedicated timeout rather than sharing it
with the test.
2022-03-17 09:36:03 -07:00
Andrey Lushnikov
e16f3c46b4
docs: always keep docker references up-to-date in documentation (#12795)
References #12796
2022-03-16 13:51:39 -07:00
Pavel Feldman
25c0369eaf
chore: prepare to publish component packages (#12697) 2022-03-12 13:51:27 -08:00
Pavel Feldman
e9fa098bf3
chore: add ct examples (#12693) 2022-03-11 15:46:11 -08:00
Andrey Lushnikov
e3ab6388a9
feat(toHaveScreenshot): enable sensible defaults (#12675)
This patch:
- Enables configuration of certain defaults for some options of `expect.toHaveScreenshot` method via `TestProject.expect.toHaveScreenshot` property
- Sets sensible defaults for these options:
  * `fonts: "ready"`
  * `animations: "disabled"`
  * `size: "css"`
2022-03-11 08:45:36 -08:00
Pavel Feldman
af55f48754
chore: add experimental mount (#12657) 2022-03-11 08:00:46 -08:00
Andrey Lushnikov
b51157bdea
feat: bring back maxDiffPixels in toMatchSnapshot (#12627)
This patch reverts 2 commits that removed the feature from the method:
- "fix: explicitly ignore maxDiffPixels in toMatchSnapshot (#12570)"
  commit b8af8458d6.
- "chore: remove `maxDiffPixels` from toMatchSnapshot (#12539)"
  commit a3dff45974.
2022-03-10 18:41:16 -08:00
Andrey Lushnikov
12d8a262be
feat: support screenshotsDir option (#12642)
The `screenshotsDir` option controls the expectation storage
for `toHaveScreenshot()` function.

The new expectation management for screenshots has the following
key properties:
- All screenshots are stored in a single folder called `screenshotsDir`.
- Screenshot names **do not** respect `snapshotDir` and `snapshotSuffix`
  configurations.
- `screenshotsDir` is configurable per project. This way a "smoke tests"
  project can re-use screenshots from "all tests" project.
- Host platform is a top-level folder.

For example, given the following config:

```js
// playwright.config.ts
module.exports = {
  projects: [
    { name: 'Mobile Safari' },
    { name: 'Desktop Chrome' },
  ],
};
```

And the following test structure:

```
smoke-tests/
└── basic.spec.ts
```

Will result in the following screenshots folder structure by default:

```
__screenshots__/
└── darwin/
    ├── Mobile Safari/
    │   └── smoke-tests/
    │       └── basic.spec.ts/
    │           └── screenshot-expectation.png
    └── Desktop Chrome/
        └── smoke-tests/
            └── basic.spec.ts/
                └── screenshot-expectation.png
```
2022-03-10 16:50:26 -08:00
Max Schmitt
372a3219f3
chore: remove Python from main Docker image (#12431) 2022-03-10 19:51:35 +01:00
Yury Semikhatsky
79c8746fd2
docs: add name for screenshot animations option (#12601) 2022-03-08 16:02:31 -08:00
Andrey Lushnikov
a3dff45974
chore: remove maxDiffPixels from toMatchSnapshot (#12539)
References #12441
2022-03-04 18:27:04 -08:00
Andrey Lushnikov
4953fc4845
chore: introduce toHaveScreenshot configuration options (#12507)
References https://github.com/microsoft/playwright/issues/12441
2022-03-04 17:30:43 -08:00
Yury Semikhatsky
f96a1a3ccd
fix(devops): list dependencies error (#12521) 2022-03-04 09:23:05 -08:00
Andrey Lushnikov
279e579097
chore: address pixelCount and pixelRatio review comments (#12501)
- documentation fixes
- rename pixelCount to maxDiffPixels
- rename pixelRatio to maxDiffPixelRatio
2022-03-03 23:17:31 -08:00
Yury Semikhatsky
b96bbc6ad7
docs: simplify test-assertions.md, avoid duplication (#12475) 2022-03-03 10:06:14 -08:00
Pavel Feldman
34bf0d4b87
feat(test-runner): allow grepping in project (#12469) 2022-03-02 15:02:35 -08:00
Yury Semikhatsky
a413c0f94c
docs: restore assertions timeout option in js (#12467) 2022-03-02 12:43:16 -08:00
Pavel Feldman
4b19d59ec5
feat(test): introduce fully parallel mode (#12446) 2022-03-01 18:12:21 -08:00
Andrey Lushnikov
33655ff168
devops(flakiness-dashboard): another fix to support empty metadata (#12430) 2022-03-01 01:50:40 -08:00
Andrey Lushnikov
4a1878e00e
devops: fix flakiness dashboard for projects with no metadata (#12426) 2022-03-01 01:21:00 -08:00
Andrey Lushnikov
396d920145
feat(test-runner): implement expect(pageOrLocator).toHaveScreenshot (#12242)
Fixes #9938
2022-02-28 12:25:59 -08:00
Max Schmitt
428a014cad
devops: Docker publishing cleanups (#12341) 2022-02-24 18:10:34 +01:00
Max Schmitt
0b55950d6a
chore: fix Android tests (#12325) 2022-02-24 06:57:32 +01:00
Andrey Lushnikov
a98babec69
feat(test-runner): introduce pixelCount and pixelRatio options (#12169)
This patch adds additional options to `toMatchSnapshot` method:
- `pixelCount` - acceptable number of pixels that differ to still
  consider images equal. Unset by default.
- `pixelRatio` - acceptable ratio of all image pixels (from 0 to 1) that differ to still
  consider images equal. Unset by default.

Fixes #12167, #10219
2022-02-17 15:44:03 -08:00
Yury Semikhatsky
abd7084bcc
fix: match default font families in headless chromium (#11340) 2022-02-11 09:06:17 -08:00
Dmitry Gozman
66b5cf5ae1
feat(remote): make PlaywrightServer work with browserType.connect (#11849)
This changes PlaywrigtServer to serve connections like `ws://localhost:3333/?browser=chromium`:
- launches the browser;
- talks `browserType.connect`-style protocol over websocket;
- compatible with `connectOptions` fixture.

```js
await playwright.chromium.connect({ wsEndpoint: 'ws://localhost:3333/?browser=chrome' });
```
2022-02-10 16:36:23 -08:00
Max Schmitt
b8d588aa47
chore: fix .NET generation script for .NET 6 (#11965) 2022-02-09 18:03:37 +01:00
Dmitry Gozman
19368e93af
feat(test runner): support connectOptions (#11919)
This allows to specify `connectOptions` in the config that
switch built-in `browser` to be remotely connected.
2022-02-08 20:45:42 -08:00
Andrey Lushnikov
39ed705904
chore: unify workspace helper scripts (#11925)
This patch unifies a variety of different workspace
scripts into a single `//utils/workspace.js`.

Fixes #11362
2022-02-08 10:35:00 -08:00
Pavel Feldman
1215057ca1
chore: use ipc transport for out-of-process driver (#11826) 2022-02-02 21:26:45 -08:00
Pavel Feldman
fdda759a9d
feat(parallel): allow setting enclosing scope parallel mode (#11822) 2022-02-02 20:44:11 -08:00
Andrey Lushnikov
ba0c7e679b
feat(test-runner): support expect.soft (#11800)
Soft expects will still fail the test, but will not abort it's execution. As a consequence of this:
-  `TestResult` now might have multiple errors, which is reflected with a new `testResult.erros: TestError[]` field.
- `TestInfo` now might have multiple errors as well, which is reflected with a new `testInfo.errors: TestError[]` field.

Fixes #7819
2022-02-02 18:33:51 -08:00
Max Schmitt
c752b28516
chore: pin production dependencies (#11793) 2022-02-02 11:14:41 +01:00
Pavel Feldman
6e2fcc4700
chore: do not expose suite load error (#11797) 2022-02-01 15:34:16 -08:00
Max Schmitt
028afb167b
chore: bump production dependencies (#11787) 2022-02-01 21:27:34 +01:00
Pavel Feldman
2b55adaafa
feat(breaking): always report onBegin/onEnd, report file errors (#11758) 2022-01-31 17:09:04 -08:00
Xiaoxing Ye
a35c249fdc
fix: quote path to prevent space issue (#11733)
Co-authored-by: Xiaoxing Ye <xiaoye@microsoft.com>
2022-01-29 09:56:58 -08:00
dependabot[bot]
5635e840f8
chore(deps): bump node-fetch in /utils/flakiness-dashboard (#11732)
Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.1 to 2.6.7.
- [Release notes](https://github.com/node-fetch/node-fetch/releases)
- [Commits](https://github.com/node-fetch/node-fetch/compare/v2.6.1...v2.6.7)

---
updated-dependencies:
- dependency-name: node-fetch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-29 08:15:26 -08:00
divdavem
512a245f13
feat(test-runner): wait for a url before starting tests (#10138)
The webServer configuration in @playwright/test now accepts a url as an
alternative to a port number to wait for a url to return a 2xx status code.
2022-01-26 16:32:58 -08:00
Pavel Feldman
136fab7041
fix(prepare): don't change package files on prepare (#11579) 2022-01-24 11:25:24 -08:00
Yury Semikhatsky
ab9d5a0dc4
chore(tracing): add tracing to APIRequestContext (#11502) 2022-01-22 11:25:13 -08:00
campersau
066b6734d0
chore(dotnet): generate byte[] for binary properties in generator (#11539) 2022-01-21 15:51:06 +01:00
Andrey Lushnikov
9f689865b7
chore: minor fix to the package update version bumper (#11448) 2022-01-18 00:55:37 -08:00
Andrey Lushnikov
9285596806
chore: cut v1.18.0 (#11358)
Drive-by: fix the `//utils/bump_package_versions.js` script.
2022-01-12 11:50:44 -08:00
Dmitry Gozman
14fd837e94
fix(test runner): hide beforeAll/afterAll hooks from the reporter api (#11306)
This api is not ready yet.
2022-01-10 12:09:51 -08:00
Dmitry Gozman
3ecac56cc0
fix(test runner): testInfo.attach api review changes (#11211)
Remove overload, require name, merge options.
2022-01-05 16:39:33 -08:00
Dmitry Gozman
f77c874e8a
feat(test runner): make _extendTest experimental (#11210)
Hidden from types and docs.
2022-01-05 15:54:00 -08:00
Pavel Feldman
a0aeaeb929
test: expose repeatEachIndex (#11158) 2022-01-03 17:29:54 -08:00
Dmitry Gozman
af153b9826
test: unflake some websocket tests (#11069) 2021-12-22 11:17:34 -08:00
Yury Semikhatsky
8f9eaf7cba
fix(types): allow specifying element type in locator.evaluate callback (#11048) 2021-12-21 13:17:45 -08:00
Yury Semikhatsky
0eaa19d5e7
docs(expect): APIResponse assertions (#10957) 2021-12-16 11:27:30 -08:00
Dmitry Gozman
0d54afab9c
feat(test runner): show beforeAll/afterAll hooks similar to tests (#10923)
Reporters now get notified about hooks start/end/steps.
2021-12-15 10:39:49 -08:00
Max Schmitt
b310c6bd6c
chore(dotnet): make JSHandle inherit from IAsyncDisposable (#10905) 2021-12-14 12:40:56 -08:00
Pavel Feldman
a82a3f1128
chore: move html report to package (#10898) 2021-12-13 16:38:26 -08:00
Joel Einbinder
d8abb18c57
chore: allow private build-only packages (#10893) 2021-12-13 15:37:41 -08:00
Yury Semikhatsky
976af162b0
feat(tracing): pack sources to trace on the driver side (#10815) 2021-12-09 17:21:17 -08:00
Max Schmitt
5ba7903ba0
devops: migrate from master to main branch (#10303) 2021-12-07 22:58:33 -08:00
Max Schmitt
6e607bc109
chore: fix .NET docs comments which contained < or > (#10772) 2021-12-07 16:33:28 -08:00
Andrey Lushnikov
6ea607ce2a
devops: move docker publishing logic to main repo (#10768)
This patch:
- moves docker publishing to main repo
- extracts all the logic from the GHA YML file to Bash
- starts using the script in both `publish_canary.yml` and
  `publish_release.yml`

Fixes #10351
2021-12-07 15:28:47 -08:00
Andrey Lushnikov
e680b733f5
devops: demand explicit arch when building docker (#10743)
Currently, arch is inhereted from host. This patch explicitly
sets desired docker build arch.

References #10351
2021-12-07 09:28:59 -08:00
Max Schmitt
c3687a693b
chore(dotnet): fix channel generation for 1.17 (#10711) 2021-12-06 13:40:26 -08:00
Pavel Feldman
518d67add5
feat(test.info): expose information on the currently running test (#10708) 2021-12-06 09:25:11 -08:00