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
Max Schmitt
ea9475d37d
chore: fix utils/generate_dotnet_channels.js after monorepo ( #10710 )
2021-12-03 18:51:25 -08:00
Pavel Feldman
b9731a904e
chore: add validations into check_deps ( #10661 )
2021-12-01 18:14:13 -08:00
Pavel Feldman
541248006c
chore: remove create-playwright, it is in monorepo by mistake ( #10654 )
2021-12-01 13:09:35 -08:00
Max Schmitt
5c93066437
chore: fix bump_package_versions.js under Node.js 12 ( #10629 )
2021-12-01 18:26:36 +01:00
Max Schmitt
0936ce2bbd
chore: add wget to Docker images
2021-11-30 19:35:48 +01:00
Max Schmitt
11a389c8f9
chore: have correct version in driver ( #10374 )
2021-11-29 18:05:43 +01:00
Max Schmitt
af28a779be
docs: migrate JS assertions over to Java/Python assertions ( #10431 )
2021-11-24 21:58:35 +01:00
Max Schmitt
5a8010cf4f
fix: noncompliant Firefox User-Agents ( #10492 )
2021-11-23 18:56:22 +01:00
Ross Wollman
854f321532
feat(api): add explicit async testInfo.attach ( #10121 )
...
feat(api): add explicit async testInfo.attach
We add an explicit async API for attaching file paths (and Buffers) to
tests that can be awaited to help users ensure they are attaching files
that actually exist at both the time of the invocation and later when
reporters (like the HTML Reporter) run and package up test artifacts.
This is intended to help surface attachment issues as soon as possible
so you aren't silently left with a missing attachment
minutes/days/months later when you go to debug a suddenly breaking test
expecting an attachment to be there.
NB: The current implemntation incurs an extra file copy compared to
manipulating the raw attachments array. If users encounter performance
issues because of this, we can consider an option parameter that uses
rename under the hood instead of copy. However, that would need to be
used with care if the file were to be accessed later in the test.
2021-11-23 09:30:53 -08:00
Joel Einbinder
bd5ae9e0cb
fix(dotnet): correctly mark members as deprecated ( #9977 )
2021-11-23 03:00:12 -05:00
Pavel Feldman
daae8d4863
chore: open trace.playwright.dev ( #10475 )
2021-11-22 10:41:22 -08:00
Dmitry Gozman
0302e759df
feat(test runner): allow top-level test.fixme similar to test.skip ( #10250 )
...
```js
test.fixme('my test name', () => {});
```
2021-11-19 11:40:40 -08:00
Dmitry Gozman
d9f849fb14
feat(test runner): replace declare/define with "options" ( #10293 )
...
1. Fixtures defined in test.extend() can now have `{ option: true }` configuration that makes them overridable in the config. Options support all other properties of fixtures - value/function, scope, auto.
```
const test = base.extend<MyOptions>({
foo: ['default', { option: true }],
});
```
2. test.declare() and project.define are removed.
3. project.use applies overrides to default option values and nothing else. Any test.extend() and test.use() calls take priority over config options.
Required user changes: if someone used to define fixture options with test.extend(), overriding them in config will stop working. The solution is to add `{ option: true }`.
```
// Old code
export const test = base.extend<{ myOption: number, myFixture: number }>({
myOption: 123,
myFixture: ({ myOption }, use) => use(2 * myOption),
});
// New code
export const test = base.extend<{ myOption: number, myFixture: number }>({
myOption: [123, { option: true }],
myFixture: ({ myOption }, use) => use(2 * myOption),
});
```
2021-11-18 15:45:52 -08:00
Dmitry Gozman
c470080aec
test: move grid tests to installation-tests ( #10418 )
...
- Determine the actual chrome version.
- Download chromedriver.
- Run tests.
2021-11-18 15:32:09 -08:00
Andrey Lushnikov
f14e105051
chore: fixes to helper scripts
2021-11-17 17:02:29 -08:00
Pavel Feldman
70ede0d987
chore: use channel traits ( #10389 )
2021-11-17 15:26:01 -08:00
Andrey Lushnikov
32bc83d322
chore: be on the safe side with publishing release candidate ( #10363 )
...
Make sure we never publish any other version that contains `rc`
as part of the version.
References #10334
2021-11-16 15:38:14 -08:00
Andrey Lushnikov
6904d6c7e6
chore: support release candidate publishing ( #10360 )
...
Fixes #10334
2021-11-16 14:28:34 -08:00
Andrey Lushnikov
fd3ec50cf6
devops: switch to LF line-endings in Git for text files ( #10292 )
...
Co-authored-by: Max Schmitt <max@schmitt.mx>
2021-11-15 17:48:49 +01:00
Andrey Lushnikov
8ce6633937
chore: clean up docker image ( #10260 )
...
This patch:
- removes the Visual Regression bits from the images. These will
probably be added back when it's ready for the prime time.
* removes VNC && noVNC
* removes Playwright Agent
- cleans up apt caches
This drops image size from 2.03GB to 1.91GB.
2021-11-11 15:35:57 -08:00
Dmitry Gozman
f38f611478
chore: add npm run lint-tests ( #10252 )
2021-11-11 13:27:50 -08:00
Max Schmitt
96d7b21b34
devops: fix driver deployment ( #10208 )
...
follow-up for #10207
2021-11-10 11:21:25 +01:00
Andrey Lushnikov
8375bff1db
devops: support arm drivers for Mac and Linux ( #10207 )
...
- Move to node 16 for driver (Node publishes Mac arm64 builds since Node 16)
- Publish Mac Arm64 driver
- Publish Linux Arm64 driver
2021-11-10 01:19:05 -08:00
Andrey Lushnikov
7af0dc178b
devops: support beta deployment for Trace viewer ( #10201 )
...
Trace Viewer will have 3 deployments:
- Stable: https://trace.playwright.dev
- Beta (from release branch): https://trace.playwright.dev/beta
- Next (from master branch): https://trace.playwright.dev/next
2021-11-09 17:21:51 -08:00
Max Schmitt
c98b8ebd2b
devops: follow-up on Trace Viewer deployment ( #10154 )
2021-11-09 00:42:59 +01:00
Pavel Feldman
7b64161a37
feat(test-runner): allow specifying fine-grained trace options ( #10147 )
2021-11-08 15:39:58 -08:00
Max Schmitt
51910b7a01
devops: add Trace Viewer deployment ( #10154 )
2021-11-09 00:27:54 +01:00
Dmitry Gozman
9cebe60831
feat(reporters): augment non-stdio reporters with dot/line ( #10003 )
2021-11-03 08:25:16 -07:00
Nick Partridge
a51ac39275
feat: add snapshotDir
to set base snapshot directory ( #9260 )
2021-11-02 08:02:49 -07:00
Andrey Lushnikov
e26a722d23
devops: fix publishing @next versions ( #9963 )
...
This patch:
- removes the "is this upstream check?" when publishing daily version
- fixes the bug when manually triggered builds were pushed under @beta
tag
Drive-by: rename "tip-of-tree" flag to "next" for consistency.
2021-11-02 02:35:03 -07:00
Pavel Feldman
56ca3a18f5
feat(trace-viewer): show test name ( #9957 )
2021-11-01 21:23:35 -07:00
Max Schmitt
96d611ed7d
devops: publish devrelease:npm to beta on release branches ( #9949 )
...
Co-authored-by: Andrey Lushnikov <aslushnikov@gmail.com>
2021-11-01 17:29:56 -07:00
Yury Semikhatsky
13cc266b37
feat: add "commit" to possible waitUntil options ( #9892 )
2021-11-01 17:12:19 -07:00
Max Schmitt
ce50b5d40a
chore: add script to update package/lock.json ( #9919 )
2021-11-01 20:09:23 +01:00
Dmitry Gozman
4f1027bdd0
feat(test runner): introduce TestInfo.parallelIndex ( #9762 )
...
This is a worker number between `0` and `workers - 1` that
does not change after worker process restart.
2021-11-01 10:37:34 -07:00
Pavel Feldman
d6adff7792
fix(html): include html into the reporter types ( #9907 )
2021-10-31 11:06:28 -07:00
Yury Semikhatsky
9f3f25916e
fix(devops): do not upload -win32.zip to Azure ( #9884 )
2021-10-29 09:54:04 -07:00
Max Schmitt
82dd7c87ad
devops: do not publish Win 32 bit driver anymore ( #9789 )
2021-10-27 23:48:26 +02:00
Max Schmitt
fef5c38b3e
chore: remove Win/32bit from registry ( #9790 )
2021-10-27 23:48:17 +02:00
Max Schmitt
113d425f15
chore: use Node.js 16 in Docker ( #9824 )
2021-10-27 23:48:10 +02:00
Andrey Lushnikov
7927920c35
fix(docker): do not export DISPLAY for everybody without XVFB running ( #9795 )
...
Fixes #9756
2021-10-26 13:21:18 -07:00
Joel Einbinder
f2888395a6
fix: support even older node 12 ( #9718 )
2021-10-22 15:59:52 -04:00
Max Schmitt
60939a91b2
devops: release create-playwright over publish infra ( #9683 )
2021-10-22 10:13:49 +02:00
Max Schmitt
94d1fcf835
chore: move create-playwright build to build.js infra ( #9687 )
...
Co-authored-by: Joel Einbinder <joel.einbinder@gmail.com>
2021-10-22 10:13:05 +02:00
Andrey Lushnikov
39516c29d1
chore: fix //utils/print_versions.js
( #9647 )
2021-10-20 02:20:46 -07:00
Max Schmitt
c60dcea3e5
chore: fix roll_browsers.js
2021-10-20 10:24:16 +02:00
Andrey Lushnikov
983cfde4d4
feat: introduce docker integration for Playwright Test ( #9599 )
2021-10-19 16:10:24 -07:00
Yury Semikhatsky
ade2171c4b
fix(docs): APIRequest* variable names ( #9621 )
2021-10-19 09:37:17 -07:00
Joel Einbinder
53c866c0f2
fix(monorepo): explicitly list package.json exports instead of using glob patterns ( #9584 )
2021-10-19 12:28:02 -04:00
Dmitry Gozman
6d554a5e30
feat(reporter): expose more apis ( #9603 )
2021-10-19 08:38:04 -07:00
Yury Semikhatsky
6d727401bf
chore(fetch): rename ApiRequest* to APIRequest* ( #9606 )
2021-10-19 07:38:27 -07:00
Pavel Feldman
e37660b068
feat(api): expose step location ( #9602 )
2021-10-18 21:06:18 -07:00
Pavel Feldman
e31b96cc26
feat(tracing): make context.request appear in the trace ( #9555 )
2021-10-15 15:22:49 -07:00
Joel Einbinder
4c9d7d5ccc
chore(webpack): fix watch for webpack 5 ( #9516 )
2021-10-14 15:16:15 -04:00
Andrey Lushnikov
cd92451b9f
fix: protocol generation in monorepo ( #9513 )
2021-10-14 11:14:50 -07:00
Joel Einbinder
c8f875a193
chore: move test runner types into the playwright test package ( #9472 )
...
Co-authored-by: Max Schmitt <max@schmitt.mx>
2021-10-14 11:55:08 +02:00
Pavel Feldman
bb77912aee
chore: don't include babel compiled files in webpack bundles ( #9491 )
2021-10-13 19:27:50 -07:00
Max Schmitt
1a69b26db1
Revert "fix(build): don't compile our web files twice with babel ( #9470 )" ( #9488 )
...
This reverts commit 4d7b6b4b50
.
2021-10-14 01:02:31 +02:00
Joel Einbinder
4d7b6b4b50
fix(build): don't compile our web files twice with babel ( #9470 )
2021-10-13 13:41:38 -07:00
Joel Einbinder
2a0a44bc09
chore: move diff_match_patch into the test package ( #9475 )
2021-10-13 13:38:26 -07:00
Joel Einbinder
74bb75ce03
chore: dont throw errors about deviceDescriptors.js on first watch ( #9469 )
2021-10-13 13:35:50 -07:00
Max Schmitt
617380ffee
chore: fix bots after adjusting package descriptions ( #9454 )
...
follow-up for: bcfd47343c
2021-10-13 00:07:21 +02:00
Pavel Feldman
c0945d9d00
chore(trace): make trace viewer a pwa ( #9438 )
2021-10-12 14:42:50 -07:00
Max Schmitt
ded1e718b5
types(test-runner): fix access worker fixtures in test.skip ( #9447 )
2021-10-12 17:44:00 +02:00
Pavel Feldman
9dfc0a3394
chore: make sw global in trace viewer ( #9431 )
2021-10-11 20:52:28 -07:00
Max Schmitt
9dd6bb8c6a
Revert "feat(test-runner): allow parametrized tests that don't extend base ( #9301 )"
...
This reverts commit f63af830de
.
2021-10-11 17:32:31 +02:00
Max Schmitt
f884103b62
devops: do not publish create-playwright pkg
2021-10-11 17:24:05 +02:00
Max Schmitt
4ae3a07a75
devops: allow dirty tree when publishing ToT release
2021-10-11 17:13:21 +02:00
Joel Einbinder
c89d5a50dd
chore: migrate to monorepo ( #9421 )
2021-10-11 16:52:17 +02:00
Max Schmitt
49a53e23df
chore: add iPhone 13 device family ( #9392 )
2021-10-08 22:43:23 +02:00
Michael Rienstra
09250fd265
chore: bump 'expect' dev dep from v26 to v27 ( #8718 )
...
Co-authored-by: Max Schmitt <max@schmitt.mx>
2021-10-08 17:01:31 +02:00
Pavel Feldman
bc71d20d0f
feat(request): add global request fixture ( #9332 )
2021-10-06 10:09:27 -07:00
Pavel Feldman
f63af830de
feat(test-runner): allow parametrized tests that don't extend base ( #9301 )
2021-10-04 17:16:33 -07:00
Sidharth Vinod
ec5e7495df
types(test-runner): Add github to built in reporters ( #9283 )
2021-10-04 11:31:26 +02:00
Dmitry Gozman
edf07949be
test: use separate Playwright instance to automate inspector ( #9270 )
...
This will prevent inspector from picking up test actions.
2021-10-01 17:06:13 -07:00
Yury Semikhatsky
235eaca34a
fix(fetch): use data, form and multipart for different post data ( #9248 )
2021-10-01 12:11:33 -07:00
Nick Partridge
b126a5685b
feat: add path option to toMatchSnapshot
( #9156 )
2021-10-01 09:15:44 -07:00
Pavel Feldman
c4c6efe7c7
chore: dedupe return types in the dotnet api generator ( #9181 )
2021-09-27 13:25:07 -07:00
Dmitry Gozman
d22dd4a4e7
feat(test runner): improve fixture typings for function fixtures ( #9138 )
...
When fixture value `R` is a function, TypeScript sometimes confuses
function `R` and function `async ({}, use) => {}`. This leads to
`any` types in the latter because it could be either of the functions
as TS thinks.
The solution is to only accept the second syntax, assuming that noone
passes fixture value that is a function as is:
```js
// This will stop working.
test.extend<{ foo: (x: number) => number }>({
foo: x => 2 * x,
});
// This will get inferred types and autocomplete.
test.extend<{ foo: (x: number) => number }>({
foo: async ({}, use) => {
await use(x => 2 * x);
},
});
```
2021-09-24 19:59:30 -07:00
Max Schmitt
3632231cc1
chore: fix utils/roll_browser.js after #9078
2021-09-24 17:09:54 +02:00
Pavel Feldman
0908dc98c8
chore: migrate expect(locator).toMatchText to protocol ( #9117 )
2021-09-23 16:46:46 -07:00
Max Schmitt
89aace688f
fix: make Serializable type any ( #9059 )
2021-09-23 11:06:34 -07:00
Dmitry Gozman
2afe76d86d
feat(launch): connect to process.env.SELENIUM_REMOTE_URL instead of local launch ( #9056 )
2021-09-22 21:13:32 -07:00
Dmitry Gozman
e6f5404621
test: unflake "should timeout in socket while connecting" ( #9093 )
2021-09-22 17:08:49 -07:00
Yury Semikhatsky
79eb7744bc
feat(fetch): support options in playwright._newRequest ( #9061 )
2021-09-22 12:44:22 -07:00
Max Schmitt
5b93df0bab
chore(docker): upgrade to NPM 7 ( #8915 )
2021-09-22 16:38:50 +02:00
Dmitry Gozman
cb7285a8c0
docs(test): separate TestOptions from Fixtures ( #9000 )
2021-09-17 17:13:47 -07:00
Pavel Feldman
63ff405e6e
fix(inspector): stop on all snapshottable actions ( #8990 )
2021-09-17 15:24:15 -07:00
Max Schmitt
abc989eb3e
chore: use Node.js 14 (LTS) for driver ( #8965 )
2021-09-16 15:14:11 +02:00
Andrey Lushnikov
4f762ba90a
feat: introduce experimental general-purpose grid ( #8941 )
...
This patch adds a general-purpose grid framework to parallelize
Playwright across multiple agents.
This patch adds two CLI commands to manage grid:
- `npx playwright experimental-grid-server` - to launch grid
- `npx playwrigth experimental-grid-agent` - to launch agent in a host
environment.
Grid server accepts an `--agent-factory` argument. A simple
`factory.js` might look like this:
```js
const child_process = require('child_process');
module.exports = {
name: 'My Simple Factory',
capacity: Infinity, // How many workers launch per agent
timeout: 10_000, // 10 seconds timeout to create agent
launch: ({agentId, gridURL, playwrightVersion}) => child_process.spawn(`npx`, [
'playwright'
'experimental-grid-agent',
'--grid-url', gridURL,
'--agent-id', agentId,
], {
cwd: __dirname,
shell: true,
stdio: 'inherit',
}),
};
```
With this `factory.js`, grid server could be launched like this:
```bash
npx playwright experimental-grid-server --factory=./factory.js
```
Once launched, it could be used with Playwright Test using env variable:
```bash
PW_GRID=http://localhost:3000 npx playwright test
```
2021-09-16 01:20:36 -07:00
Yury Semikhatsky
c58f34fb2e
feat(fetch): introduce global fetch request ( #8927 )
2021-09-14 18:31:35 -07:00
Yury Semikhatsky
5141407c6b
fix(fetch): prefix request with underscore ( #8922 )
2021-09-14 12:56:09 -07:00
Pavel Feldman
16baaa317d
chore: remove stale html experiments ( #8905 )
2021-09-13 20:34:46 -07:00
Dmitry Gozman
6722d95a7a
docs: fix markdown parser swallowing lines after code snippets ( #8904 )
2021-09-13 18:48:16 -07:00
Dmitry Gozman
d9d2d809a2
fix(test): make use
in config accept option values only ( #8828 )
...
Also include default options in FullConfig/FullProject.
Also make examples compile and add a test.
2021-09-13 17:50:31 -07:00
Yury Semikhatsky
b79be5d98d
feat(fetch): introduce failOnStatusCode ( #8896 )
2021-09-13 15:38:27 -07:00
Yury Semikhatsky
f8c0f0d637
feat(fetch): support query params ( #8893 )
2021-09-13 14:29:44 -07:00
Pavel Feldman
7bbb63d143
feat(test): start authoring raw reporter ( #8790 )
2021-09-09 14:17:18 -07:00
Dmitry Gozman
eca82eee4a
fix(video): reduce buffering in ffmpeg, avoid overbooking cpu ( #8786 )
...
This is an attempt to improve video performance when encoding
does not keep up with frames. This situation can be reproduced
by running multiple encoders at the same time.
Added `utils/video_stress.js` to manually reproduce this issue.
Observing ffmpeg logs, it does not do any encoding initially and
instead does "input analysis / probing" that detects fps and other
parameters. By the time it starts encoding (launches vpx and creates
the video file), we already have many frames in the buffer.
Reducing probing helps:
`-avioflags direct -fpsprobesize 0 -probesize 32 -analyzeduration 0`
Another issue observed is questionable default `-threads` value.
We compile without threads support, so logs say "using emulated threads".
For some reason, setting explicit `-threads 1` (or any other value)
makes it better when cpu is loaded.
2021-09-09 12:41:06 -07:00
Joel Einbinder
e914f6bbc7
feat(network): remove Headers class and add headersArray method ( #8749 )
2021-09-07 10:27:53 -07:00
Yury Semikhatsky
152f6c6f1c
fix: support connectOverCDP over https ( #8703 )
2021-09-03 17:52:22 -07:00
Dmitry Gozman
962a33993f
fix(types): leave a single js-flavor=ts snippet in JSDoc ( #8669 )
2021-09-02 16:18:22 -07:00
Dmitry Gozman
e691b649de
feat(test runner): describe.parallel ( #8662 )
2021-09-02 15:42:07 -07:00
Dmitry Gozman
947ff6755d
feat(types): generate JSDoc for things like test.describe.only ( #8663 )
2021-09-02 13:56:36 -07:00
Max Schmitt
5f6ec04cfe
fix(test-runner): add jest-matcher-utils to dependencies ( #8501 )
2021-09-02 19:56:30 +02:00
Max Schmitt
595f2296a6
chore: fix roll browser script which broke in #8579 ( #8628 )
2021-09-01 09:17:06 -07:00
Dmitry Gozman
bee8ed117b
feat(html reporter): preview source code, steps and step errors ( #8598 )
2021-08-31 16:34:52 -07:00
Pavel Feldman
e47bacdecb
fix(cookies): read response headers off extra info event, if any ( #8526 )
2021-08-30 09:58:44 -07:00
Max Schmitt
65dc238b32
chore(channels): generate dispatcher event types ( #8540 )
2021-08-30 18:43:18 +02:00
Dmitry Gozman
bb5e44fbc4
docs: introduce overloads, generate JSDoc for overloads ( #8485 )
...
- Each overload, e.g. for `page.evaluate`, shows a nice autocomplete doc,
not only the first one.
- We can have multiple overloads directly on the docs page, e.g.
`test.skip(title, fn)` and `test.skip(condition, description)`.
These overloads are internally named `Test.skip#1` and all aliased
to `test.skip`.
2021-08-27 21:57:40 -07:00
Dmitry Gozman
17146b44c2
docs: validate links for all languages ( #8478 )
2021-08-26 10:59:33 -07:00
Dmitry Gozman
a479cb6f52
fix(test runner): add an overload for test.skip(title, fn) ( #8454 )
...
We shipped this feature, but forgot to add the right overload to d.ts.
2021-08-25 14:36:36 -07:00
Dmitry Gozman
e726c18788
chore: use 'mime' for various mimeType-extension mappings ( #8426 )
2021-08-25 11:18:35 -07:00
Anže Vodovnik
061b5c67f2
chore(dotnet): generate [Obsolete] on deprecated members ( #8434 )
2021-08-25 14:24:18 +02:00
Anish Karandikar
e7aec6d82b
chore: minor edit to utils/update_canary_version.js ( #8244 )
2021-08-24 03:02:24 -07:00
Pavel Feldman
710cec80a0
feat(test-runner): render step titles ( #8270 )
2021-08-17 16:41:36 -07:00
Pavel Feldman
97ba4f22f3
feat(test-runner): report nested steps ( #8266 )
2021-08-17 13:57:26 -07:00
Pavel Feldman
7b861dcee6
chore: dotnet connect + generator
2021-08-16 12:49:25 -07:00
Pavel Feldman
f4c8fa3c56
fix(android): fix android tests (4) ( #8211 )
2021-08-16 08:13:02 -07:00
Pavel Feldman
5aff9db3ca
fix(android): fix android tests (3)
2021-08-15 23:22:16 -07:00
Pavel Feldman
dfb2616918
fix(android): fix android tests (2)
2021-08-15 23:04:45 -07:00
Pavel Feldman
bdb772d710
fix(android): fix android tests ( #8209 )
2021-08-15 22:54:30 -07:00
Dmitry Gozman
052e0e197c
fix(types): allow specifying scope when overriding fixtures ( #8139 )
...
Otherwise it show a confusing error.
2021-08-11 10:44:15 -07:00
Dmitry Gozman
a5e0965087
feat(test runner): implement test.describe.serial ( #8132 )
2021-08-10 21:26:45 -07:00
Dmitry Gozman
3bf3318350
fix(test runner): make sure options, trace and screenshot apply to all contexts ( #8083 )
...
- Uses some auto fixtures to set default options and instrumentation on BrowserType.
- Moves screenshot, trace and video to worker-scoped fixtures.
- Throws in page/context when used from beforeAll/afterAll.
- Plumbs around BrowserType to be accessible from Browser and BrowserContext.
2021-08-09 18:09:11 -07:00
Dmitry Gozman
87548f94c1
feat(test runner): support test fixtures in beforeAll/afterAll ( #8082 )
...
Each hook gets its own test scope. This is not too useful for
object fixtures like `page` (although one can use a page in
`beforeAll` to save storage state), but much more useful for option
fixtures like `viewport`.
2021-08-09 13:26:33 -07:00
Dmitry Gozman
41949e559e
Revert "feat(test runner): file scope fixtures ( #7969 )" ( #8081 )
...
This reverts commit 1bbf86d060
,
leaving small improvements around.
2021-08-09 12:33:16 -07:00
Pavel Feldman
290f601dae
feat(expect): introduce explicit default async expect timeout ( #8071 )
2021-08-07 22:08:56 -07:00
Pavel Feldman
a8d404cd29
feat(test-runner): basic html reporter ( #7994 )
2021-08-05 13:36:47 -07:00
Pavel Feldman
19b673e467
fix(webpack): use production mode in production builds ( #8007 )
2021-08-05 12:07:43 -07:00
Anže Vodovnik
8792955f82
fix: generator incorrectly appends <T> to name of files ( #8011 )
2021-08-05 11:17:51 -07:00
Dmitry Gozman
1bbf86d060
feat(test runner): file scope fixtures ( #7969 )
...
These are reset after running tests from a single file.
2021-08-04 21:11:02 -07:00
Max Schmitt
385d489b35
feat(test-runner): re-enable web server ( #7906 )
...
Co-authored-by: Joel Einbinder <joel.einbinder@gmail.com>
2021-08-03 23:24:14 +02:00
Joel Einbinder
a2cbba9c1c
chore(typescript): update to 4.3 ( #7809 )
2021-08-03 12:21:07 -04:00
Pavel Feldman
3b34e57ee4
feat(test-runner): introduce test.step ( #7956 )
2021-08-02 22:11:37 -07:00
Pavel Feldman
5803035c1b
feat(test-runner): introduce steps ( #7952 )
2021-08-02 17:17:20 -07:00
Pavel Feldman
4163cec93b
feat(test-runner): introduce actionTimeout and navigationTimeout ( #7919 )
2021-07-29 21:03:50 -07:00
Dmitry Gozman
ba7d11e08b
fix(build): watch test types changes and update .d.ts ( #7921 )
2021-07-29 14:33:47 -07:00
Dmitry Gozman
dd0b089d13
feat(test runner): createContext fixture for multi-context scenarios ( #7779 )
2021-07-29 14:03:58 -07:00
Dmitry Gozman
3f0485486d
feat(test runner): show errors from interrupted tests when available ( #7874 )
...
This shows the exact operation that is timing out (like click) when
user hits Ctrl+C.
2021-07-28 15:43:37 -07:00
Pavel Feldman
49e9f8c15e
feat(expect): add text and true matchers ( #7873 )
2021-07-28 12:07:11 -07:00
Dmitry Gozman
34b96a5759
chore: generate JSDoc for testing types from md reference ( #7799 )
2021-07-27 19:10:55 -07:00
Pavel Feldman
b9aad5eb86
chore: move locators to strict selectors ( #7866 )
2021-07-27 15:27:36 -07:00
Pavel Feldman
0a6ae11da1
feat(strict): introduce strict mode ( #7851 )
2021-07-26 22:00:23 -07:00
Pavel Feldman
827fb80465
feat(locator): implement element locators ( #7808 )
2021-07-22 21:37:20 -07:00
Dmitry Gozman
bfbba5a979
docs(test runner): api reference for reporter api ( #7811 )
2021-07-22 19:56:36 -07:00
Dmitry Gozman
fd9c72015f
docs(test runner): API reference for builtin fixtures ( #7805 )
2021-07-22 14:47:12 -07:00
Max Schmitt
449c8a77dd
chore: disable source-map reference in JS for production builds ( #7622 )
2021-07-22 20:29:36 +02:00
Dmitry Gozman
8f1074c76e
docs(test-runner): initial API docs for test runner ( #7732 )
2021-07-22 11:01:18 -07:00
Max Schmitt
acdc531efc
chore: migrate connect/overCDP to options instead of params ( #7606 )
2021-07-22 16:55:23 +02:00
Max Schmitt
86b21d5299
feat: add High DPI and Low DPI Desktop device descriptors ( #7531 )
2021-07-15 22:16:27 +02:00
Max Schmitt
1b92c674f9
feat: have up2date user-agents for WK and FF ( #7644 )
2021-07-15 17:41:23 +02:00
Pavel Feldman
3eb21e2322
feat(webkit): roll to r1515 ( #7625 )
2021-07-14 18:43:51 -07:00
Dmitry Gozman
7b795c9bc5
chore: fix roll_browser script ( #7626 )
2021-07-14 18:39:39 -07:00
Anže Vodovnik
61365b21ce
chore(dotnet): stop generating adapters ( #7513 )
2021-07-14 11:13:48 +02:00
Dmitry Gozman
d1170b30fc
Revert "api: remove timeout option from isVisible and isHidden methods ( #7414 )" ( #7600 )
...
This reverts commit 9f71c96740
.
2021-07-14 10:46:00 +02:00
Dmitry Gozman
0742cb9076
chore: move working with browser channels to Registry Executables ( #7581 )
2021-07-13 19:03:49 -07:00
Dmitry Gozman
57c5e4d8cf
chore: replace Registry api with Executable list ( #7544 )
2021-07-13 15:57:40 -07:00
Joel Einbinder
0f118618d4
fix(types): fix typo in event description ( #7543 )
2021-07-09 18:21:47 -05:00
Joel Einbinder
e4698b5f6a
fix(types): add better descriptions for event emitter methods ( #6417 )
2021-07-08 11:24:46 -05:00
Max Schmitt
08da9d207e
chore: move processLauncher into src/utils ( #7504 )
2021-07-07 21:14:16 +02:00
Max Schmitt
98bcf26656
feat(test-runner): add webServer ( #7368 )
2021-07-07 20:19:42 +02:00
Dmitry Gozman
47885db116
chore: move install to Registry ( #7433 )
...
This is an effort to consolidate all handling of browser binaries in a single place.
2021-07-06 20:59:16 -07:00
Pavel Feldman
f52a53e21e
feat(trace-viewer): add nicer params rendering ( #7448 )
2021-07-02 16:45:09 -07:00
Pavel Feldman
99d7d196c5
feat(trace-viewer): render call info w/ params, result ( #7438 )
2021-07-02 14:33:38 -07:00
Andrey Lushnikov
fe32d38414
feat: move browser fonts to tools section ( #7443 )
...
This way we not only fix Docker images, but also fix `npx playwright
install-deps` in virtual machines.
2021-07-02 02:09:31 -07:00
Andrey Lushnikov
a6421c690b
devops: add missing fonts to docker ( #7435 )
...
These fonts are taken from Selenium docker image:
77db00ced0/NodeBase/Dockerfile (L57-L89)
Fixes #6907
2021-07-01 23:29:33 -07:00
Pavel Feldman
e19d509c32
feat(icon): add an icon for trace viewer ( #7430 )
2021-07-01 17:05:14 -07:00
Pavel Feldman
8fb0454488
fix(trace-viewer): fall back to stable channels ( #7429 )
2021-07-01 15:26:55 -07:00
Dmitry Gozman
9f71c96740
api: remove timeout option from isVisible and isHidden methods ( #7414 )
...
It is unused and confusing.
2021-07-01 13:30:16 -07:00
Pavel Feldman
f43b4efbc9
fix(trace-viewer): include waitFor* in trace viewer ( #7413 )
2021-06-30 17:56:48 -07:00
Pavel Feldman
b1d66d54f0
fix(tracing): explicitly list actions to snapshot ( #7376 )
2021-06-29 15:28:15 -07:00
Max Schmitt
9f9201420a
fix(websockets): filter for text and binary frames ( #7360 )
2021-06-28 21:23:29 +02:00
Joel Einbinder
1a6d46d844
chore(typescript): compile with babel, lint everything with tsc ( #6872 )
2021-06-23 18:01:48 -07:00
Max Schmitt
b3cc683e6b
chore hide Download._cancel ( #7282 )
2021-06-23 23:20:36 +02:00
Max Schmitt
07fc8cc777
fix(driver): fix compatibility when folder contains space ( #7240 )
2021-06-21 10:18:09 -07:00
Joel Einbinder
4a04a939a9
fix(docker): use node 14 not node 16 ( #7212 )
2021-06-17 16:14:10 -07:00
Max Schmitt
36c5395d2d
chore: rebase documentation and markdown classes from docs ( #7172 )
2021-06-17 08:19:24 +02:00
Andrey Lushnikov
a3e4185b2f
chore: nuke 'webkit-technology-preview' experiment ( #7164 )
...
It proved to be unmaintainable due to the following reasons:
- determining upstream branch for the technology preview was a manual
and tedious process
- once determined, actual Safari Technology Preview occasionally
diverted from the branch
2021-06-15 23:58:30 -07:00
Andrey Lushnikov
ec68b31dc4
feat: support chromium-with-symbols
channel ( #7135 )
...
References #7130
2021-06-15 17:57:31 -07:00
Dmitry Gozman
b625a04adc
types: move exported objects from index.d.ts to overrides.d.ts ( #7152 )
...
This way we generate these types right away, without duplicating them everywhere.
2021-06-15 15:06:18 -07:00
Pavel Feldman
9550106e1d
fix(test-runner): video: 'retain-on-failure' leaves empty folders behind ( #7125 )
2021-06-15 10:06:49 -07:00
Anže Vodovnik
66f9aeee17
chore: use .Core namespace for dotnet ( #7103 )
2021-06-15 11:47:24 +02:00
Max Schmitt
64b23040dc
chore: use new links in generated types ( #7102 )
2021-06-14 17:13:28 +02:00
Peng-Yu Chen
5f6d4a7b73
feat(download): adding a new Download._cancel
method ( #6236 )
2021-06-12 22:23:22 +02:00
Pavel Feldman
6ec70bc0ac
api(dotnet): embrace nullable references ( #6964 )
2021-06-08 12:20:35 -07:00
Andrey Lushnikov
53d68bdb38
feat: firefox is stable by default ( #6953 )
...
This patch:
- rolls Firefox to v1269 which is now a firefox-stable build.
- introduces a new channel, `firefox-beta`, for our internal needs.
Fixes #6817
2021-06-08 09:34:17 -07:00
Dmitry Gozman
f745bf1fbc
chore: bring in folio source ( #6923 )
...
- Source now lives at `src/test`.
- Former folio tests live at `tests/playwright-test`.
- We use `src/test/internal.ts` that exposes base test without
Playwright fixtures for most tests (to avoid modifications for now).
- Test types live in `types/testFoo.d.ts`.
- Stable test runner is installed to `tests/config/test-runner` during `npm install`.
- All deps including test-only are now listed in `package.json`.
Non-test deps must also be listed in `build_package.js` to get included.
2021-06-06 17:09:53 -07:00
Dmitry Gozman
69b734629c
fix: various test-related fixes ( #6916 )
...
- Closing inspector window resumes the script.
- Replace FOLIO_WORKER_INDEX with TEST_WORKER_INDEX.
- Account for `@playwright/test` stack traces.
2021-06-04 18:43:54 -07:00
Max Schmitt
064150f8dd
chore: use fs.promises API instead of promisify ( #6871 )
2021-06-03 18:55:33 +02:00
Dmitry Gozman
3de3a88930
feat(test): introduce npx playwright test
( #6816 )
2021-06-03 08:07:55 -07:00
Dmitry Gozman
33c2f6c31e
chore: do not bundle api.json and protocol.yml ( #6841 )
...
These are only needed for the driver, so bundle them
in the driver explicitly.
2021-06-02 14:01:05 -07:00
Max Schmitt
79b244a2f4
chore: use bash instead of sh in code blocks ( #6847 )
2021-06-02 18:23:06 +02:00
Andrey Lushnikov
cb4adb1446
feat: install chrome-beta via cli ( #6831 )
...
This patch starts introduces `npx playwright install chrome-beta`
command and switches our Chrome Beta tests to it.
2021-06-01 18:26:12 -07:00
Dmitry Gozman
d36bffb9a9
fix(connect): respect timeout in all scenarios ( #6762 )
...
Drive-by: fix console error in test arising from bad usage
of test websocket server in `connect()` calls.
2021-05-26 15:18:52 -07:00
Pavel Feldman
bb0e196b15
api(dotnet): specialize waitForEvent ( #6761 )
2021-05-26 15:11:31 -07:00
Pavel Feldman
93648aafc0
chore: generate dotnet initializers ( #6755 )
2021-05-26 08:04:45 -07:00
Andrey Lushnikov
c60974d922
feat: do not rely on chocolatey to install Google Chrome Beta ( #6735 )
2021-05-25 17:32:08 -07:00
Pavel Feldman
24a2326031
api(dotnet): use lists, not collections ( #6746 )
2021-05-25 15:26:44 -07:00
Pavel Feldman
f7f08c9c02
api(dotnet): normalize enums, remove browser channel enum ( #6738 )
2021-05-25 14:33:27 -07:00
Pavel Feldman
be95cf48b6
api(dotnet): make headers a dict ( #6709 )
2021-05-22 20:05:26 -07:00
Pavel Feldman
3bdb1c356f
api(dotnet): generate api in a specific folder ( #6708 )
2021-05-22 11:47:13 -07:00
Pavel Feldman
7d0b4c263f
chore: fix model types generation ( #6706 )
2021-05-22 10:13:58 -07:00
Darío Kondratiuk
544ca37c00
chore(dotnet): generate clone constructors for options ( #6684 )
2021-05-20 16:24:05 -07:00
Andrey Lushnikov
ae35906fb5
devops: flakiness dashboard to support new folio report ( #6677 )
...
JSON report will change again in https://github.com/microsoft/playwright/pull/6656
This patch modifies azure function to accomodate to the new format.
Note: with the new notion of projects instead of per-test parameters,
we can actually compress dashboard per commit much more efficient. If
the format sticks, we'll follow-up with a `dashboard_compressed_v2.js`.
2021-05-20 09:46:50 -07:00
Joel Einbinder
447a0c4bb8
feat(types): export ScreenshotOptions ( #6419 )
2021-05-20 09:22:01 -07:00
Pavel Feldman
ba637e6e41
chore: bring back dblclick alias ( #6667 )
2021-05-19 16:29:35 -07:00
Pavel Feldman
e679d99421
chore: remove input files and selected option overrides ( #6665 )
2021-05-19 16:13:17 -07:00
Pavel Feldman
1f22673c29
api(dotnet): introduce RunAndWaitForAsync ( #6660 )
2021-05-19 15:49:44 -07:00