1
1
mirror of https://github.com/microsoft/playwright.git synced 2024-12-15 06:02:57 +03:00
Commit Graph

87 Commits

Author SHA1 Message Date
Dmitry Gozman
807dc1f324
fix(crash): improve documentation for crash, reject waitForEvent () 2020-06-25 09:53:56 -07:00
Pavel Feldman
c220fc7f46
chore(logs): rework logs for simplicity () 2020-06-16 17:11:19 -07:00
Dmitry Gozman
1bf9e65ef5
fix(log): include log name in progress recording () 2020-06-12 09:48:56 -07:00
Dmitry Gozman
d980ed7e7e
chore: introduce Progress concept ()
A progress roughly corresponds to an api call. It is used:

- to collect logs related to the call;
- to handle timeout;
- to provide "cancellation token" behavior so that cancelable process can either
  early-exit with progress.throwIfCanceled() or race against it with progress.race();
- to ensure resources are disposed in the case of a failure
  with progress.cleanupWhenCanceled();
- (possibly) to log api calls if needed;
- (in the future) to augment async stacks.
2020-05-29 14:39:34 -07:00
Dmitry Gozman
057ae14adc
feat: make browserServer.kill() wait for the process to exit ()
This ensures we cleaned everything up.
2020-05-27 19:59:03 -07:00
Dmitry Gozman
aae3f1e75d
feat(default context): support selected options for default context () 2020-05-21 15:13:16 -07:00
Pavel Feldman
e558f0516b
chore: print the launch error message to console () 2020-05-20 00:10:10 -07:00
Dmitry Gozman
884860b803
test: unflake launcher test ()
We throw an exception and then gracefully close the browser.
If something went wrong, we should timeout before the test times out,
kill the process and report the original exception.
2020-05-13 17:19:07 -07:00
Dmitry Gozman
28845e5ccc
feat(firefox): bump and use context setters () 2020-05-12 15:13:48 -07:00
Dmitry Gozman
a2bee2ca73
fix(launch): handle timeout and exceptions during launch () 2020-05-11 15:00:13 -07:00
Dmitry Gozman
8c083486a0
fix(launch): handle websocket connect exceptions () 2020-05-11 13:49:57 -07:00
Dmitry Gozman
ae8d97cdf9
feat(persistent context): ensure initial about:blank ()
We declare only the initial about:blank to be a supported usecase, so that
we can support options for the default context in the future.
2020-05-10 15:23:53 -07:00
Pavel Feldman
bcce48362a
api(waitForSelector): make "state: visible" default, includes rename to state () 2020-05-04 11:03:44 -07:00
Dmitry Gozman
848ea69a8a
test: unflake launcher test () 2020-04-29 22:20:06 -07:00
Andrey Lushnikov
aeabf9d707
test: mark cookies test as flaky on win () 2020-04-15 00:04:15 -07:00
Dmitry Gozman
62a493ecbd
chore(test): move more test options to state ()
This reduces the number of globals and allows to configure more options dynamically.
2020-04-12 22:19:26 -07:00
Dmitry Gozman
277c7d872f
test: close extra browser () 2020-04-12 15:30:53 -07:00
Pavel Feldman
3584205086
fix(chromium): associate navigation requests with navigations () 2020-04-09 19:03:06 -07:00
Dmitry Gozman
ade9d23c28
test: remove module.export.describe wrapper () 2020-04-08 15:19:09 -07:00
Dmitry Gozman
af01d15f62
test: slim down test utils () 2020-04-07 19:15:48 -07:00
Dmitry Gozman
e0c8fbf1a6
test: put test runner api on global, remove unused parameters () 2020-04-07 08:10:31 -07:00
Pavel Feldman
1f08b72a27
test: add web socket leak test coverage () 2020-03-30 13:49:52 -07:00
Yury Semikhatsky
afbc2f272a
test(firefox): enable passing "userDataDir option should restore cookies" () 2020-03-23 14:59:29 -07:00
Pavel Feldman
23e5d80e06
test: uncomment slow ff tests () 2020-03-22 22:16:39 -07:00
Dmitry Gozman
e115e8e2a9
tests: mark tests that launch() twice or use fixtures as slow () 2020-03-20 19:49:35 -07:00
Dmitry Gozman
9b86c631c8
api: make BrowserContext.pages() synchronous ()
Returns all pages which have been initialized already.

