Commit Graph

685 Commits

Author SHA1 Message Date
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