2201 Commits

Author SHA1 Message Date
Yury Semikhatsky
28fb3c776a
feat: response interception after redirects in chromium (#7910) 2021-08-05 08:49:02 -07:00
Max Schmitt
62a4d82b7b
chore: cleanup locators implementation (#7990) 2021-08-05 17:13:46 +02:00
Dmitry Gozman
9ab60f66bf
feat(tracing): allow calling tracing.start multiple times (#7992)
Subsequent invocations reset the trace. This removes the `tracing._reset` method.

Also fixed a bug where BASE element was not reset properly.
Also fixed a bug where tracing would affect the result of protocol call
by setting `callMetadata.error` property.
2021-08-04 21:11:35 -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
3e491114f2
test: fix some failing locators tests (#7989) 2021-08-04 23:36:27 +02: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
4e8e75beb1
chore: ensure assertions result in a message (#7981) 2021-08-04 08:26:07 -07:00
Dmitry Gozman
ea4f42b7ed
feat(report): add video to attachments (#7976) 2021-08-03 17:07:57 -07:00
Dmitry Gozman
3e05d8e9fa
feat(tracing): introduce _reset() and _export() (#7974)
`tracing._export({ path })` exports current tracing state into a file
and does not require tracing to be stopped.

`tracing._reset()` resets current tracing state, but keeps resources
around so they can be referenced in the future snapshots. Does not stop.

The usage pattern is:
```js
await tracing.start({ screenshots: true, snapshots: true });
// ...
await tracing._reset();
// Do stuff, it will all be in the export below.
await tracing._export({ path });
// ...
await tracing.stop();
```
2021-08-03 16:08:06 -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
Max Schmitt
2236d74f3f
chore: locator code style nits (#7972) 2021-08-03 13:32:39 -07:00
Dmitry Gozman
c406b23387
feat(tracing): do not store scripts in trace (#7970)
We do not need them for snapshots.
2021-08-03 13:05:58 -07:00
Joel Einbinder
4fabe5e6e4
feat(drag): sourcePosition and targetPosition (#7803) 2021-08-03 13:12:34 -04:00
Joel Einbinder
a2cbba9c1c
chore(typescript): update to 4.3 (#7809) 2021-08-03 12:21:07 -04:00
Fabian Mendez
731f9453c5
feat(inputValue): implement inputValue for select elements (#7951) 2021-08-03 08:22:40 -07: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
af30d267b6
feat(test-runner): experiemental expect plumbing (#7926) 2021-07-30 16:07:02 -07:00
Dmitry Gozman
081b8683a3
feat(test runner): expect(locator) matchers to show a nice error on timeout (#7935) 2021-07-30 13:12:49 -07:00
Dmitry Gozman
5a3ebfc9f9
fix(test runner): dot reporter incorrectly splits by 80 (#7925) 2021-07-30 01:34:28 -07:00
Dmitry Gozman
2e387b3a3a
chore(test runner): reuse TestGroup instead of DispatcherEntry (#7924) 2021-07-29 21:41:06 -07:00
Pavel Feldman
4163cec93b
feat(test-runner): introduce actionTimeout and navigationTimeout (#7919) 2021-07-29 21:03:50 -07:00
Dmitry Gozman
34c0c342fa
fix(test runner): make test order stable when fixtures are changing (#7923)
We used to sort based on workerHash, and that changes depending on
the exact worker fixtures list. Now we replace workerHash with
an ordinal when constructing the TestGroup list to preserve the
natural order.
2021-07-29 18:27:47 -07:00
Dmitry Gozman
a18b4fb49a
fix(test runner): workaround npm bug that sends multiple sigints (#7916)
When running through NPM, we can get multiple SIGINT signals
for a single Ctrl+C - the more npm layers you use, the more SIGINTs you get.

This is a known NPM bug present since at least NPM v6.
Workaround is to give NPM one second for the fake signals, and
only then remove out listener.
2021-07-29 16:01:22 -07:00
Dmitry Gozman
40901e8b9a
feat(test runner): test.skip(title, testFunction) syntax (#7922) 2021-07-29 14:33:37 -07:00
Pavel Feldman
2c095294c5
feat(locators): introduce allTextContents, allInnerTexts (#7920) 2021-07-29 14:09:35 -07:00
Dmitry Gozman
dd0b089d13
feat(test runner): createContext fixture for multi-context scenarios (#7779) 2021-07-29 14:03:58 -07:00
Yury Semikhatsky
722f0606c4
feat(firefox): response interception (#7510) 2021-07-29 10:12:47 -07:00
Pavel Feldman
1807142eb7
feat(expect): even more matchers (#7902) 2021-07-29 07:33:19 -07:00
Jan Sepke
600d82b17c
fix(cli): fix typo in help text (#7903)
Co-authored-by: Max Schmitt <max@schmitt.mx>
2021-07-29 11:23:50 +02:00
Pavel Feldman
9e07029973
chore: relayout matchers (#7901) 2021-07-28 22:30:37 -07:00
Pavel Feldman
3187ffdebf
feat(expect): add more matchers (#7891) 2021-07-28 15:44:44 -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
446d3f1018
chore: update locator docs, make it not force-visible (#7888) 2021-07-28 13:30:30 -07:00
Pavel Feldman
49e9f8c15e
feat(expect): add text and true matchers (#7873) 2021-07-28 12:07:11 -07:00
Max Schmitt
74cd7584ac
chore: enable linting with ESLint for TSX files (#7885) 2021-07-28 18:21:55 +02:00
Pavel Feldman
b8dc0b9156
feat(expect): implement toMatchText (#7871) 2021-07-27 20:26:12 -07:00
Pavel Feldman
cc43f9339f
feat(locators): implement last,nth (#7870) 2021-07-27 15:58:18 -07:00
Pavel Feldman
b9aad5eb86
chore: move locators to strict selectors (#7866) 2021-07-27 15:27:36 -07:00
Pavel Feldman
982f61d575
chore: BFS nodes, simplify querying (#7861) 2021-07-27 12:53:12 -07:00
Dmitry Gozman
da9b488d0d
fix(test-runner): sharding tests does not show a lot of skips (#7708) 2021-07-27 11:04:38 -07:00
Dmitry Gozman
cf886b3829
fix(test runner): align shard info to be one-based everywhere (#7859)
We used to treat shard from cli and shard from config differently.
2021-07-27 09:13:04 -07:00
Pavel Feldman
0a6ae11da1
feat(strict): introduce strict mode (#7851) 2021-07-26 22:00:23 -07:00
Pavel Feldman
d370f65713
chore: rename $,$$ to readable names (#7848) 2021-07-26 15:46:51 -07:00
Pavel Feldman
95001fe8d1
chore: unify v1 and v2 selector handling (#7844) 2021-07-26 15:07:12 -07:00
Thomas Chaplin
9d7a0ec2d9
fix(dependencies): add missing package libxshmfence1 to ubuntu:20.04 (#7796) 2021-07-26 10:50:51 +02:00
Pavel Feldman
7bdb901bb0
feat(webkit): roll WebKit to 1521 (#7798) 2021-07-23 09:13:57 -07:00
Dmitry Gozman
bf6482a58d
fix(test runner): do not override browserName when using without --browser (#7806) 2021-07-23 09:04:20 -07:00
Pavel Feldman
827fb80465
feat(locator): implement element locators (#7808) 2021-07-22 21:37:20 -07:00
Pavel Feldman
a20e20cdae
fix(trace-viewer): can't read object type (#7802) 2021-07-22 13:35:11 -07:00