References .
2020-03-13 11:33:33 -07:00
Pavel Feldman
9aa56a6b9e
api(browserType): remove devices, errors () 2020-03-12 17:58:00 -07:00
Pavel Feldman
b43f33f4d3
api(review): misc changes to API. () 2020-03-11 18:10:48 -07:00
Yury Semikhatsky
9bd3711394
fix(context): reliably fire BrowserContext.Close event when browser is closing () 2020-03-09 16:53:33 -07:00
Pavel Feldman
3fa000f5f4
api(waitForSelector): bring it back () 2020-03-06 15:02:42 -08:00
Andrey Lushnikov
ca6faf2e4c chore: properly mark failint tests 2020-03-06 13:34:29 -08:00
Andrey Lushnikov
cf820b5269 test: mark failing tests on WebKit 2020-03-06 12:24:21 -08:00
Dmitry Gozman
1d770af804
api: waitForElement accepts waitFor: attached|detached|visible|hidden ()
This includes rename waitForSelector -> waitForElement and removes $wait.
2020-03-05 17:45:41 -08:00
Yury Semikhatsky
9bc6dcea1d
feat(api): introduce BrowserContext.waitForEvent () 2020-03-05 17:22:57 -08:00
Pavel Feldman
5bd6e4970b
test: it.skip skips and it.fail expects to fail now () 2020-03-02 13:47:08 -08:00
Pavel Feldman
dc161df063
fix(launch): throw upon page argument when non-persistent () 2020-02-27 14:09:24 -08:00
Andrey Lushnikov
d735de5347
feat: do not let users pass userDataDir to browserType.launch() ()
We now have a separate method for this - `browserType.launchPersistent`.
This will probably save our users quite some time.
2020-02-12 19:32:23 -08:00
Andrey Lushnikov
bfaf191c98
test: add missing tests ()
Chromium tests on Linux now call all our API methods and events at least once!
2020-02-12 16:13:48 -08:00
Dmitry Gozman
da30847c83
feat(firefox): apply emulation to all pages in the browser context () 2020-02-11 18:52:01 -08:00
Pavel Feldman
20e2bac857 test: fix flaky page event test 2020-02-11 15:19:43 -08:00
Pavel Feldman
72b9cf010e
feat(context): introduce BrowserContext close event () 2020-02-11 10:27:19 -08:00
Joel Einbinder
251ad38824
fix(navigations): remove LifecycleWatcher, fix flakes () 2020-02-10 18:35:47 -08:00
Joel Einbinder
c03e8b7946
chore(tests): add types for tests ()
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
a547aa7984
feat(connect): allow multiple webkit connections over web socket () 2020-02-06 12:41:43 -08:00
Pavel Feldman
55b6fe241e
feat(launch): introduce client, server & persistent launch modes (3) () 2020-02-05 16:36:36 -08:00
Pavel Feldman
a2ab645e63
feat(launch): introduce client, server & persistent launch modes (2) () 2020-02-05 12:41:55 -08:00
Pavel Feldman
0518625dcc
feat(launch): introduce client, server & persistent launch modes (1) () 2020-02-04 19:41:38 -08:00
Joel Einbinder
2b231c9e1b
fix(test): unflake waitForSelector when browser closes test ()
The waitForSelector call might not have made it into the browser by the time we disconnect, resulting in a websocket error instead of a protocol error.
2020-01-30 14:19:30 -08:00
Andrey Lushnikov
ce7c8d74b5
feat: introduce BrowserType.name() ()
This helps a lot to produce nice logging:

```js
const { chromium, webkit } = require('playwright');

(async () => {
  for (const launcher of [chromium, webkit]) {
    console.log(`Testing on ${launcher.name()}`);
    const browser = await launcher.launch();
    // ...
    await browser.close();
  }
})();
```
2020-01-28 18:09:07 -08:00
Joel Einbinder
184b25ff7b
chore: windows bots via github actions ()
Mac will come in a follow up!

As a drive-by, removed npm build everywhere, because npm install already runs build.
2020-01-28 18:04:51 -08:00