Commit Graph

2378 Commits

Author SHA1 Message Date
Andrey Lushnikov
b7d68d1cdb
devops: automate Docker image publishing (#2937)
This starts publishing our Docker images using Github Actions:
- on every commit, a new image will be pushed, tagged with a SHA of the
  commit, e.g.
  `mcr.microsoft.com/playwright:sha-fe997eca88d6de48378b05133dadfe032bd8b0ea`
- on every release, a new image will be pushed, tagged with the release
  version, e.g. `mcr.microsoft.com/playwright:v1.2.1`

**Note:** today we don't version our images and instead push them all as
`bionic`. This patch retains the tag - along with `latest`. Both
`bionic` and `latest` tags will point to the latest release.
2020-07-13 16:18:51 -07:00
Dmitry Gozman
65d45c18c3
feat(rpc): introduce Waiter for various waitFor implementations (#2935)
Use it for waitForEvent and waitForLoadState.
2020-07-13 16:03:24 -07:00
Arjun Attam
b2d820a185
docs(emulation): separate section for dark mode (#2915) 2020-07-13 15:47:13 -07:00
Dmitry Gozman
9fd30e58e2
feat(rpc): ensure feature-detection works as before (#2898)
For this, some tests are migrated from skip() to feature detection,
like our users would do.
2020-07-13 15:26:09 -07:00
Dmitry Gozman
2151757621
feat(rpc): run rpc tests in-process and out-of-process (#2929) 2020-07-13 15:00:20 -07:00
Andrey Lushnikov
0346c3a1dc
chore: update release notes draft gen (#2932) 2020-07-13 14:48:29 -07:00
Dmitry Gozman
6d94c92053
feat(rpc): support no-serialization mode, run hook tests (#2925)
Added rpc_json_linux bots to excercise serialization - these
do not run hook tests.
2020-07-13 08:31:20 -07:00
Dmitry Gozman
6674458496
feat(rpc): log api calls into LoggerSink (#2904) 2020-07-10 18:00:10 -07:00
Dmitry Gozman
c63b706aac
fix(events): avoid firing events after close/detach (#2919) 2020-07-10 16:38:01 -07:00
Dmitry Gozman
fc6861410b
feat(rpc): merge DispatcherScope and Dispatcher (#2918) 2020-07-10 16:24:11 -07:00
Pavel Feldman
ebb4c3320f
test: mark 2 chromium not important win tests as failed (#2914) 2020-07-10 16:15:12 -07:00
Pavel Feldman
982e5e3550
devops: collect artifacts from browser locations (#2913) 2020-07-10 16:15:00 -07:00
Andrey Lushnikov
21807bcd35
feat(webkit): roll WebKit to r1306 (#2899)
r1306 was built with the new slim JHBUILD procedure. If this passes
our CI bots, it'll be good to go.
2020-07-10 16:05:43 -07:00
Andrey Lushnikov
a403d4beff
fix(firefox): fix launching firefox without dependencies (#2900)
We always have to reject promises with some error. Otherwise,
our error-rewriting logic in try-catch miserably fails.

With this patch, attempt to launch Firefox when it's missing
dependencies will actually result in a thrown exception with
pretty logs. Without this patch, Playwright throws internal error.
2020-07-10 16:04:19 -07:00
Yury Semikhatsky
1cebf8757c
chore(docker): skip "recommended" dependencies (#2917) 2020-07-10 16:01:30 -07:00
Yury Semikhatsky
bce4b1aea9
chore(docker): trim some of the gstreamer dependencies (#2897) 2020-07-10 15:56:52 -07:00
Pavel Feldman
631f76df75
chore(rpc): remove union types from page and handles (#2912) 2020-07-10 15:39:11 -07:00
Dmitry Gozman
b6fd4dc56c
feat(rpc): merge ChannelOwner and ConnectionScope (#2911) 2020-07-10 15:11:47 -07:00
Dmitry Gozman
54f9a0dd7b
test: update headfull chromium expectations after a recent roll (#2908) 2020-07-10 14:26:49 -07:00
Pavel Feldman
d561465214
devops: use matrix in GHA, add non-linux rpc (#2907) 2020-07-10 13:15:57 -07:00
Pavel Feldman
c89c30e333
fix(popup): do not report frameless pages (#2910) 2020-07-10 13:15:39 -07:00
Yury Semikhatsky
c21b637358
feat(webkit): bump to 1305 (#2893) 2020-07-09 15:36:48 -07:00
Dmitry Gozman
a91ec9a15d
feat(rpc): pass more tests (#2896)
Includes coverage, tracing and misc close() tests.
2020-07-09 15:33:01 -07:00
Dmitry Gozman
7039409397
test: skip devtools test with USES_HOOKS (#2895) 2020-07-09 13:45:28 -07:00
Carlos Alberto Lopez Perez
cb8b1bca97
browser(webkit): Reduce binary size of WebKit Linux build bundles (GTK and WPE) (#2880)
This patch changes the build system to use the JHBuild minimal dependency
system introduced in WebKit r264092 <https://trac.webkit.org/r264092>

The build has been tested with Ubuntu-18.04

The binary size of the zip bundles is now: 37M (WPE) and 40M (GTK).
Previously it was 54M and 59M (respectively)
2020-07-09 11:37:13 -07:00
Joel Einbinder
e90ba26250
fix(context): fire close event for persistent contexts (#2891) 2020-07-09 08:34:07 -07:00
Dmitry Gozman
8fe29feb21
feat(rpc): support more chromium-specific apis (#2883)
This includes page CDPSession, backgroundPages() and serviceWorkers().

This has also revealed an issue with closing order between the context
and the service worker.
2020-07-08 21:36:03 -07:00
Pavel Feldman
b3ca4afd40
chore: misc test fixes (#2857) 2020-07-08 18:42:31 -07:00
Pavel Feldman
6209d14f87
chore: misc test fixes (#2888) 2020-07-08 18:42:04 -07:00
Andrey Lushnikov
c3ac0371e6
test: add test to validate user-agent sanity (#2887) 2020-07-08 17:45:45 -07:00
Yury Semikhatsky
b93e0994bc
browser(webkit, firefox): bump versions (#2866) 2020-07-08 17:10:33 -07:00
Andrey Lushnikov
458aaa508f
feat(chromium): roll Chromium to r786218 (#2879)
This roll includes:
- https://crrev.com/786119 - mac: close context menu when destroying RenderViewContextMenuMacCocoa

Fixes #2700
2020-07-08 17:09:42 -07:00
Paul
71713c9580
fix(webkit): Fix default User-Agent (#2886)
Co-authored-by: pspaul <pspaul@pspaul.de>
2020-07-08 16:15:31 -07:00
Yury Semikhatsky
f5911de93d
browser(webkit): release GTK app only if it has been referenced (#2885) 2020-07-08 16:13:58 -07:00
Yury Semikhatsky
83bba08cc4
browser(webkit): fix touch events on mac after last roll (#2884) 2020-07-08 14:32:39 -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
Arjun Attam
6a1bd3ae6e
docs: add debugging docs page (#2865) 2020-07-08 08:59:58 -07:00
Joel Einbinder
8611ee8df7
chore(testrunner): typescript test files (#2751)
This lets our spec files be .ts instead of just .js. The typescript files will be checked against the public types. Tests are compiled with babel just in time before running them, emulating the jest experience. TypeScript tests are also linted with eslint.

I converted keyboard.spec.js as the first demo. I'll follow up converting some more more tests.
2020-07-08 00:20:36 -07:00
Ross Wollman
e97badcca8
docs(CONTRIBUTING.md): Add build step (#2869)
* docs(CONTRIBUTING.md): Add build step

Without the build step, a fresh install without any previous
builds would get:

```
$ npm test

> playwright-internal@1.2.0-post test /Users/pw/code/playwright
> cross-env BROWSER=all node --unhandled-rejections=strict test/test.js

internal/modules/cjs/loader.js:1033
  throw err;
  ^

Error: Cannot find module '../lib/rpc/server/dispatcher'
Require stack:
- /Users/pw/code/playwright/test/environments.js
- /Users/pw/code/playwright/test/test.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1030:15)
    at Function.Module._load (internal/modules/cjs/loader.js:899:27)
    at Module.require (internal/modules/cjs/loader.js:1090:19)
    at require (internal/modules/cjs/helpers.js:75:18)
    at Object.<anonymous> (/Users/pw/code/playwright/test/environments.js:23:34)
    at Module._compile (internal/modules/cjs/loader.js:1201:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1221:10)
    at Module.load (internal/modules/cjs/loader.js:1050:32)
    at Function.Module._load (internal/modules/cjs/loader.js:938:14)
    at Module.require (internal/modules/cjs/loader.js:1090:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/pw/code/playwright/test/environments.js',
    '/Users/pw/code/playwright/test/test.js'
  ]
}
npm ERR! Test failed.  See above for more details.
```

Fixes #2868.

Co-authored-by: Andrey Lushnikov <aslushnikov@gmail.com>
2020-07-07 22:38:59 -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
Dmitry Gozman
2a86ead0ac
chore: replace FrameTask with internal events on Frame (#2856)
We now use a few helper.waitForEvent calls to wait for internal
events kNavigationEvent and kLifecycleEvent. With these events,
we should be able to replicate logic over rpc.
2020-07-07 15:22:05 -07:00
Dmitry Gozman
35cb20d5ad
test: unflake recorder tests (#2808)
We ensure that recorder is installed in the main frame before running the test.
2020-07-07 14:11:59 -07:00
Yury Semikhatsky
baaa65492b
browser(firefox): resize window when changing viewport (#2861) 2020-07-07 14:04:07 -07:00
Yury Semikhatsky
64f57216e2
browser(webkit): roll to 07-07-2020 (#2863) 2020-07-07 13:03:07 -07:00
Joel Einbinder
6ed8b5fcc6
chore(eslint): lint for copyrights on files (#2858) 2020-07-07 11:12:45 -07:00
Yevhen
de7969f0f5
docs(api/input): fix typo (#2837) 2020-07-07 10:46:13 -07:00
Yury Semikhatsky
9640dbf2a6
browser(firefox): exclude browser controls from screencast (#2855) 2020-07-07 09:40:09 -07:00
Yury Semikhatsky
39144dd5b2
feat(webkit): bump to 1302 (#2852) 2020-07-07 09:31:02 -07:00
Dmitry Gozman
0380400de4
chore: refactor waiting for lifecycle events (#2851)
Instead of checking lifecycle events on every change, we
notify precisely when lifecycle event in the subtree
is satisfied. This allows FrameTask to be later switched
to event-based approach, and will easily translate to the
rpc client.
2020-07-06 17:33:56 -07:00