Commit graph

102 commits

Author SHA1 Message Date
Joel Einbinder d76166beca
chore(test): require playwright fixtures from userland (#3355)
This patch moves fixtures.js to base.fixtures.ts that sits next to tests. All tests get an extra import to get the base fixtures (both types and implementations).
2020-08-10 16:48:34 -07:00
Yury Semikhatsky 9ec026730f
chore(test): use pathToFileURL (#3292) 2020-08-04 17:26:42 -07:00
Pavel Feldman 57490b74c6
test: remove describes (6) (#3295) 2020-08-04 16:32:10 -07:00
Pavel Feldman 070a257600
test: move all generic page tests to jest (#3002) 2020-07-17 09:49:12 -07:00
Dmitry Gozman aa4c893b09
feat(rpc): implement waitForNavigation on the client (#2949)
Drive-by: fix electron issues, exposed by the test using
waitForNavigation.

Drive-by: mark some tests skip(CHANNEL) that were mistakenly
marked skip(USES_HOOKS).
2020-07-15 18:48:19 -07:00
Dmitry Gozman c51ea0afd1
feat(rpc): remove PageAttribution from the protocol, attribute on the client side (#2957)
This also changes timeout error format to
"page.click: Timeout 5000ms exceeded", so that all errors
can be similarly prefixed with api name.

We can now have different api names in different clients,
and our protocol is more reasonable.
2020-07-15 14:04:39 -07:00
Joel Einbinder 8611ee8df7
chore(testrunner): typescript test files (#2751)
This lets our spec files be .ts instead of just .js. The typescript files will be checked against the public types. Tests are compiled with babel just in time before running them, emulating the jest experience. TypeScript tests are also linted with eslint.

I converted keyboard.spec.js as the first demo. I'll follow up converting some more more tests.
2020-07-08 00:20:36 -07:00
Dmitry Gozman 2a86ead0ac
chore: replace FrameTask with internal events on Frame (#2856)
We now use a few helper.waitForEvent calls to wait for internal
events kNavigationEvent and kLifecycleEvent. With these events,
we should be able to replicate logic over rpc.
2020-07-07 15:22:05 -07:00
Dmitry Gozman 9d6eaadba7
fix(navigation): ensure that goBack/goForward work with file urls (#2792) 2020-07-01 19:17:27 -07:00
Pavel Feldman e29f7b9f58
chore(rpc): support workers, file chooser, browser server (#2766) 2020-06-30 10:55:11 -07:00
Dmitry Gozman 4834e5653d
fix(firefox): bump firefox and fix network with service worker (#2610) 2020-06-17 14:13:56 -07:00
Dmitry Gozman 5c3a275270
feat(debug): improve api logs (#2481) 2020-06-06 20:59:06 -07:00
Dmitry Gozman 1d37a10558
chore: migrate navigations to Progress (#2463) 2020-06-04 16:43:48 -07:00
Yury Semikhatsky 03ca297890
fix(webkit): make click work with cross-process _blank target (#2083) 2020-05-02 10:57:33 -07:00
Pavel Feldman f2fcb2b017
test(webkit): test cross-process nav w/ _blank target (#2080) 2020-05-02 07:51:23 -07:00
Pavel Feldman 6ecac8c164
chore: restore networkidle0 alias (#1920) 2020-04-22 10:52:01 -07:00
Pavel Feldman 0656771167
api(networkidle): remove networkidle2 (#1883) 2020-04-20 16:52:26 -07:00
Yury Semikhatsky 04ed68384b
tests(firefox): unskip network idle tests (#1832) 2020-04-16 14:25:19 -07:00
Dmitry Gozman ade9d23c28
test: remove module.export.describe wrapper (#1716) 2020-04-08 15:19:09 -07:00
Pavel Feldman c6f580faf8
chore: migrate from timeouts to deadlines internally (#1695) 2020-04-07 14:35:34 -07:00
Dmitry Gozman e0c8fbf1a6
test: put test runner api on global, remove unused parameters (#1684) 2020-04-07 08:10:31 -07:00
Pavel Feldman 5bde0b59b5
feat(auth): fix firefox auth flake (#1525) 2020-03-24 23:12:07 -07:00
Dmitry Gozman de0a2d1081
api(waitForLoadState): move waitUntil to be a first parameter (#1490) 2020-03-23 13:51:11 -07:00
Dmitry Gozman 3f90c09e6d
tests: mark popup tests as passing on Firefox (#1466) 2020-03-21 19:56:33 -07:00
Yury Semikhatsky 535b484637
api(context): get rid of PageEvent (#1433) 2020-03-19 16:25:12 -07:00
Pavel Feldman 2af07ce475
chore: rework disposers into a frame task (#1413) 2020-03-18 20:05:35 -07:00
Dmitry Gozman aa32d351be
fix(tests): remove flaky load event from auto-waiting tests (#1399)
We do not guarantee that click resolves before load event comes.
Theoretically, inserting two tasks before resolving load should help,
but seems like a strange contract.

Drive-by: move auto waiting tests to a separate file.
2020-03-16 18:33:39 -07:00
Pavel Feldman 64b175ce10
api(waitForLoadState): restore it (#1390) 2020-03-16 14:39:44 -07:00
Dmitry Gozman 9b86c631c8
api: make BrowserContext.pages() synchronous (#1369)
Returns all pages which have been initialized already.

References #1348.
2020-03-13 11:33:33 -07:00
Pavel Feldman 24d4fb1e5c
api(click): remove tripleclick, respect clickCount (#1373) 2020-03-13 08:09:48 -07:00
Dmitry Gozman e382bb329b
api: remove 'commit' phase, actions to wait until 'domcontentloaded' by default (#1358) 2020-03-12 11:20:03 -07:00
Dmitry Gozman c1ef683373
api: remove waitForLoadState() in favor of PageEvent.page(options) (#1323) 2020-03-11 14:46:52 -07:00
Pavel 6b711f57fa test(webkit): unblock and uncomment sync window.stop test 2020-03-10 15:17:59 -07:00
Pavel Feldman 044f774458 test: unflake should fail when frame detaches 2020-03-10 13:14:35 -07:00
Pavel Feldman 2fa2421894
fix(webkit): fail the 204 navigations (#1260) 2020-03-09 11:42:56 -07:00
Pavel Feldman 78bd29d558
fix(click): work around input alignment on chromium (#1282) 2020-03-07 08:19:31 -08:00
Pavel Feldman 119df5a985
feat(nowait): allow waitUntil:nowait for actions (#1264) 2020-03-06 14:32:15 -08:00
Andrey Lushnikov 8cc7d43a83 tests: disable failing test on chromium 2020-03-06 11:45:13 -08:00
Pavel Feldman 677ebf882f test: mark "clicking anchor should await navigation" as failing on chromium 2020-03-06 10:54:34 -08:00
Pavel Feldman f3734c3e86 test: mark "should await navigating specified target" as failing on chromium 2020-03-06 10:44:44 -08:00
Pavel Feldman 2724157c22
feat(waitUntil): allow waiting for navigation from clicks, etc (#1255) 2020-03-06 08:24:32 -08:00
Pavel Feldman c734b4b715
feat(click): start wire auto-waiting click in firefox (#1233) 2020-03-05 14:47:04 -08:00
Dmitry Gozman cd8714d573
tests: skip failing waitForNavigation test in Chromium (#1248) 2020-03-05 13:28:45 -08:00
Yury Semikhatsky aabdac8380
api: remove Page.setCacheEnabled (#1231) 2020-03-05 10:09:04 -08:00
Pavel Feldman 11f68bac54
feat(cr, wk): make clicks, input and evaluate await scheduled navigations (#1200) 2020-03-04 19:15:01 -08:00
Dmitry Gozman 33f3e5724b
test: skip flaky 'Page.goto extraHttpHeaders should be pushed to provisional page' (#1203) 2020-03-03 17:26:58 -08:00
Dmitry Gozman 2ec9e6daa2
test: cleanup some test files (#1195) 2020-03-03 15:02:06 -08:00
Pavel ba06fb2f0d test: mark some tests as skipped 2020-03-02 14:57:54 -08:00
Andrey Lushnikov 22c28b6615
test(firefox): support loading of file URLs (#1132)
Fixes #822
2020-02-26 15:02:59 -08:00
Joel Einbinder 568c6cbb54
test(navigation): fix flaky networkidle tests (#1058)
The network idle tests were waiting for requests to appear on the server, but not for playwright to be notified of the request via protocol. They also assumed performance.now would match up with setTimeout times.
2020-02-19 14:26:02 -08:00