Commit graph

665 commits

Author SHA1 Message Date
Joel Einbinder 180446d20f
fix(types): restore electron types (#5574) 2021-02-23 20:29:10 -08:00
Dmitry Gozman 5cb914b2fe
fix(types): do not use import('electron') (#5572) 2021-02-23 18:48:34 -08:00
Pavel Feldman 65bf44d52b
docs(inspector): add initial inspector docs (#5541) 2021-02-21 18:36:39 -08:00
Pavel Feldman b2227c1bcf
feat(inspector): allow selecting file (#5483) 2021-02-17 14:05:41 -08:00
Anže Vodovnik 8f3a6c6b45
chore(docs): improve xmldoc inline code parsing (#5480) 2021-02-17 10:45:15 -08:00
Naresh cc749fe679
fix(android): added recent apps button (#5331) 2021-02-16 19:37:46 -08:00
Anže Vodovnik 9dd443e1aa
chore(docs): add ability to generate xmldocs (#5164)
Introduces a naive XmlDocs renderer for Markdown nodes. It needs to be called separately for now.
2021-02-15 19:41:40 +01:00
Pavel Feldman aef052aecc
chore: pause on input in pwdebug mode (#5427) 2021-02-12 10:11:30 -08:00
Dmitry Gozman 3e7b8e3d74
test: add basic end-to-end driver test (#5426)
- Introduce internal "out of process" start()/stop() mode.
- This mode is used both in regular tests and installation tests.
- Emulate basic driver installation, browser download and running.
2021-02-12 09:05:32 -08:00
Yury Semikhatsky 0c8d8a3d0f
fix(docs): correctly detect type-only overrides (#5430) 2021-02-11 23:43:59 -08:00
Andrey Lushnikov 5ea6d6eefd
fix(docker): avoid symlink hack in Docker images (#5429)
Instead of symlinking pwuser's registry to root's registry, we now
use the `PLAYWRIGHT_BROWSERS_PATH` variable to define a single
browser registry across the docker image, accessible for all
users.

Fixes #4485
2021-02-11 18:33:30 -08:00
Pavel Feldman 449adfd3ae
chore(recorder): move recording output into the gui app (#5425) 2021-02-11 17:46:54 -08:00
Dmitry Gozman 99f8e1cf63
docs: document Android and friends (#5415)
These are experimental, currently available through `_android`.
2021-02-11 10:31:57 -08:00
Pavel Feldman 6e6e36b565
chore: move progress log into the metadata (#5411) 2021-02-10 21:50:29 -08:00
Pavel Feldman a06cf70d28
chore: pass parsed stack in metainfo (#5407) 2021-02-10 18:52:28 -08:00
Yury Semikhatsky d39d2eaf4c
docs: support method overrides (#5405) 2021-02-10 14:27:20 -08:00
Dmitry Gozman c12374ea07
feat(docs): improve link validation (#5394) 2021-02-10 07:13:14 -08:00
Andrey Lushnikov e2013b29e3 devops: fix driver publish 2021-02-09 17:02:24 -07:00
Andrey Lushnikov 1240dd48cb
devops: start publishing canary at midnight every day (#5343)
This patch:
- starts publishing canary NPM package at 00:10AM UTC
- canary version is published from default (`master`) branch and is 
  named with a date. E.g. for a version published on Feb 5, 2021, the
  version would be `1.8.0-alpha-feb-5-2021`
- versions from release branches are still published on every commit and have the 
  regular commit timestamp suffix
2021-02-09 14:28:04 -08:00
Yury Semikhatsky adeb2348cf
docs: change WebSocket.frame* event type to WebSocketFrame in java (#5384) 2021-02-09 12:11:48 -08:00
Andrey Lushnikov d499cf08d1
refactor: remove browserPaths in favor of Registry class (#5318)
This patch introduces a new Registry class that incapsulates
all logic regarding browsers and their paths.

Fixes #5278
2021-02-08 16:02:49 -08:00
Andrey Lushnikov 32ba29a143 devops: introduce compressed dashboard
Compressed dashboard is 10 times smaller yet has all the data to
render flakiness.

Drive-by: remove old dashboard implementations since they are no
longer used.
2021-02-06 22:12:35 -07:00
Joel Einbinder 3d14780bcb
fix(docker): add fonts-liberation for chromium (#5344) 2021-02-06 09:05:45 -08:00
Yury Semikhatsky a1b3164864
docs: fix nested union handling (#5341) 2021-02-05 16:32:13 -08:00
Dmitry Gozman 983e04374a
chore: fix build/packaging for recorder and traceviewer (#5338) 2021-02-05 16:19:09 -08:00
Yury Semikhatsky 4b74f5693c
docs: add enum aliases (#5335) 2021-02-05 15:28:48 -08:00
Anže Vodovnik ff06399afd
docs(csharp): events convention based naming fix for csharp (#5238)
* docs(gen): Updating events names to camelCase.
* docs(gen): updating generator to match new assumption for event names
* docs(gen): renaming references to events
2021-02-04 19:34:09 +01:00
Anže Vodovnik cf96b15051
fix(docs): ignore case when validating order of events and methods (#5309) 2021-02-04 19:19:38 +01:00
Joel Einbinder 3126fee780
fix(lint): correctly find api.ts on windows (#5308) 2021-02-04 05:31:59 -08:00
Andrey Lushnikov 3c36322c72
feat(ffmpeg): roll FFMPEG to r1005 (#5303)
Drive-By: update `//utils/roll_browser.js` script to support FFMPEG

References #5278
2021-02-03 21:15:09 -08:00
Pavel Feldman 1db5ef24a8
docs: document electron api (#5229) 2021-02-01 11:43:26 -08:00
Yury Semikhatsky e71ef7949b
docs: add java traits to some methods (#5222) (#5243) 2021-02-01 11:13:13 -08:00
Pavel Feldman bf8c30a88b
feat(ui): extract recorder sidebar into a window (#5223) 2021-01-31 16:37:13 -08:00
Pavel Feldman 82bb92f103 Revert "docs: add java traits to some methods (#5222)"
Breaks playwright.dev
2021-01-30 22:15:56 -08:00
Yury Semikhatsky 9c4668685d
docs: add java traits to some methods (#5222) 2021-01-29 19:15:25 -08:00
Yury Semikhatsky a1d875ed97
docs: make inline refs us parameter name instead of its alias (#5219) 2021-01-29 16:02:17 -08:00
Pavel Feldman 975519150e
chore: centralize playwright creation, bind context listeners to instance (#5217) 2021-01-29 16:00:56 -08:00
Anže Vodovnik dbcdf9dcd7
chore(docs): aliases for dotnet/chsarp docs. (#5162)
Co-authored-by: Yury Semikhatsky <yurys@chromium.org>
2021-01-29 11:08:22 -08:00
Yury Semikhatsky 21041bc331
docs: support argument overrides (#5200) 2021-01-28 17:51:41 -08:00
Pavel Feldman 79e00e4911
feat(ui): more recorder uis (#5208) 2021-01-28 14:25:10 -08:00
Pavel Feldman 8d8fa4c322
chore: move trace viewer to the src/web (#5199) 2021-01-28 09:33:20 -08:00
Anže Vodovnik f2ef7f51b8
Link patching now picks up multiple in single line (#5163) 2021-01-27 16:21:27 -08:00
Andrey Lushnikov 5358fed49a chore: fix typo 2021-01-27 20:56:46 +03:00
Andrey Lushnikov a4f59dd57c
devops: upload host arch as part of test report (#5167) 2021-01-27 09:05:31 -08:00
Andrey Lushnikov 9de0a5a963
chore: add Python to docker images (#5139)
This adds +100MB to network transfer size but enables our
users to use playwright-python from-inside docker container.
2021-01-27 08:51:51 -08:00
Pavel Feldman 01d6f83597
chore: introduce debug toolbar (#5145) 2021-01-25 14:49:26 -08:00
Pavel Feldman 464fdc1800
chore: make recorder a supplement (#5131) 2021-01-24 19:21:19 -08:00
Pavel Feldman be9bef513e
chore: move recorder to server side (#5128) 2021-01-24 08:44:11 -08:00
Andrey Lushnikov 8ad7318119
devops: fix publish script to return code zero when tip-of-tree moved (#5123) 2021-01-23 04:09:37 +03:00
Yury Semikhatsky 71d82a5a57
fix(lint): fix type test to work nicely with close param (#5114) 2021-01-22 14:41:24 -08:00
Pavel Feldman 8f06761ba1
docs: link to the new docs from source (#5092) 2021-01-21 14:35:20 -08:00
Dmitry Gozman 0d0a6e8f82
devops: update publish script to work for @next (#5072) 2021-01-20 13:38:03 -08:00
Dmitry Gozman a7949173e0
devops: always check git status before publishing to npm (#5070) 2021-01-20 13:08:51 -08:00
Dmitry Gozman 17e953c2d8
chore: make generate_types not depend on the source (#5040)
The only dependency is a list of devices that we
can turn into a js file.
2021-01-17 12:09:20 -08:00
Pavel Feldman 41e394bc22
docs: allow overriding return types (#5031) 2021-01-15 16:01:41 -08:00
Pavel Feldman 6e94c11034
docs: prepare docs for tabbed snippets (#5026) 2021-01-15 12:30:10 -08:00
Andrey Lushnikov 3ed9f2d63e
chore: disable v1 flakiness dashboard (#5015)
Computing V1 flakiness dashboard was very expensive (>1 minute for AZ
function to run).

Disable it now in favor of V2 flakiness dashboard that proves to be very
reliable.
2021-01-14 21:43:42 +03:00
Pavel Feldman 8354a91d0e
docs: add python snippets for api classes (#5011) 2021-01-14 07:48:56 -08:00
Pavel Feldman 5408e26e02
docs: add python snippets for class Page (#5010) 2021-01-13 21:03:35 -08:00
Dmitry Gozman e3ebba5573
chore: cleanup code that is not used by cli anymore (#5005) 2021-01-13 17:02:53 -08:00
Andrey Lushnikov fcbfbe6fa1
devops: fix azure function bugs (#4998)
This patch:
- starts processing dashboards serially to avoid hitting node.js azure
  function heap limit
- fixes typo in the new `dashboards_raw` processor
2021-01-13 14:15:38 +03:00
Andrey Lushnikov 8316dee44d
devops(flakiness): persist all test reports, aggregated per commit sha (#4991)
We can either load it raw as-is and process later on the front-end side,
or post-process while experimenting with different storage solutions.
2021-01-13 04:31:48 +03:00
Pavel Feldman cac119f3bf
docs: python api review (#4986) 2021-01-12 12:14:27 -08:00
Pavel Feldman 7a8214cd95
chore: prepare non-api docs for non-js variants (#4969) 2021-01-11 09:34:49 -08:00
Pavel Feldman 4dbbb47583
docs: document Python's expect_event methods (#4963) 2021-01-10 21:00:52 -08:00
Pavel Feldman e67d89747a
chore: update docs to cover python specifics (#4960) 2021-01-10 18:18:35 -08:00
Pavel Feldman 3b617b3709
docs: validate member links (#4955) 2021-01-08 16:36:52 -08:00
Joel Einbinder 31d980fc92
chore(webpack): minify injected sources (#4946) 2021-01-08 16:15:05 -08:00
Pavel Feldman 114d586f07
chore: add python aliases (#4949) 2021-01-08 15:00:14 -08:00
Pavel Feldman 15c0a29526
docs: split nodejs and python links (#4942) 2021-01-07 23:37:53 -08:00
Dmitry Gozman 2e05feac25
feat(cli): bring in trace viewer (#4920) 2021-01-07 16:15:34 -08:00
Pavel Feldman 54c06a1b45
chore: mark methods as js-only, add python-specific methods (#4938) 2021-01-07 16:12:25 -08:00
Pavel Feldman e56832b646
chore: language-specific members api (#4936) 2021-01-07 15:00:04 -08:00
Dmitry Gozman ffa169ba92
chore: use chokidar for build (#4932) 2021-01-07 13:26:34 -08:00
Pavel Feldman bdf12e32e4
docs: split api-body into classes (#4931) 2021-01-07 11:46:05 -08:00
Pavel Feldman 4cd989c653
docs: introduce deprecation annotation and any type (#4930) 2021-01-07 11:11:40 -08:00
Pavel Feldman 913f85249f
docs: make all links relative (#4926) 2021-01-06 20:02:51 -08:00
Dmitry Gozman 4ff7e1a419
chore: cleanup our build system (#4903)
- Consolidate our build and watch to a single build.js file.
- Update contributing docs.
- Remove unused scripts and package.json script entries.
2021-01-06 12:41:17 -08:00
Pavel Feldman 2311c282d6
docs: pref docs to be language-specific (#4916) 2021-01-06 11:59:29 -08:00
Dmitry Gozman f672033e11
chore: bundle small build of highlight.js (#4907)
This follows the "build from source" configuration (https://highlightjs.org/usage/#source)
and reduces the footprint from 2mb to 100kb.
2021-01-06 09:31:42 -08:00
Andrey Lushnikov 6b3dcb01aa
chore: fix randomly crashing build-playwright-driver.sh (#4909)
Some googling showed that CI systems might not be capable of
handling too much STDOUT that `tar -v` produces.
([source](https://stackoverflow.com/questions/37540792/jenkins-script-tar-write-error)).

This patch:
- removes verbose flag from tar to reduce output
- sets `+x` to get some logging for the script
- silences zip output
2021-01-06 14:13:01 +03:00
Pavel Feldman b6cd385a67
docs: mark some paths as such (#4896) 2021-01-05 17:05:43 -08:00
Dmitry Gozman a9c776f56e
chore: watch to regenerate api.json (#4901) 2021-01-05 15:25:25 -08:00
Dmitry Gozman d47fb6a780
feat(cli): build driver and upload to cdn (#4841) 2021-01-05 14:04:47 -08:00
Pavel Feldman 4996eacd5b
docs: split numbers into integers and floats (#4887) 2021-01-05 09:42:49 -08:00
Joel Einbinder 4a89158293
fix(type-generator): make the generated by message consistent on windows (#4888) 2021-01-05 06:42:38 -08:00
Pavel Feldman 80f8a0fdf5
doc: further align docs w/ playwright.dev (3) (#4884) 2021-01-04 17:59:23 -08:00
Pavel Feldman 31ffeb32e3
doc: further align docs w/ playwright.dev (2) (#4871) 2021-01-04 13:50:29 -08:00
Dmitry Gozman 706c1e44d1
chore: use last commit timestamp for @next builds (#4876) 2021-01-04 11:12:42 -08:00
Pavel Feldman ae935a43d9
doc: further align docs w/ playwright.dev (#4866) 2021-01-03 08:47:29 -08:00
Pavel Feldman e0e836cb6e
doc: split classes into files (#4864) 2021-01-01 15:17:27 -08:00
Pavel Feldman ba291372e7
docs: generate all docs off docs-src (#4858) 2020-12-30 18:04:51 -08:00
Pavel Feldman a5bd415edc
doc: generate class toc as a part of the api generation (#4852) 2020-12-29 17:35:01 -08:00
Pavel Feldman 9817d1095a
doc: generator code health (3) (#4850) 2020-12-29 12:12:46 -08:00
Pavel Feldman 722db85e1c
doc: generator code health (2) (#4843) 2020-12-28 23:42:51 -08:00
Pavel Feldman 70c14e6b99
doc: generator code health (#4840) 2020-12-28 17:38:00 -08:00
Dmitry Gozman a1232b6980
chore: simplify and remove some scripts (#4838) 2020-12-28 16:19:28 -08:00
Dmitry Gozman 068d8612a7
feat(cli): make run-driver work (#4836) 2020-12-28 15:44:24 -08:00
Dmitry Gozman 293a7bdd4c
feat(cli): bring in codegen and tests (#4815) 2020-12-28 14:50:12 -08:00
Dmitry Gozman 94077e0e74
chore: remove JS types checker, rely on typescript (#4831)
chore: remove JS types checker, rely on typescript

We keep checking that all methods are documented, and no extra methods
are documented, but rely on typescript for everything else.
2020-12-28 10:54:47 -08:00
Pavel Feldman a446792c18
docs: generate api.md off documentation model (#4832) 2020-12-28 07:03:09 -08:00
Pavel Feldman fee7dd7cc1
chore: nit type validator fix (#4830) 2020-12-27 08:42:22 -08:00
Dmitry Gozman 905f28c339
feat(types): simplify android and electron types (#4829)
These now follow the scheme for regular types.
2020-12-26 20:25:18 -08:00
Dmitry Gozman 34c1b338be
feat(types): make our client classes implement public types (#4817)
This patch:
- introduces non-exported but used in api/impl struct types (e.g. Point);
- makes all client classes implement respective public api interface.

Pros:
- Typescript is now responsible for type checking.
  We can remove our doclint checker (not removed yet).
- Electron and Android types can be defined in the same way
  (this is not implemented yet).
- We can move most of the type structs like Point to the public api
  and make some of them available.

Cons:
- Any cons?
2020-12-26 17:05:57 -08:00
Pavel Feldman dc25173ae3
chore(docs): fix crlf (#4828) 2020-12-26 17:05:44 -08:00
Pavel Feldman 2cb5770183
docs: move playwright module into api-body.md (#4827) 2020-12-26 15:33:29 -08:00
Pavel Feldman 15cdfd1cc1
chore: generate types, api.json off md rather than html (#4825) 2020-12-26 14:31:41 -08:00
Dmitry Gozman 9dd982c508
chore: commit generated types to the repository (#4826)
Also check them during `npm run lint` and regenerate during `npm run watch`.
2020-12-26 13:52:05 -08:00
Pavel Feldman 277d255fc3
chore: brush up md processing (#4819) 2020-12-23 19:35:43 -08:00
Dmitry Gozman 225e65e076
feat(cli): share console api between cli and debug mode (#4807) 2020-12-23 14:15:16 -08:00
Dmitry Gozman f709e2300c
feat(cli): bring selector generator into playwright (#4795)
Also remove unused `SelectorEngine.create` function and add tests.
2020-12-23 12:44:47 -08:00
Dmitry Gozman d40afa2fbf
feat(cli): first few cli commands (#4773)
This sets up cli capabilities and brings in a few commands from playwright-cli.
2020-12-22 14:54:13 -08:00
Dmitry Gozman cc32217e84
chore: fix check-deps (#4801) 2020-12-22 11:01:25 -08:00
Yury Semikhatsky a7f4c69a60
docs: fix browser version generation script (#4797) 2020-12-21 18:09:55 -08:00
Pavel Feldman 2e220df7ac
docs: explicitly annotate methods and parameters (#4771) 2020-12-18 15:31:34 -08:00
Pavel Feldman 774eb53980
fix(adb): force page scale factor update on connection (#4755) 2020-12-17 18:28:49 -08:00
Pavel Feldman e02c54485c
chore(adb): make driver smaller (#4713) 2020-12-14 18:39:14 -08:00
Pavel Feldman 4799e8f20b
feat(adb): add screenshot (#4701) 2020-12-13 23:20:13 -08:00
Pavel Feldman 1596b53da2
test(adb): fix browser tests (#4700) 2020-12-13 22:33:00 -08:00
Max Schmitt b8112dedca
devops: fix Android tests on GHA (#4698) 2020-12-13 14:38:51 -08:00
Max Schmitt f4eff4dbe0
devops: add bot to test Android (#4693) 2020-12-13 14:13:50 -08:00
Pavel Feldman 2ba60e92e3
test(adb): add some adb tests (#4679) 2020-12-11 23:36:08 -08:00
Pavel Feldman aa1b546bd0
chore(android): respect timeout, add build script (#4690) 2020-12-11 23:35:25 -08:00
Pavel Feldman 616df7d2f4
fix(adb): minor fixes (#4678) 2020-12-10 16:37:18 -08:00
Andrey Lushnikov 84ff20f193
test: fix test server on Node 15 (#4668)
This patch fixes a bug in our test server that manifests itself in
Node 15.

Context: Node 14 does not support Apple Silicon (and probably will not),
so we currently have to run tests on Node 15 on new macs.
2020-12-10 09:47:06 -08:00
Pavel Feldman aacd8e633c
chore: expose adb devices and actions (#4647) 2020-12-09 15:06:57 -08:00
Pavel Feldman 1717cbd3d5
doc: describe return value as a part of method (#4608) 2020-12-05 15:29:16 -08:00
Pavel Feldman 96a1f79e96
docs: reformat api-body to allow multiline params documentation (#4604) 2020-12-04 18:05:35 -08:00
Pavel Feldman bf7dff80da chore: remove the --only-update-browsers option 2020-12-04 12:22:34 -08:00
Pavel Feldman 20c17d5470 chore: fix the doclint tests 2020-12-04 12:10:44 -08:00
Pavel Feldman 150d778ca7
docs: disambiguate events (#4597) 2020-12-04 11:09:20 -08:00
Pavel Feldman 761b78efc0
docs: generate links based on the method names (#4593) 2020-12-04 09:03:33 -08:00
Pavel Feldman 2452d07ff7
docs: generate method signatures in docs (#4590) 2020-12-03 22:28:11 -08:00
Pavel Feldman 0eb6f85617
docs: pretty-print api.md (#4588) 2020-12-03 18:05:36 -08:00
Pavel Feldman 5d47a9744c
docs: reformat template parameters (#4587) 2020-12-03 16:02:34 -08:00
Joel Einbinder bc701629db
fix(doclint): exit 1 when doclint throws an error (#4572) 2020-12-03 09:21:56 -08:00
Max Schmitt d2b7e0d1df
fix(types): add typed cb for Page.waitForResponse (#4575) 2020-12-03 09:20:53 -08:00
Pavel Feldman 95c502d274
docs: use templates to reuse documentation properties (#4578) 2020-12-03 09:11:48 -08:00
Pavel Feldman 1fa7e86ea9
docs: generate api.md (#4576) 2020-12-02 13:50:10 -08:00
Joel Einbinder d116787a4d
fix(lint): update check_deps for src/remote (#4547)
check_deps was throwing an error, but nobody was catching it and it still returned an exit code 0. I fixed that, and also fixed the error by adding deps for src/remote.
2020-11-30 14:57:17 -08:00
Andrey Lushnikov d104591aa1
devops(flakiness): azure function to store dashboard in a new format (#4540)
This refactors azure function and adds a new dashboard format implementation that is 15x smaller while tracking specs with non-empty annotations.

Old dashboard is still updated.
2020-11-30 10:16:03 -08:00
Andrey Lushnikov f916c98081
chore: update WebKit version to 14.1 (#4515)
Safari Technology Preview now reports WebKit 14.1
2020-11-23 16:21:42 -08:00
Andrey Lushnikov 06e0aa40eb
devops: add source code for flakiness dashboard (#4479)
This adds source code for the azure function that processes flakiness reports
2020-11-23 15:02:04 -08:00
Dmitry Gozman 38fadcaded
fix(chromium): use frameDetached reason (#4468)
This fixes the local -> remote frame swap when
Page.frameDetached arrives before Target.attachedToTarget.

Instead of error-prone logic we do currently, new CDP exposes
frame detach reason that we can use.
2020-11-17 10:24:13 -08:00
Andrey Lushnikov 2bfee8dc0a
chore: fix publishing @next from release branch (#4418) 2020-11-12 12:18:20 -08:00
Pavel Feldman 2158d6d073
feat(scopes): make page a scope (#4385) 2020-11-10 14:47:26 -08:00
Pavel Feldman 28f6547d67
chore: add adb-based connectivity (#4375) 2020-11-06 16:31:11 -08:00
Dmitry Gozman 12afb79e73
test: unflake har tests (#4335)
Our test server throws Parse Error when connection
aborts at unfortunate time.
2020-11-04 10:24:01 -08:00
Yury Semikhatsky 46e124a933
fix(api.json): use separate maps for methods and events (#4310) 2020-11-02 18:31:32 -08:00
Andrey Lushnikov 51f8f23c5d
devops(flakiness): collect more commit information (#4315)
Collect commit title and author details.
2020-11-02 18:28:03 -08:00
Pavel Feldman 333916a83d
infra: bump to next version on trunk at a branch point (#4288) 2020-10-29 17:46:07 -07:00
Andrey Lushnikov e62f27ac47
chore: eliminate dead code (#4253)
Remove a stray code from original experimentation with flakiness
dashboard.
2020-10-27 00:00:28 -07:00
Pavel Feldman be8428475d
feat(websocket): implement Web Sockets for Chromium & WebKit (#4234) 2020-10-26 22:20:43 -07:00
Andrey Lushnikov 86e1e3f3fe
devops: collect host os name and version (#4244)
Our test annotations don't provide (and don't require) a fine-grained
information regarding ubuntu version, so we collect it separately.
2020-10-26 16:44:32 -07:00
Pavel Feldman 7fc4b797eb
feat(har): allow saving har for context (#4214) 2020-10-26 14:32:07 -07:00
Andrey Lushnikov d5fbe3a662
devops: start uploading test reports to flakiness dashboard (#4239) 2020-10-26 13:46:26 -07:00
Pavel Feldman c2adc98cb0
chore: roll folio to 0.3.8 (#4113) 2020-10-12 13:48:56 -07:00
Dmitry Gozman 46b14bc740
chore: roll folio to 0.3.6 (#4110) 2020-10-12 09:16:02 -07:00
Pavel Feldman 0db09f8ed4
test: roll test runner to 0.9.20 (#4062) 2020-10-05 17:03:24 -07:00
Yury Semikhatsky fbe0fb2977
fix(api.json): do not copy documentation from base class members (#4048) 2020-10-02 19:19:19 -07:00
Dmitry Gozman 5e42029fce
api: allow exposeBinding to pass handles (#4030)
This adds an option `{ handle: true }` to pass a single handle instead of arbitrary json values.
2020-10-01 22:47:31 -07:00
Dmitry Gozman 4a77363af7
api: update videos api, hide tracing (#4015) 2020-10-01 11:06:19 -07:00
Pavel Feldman d658b687ca
chore: refactor screencast tests (#4007) 2020-09-29 18:52:30 -07:00
Pavel Feldman 7ccdc5176d
chore: include api.json into the Playwright package (#4003) 2020-09-29 13:48:24 -07:00
Pavel Feldman 6102052832
Revert "chore: don't hold sourcemap reference in prod build (#3959)" (#3979)
I like my tests showing TS source lines more!
2020-09-25 15:25:54 -07:00
Pavel Feldman 970b011cba
chore: roll @playwright/test to 0.9.6 (#3977) 2020-09-25 12:52:06 -07:00
Max Schmitt 6d5ab534d9
chore: don't hold sourcemap reference in prod build (#3959) 2020-09-23 22:19:45 -07:00
Dmitry Gozman 0ade6af689
api(trace): introduce artifacts options (#3914)
api(trace): introduce artifacts options

This introduces launch({ artifactsPath }) and newContext({ relativeArtifactsPath, recordTrace }) options.
- artifactsPath option controls the directory where all artifacts go. If not passed, artifacts are not collected.
- relativeArtifactsPath can be used to put context-specific artifacts into a subfolder. If not passed, shared artifactsPath is used.
- recordTrace controls trace recording.

We also expose trace types under playwright/types/trace.d.ts.

In the follow up:
- videos will be put into artifactsPath;
- downloads will be put into artifactsPath, or keep using existing downloadsPath when artifactsPath is not specified.
2020-09-18 11:54:00 -07:00
Pavel Feldman c20cbae529
chore: remove trace viewer (#3869) 2020-09-14 07:56:04 -07:00
Pavel Feldman f94df318d5
chore: roll test runner to 0.3.9 (#3847) 2020-09-11 10:02:07 -07:00
Pavel Feldman a597004780
chore: roll test runner to 0.3.5 (#3832) 2020-09-10 21:31:46 -07:00
Dmitry Gozman 9e41518c92
feat(rpc): allow sending metadata with rpc calls (#3836)
Currently, metadata does only contain the stack trace,
and we send it from the JS client.
2020-09-10 19:25:44 -07:00
Andrey Lushnikov 45542a5334
docs: fix table-of-contents generation (#3840) 2020-09-10 15:14:00 -07:00
Andrey Lushnikov 868740067b
refactor: consolidate ffmpeg-related files in third_party/ffmpeg (#3815)
This patch:
- moves ffmpeg binaries from `//bin/` to `//third_party/ffmpeg`
- adds [COPYING.GPLv3](https://github.com/FFmpeg/FFmpeg/blob/master/COPYING.GPLv3)
ffmpeg license
- changes npm packaging to include `//third_party/ffmpeg` only in `playwright` and `playwrihgt-chromium` a
2020-09-09 09:51:28 -07:00
Andrey Lushnikov 143adc1634
refactor: bake ffmpeg into npm instead of CDN (#3799) 2020-09-08 15:10:36 -07:00
Joel Einbinder 658b34e3fe
fix(lint): fix doclint and preprocessor tests (#3793) 2020-09-08 10:19:26 -07:00
Dmitry Gozman 675ce00432
chore: introduce "instrumentation" that is used for debug and trace (#3775) 2020-09-04 16:31:52 -07:00
Max Schmitt 190d16daa3
feat: add browser type to device descriptors (#3731) 2020-09-03 13:12:43 -07:00
Andrey Lushnikov 8b9be6bbbe
devops: fix publishing of @next packages to NPM (#3759)
This patch:
- stop relying on stdout from `//packages/build_package.js` to get
output paths. This was a legacy code that's not needed anymore
- remove stray output from `//packages/build_package.js`
2020-09-03 11:59:58 -07:00
Dmitry Gozman a4563a85ce
fix(snapshot): remove integrity checksum for css (#3729)
Otherwise we cannot override css with cssom changes.
2020-09-02 10:20:52 -07:00
Yury Semikhatsky 8ec55e1fb2
feat(screencast): use ffmpeg to produce webm in chromium (#3668) 2020-08-31 08:43:14 -07:00
Joel Einbinder 3cc91093a1
chore(testrunner): move out of the repo (#3687) 2020-08-29 08:27:32 -07:00
Joel Einbinder 6a93cb9749
fix(types): don't show types that we don't export (#3185)
Today we have a bunch of types used by the d.ts file that are not exported. We don't want to export them because it would greatly increase our semver API surface area, so this patch inlines them. Now users will not see names of types they can't import.
2020-08-28 17:53:03 -07:00
Dmitry Gozman e5ff283a40
fix(trace): only enable on separate tracing bots (#3677) 2020-08-28 13:50:06 -07:00
Dmitry Gozman b34d9aba25
feat(trace): experimental traces for our tests (#3567)
This introduces basic tracing enabled in our tests.

What is captured:
- network resources;
- snapshots at the start of most actions;
- snapshot after the test failure.

How this integrates with test runner:
- context fixture calls private method context._initSnapshotter() and uses Tracer to trace all events;
- all tests share a single test-results/trace-storage directory to store blobs;
- each test has its own trace file.
- npm run show-trace opens a bare-minimum trace viewer that renders snapshots.
2020-08-28 10:51:55 -07:00
Max Schmitt 254238cdce
enh: bake browser revisions and api into driver (#3514) 2020-08-26 16:01:42 -07:00
Yury Semikhatsky a2a96198e6
fix(devops): fix firefox protocol.ts location (#3630) 2020-08-25 16:23:43 -07:00
Dmitry Gozman bdbcae16cb
chore: remove injected -> types dependency (#3606)
This way, injected is self-contained and we can ensure it does not
depend on anything node-specific.
2020-08-24 15:30:45 -07:00
Dmitry Gozman a099e941d6
chore: move last rpc files to their place (#3604)
Also update check-deps to be more user-friendly.
2020-08-24 14:48:03 -07:00
Dmitry Gozman cd220daa83
chore: move src files to server (#3593) 2020-08-24 06:51:51 -07:00
Dmitry Gozman 43893cc0f8
chore: improve check-deps (#3592) 2020-08-23 21:24:16 -07:00
Dmitry Gozman 73e53b21df
chore: move injected and debug to src/server (#3591) 2020-08-23 20:25:59 -07:00
Dmitry Gozman 847201b132
chore: move firefox to src/server/firefox (#3590) 2020-08-23 17:05:58 -07:00
Dmitry Gozman 6a53b205e5
chore: move webkit to src/server/webkit (#3589) 2020-08-23 15:39:03 -07:00
Dmitry Gozman 2e1493a5fa
chore: move browserPaths to utils, enforce more deps (#3584) 2020-08-22 21:15:03 -07:00
Dmitry Gozman f4e8f34c96
chore: move chromium to src/server/chromium, enfore installer deps (#3582) 2020-08-22 15:46:42 -07:00
Dmitry Gozman 9fca63f8ec
chore: move src/rpc/client to src/client (#3581) 2020-08-22 15:13:51 -07:00
Dmitry Gozman 655013d025
chore: move shared utilities to src/utils (#3575) 2020-08-22 07:07:13 -07:00
Dmitry Gozman 6fe1cd9812
chore: move protocol files to src/protocol (#3571) 2020-08-21 18:46:11 -07:00
Joel Einbinder 8ae3c4be06
feat(testrunner): delete types.d.ts (#3551) 2020-08-21 09:53:02 -07:00
Joel Einbinder 012f9425bf
chore(test-runner): move into its own folder and typescript project (#3548) 2020-08-20 16:04:27 -07:00
Joel Einbinder 0d03cc0f9a
feat(utils): add a script for watching various builds (#3545)
Watches our main typescript compilation, webpacks, type generation, and rpc channel generation.
2020-08-20 09:27:04 -07:00
Pavel Feldman 86815d70e0
test: convert rename options to parameters, remove options magic (#3543) 2020-08-19 21:32:12 -07:00
Dmitry Gozman 5aa4116204
docs: sort all enums in doclint (#3488)
Currently, the order depends on some internals of typescript compiler
and changes from time to time. Sorting makes it stable.
2020-08-17 10:47:21 -07:00
Joel Einbinder c0b9cecc65
feat(types): export ConnectOptions (#3147) 2020-08-16 16:40:25 -07:00
Joel Einbinder d516f81eeb
fix(rpc): add a custom toJSON to help jest's expect library (#3489) 2020-08-16 14:41:33 -07:00
Dmitry Gozman 85c93e91a7
api: introduce ElementHandle.waitForSelector (#3452)
This is similar to Frame.waitForSelector, but relative to the handle.
2020-08-14 14:47:24 -07:00
Pavel Feldman 6abc352498
test: remove output and golden directory notions (#3456) 2020-08-13 17:32:27 -07:00
Dmitry Gozman 9b52ca8676
chore: remove unused non-rpc code, test options, infra, bots (#3444) 2020-08-13 16:00:23 -07:00
Joel Einbinder 84441f8f77
chore(test): run doclint tests with mocha, delete testrunner again (#3447) 2020-08-13 13:57:27 -07:00
Andrey Lushnikov 4f05039944
devops: do not fail check when refusing to publish TOT revision (#3443) 2020-08-13 10:39:45 -07:00
Pavel Feldman 51bd3709ff
Revert "chore(test): run doclint tests with mocha, delete utils/testrunner (#3428)" (#3432) 2020-08-12 22:01:37 -07:00
Joel Einbinder 061ff25741
chore(test): run doclint tests with mocha, delete utils/testrunner (#3428) 2020-08-12 20:02:48 -07:00
Andrey Lushnikov 40f685226b
devops: migrate //utils/check_availability.js off browser fetcher (#3418)
The script is used to check the state of chromium CDN, whereas
our browser fetcher now defaults to Playwright CDN.
2020-08-12 15:01:07 -07:00
Joel Einbinder 6054f14794
chore(tests): convert all tests to typescript (#3384) 2020-08-11 15:50:53 -07:00
Joel Einbinder 55a78482e4
fix(types): fix type generation to make ts tests work (#3385) 2020-08-11 14:31:20 -07:00
Pavel Feldman 823ef86470
test: add support for mocha (#3376) 2020-08-10 20:10:39 -07:00
Joel Einbinder d76166beca
chore(test): require playwright fixtures from userland (#3355)
This patch moves fixtures.js to base.fixtures.ts that sits next to tests. All tests get an extra import to get the base fixtures (both types and implementations).
2020-08-10 16:48:34 -07:00
Dmitry Gozman 3179e71912
feat(rpc): in-process rpc on by default (#3104) 2020-08-10 14:18:58 -07:00
Dmitry Gozman ef76f5b922
feat(rpc): introduce JSON type in the protocol for arbitrary blobs (#3367) 2020-08-10 11:20:32 -07:00
Pavel Feldman 6f09590c9a
test: restore nojest runner (#3359) 2020-08-08 19:43:00 -07:00
Dmitry Gozman c6acc32889
docs(api): explicit nulls, use Serializable and EvaluationArgument more (#3358) 2020-08-07 20:55:22 -07:00
Joel Einbinder c9409bf1b3
fix(types): add missing properties to DeviceDescriptor (#3332) 2020-08-06 15:45:13 -07:00
Dmitry Gozman 126b1f79d4
feat(rpc): run doclint against rpc client (#3260) 2020-07-31 17:00:36 -07:00
Pavel Feldman 93056ed8ef
chore(rpc): more protocol nits (#3246) 2020-07-30 17:51:41 -07:00
Dmitry Gozman 6297f86cfa
feat(rpc): run generate-channels during lint (#3238) 2020-07-30 15:08:21 -07:00
Dmitry Gozman 3bd97776b8
feat(rpc): do not use server types and events in rpc/client (#3219)
This change removes almost all dependencies from rpc/client
to the rest of the project. The last ones would be utilities
like helper, converters, etc.
2020-07-29 17:26:59 -07:00
Andrey Lushnikov 487bc589b0
devops: re-factor list-dependencies script to output per-browser results (#3194)
This patch:
- refactors script to output per-browser package dependencies. This is to aid with
  per-browser docker setup and Playwright github action.
- sorts package maps for both Ubuntu 18.04 and Ubuntu 20.04 alphabetically (and removes a stray dependency)

References #2926
2020-07-29 13:38:54 -07:00
Max Schmitt 21b1be7351
docs(selectors): fixed selector register example (#3169) 2020-07-29 10:37:57 -07:00
Dmitry Gozman bdfde5cd5c
fix(firefox): roll firefox for postdata fix (#3196) 2020-07-28 18:47:25 -07:00
Dmitry Gozman 6cb1e03713
feat(rpc): disallow deps into rpc client from outside (#3199)
For this, common converters are extracted from rpc serializers.
2020-07-28 15:33:38 -07:00
Dmitry Gozman e406119f0c
chore: add check_deps script (#3182)
This will be used to disallow cross-directory imports,
for example from impl to rpc.
2020-07-27 13:02:28 -07:00
Dmitry Gozman 98cc9db8e8
chore: simplify doclint (#3162)
This renames CRBrowserContext events into ChromiumBrowserContext and
simplifies some doclint/coverage logic.
2020-07-24 20:40:21 -07:00
Dmitry Gozman fd2e65b73c
api: export all browsers from every package (#3128)
This makes it easier to reason about our packages.
The only difference is what each package downloads.
When the browser is not downloaded, it will fail to launch.

Each browser gets a 'download' attribute in the browser.json file.
2020-07-24 16:36:00 -07:00
Andrey Lushnikov c8c92c509d
fix(utils): fix check-availability script (#3158) 2020-07-24 16:22:52 -07:00
Dmitry Gozman 415e94f410
feat(rpc): server-side validator (#3150) 2020-07-24 15:16:33 -07:00
Pavel Feldman e7cca86757
fix(postData): allow overriding binary post data (#3120) 2020-07-24 12:16:45 -07:00
Dmitry Gozman 68c4f79b02
feat(rpc): convert protocol to yaml (#3102) 2020-07-22 19:38:19 -07:00
Dmitry Gozman b1a5a02154
feat(rpc): client-side parameters validation (#3069) 2020-07-22 18:05:07 -07:00
Dmitry Gozman 4db035dff4
chore: roll_browser to also update docs (#3088) 2020-07-22 11:03:35 -07:00
Andrey Lushnikov 47e30f047b
feat: introduce chromiumSandbox launch option (#3067)
The option is intended to be used instead of the `--no-sandbox`
argument that is accepted exclusively by Chromium and crashes
WebKit.

References #2745
2020-07-21 13:49:09 -07:00
Dmitry Gozman 3dead4c8d1
feat(rpc): remove last union types from the protocol (#3059) 2020-07-21 12:44:30 -07:00
Dmitry Gozman 5848ed8f41
feat(rpc): introduce protocol.pdl (#3054)
We now generate channels.ts from the protocol definition. There are still some shortcomings,
like union types - these will be addressed in follow ups.
2020-07-20 17:38:06 -07:00
Andrey Lushnikov 377404448c
devops: add script to generate shared object => package mapping (#3022)
We use this mapping to provide recommendations on which packages
to install on Linux distributions.

References #2745
2020-07-20 10:35:42 -07:00
Andrey Lushnikov 0346c3a1dc
chore: update release notes draft gen (#2932) 2020-07-13 14:48:29 -07:00
Joel Einbinder 040c6a6a41
chore(jest): run tests with jest (#2754)
Experimentally run `npx jest` to run our tests with jest.
2020-07-08 11:13:18 -07:00
Andrey Lushnikov 760283ea4e
testrunner: fix default environment name (#2870) 2020-07-07 22:14:04 -07:00
Dmitry Gozman 0c80c22716
feat(rpc): plumb CDPSession (#2862) 2020-07-07 18:47:00 -07:00
Joel Einbinder 6ed8b5fcc6
chore(eslint): lint for copyrights on files (#2858) 2020-07-07 11:12:45 -07:00
Andrey Lushnikov 15ddb5d32b
chore: update webkit version (#2804)
Safari Technology Preview reports WebKit 14.0. Align with them!
2020-07-06 15:13:53 -07:00