Commit Graph

121 Commits

Author SHA1 Message Date
Yury Semikhatsky
c58f34fb2e
feat(fetch): introduce global fetch request (#8927) 2021-09-14 18:31:35 -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
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
Dmitry Gozman
bee8ed117b
feat(html reporter): preview source code, steps and step errors (#8598) 2021-08-31 16:34:52 -07: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
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
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
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
Dmitry Gozman
1bbf86d060
feat(test runner): file scope fixtures (#7969)
These are reset after running tests from a single file.
2021-08-04 21:11:02 -07:00
Max Schmitt
385d489b35
feat(test-runner): re-enable web server (#7906)
Co-authored-by: Joel Einbinder <joel.einbinder@gmail.com>
2021-08-03 23:24:14 +02:00
Joel Einbinder
a2cbba9c1c
chore(typescript): update to 4.3 (#7809) 2021-08-03 12:21:07 -04:00
Pavel Feldman
3b34e57ee4
feat(test-runner): introduce test.step (#7956) 2021-08-02 22:11:37 -07:00
Pavel Feldman
5803035c1b
feat(test-runner): introduce steps (#7952) 2021-08-02 17:17:20 -07:00
Pavel Feldman
4163cec93b
feat(test-runner): introduce actionTimeout and navigationTimeout (#7919) 2021-07-29 21:03:50 -07:00
Dmitry Gozman
dd0b089d13
feat(test runner): createContext fixture for multi-context scenarios (#7779) 2021-07-29 14:03:58 -07:00
Dmitry Gozman
3f0485486d
feat(test runner): show errors from interrupted tests when available (#7874)
This shows the exact operation that is timing out (like click) when
user hits Ctrl+C.
2021-07-28 15:43:37 -07:00
Pavel Feldman
49e9f8c15e
feat(expect): add text and true matchers (#7873) 2021-07-28 12:07:11 -07:00
Dmitry Gozman
34b96a5759
chore: generate JSDoc for testing types from md reference (#7799) 2021-07-27 19:10:55 -07:00
Pavel Feldman
b9aad5eb86
chore: move locators to strict selectors (#7866) 2021-07-27 15:27:36 -07:00
Pavel Feldman
0a6ae11da1
feat(strict): introduce strict mode (#7851) 2021-07-26 22:00:23 -07:00
Pavel Feldman
827fb80465
feat(locator): implement element locators (#7808) 2021-07-22 21:37:20 -07:00
Max Schmitt
acdc531efc
chore: migrate connect/overCDP to options instead of params (#7606) 2021-07-22 16:55:23 +02:00
Dmitry Gozman
d1170b30fc
Revert "api: remove timeout option from isVisible and isHidden methods (#7414)" (#7600)
This reverts commit 9f71c96740.
2021-07-14 10:46:00 +02:00
Joel Einbinder
0f118618d4
fix(types): fix typo in event description (#7543) 2021-07-09 18:21:47 -05:00
Joel Einbinder
e4698b5f6a
fix(types): add better descriptions for event emitter methods (#6417) 2021-07-08 11:24:46 -05:00
Dmitry Gozman
9f71c96740
api: remove timeout option from isVisible and isHidden methods (#7414)
It is unused and confusing.
2021-07-01 13:30:16 -07:00
Joel Einbinder
1a6d46d844
chore(typescript): compile with babel, lint everything with tsc (#6872) 2021-06-23 18:01:48 -07:00
Dmitry Gozman
b625a04adc
types: move exported objects from index.d.ts to overrides.d.ts (#7152)
This way we generate these types right away, without duplicating them everywhere.
2021-06-15 15:06:18 -07:00
Max Schmitt
64b23040dc
chore: use new links in generated types (#7102) 2021-06-14 17:13:28 +02:00
Dmitry Gozman
69b734629c
fix: various test-related fixes (#6916)
- Closing inspector window resumes the script.
- Replace FOLIO_WORKER_INDEX with TEST_WORKER_INDEX.
- Account for `@playwright/test` stack traces.
2021-06-04 18:43:54 -07:00
Max Schmitt
79b244a2f4
chore: use bash instead of sh in code blocks (#6847) 2021-06-02 18:23:06 +02:00
Joel Einbinder
447a0c4bb8
feat(types): export ScreenshotOptions (#6419) 2021-05-20 09:22:01 -07:00
Max Schmitt
5f7739962c
chore: get rid of trailing spaces in types.d.ts (#6481) 2021-05-10 16:26:11 +02:00
Jason Harwig
42a5566653
fix(types): fix waitForSelector typing to not union null when appropriate (#6344)
Previously when options were defined, but no `state` key was provided,
the types would return null as an option. Even though the default state
is `visible` and shouldn't allow `null`.

Tests updated to fail appropriately and new tests added for this case.
2021-05-05 13:03:27 -07:00
Max Schmitt
a59a494e64
chore: drop support for Node.js 10 (#6371) 2021-04-30 07:49:10 -07:00
Dmitry Gozman
243ede5dfb
feat(waitForEvent): allow async predicate (#6201)
We await the predicate now. For synchronous predicates,
nothing should change becase the await will finish before
the next protocol message arrives (thanks to `makeWaitForNextTask`).
2021-04-19 10:32:51 -07:00
Joel Einbinder
63d0d466e3
feat(cdp): replace wsEndpoint with protocol neutral endpointURL (#6141) 2021-04-08 14:55:28 -07:00
Joel Einbinder
779355ad51
feat(types): make the template on BrowserType optional (#6142)
This makes it much nicer to use `BrowserType` because it no longer has a template.

Technically a breaking change because of the rare edge case where someone used their own non-browser type inside the template, but I don't consider that intended behavior and think this is fine.
2021-04-08 10:27:24 -07:00
Darío Kondratiuk
e82b546085
docs(dotnet): generate arguments in a consistent order (#5800) 2021-04-08 14:21:10 +02:00
Pavel Feldman
a7630c91d5
api: remove Chromium* classes (#6040) 2021-04-01 18:47:14 -07:00
Joel Einbinder
180446d20f
fix(types): restore electron types (#5574) 2021-02-23 20:29:10 -08:00
Dmitry Gozman
5cb914b2fe
fix(types): do not use import('electron') (#5572) 2021-02-23 18:48:34 -08:00