Commit graph

155 commits

Author SHA1 Message Date
Pavel Feldman 328805747f test(webkit): disable failing wk test 2020-03-06 10:20:15 -08:00
Pavel Feldman a802b00880 test: oops - fdescribe 2020-03-06 09:42:13 -08:00
Pavel Feldman 49c1161e00
api(press): bump .press to the page/frame level (#1262) 2020-03-06 09:38:08 -08:00
Dmitry Gozman e5f82af47c
api(popups): emit PageEvent immediately, and resolve page() once initialized (#1229)
This way we do not miss any popups, even immediately closed ones.
2020-03-05 15:18:27 -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 5ee744cd26
api(page.frame): allow looking up frames by name (#1228) 2020-03-04 17:53:39 -08:00
Joel Einbinder fcfe887c57
feat(select): don't accept undefined as a value (#1202)
`page.select` accepting an `undefined` value is a legacy of when `page.select` took `...values`. This matches the way the method is documented in the API.
2020-03-03 16:59:41 -08:00
Pavel ba06fb2f0d test: mark some tests as skipped 2020-03-02 14:57:54 -08:00
Pavel Feldman 5bd6e4970b
test: it.skip skips and it.fail expects to fail now (#1178) 2020-03-02 13:47:08 -08:00
Dmitry Gozman 823bf389a7
api: evaluateOnNewDocument -> addInitScript (#1152)
Also adds more options to specify the script.
2020-02-27 17:42:14 -08:00
aesyondu fdfec8eb2a
fix(platform) instanceof bug between execution contexts of RegExp object (#1048)
First encountered at jest-playwright repo:
https://github.com/mmarkelov/jest-playwright/issues/38

Solution based on:
https://stackoverflow.com/questions/4339288/typeof-for-regexp#comment4724685_4339350
2020-02-24 18:32:17 -08:00
Dmitry Gozman 1f8508d1ed
feat(waitFor): update various waitFor options to be a single boolean (#1066) 2020-02-22 09:16:28 -05:00
Dmitry Gozman 2e0d89e25c
fix(firefox): roll to 1029 and unskip passing tests (#984) 2020-02-13 13:19:25 -08:00
Dmitry Gozman fbce2908ad
test: unskip passing Firefox tests (#966) 2020-02-12 16:27:45 -08:00
Dmitry Gozman da30847c83
feat(firefox): apply emulation to all pages in the browser context (#931) 2020-02-11 18:52:01 -08:00
Joel Einbinder c03e8b7946
chore(tests): add types for tests (#915)
I enabled vscode autocomplete in our test files. Typechecking had too many errors to enable, but it caught some real bugs that I will fix in a follow up.

This patch contains:
* `test/types.d.ts` - d.ts file for our test runner.
* `test/tsconfig.json` - typescript project for our tests.
* JSDoc header in all specs to mark the describe as a TestSuite
* Drive-by fix of a launcher test that was using `if` instead of `it`
* Some drive-by fixes of unimpactful typos in tests.
2020-02-10 13:20:13 -08:00
Pavel Feldman 84f5700294
feat(api): rename browserContext() to context() in the apis, remove url from newPage (#906) 2020-02-10 10:41:45 -08:00
Andrey Lushnikov a4c40fff82
test: make sure page.fill actually clears an input (#851) 2020-02-05 16:07:25 -08:00
Pavel Feldman 1059e22f9e
fix(fill): make fill work for input[type=number] (#819) 2020-02-03 15:50:45 -08:00
Yury Semikhatsky 25f2a32af3
feat: add Page.opener() to the API (#790)
Fixes #783
2020-01-31 18:38:45 -08:00
Pavel Feldman ef1d2fb995
Revert "fix: move offline/cache/interception switches to BrowserContext (#748)" (#793)
This reverts commit 6faf74bc95.
2020-01-31 16:23:15 -08:00
Joel Einbinder ca49d50b9c
test: disable firefox popup tests that rely on waitForLoadState (#768)
We have a race between opening a popup and calling waitForLoadState that sometimes causes waitForLoadState to timeout.
2020-01-30 14:53:38 -08:00
Yury Semikhatsky 6faf74bc95
fix: move offline/cache/interception switches to BrowserContext (#748) 2020-01-29 12:51:14 -08:00
Joel Einbinder 4a3bd6008b
fix(test): fix race in confusing confuse with previous navigation test (#730) 2020-01-28 17:25:07 -08:00
Yury Semikhatsky 38b5f76d6e fix(test): wait for load state before checking opener of popup (#714) 2020-01-28 11:27:14 -08:00
Yury Semikhatsky 2ddc987854 fix(webkit): initialize popups on start (#693) 2020-01-28 11:07:35 -08:00
Dmitry Gozman 89b5d2f7be
fix(setContent): manually reset lifecycyle for all browsers at the right moment (#679) 2020-01-27 16:51:52 -08:00
Andrey Lushnikov 06e48f2294 test: skip failing wk test 2020-01-22 18:52:41 -08:00
Pavel 1c8b421260 chore: remove web sockets for now, mute failing wpe tests 2020-01-21 18:33:19 -08:00
Dmitry Gozman 6cf70e2e4c test(firefox): enable some passing tests (#536) 2020-01-17 17:51:48 -08:00
Yury Semikhatsky 44cbe00643
test(webkit): unskip passing test (#530) 2020-01-17 16:17:51 -08:00
Dmitry Gozman 21510a5b06
feat(firefox): support isolated worlds (#507) 2020-01-16 12:57:28 -08:00
Joel Einbinder 29c3a7f021 test: add a failing test for Page.waitForLoadState (#488) 2020-01-14 13:54:48 -08:00
Yury Semikhatsky 5fa39dde3f
fix(webkit): use cross-process loader ids (#486) 2020-01-14 11:46:08 -08:00
Yury Semikhatsky ff904d3a61
Revert "fix(webkit): use cross-process loader ids (#484)" (#485)
This reverts commit d341b43023.
2020-01-14 09:49:49 -08:00
Yury Semikhatsky d341b43023
fix(webkit): use cross-process loader ids (#484) 2020-01-14 09:48:36 -08:00
Yury Semikhatsky 778ab3deff chore: replace CHROME with CHROMIUM (#465) 2020-01-13 10:13:28 -08:00
Andrey Lushnikov 7a7ff9e994 Revert "Revert "feat(firefox): roll Firefox to r1011 (#452)""
This reverts commit a738af4603.
2020-01-11 02:32:28 +01:00
Pavel Feldman a738af4603 Revert "feat(firefox): roll Firefox to r1011 (#452)"
This reverts commit c1f75f7833.
2020-01-10 12:17:34 -08:00
Andrey Lushnikov c1f75f7833 feat(firefox): roll Firefox to r1011 (#452) 2020-01-10 10:54:24 -08:00
Pavel Feldman e826a4d3f4
fix: await the popup nav to make the test pass (#391) 2020-01-06 16:34:04 -08:00
Pavel Feldman a3e3ff73bd
test: fix the popup test on WebKit / GTK (#384) 2020-01-06 13:31:37 -08:00
Pavel Feldman 58b8e66df8
tests: make WebKit / GTK run all tests again (#383) 2020-01-06 11:48:11 -08:00
Pavel Feldman 38e79f12ec feat(media): remove media emulation from browser context options (#377) 2020-01-05 14:39:16 -08:00
Pavel Feldman 2f3593bd9a
test: uncomment / fix webkit tests that time out (#379) 2020-01-04 22:27:09 -08:00
Dmitry Gozman 04bf728364 test: make network cache test pass on all browsers (#374) 2020-01-03 15:34:51 -08:00
Pavel Feldman fcd62b9611 feat(webkit): roll webkit to r1060, support target crash (#364) 2020-01-03 11:10:10 -08:00
Pavel Feldman 0d9638fe20 feat(webkit): support pageerror event (#362) 2020-01-03 10:07:49 -08:00
Arjun Attam 682e2be15f fix: allow email type in input for fill action (#353) 2020-01-02 14:10:01 -08:00
Yury Semikhatsky c540561503
test(wk): unskip passing test (#339) 2019-12-26 15:27:52 -08:00
Yury Semikhatsky 3f0eaa2350
test(wk): unskip test that failed because bootstrap scripts did not survive PSON (#331) 2019-12-23 10:40:15 -08:00
Pavel Feldman 9cfa404c87
feat: trim down url matching (#322) 2019-12-20 14:38:54 -08:00
Andrey Lushnikov a7f3490e48 feat(testrunner): implement "dit" command (#312) 2019-12-19 16:47:35 -07:00
Dmitry Gozman c172a7e7e0 feature: $wait similar to waitForFunction, but taking a selector (#303) 2019-12-18 18:11:02 -08:00
Pavel Feldman d570fc7809
feat: further strip the browser api (#304) 2019-12-18 18:07:11 -08:00
Joel Einbinder 1c2b6444e9 test(webkit): add tests for after cross origin navigations (#298) 2019-12-18 17:42:16 -08:00
Andrey Lushnikov 8cc682c7b8 feat(testrunner): allow focusing all tests in a file
With this change, exporting a "fdescribe" function from a file
will focus all tests inside the file.
2019-12-18 17:13:39 -08:00
Pavel Feldman b5e9086576 chore: remove browser from the api (#296) 2019-12-18 16:23:05 -08:00
Dmitry Gozman 9afd35d3a1
feature(waitfor): waitFor visible or any by default (#284) 2019-12-18 14:28:16 -08:00
Dmitry Gozman 7750db97fe
api: remove ExecutionContext from api (#290)
In the current state, it is superseeded by Frame and JSHandle.
2019-12-18 13:51:45 -08:00
Pavel Feldman 6d0dfd0abf
feat(context): start moving overrides to the context level 2019-12-18 12:23:33 -08:00
Andrey Lushnikov 533d058ea6
fix(firefox): support late attachment and skip a few failing tests (#283) 2019-12-17 17:33:06 -08:00
Dmitry Gozman fd927000ea feature: update api around selectors (#280)
- Selector is again a string.
- Most methods taking selector also accept waitFor option.
- Available waitFor options are: 'visible', 'hidden', 'any' === true, false === undefined.
- waitForXPath is removed.
- waitForSelector is replaced by $(selector, { waitFor: true }).
2019-12-17 14:30:02 -08:00
Dmitry Gozman 75ae9bfeee
feature(waitFor): use URLMatch to match request/response, waitForEvent for generic (#278) 2019-12-17 14:00:39 -08:00
Andrey Lushnikov 0dafabb05e test: fix a few tests on firefox (#279) 2019-12-17 13:33:05 -07:00
Yury Semikhatsky 629c56b0ab test: make async stacks pass on WebKit (#277) 2019-12-17 11:04:04 -08:00
Dmitry Gozman 5a60a96410 chore: reuse navigation methods between browsers (#271) 2019-12-16 22:02:33 -08:00
Yury Semikhatsky 974f82073f feat(webkit): allow to run beforeunload when closing page (#264) 2019-12-16 17:33:36 -08:00
Yury Semikhatsky bfb8df29bb
feat(webkit): reload page after updating user agent (#268) 2019-12-16 18:29:40 -07:00
Pavel Feldman df95b9ddb4 feat(waitFor): allow actions to wait for selector; make visible requirement default (#254) 2019-12-14 20:13:22 -07:00
Yury Semikhatsky 394c74fa5f chore(tests): move setCacheEnabled interception test to features (#253) 2019-12-14 11:54:52 -08:00
Dmitry Gozman 90f0b8c2b0
fix(firefox): setContent to properly listen for lifecycle events (#219) 2019-12-12 20:11:33 -08:00
Pavel 0675d8ec9a test: happy webkit test patch 2019-12-12 18:27:07 -08:00
Pavel Feldman cca2659578 test: update console tests (#223) 2019-12-12 08:58:37 -08:00
Pavel Feldman 66e93ce2c0 test: rearrange / uncomment more tests 2019-12-11 22:52:14 -08:00
Pavel Feldman 6440323003 fix(webkit): wait for main response on subresource-free goto (#216) 2019-12-11 16:19:37 -08:00
Joel Einbinder 78847c2f52 test(webkit): add failing test for navigating after disabling javascript (#215) 2019-12-11 16:04:02 -07:00
Pavel Feldman 4824a25cc6
fix(csp): fix some of the csp tests (#211) 2019-12-11 13:51:03 -08:00
Dmitry Gozman 57acdfd860 chore: reuse LifecycleWatcher between browsers (#208) 2019-12-11 07:17:32 -08:00
Pavel Feldman e42e361d20
feat(webkit): use new bypass csp method (#207) 2019-12-10 19:26:13 -08:00
Joel Einbinder 02f2209b13 test(firefox): enable some tests that already firefox passes (#204) 2019-12-10 17:09:06 -08:00
Pavel Feldman 8c548ed9e9
feat(webkit): implement page.exposeFunction (#195) 2019-12-10 15:17:42 -08:00
Joel Einbinder 0af3b9dfc8 feat(webkit): page.on('popup') (#202) 2019-12-10 15:07:00 -08:00
Pavel Feldman f37d9bfe95 test: extract chromium-specific connect tests 2019-12-10 13:28:50 -08:00
Pavel Feldman c61c5b056f test: group interception tests in interception.spec 2019-12-10 13:11:20 -08:00
Joel Einbinder e3f34bd69a
fix(fill): throw when the element isn't fillable (#160)
An element is fillable if its:
- In dom
- Not display:none or visibility:hidden
- textarea or input or contenteditable

if textarea or input it must also be
- not readOnly
- not disabled

#133
2019-12-09 14:51:19 -08:00
Pavel Feldman 2d77760f01
chore: move tests around after targets extraction (#153) 2019-12-05 13:15:17 -08:00
Pavel Feldman e1c4eaae28
chore: make targets chromium feature (#137) 2019-12-04 16:12:43 -08:00
Dmitry Gozman fc5898892b
feat(selectors): support optional "visible" property in all selectors (#129) 2019-12-04 13:11:10 -08:00
Yury Semikhatsky ba54ad46b3 feat(page): add Page.setJavaScriptEnabled for WebKit (#125) 2019-12-03 10:47:02 -08:00
Pavel Feldman c7a07ea2a8 chore: move more unsupported apis to interception (#91) 2019-11-26 15:01:27 -08:00
Andrey Lushnikov d4d0654666
feat(firefox): roll Firefox to r1003 (#78) 2019-11-25 16:49:15 -08:00
Pavel Feldman 3190044c00 feat(firefox): implemented *.fill (#63) 2019-11-22 16:55:35 -08:00
Dmitry Gozman e04910501b
feat(select): use ElementHandle instead of 'id=foo' when choosing options (#54) 2019-11-22 11:54:49 -08:00
Dmitry Gozman 7783400156 feat(select): allow to select options by value/label/id/index (#46) 2019-11-21 21:19:21 -08:00
Pavel Feldman e3dcac1d46
chore: move interception API into features/ (#43) 2019-11-21 14:41:38 -08:00
Joel Einbinder 92a6500b23 feat(webkit): page.fill and friends (#40) 2019-11-20 16:57:37 -08:00
Pavel Feldman 1fe1e150f3 chore: move geolocation into features/ (#37) 2019-11-20 14:18:05 -08:00