Commit Graph

59 Commits

Author SHA1 Message Date
Andrey Lushnikov
21dc346b16
devops: auto-correct links in our documentation (#1955) 2020-04-23 19:52:06 -07:00
Joel Einbinder
671cfa0a54
fix(types): support objects with typed keys and values (#1752)
There are a few places in the API where we use objects as maps. This patch adds them to docs and the types.

For `env`, we accept booleans and numbers as well because they are often used for their string values.
2020-04-23 14:45:57 -07:00
Andrey Lushnikov
89007c8f3d
devops: make README.md to always reflect tip-of-tree (#1911)
As of today, we have tooling in place that makes sure that our
main README.md **roughly** represents the state of the last release:
- browser versions and browser badges are those that we released last
- links to our API point to the last-released API version

This tooling, however, relies on the fact that every release is a sequence
of two consecutive commits:
- one commit that sets `package.json` version to a released version
- the following that "bumps" version to `-post`.

This release process is very unfortunate, because:
- it made releasing from branch impossible
- it required "freezing" commits to the master branch

This patch removes all the tooling and transitions `README.md` to always
represent tip-of-tree state. We will fully rely on
`https://playwright.dev` to show versioned docs.
2020-04-21 22:08:56 -07:00
Andrey Lushnikov
9efc66366c
chore: generate README.md for playwright package on prepublish (#1801)
This will ensure that `playwright` package always has a readme.

Fix #1798
2020-04-15 11:29:59 -07:00
Dmitry Gozman
29a6cdff6b
fix(tests): fix a race with golden setup (#1757)
When running multiple browsers, we should take the golden information from the state.
2020-04-13 14:12:44 -07:00
Dmitry Gozman
cd39053ccc
feat(testrunner): make it easier to setup golden matcher (#1682) 2020-04-06 18:01:56 -07:00
Dmitry Gozman
f2b13c0e93
chore(testrunner): split TestRunner into parts (#1679) 2020-04-06 17:21:42 -07:00
Dmitry Gozman
ea16e55ba3
fix(lint): import errors (#1649) 2020-04-02 20:30:52 -07:00
Joel Einbinder
3d6d9db44a
fix: wait for the process to close when closing the browser (#1629) 2020-04-02 16:57:12 -07:00
Pavel Feldman
e241c1bef8
chore: remove web mode (#1625) 2020-04-01 14:42:47 -07:00
Arjun Attam
1f0b7bff04
docs(api): update ordering for $eval and $$eval (#1623) 2020-04-01 13:09:24 -07:00
Dmitry Gozman
af7a16c360
chore(testrunner): merge test spec with test, suite spec with suite (#1566) 2020-03-26 22:47:13 -07:00
Joel Einbinder
5bf9f223db
fix(docs): consider argument to be optional in evaluate (#1500) 2020-03-23 17:22:10 -07:00
Joel Einbinder
1a25a4efcf
fix(doclint): support lists in comments (#1492)
Adds logging comments to the doclint tests, and adds a new one with a bulleted list in a comment. Lists can only be used in comments where extra properties would be unexpected.
2020-03-23 14:50:32 -07:00
Dmitry Gozman
16c7a5bd5c
api(eval): accept zero or one arguments in all evaluation functions (#1431) 2020-03-20 15:08:17 -07:00
Joel Einbinder
825555cddf
types: better types (#1166)
This generates typescript definitions based on the api.md, instead of autogenerating them from the typescript source code.

Now types
 - only include the public api
 - work with older versions of typescript
 - include descriptions
 - are more consistent
 - are more complete

#6
2020-03-20 01:30:35 -07:00
Joel Einbinder
b0749e3a6d
fix(docs): fixup and lint optionals and return values in api.md (#1376)
Currently in our API `?` means null, but sometimes it means optional. Linting optional/nulls with this patch is required for #1166 to land nicely.

Previously, return types were not being linted in `api.md`. This is fixed, along with many broken return types.

This patch considers `?` to mean nullable, and has some heuristics to determine optionality. I believe this to be the minimal patch needed to unblock #1166. After it lands, we can consider changing the api docs to hopefully remove some heuristics and strangeness.
2020-03-18 16:23:25 -07:00
Joel Einbinder
741e2d19d6
fix(docs): lint and fix all internal links in api.md
We have had a lot of churn in the api, which has caused a lot of our links to break.
2020-03-18 15:34:53 -07:00
Pavel Feldman
e692dd6e62
api(cdp): rename ChromiumSession to CDPSession (#1380) 2020-03-13 16:16:54 -07:00
Joel Einbinder
be83cba409
fix(doclint): correctly get versions on windows (#1350)
--version doesn't work on windows.
2020-03-12 14:03:01 -07:00
Andrey Lushnikov
c881248062
docs(contributing.md): update CONTRIBUTING.md (#1286)
Fixes #1257
2020-03-07 17:29:22 -08:00
Pavel Feldman
3c35d7b058
api(waitFor): click(waitFor) -> click(force) (#1275) 2020-03-06 16:24:21 -08:00
Joel Einbinder
8aa88d5021
fix(doc): check and update optional types in the api (#1206)
This adds a new check to doclint for whether a member is correctly marked as optional. 
part of #6
2020-03-03 17:29:12 -08:00
Joel Einbinder
b50e8b377f
chore: fix doclint tests (#1098)
This fixes the doclint tests so that `npm test` works. It also adds all the browsers to npm test.

Fixes #8
2020-02-24 18:24:02 -08:00
Andrey Lushnikov
d29625c281
chore: generate browser versions when doing release (#999)
This introduces a handful of new markdown preprocessor commands to
insert browser versions:
- `GEN:chromium-version-if-release` - inserts current Chromium version
  if we're doing release; noop otherwise.
- `GEN:firefox-version-if-release` - inserts current Firefox version
  if we're doing release; noop otherwise.

And to generate badge links:
- `GEN:chromium-version-badge-if-release` - inserts current Chromium version
  badge if we're doing release; noop otherwise.
- `GEN:firefox-version-badge-if-release` - inserts current Firefox version
  badge if we're doing release; noop otherwise.

This doesn't touch webkit at all - we're yet to figure what to do with
webkit version.

NOTE: versions will be updated only once we release. This way our
README.md always represents last released version.
2020-02-13 18:26:38 -08:00
Joel Einbinder
ffc1022717
fix(doclint): fix doclint for new typescript (#879)
Some types now have `innerTypeNames.length === 0`. Fun!
2020-02-06 16:26:36 -08:00
Pavel Feldman
a2ab645e63
feat(launch): introduce client, server & persistent launch modes (2) (#840) 2020-02-05 12:41:55 -08:00
Andrey Lushnikov
0f1a42a5d3 docs(readme): fix API link to always point to last released API 2020-02-05 12:05:36 -08:00
Pavel Feldman
5a5016fa7d docs: inline superclass toc into classes for convenience (#663) 2020-01-27 10:05:04 -08:00
Joel Einbinder
ff877014cd
doc(troubleshooting): add note about lack of node 8 support (#623) 2020-01-24 09:04:54 -08:00
Joel Einbinder
3b2993ffe9 fix(docs): add back troubleshooting.md (#605)
This is mostly copied from Puppeteer's troubleshooting.md, with everything under a Chromium header and a few tweaks to make things make sense for Playwright.

We can add other browsers to this document once we figure out how to troubleshoot them.

Fixes #583
2020-01-23 15:54:09 -08:00
Andrey Lushnikov
eab8f92ac8 docs: create a single top-level TOC for api.md (#561)
This patch:
- creates a single top-level TOC for api.md
- adds a TOC for each class in the api.md
2020-01-22 12:21:45 -08:00
Joel Einbinder
4573cd3fec chore(packages): copy readme from root folder into packages/playwright (#552) 2020-01-21 17:24:47 -08:00
Dmitry Gozman
b388722777
chore: update top-level api (#479)
```
require('playwright').chromium.launch(...)
window.playwrightweb.chromium.connect(...)
```
2020-01-13 17:36:46 -08:00
Dmitry Gozman
c77fd5e6cb
feat(pw-web): generate playwright/web.js which can be used in the browser (#455) 2020-01-10 16:03:10 -08:00
Dmitry Gozman
57c3916b0c
docs: support interfaces in doclint (#420) 2020-01-08 14:04:33 -08:00
Dmitry Gozman
6318b1de75 chore: move server-side code to src/server (#411) 2020-01-07 15:27:45 -08:00
Pavel Feldman
e0693654b7 docs: do not yell at templated types in doc lint (#409) 2020-01-07 14:19:58 -08:00
Dmitry Gozman
9c966c8b19
feat(pw-web): introduce platform.ts to absract between node and browser platforms (#392) 2020-01-07 11:55:24 -08:00
Pavel Feldman
0ffc9fd4f5 docs: more iterations on the docs 2019-12-20 20:28:35 -08:00
Pavel Feldman
8f480a3987 docs: more docs update (#327) 2019-12-20 16:57:21 -08:00
Pavel
2673ea90d9 doc: more documentation fixes 2019-12-20 15:26:18 -08:00
Pavel Feldman
ad22a46fde
feat: move permissions back into the context (#320) 2019-12-20 13:07:14 -08:00
Pavel
ae86a0be17 docs: started working on the api.md 2019-12-19 18:03:52 -08:00
Pavel Feldman
d570fc7809
feat: further strip the browser api (#304) 2019-12-18 18:07:11 -08:00
Dmitry Gozman
f1f9dc166b
chore: remove unneeded files, reuse events between browsers, no implicit any (#191) 2019-12-10 11:15:14 -08:00
Joel Einbinder
57313e3f73
feat: basic d.ts file (#161)
`protocol.d.ts` had to move to `protocol.ts` otherwise typescript refuses to include it in the out directory.

Removed the old d.ts generator. It will need to be rewritten anyway.

These new types include private stuff that they probably shouldn't, and are missing documentation. I'll follow up with a better d.ts generator later.

#6
2019-12-06 11:28:23 -08:00
Dmitry Gozman
d4f0084f67
chore: move element coordinates handling to common (#139)
Browser now implement boundingBox(), contentQuads() and layoutViewport().
2019-12-05 09:54:50 -08:00
Dmitry Gozman
fc5898892b
feat(selectors): support optional "visible" property in all selectors (#129) 2019-12-04 13:11:10 -08:00
Dmitry Gozman
e124d44a55 chore: rework wait task to accept arbitrary task on dom world (#126) 2019-12-03 11:51:41 -07:00