Commit Graph

179 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
511883d3f0
devops: fix checking if branch is tip-of-tree when publishing @next (#1926)
This should fix publishing @next from release branches.
2020-04-22 17:02:38 -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
2d68830411
feat(testrunner): support --file to filter tests by test file name. (#1903) 2020-04-21 16:47:38 -07:00
Andrey Lushnikov
96331de1f1
devops: start actually publishing @next versions for tip-of-tree commits (#1893)
The https://github.com/microsoft/playwright/runs/603719537 was pretty
successful.
2020-04-20 23:52:03 -07:00
Andrey Lushnikov
068e1e00af devops: fix next version generation 2020-04-20 17:53:08 -07:00
Andrey Lushnikov
ac8a30c526
devops: start releasing from Github Actions (#1890)
This patch:
- removes releasing from Travis CI
- sets up a new GH Action that releases @next version from tip-of-tree

Once this GH Action proves to be working, we'll setup a `publish_release.yml`
workflow that will be triggered only by **release** github events
and that will publish released version with `LATEST` tag.

NOTE: this workflow does not actually run publishing - we're doing
`--dry-run` for now to see how it works in
`//utils/publish_all_packages.sh`.
2020-04-20 17:45:29 -07:00
Dmitry Gozman
948d51d52c
fix(types): export selected types (#1881)
Currently exports LaunchOptions, BrowserContextOptions, Cookie and their deps.
2020-04-20 17:30:57 -07:00
Pavel Feldman
0656771167
api(networkidle): remove networkidle2 (#1883) 2020-04-20 16:52:26 -07:00
Dmitry Gozman
cf82e2c945
fix(testrunner): await terminations before reporting test results (#1855)
This way we ensure that all errors are picked up.
2020-04-17 18:42:12 -07:00
Andrey Lushnikov
51b8685a8c
feat(testrunner): support --repeat CLI flag to repeat tests (#1828)
This allows you to run `npm run cunit -- --repeat 10` to run
tests multiple times.
2020-04-16 18:09:25 -07:00
Andrey Lushnikov
167d265e56
fix(testrunner): make .repeat() retain test order (#1814) 2020-04-15 18:41:55 -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
a3571c24c4
fix(testrunner): respect timeout=0 in hooks (#1764) 2020-04-13 14:30:51 -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
cd2ecb2212
fix(types): allow explicit subtypes for unwrapped handles (#1747) 2020-04-10 20:10:34 -07:00
Andrey Lushnikov
2fd7f4e111 devops: fix update_version.js script 2020-04-08 16:25:32 -07:00
Dmitry Gozman
2d57fff0be
fix(tests): fix multiple browsers tests (#1718)
- Use a server only once, not once per browser.
- Avoid require cache for test files.
- Improve testrunner hooks debugging.
2020-04-08 15:54:17 -07:00
Dmitry Gozman
2ef8e26602
test: structure tests to use environments, closer to end user (#1713) 2020-04-08 14:17:34 -07:00
Dmitry Gozman
20ff327827
feat(testrunner): catch delegate errors (#1704)
This ensures we get a proper error when something goes wrong. Should
also help with producing the right error code in the case of internal error.

Drive-by: fix location issue which manifests on the bots.
Drive-by: remove the use of Array.prototype.flat to make it work on bots.
2020-04-07 22:56:21 -07:00
Dmitry Gozman
39e06f0286
feat(testrunner): improve reporting of unhandled errors/rejections (#1697) 2020-04-07 16:02:33 -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
e519a3d762
fix(testrunner): better capture Location for hooks (#1680) 2020-04-06 17:47:17 -07:00
Dmitry Gozman
f2b13c0e93
chore(testrunner): split TestRunner into parts (#1679) 2020-04-06 17:21:42 -07:00
Dmitry Gozman
823f961d8d
feat(testrunner): migrate from events to a delegate (#1647)
This allows an async handler for each event that can be awaited.
Drive-by: merge TestPass into TestRunner.
2020-04-03 15:47:25 -07:00
Dmitry Gozman
1f2803bbc6
feat(testrunner): removeEnvironment (#1650) 2020-04-03 09:48:01 -07:00
Dmitry Gozman
ea16e55ba3
fix(lint): import errors (#1649) 2020-04-02 20:30:52 -07:00
Pavel Feldman
75571e8eb8
feat(downloads): support downloads on cr and wk (#1632) 2020-04-02 17:56:14 -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
Dmitry Gozman
d38baae01c
feat(testrunner): nested environments (#1635) 2020-04-02 13:12:22 -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
f87e64544c
feat(testrunner): introduce environments (#1593) 2020-04-01 10:49:47 -07:00
Joel Einbinder
a853690c16
fix(types): don't export derived types (#1598)
I was playing around today with different ways of changing the way we export types for #1439. I looked at only exporting 'Parameter' types, only exporting 'Return' types, only exporting a manual list of 'important' types. They all had different pros and cons, and it was very difficult to settle on a good answer.

For now, let's not export any parameter/return types. We can whitelist some types upon user request. I'm thinking `LaunchOptions` and `AccessibilitySnapshot` could be quite useful. We can always add new types after 1.0, but we can't remove them.

The patch looks funny because this was my original intent for the types, but I didn't know I had to `export {}` to tell typescript that my .d.ts shouldn't export everything.
2020-03-31 16:19:20 -07:00
Joel Einbinder
92c5ab3b7e
fix(types): correctly infer type in $eval and $$eval (#1603) 2020-03-31 13:22:38 -07:00
Joel Einbinder
08aebc72fa
fix(types): add types for waitForEvent (#1601) 2020-03-31 09:17:54 -07:00
Dmitry Gozman
b6166c9669
chore(testrunner): introduce Location class (#1585)
Drive-by: fix an edge when testing continued after termination.
2020-03-29 21:38:30 -07:00
Dmitry Gozman
c49b856d6d
chore(testrunner): remove setup() helper (#1584) 2020-03-29 11:37:45 -07:00
Dmitry Gozman
a41836b1f1
chore(testrunner): introduce TestRun (#1582) 2020-03-28 14:25:57 -07:00
Dmitry Gozman
b85ab891a1
chore(testrunner): make most modifiers external (#1581) 2020-03-28 08:49:00 -07:00
Dmitry Gozman
4bd46bafa9
feat(testurnner): allow multiple hooks isntances and per-test hooks (#1571) 2020-03-27 22:57:22 -07:00
Dmitry Gozman
6503c83302
fix(install): speculative fix for generateChromiumProtocol (#1583) 2020-03-27 22:42:39 -07:00
Pavel Feldman
6903496f2d
fix(build): generate protocol in chromium (#1579) 2020-03-27 17:11:54 -07:00
Dmitry Gozman
a042466125
chore(testrunner): remove effectiveMode and effectiveExpectation (#1569) 2020-03-27 15:35:14 -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
Dmitry Gozman
aad82e00bd
chore(testrunner): decouple UserCallback from location and timeout (#1557)
This will make it easier to change lifetimes of Test and Suite.
2020-03-26 14:43:28 -07:00
Dmitry Gozman
81bd8de00b
feat(testrunner): composable and bindable attributes and modifiers (#1547)
This allows to make things like `fit`, `skip()` and soon even `dit` be implemented externally.
2020-03-25 22:42:09 -07:00
Andrey Lushnikov
7e75cefd20
devops: restore publishing @next version (#1540)
This merges the `//utils/apply_next_version.js` in to
`//utils/update_version.js`.
2020-03-25 17:31:19 -07:00
Dmitry Gozman
b61198458c
feat(testrunner): modifiers and attributes (#1538)
This generalizes test modifiers to support custom ones.
2020-03-25 14:40:57 -07:00