Commit Graph

18 Commits

Author SHA1 Message Date
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
Andrey Lushnikov
05b019f1ba
reland: testrunner: make environment a simple class (#2812)
This re-lands PR https://github.com/microsoft/playwright/pull/2769

It was reverted before in https://github.com/microsoft/playwright/pull/2790
because it was breaking the new CHANNEL bot.
2020-07-02 11:05:38 -07:00
Pavel Feldman
c25fc4956d
chore(rpc): scope client-side handles (#2796) 2020-07-01 13:55:29 -07:00
Pavel Feldman
e467ea57e7
revert: testrunner: make environment a simple class (#2769) (#2790) 2020-07-01 10:56:19 -07:00
Andrey Lushnikov
1605cb453c
testrunner: make environment a simple class (#2769)
This patch:
- makes environment a simple class with optional methods `beforeEach`, `afterEach`, `beforeAll`, `afterAll`, `globalSetup` and `globalTeardown`
- removes capability to have multiple hooks of the same name inside suite
- removes default environment for test. (`dit` now adds a `TraceTestEnvironment` to the test)
- extracts all environments that we use in our tests in `//test/environments.js`

Downsides:
- we no longer know hook locations for the environments. This, however, should not be a big deal since stack traces (if any) will still point into it.
- this also regresses hook locations for suites for simplicity. We can get them back, but it shouldn't be pressing since we now have only one hook of each kind in every suite.
2020-06-30 16:51:03 -07:00
Pavel Feldman
59d0f8728d
test(recorder): add recorder sanity tests (#2582) 2020-06-16 10:15:08 -07:00
Dmitry Gozman
4faa1306b9
test: dump all logs in DEBUGP mode (#2517) 2020-06-09 18:55:57 -07:00
Pavel Feldman
9aa9d6bc1d
feat(downloads): accept downloads in persistent, allow specifying the downloadsPath (#2503) 2020-06-08 21:45:35 -07:00
Pavel Feldman
fb058ffe0d
feat(proxy): allow specifying proxy (#2485) 2020-06-05 13:50:15 -07:00
Pavel Feldman
c001facffc
feat(firefox): allow passing user prefs at launch time (#2417) 2020-05-31 09:28:57 -07:00
Andrey Lushnikov
0753c2d54b
test: hack in output directory cleanup for parallel runs (#2378) 2020-05-27 22:03:38 -07:00
Dmitry Gozman
82cab094e8
feat(logging): add logging to websocket transport (#2289) 2020-05-18 19:00:38 -07:00
Pavel Feldman
ffe7084652
feat(electron): experimental electron support (#2166) 2020-05-11 18:00:33 -07:00
Pavel Feldman
c1c0237d4e
api(dispatchEvent): page, frame and handle versions added (#1932) 2020-04-23 14:58:37 -07:00
Pavel Feldman
5b085fdf03
feat(logger): introduce context-level logger (#1896) 2020-04-20 23:24:53 -07:00
Dmitry Gozman
29a6cdff6b
fix(tests): fix a race with golden setup (#1757)
When running multiple browsers, we should take the golden information from the state.
2020-04-13 14:12:44 -07:00
Dmitry Gozman
62a493ecbd
chore(test): move more test options to state (#1761)
This reduces the number of globals and allows to configure more options dynamically.
2020-04-12 22:19:26 -07:00
Dmitry Gozman
42beb3784f
feat(test): introduce test.config.js (#1725)
This file encapsulate everything specific to playwright testing. Now the general test.js can be reused for other projects.
2020-04-09 18:14:29 -07:00