Commit Graph

32 Commits

Author SHA1 Message Date
Pavel Feldman
5ae2017a5b
chore: always import type (#13365) 2022-04-06 14:57:14 -07:00
Pavel Feldman
373042ed89
chore: don't allow importing @playwright/test twice (#11218) 2022-01-06 09:29:05 -08:00
Dmitry Gozman
f77c874e8a
feat(test runner): make _extendTest experimental (#11210)
Hidden from types and docs.
2022-01-05 15:54:00 -08:00
Dmitry Gozman
d9f849fb14
feat(test runner): replace declare/define with "options" (#10293)
1. Fixtures defined in test.extend() can now have `{ option: true }` configuration that makes them overridable in the config. Options support all other properties of fixtures - value/function, scope, auto.
```
const test = base.extend<MyOptions>({
  foo: ['default', { option: true }],
});
```

2. test.declare() and project.define are removed.

3. project.use applies overrides to default option values and nothing else. Any test.extend() and test.use() calls take priority over config options.

Required user changes: if someone used to define fixture options with test.extend(), overriding them in config will stop working. The solution is to add `{ option: true }`.

```
// Old code
export const test = base.extend<{ myOption: number, myFixture: number }>({
  myOption: 123,
  myFixture: ({ myOption }, use) => use(2 * myOption),
});

// New code
export const test = base.extend<{ myOption: number, myFixture: number }>({
  myOption: [123, { option: true }],
  myFixture: ({ myOption }, use) => use(2 * myOption),
});
```
2021-11-18 15:45:52 -08:00
Pavel Feldman
2e4722d460
test: migrate to upstream fixtures (#9835) 2021-10-28 08:31:30 -07:00
Pavel Feldman
31faa7d9a7
chore: sort out base fixtures (#9809) 2021-10-27 08:28:53 -07:00
Pavel Feldman
273122b761
chore: align internal test harness w/ @playwright/test (#9796) 2021-10-26 13:45:53 -07:00
Joel Einbinder
f2888395a6
fix: support even older node 12 (#9718) 2021-10-22 15:59:52 -04:00
Joel Einbinder
53c866c0f2
fix(monorepo): explicitly list package.json exports instead of using glob patterns (#9584) 2021-10-19 12:28:02 -04:00
Andrey Lushnikov
01c702adbb
chore: move "service" mode tests to experimental grid (#9531)
This patch moves service tests to use experimental grid.
Test changes:
- `proxy.spec.ts` - proxy setup is not supported at all in service mode.
  This is because we already use proxy for browsers to properly resolve
  localhost.
- `har.spec.ts` - tests disabled since connection port is different.
2021-10-15 16:11:53 -07:00
Pavel Feldman
75cfe5d1f5
chore: start adding html runner e2e tests (#9518) 2021-10-14 15:48:05 -07:00
Joel Einbinder
c89d5a50dd
chore: migrate to monorepo (#9421) 2021-10-11 16:52:17 +02:00
Pavel Feldman
bc71d20d0f
feat(request): add global request fixture (#9332) 2021-10-06 10:09:27 -07:00
Max Schmitt
cd22072685
chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
Dmitry Gozman
018467911b
test: introduce some common test fixtures (#9060) 2021-09-21 16:24:48 -07:00
Max Schmitt
8189de42cf
test: fix package installation tests (#8430) 2021-08-25 13:34:54 +02:00
Dmitry Gozman
7818f5fa0b
test: add a tracing bot that collects a trace for most contexts (#8316) 2021-08-19 19:09:19 -07:00
Yury Semikhatsky
d42169aba1
test: proxy server fixture, new test for https via http proxy (#8299) 2021-08-19 07:36:03 -07:00
Max Schmitt
869f8d541b
chore: PlaywrightClient/Server enhancements (#7980)
- ensure timeout results in a meaningful message
- add onDisconnect handler
2021-08-04 19:45:33 +02:00
Max Schmitt
4c6deaa449
test: added tests for WebSocket over Socks proxy (#7235) 2021-06-24 18:50:16 +02:00
Dmitry Gozman
eb01844710
chore(tests): roll stable test runner to jun-8-2021 (#6951) 2021-06-08 08:35:04 -07:00
Dmitry Gozman
f745bf1fbc
chore: bring in folio source (#6923)
- Source now lives at `src/test`.
- Former folio tests live at `tests/playwright-test`.
- We use `src/test/internal.ts` that exposes base test without
  Playwright fixtures for most tests (to avoid modifications for now).
- Test types live in `types/testFoo.d.ts`.
- Stable test runner is installed to `tests/config/test-runner` during `npm install`.
- All deps including test-only are now listed in `package.json`.
  Non-test deps must also be listed in `build_package.js` to get included.
2021-06-06 17:09:53 -07:00
Dmitry Gozman
82041b2f74
test: roll to folio@0.4.0-alpha28 (#6918) 2021-06-04 20:54:58 -07:00
Max Schmitt
c09726b023
test: add tests for port-forwarding via playwrightclient (#6860)q 2021-06-03 02:19:01 +02:00
Dmitry Gozman
8fefac9b8c
test: roll to folio@0.4.0-alpha21 (#6789) 2021-05-28 17:03:18 -07:00
Dmitry Gozman
57f3a53a7e
test: roll to folio@0.4.0-alpha16 (#6656) 2021-05-20 09:51:09 -07:00
Dmitry Gozman
4c3bd11820
test: roll to folio@0.4.0-alpha14 (#6602) 2021-05-16 19:58:26 -07:00
Dmitry Gozman
5e84eade85
test: roll to folio@0.4.0-alpha13 (#6570) 2021-05-15 07:42:35 -07:00
Dmitry Gozman
8b6b894dd8
test: prepare test to use options as passed (#6557)
This changes `headful` to `headless` to align with launch options.
Also replaces `isChromium` and friends with `browserName`.
2021-05-13 10:22:23 -07:00
Dmitry Gozman
573327b7b5
test: roll to folio@0.4.0-alpha8 (#6451) 2021-05-07 15:25:55 -07:00
Dmitry Gozman
de21a94b75
test: roll to folio@0.4.0-alpha6 (#6366) 2021-04-30 13:26:13 -07:00
Dmitry Gozman
11882cdda7
test: roll to folio@0.4.0-alpha3 (#6262) 2021-04-29 11:11:32 -07:00