Commit Graph

34 Commits

Author SHA1 Message Date
Dmitry Gozman
2ac0c59156
feat(test-runner): rename Test to TestCase (#7725) 2021-07-19 14:54:18 -07:00
Dmitry Gozman
167db03f05
feat(test-runner): export reporter api as @playwright/test/reporter (#7692) 2021-07-16 21:15:03 -07:00
Dmitry Gozman
47885db116
chore: move install to Registry (#7433)
This is an effort to consolidate all handling of browser binaries in a single place.
2021-07-06 20:59:16 -07:00
Joel Einbinder
7629587914
fix(test-runner): work with .mjs files (#7373) 2021-06-29 15:28:41 -07:00
Joel Einbinder
7caf05b24a
fix(playwright-test): have the proper default export (#7328)
There are 3 ways to import `@playwright/test` library in the modern Node.js ecosystem:
- Using `require`: works great, this patch doesn't change it
- Using `import` statement from `.mjs` file - we have wrong `default` for @playwright/test that should be a `test`. This is what test checks for
- Using `import test from '@playwright/test'` from `.ts` file - was broken because TypeScript thought it's a CJS module, whereas it's a ESM module in reality.

Also, typescript types import from `.d.ts` file was broken because we had no default export (`export *` syntax does not export default).
2021-06-25 15:29:22 -07:00
Andrey Lushnikov
afa9d69b63
test: fix installation tests (#7069)
This was regressed by 3b1bae8a40
2021-06-11 13:56:41 +02:00
Dmitry Gozman
3de3a88930
feat(test): introduce npx playwright test (#6816) 2021-06-03 08:07:55 -07:00
Dmitry Gozman
24dca969b6
chore: remove electron/android from build_packages (#6827)
We do not update these packages anymore, and bundle the code in playwright.
2021-06-01 15:53:47 -07:00
Andrey Lushnikov
eb7b4dea0d
tests: disable certain installation tests on Node v16 (#6544)
NPM7 that comes with Node v16 swallows output from installation
scripts, so certain tests don't work.
2021-05-12 13:11:59 -07:00
Max Schmitt
9cd89ae052
fix: host dependency validation (#6227) 2021-04-20 18:54:53 +02:00
Yury Semikhatsky
e4ae6503d7
fix(inspector): fall back to custom executable path for UI (#6214) 2021-04-16 15:19:44 -07:00
Dmitry Gozman
bd8433ba49
test: cleanup various testing env variables (#6155) 2021-04-09 07:59:09 -07:00
Yury Semikhatsky
ddfdf8a76a
fix: install chromium along with ffmpeg (#5774) 2021-03-10 14:01:35 -08:00
Andrey Lushnikov
f3a09210da
test: move installation tests out of playwright tree (#5573) 2021-02-23 19:17:15 -08:00
Dmitry Gozman
5cb914b2fe
fix(types): do not use import('electron') (#5572) 2021-02-23 18:48:34 -08:00
Dmitry Gozman
ac1599cc2c
fix(registry): handle relative registry path (#5406)
We get relative registry path when PLAYWRIGHT_BROWSERS_PATH or HOME is relative.
In this case, it would be good to resolve to the same absolute path
during installation and execution, and we can usually do that using INIT_CWD.
2021-02-12 11:12:06 -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
Pavel Feldman
1db5ef24a8
docs: document electron api (#5229) 2021-02-01 11:43:26 -08:00
Dmitry Gozman
135e0344fc
feat(cli): small improvements (#4952)
- Allow specifying which browsers to install. This comes handy in playwright-cli.
- Print "npx playwright" as a tool name in help messages, instead of "cli".
2021-01-08 15:42:08 -08:00
Dmitry Gozman
293a7bdd4c
feat(cli): bring in codegen and tests (#4815) 2020-12-28 14:50:12 -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
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
1c39689dd6
api(videos): introduce a single recordVideo option bag (#4309)
api(videos): introduce a single recordVideo option bag

Currently contains `dir` and `size`, previously known as
`videosPath` and `videoSize`.
2020-11-02 19:42:05 -08:00
Dmitry Gozman
4a77363af7
api: update videos api, hide tracing (#4015) 2020-10-01 11:06:19 -07:00
Dmitry Gozman
df777344a3
api(video): simplify video api (#3924)
- This leaves just `recordVideos` and `videoSize` options on the context.
- Videos are saved to `artifactsPath`. We also save their ids to trace.
- `context.close()` waits for the processed videos.
2020-09-18 17:36:43 -07:00
Yury Semikhatsky
40323aa94d
fix(screencast): use viewport as default size (#3844) 2020-09-11 15:14:31 -07:00
Andrey Lushnikov
355ea73a0b
feat: actually bundle FFMPEG binaries with NPM packages (#3804)
This patch:
- adds FFMPEG binaries to the NPM packages
- adds a screencast test to make sure that screencast works. This currently relies on private screencast APIs.

NOTE: with this patch playwright package size grows from `650KB` to `4.2MB`.
2020-09-08 17:51:56 -07:00
Dmitry Gozman
77f803140a
fix(electron): fix electron types, move source to src/server/electron (#3583) 2020-08-23 13:46:40 -07:00
Dmitry Gozman
6fe1cd9812
chore: move protocol files to src/protocol (#3571) 2020-08-21 18:46:11 -07:00
Dmitry Gozman
3a6b5cab42
test: add sanity test for playwright-electron (#3387) 2020-08-12 14:45:22 -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
Dmitry Gozman
6a4195fd1d
fix(require): allow requiring internals (#3153) 2020-07-24 14:21:25 -07:00
Dmitry Gozman
d234dac752
chore: support esm imports (#3125) 2020-07-23 15:14:36 -07:00
Andrey Lushnikov
37ec3a6ae6
fix(types): properly export typescript types from packages (#2364)
Drive-by: move package tests from `//test/installation-tests` to
`//packages/installation-tests`

Fix #2349
2020-05-26 17:19:05 -07:00