Commit Graph

1149 Commits

Author SHA1 Message Date
Pavel Feldman
61a6cdde70
feat(api): expose locator.highlight (#12420) 2022-03-01 13:56:21 -08:00
Max Schmitt
e0e6b66cbe
chore(android): align android context options with mixin (#12401) 2022-03-01 18:11:38 +01:00
Pavel Feldman
6a663ef54f
chore(test-runner): revert recent changes to fix tests (#12439)
* Revert "fix(hooks): separate test timeout from beforeAll/afterAll timeouts (#12413)"

This reverts commit 73dee69558.

* Revert "fix(test-runner): rely on test title paths instead of ordinal (#12414)"

This reverts commit d744a87aee.

* Revert "chore(test runner): run hooks/modifiers as a part of the test  (#12329)"

This reverts commit 47045ba48d.
2022-03-01 09:11:17 -08:00
Max Schmitt
d2ae6a9db2
fix: isDisabled check with option/optgroup (#12437) 2022-03-01 18:10:16 +01:00
Pavel Feldman
d14ecec612
chore: remove flaky-by-design test (#12434) 2022-03-01 08:52:52 -08:00
Andrey Lushnikov
1a7a3bf99d
chore: fix types for tests (#12429) 2022-03-01 01:32:40 -08:00
Andrey Lushnikov
66eda836c9
browser(ff-beta): roll Firefox-Beta to 98b10 (#12421)
Firefox reverted the third-party cookies recently:
https://bugzilla.mozilla.org/show_bug.cgi?id=1751435

Thus changes in tests.

References #12225
2022-03-01 00:17:33 -08:00
Andrey Lushnikov
d744a87aee
fix(test-runner): rely on test title paths instead of ordinal (#12414)
Fixes #11904
2022-02-28 15:40:23 -08:00
Dmitry Gozman
73dee69558
fix(hooks): separate test timeout from beforeAll/afterAll timeouts (#12413)
This makes it possible to have longer `beforeAll`/`afterAll` and not
affect first/last test timeout.
2022-02-28 15:09:04 -08:00
Mateusz Burzyński
eaa98ce53a
feat(keyboard): support simple copy-pasting using meta+c/v (#10828)
It's a straightforward change to support new, common, keyboard commands

Note that I've tested this locally with Chrome on my Mac but it seems that CI doesn't want to pass Chrome tests - it's running on ubuntu though. Does this mean that I should introduce per-platform editing commands? At the moment there is only a single [`macEditingCommands`](0ed33522c5/packages/playwright-core/src/server/macEditingCommands.ts) file.

References https://github.com/microsoft/playwright/issues/12000

Co-authored-by: Andrey Lushnikov <aslushnikov@gmail.com>
2022-02-28 13:43:43 -08:00
Andrey Lushnikov
f47423d315
devops: upload test-runner test results to flakiness dashboard (#12412)
Fixes #12152
2022-02-28 13:41:30 -08:00
Andrey Lushnikov
396d920145
feat(test-runner): implement expect(pageOrLocator).toHaveScreenshot (#12242)
Fixes #9938
2022-02-28 12:25:59 -08:00
Dmitry Gozman
47045ba48d
chore(test runner): run hooks/modifiers as a part of the test (#12329)
chore(test runner): run hooks/modifiers as a part of the test

This moves `beforeAll`, `afterAll` and some modifiers from running
as a separate entity into running inside a test.

Pros:
- All errors are reported as test errors.
- All artifacts are collected as test artifacts.
- Reporters support this out of the box.

Details:
- Each test computes the necessary hooks to run and runs them.
- Teardown is usually performed during the test (on test failure or worker stop).
- `skipRemaining` is added to `DonePayload` to preserve the behavior
  where `beforeAll` hook failure skips subsequent tests.
  This behavior can now be improved to only target tests affected by this hook.
2022-02-28 11:42:47 -08:00
Dmitry Gozman
3c2bca2768
fix(test loader): implement tsconfig paths through resolveFilename (#12357)
This uses `Module._resolveFilename` to intercept module resolution and
check `tsconfig.paths` similarly to pirates usage ot `Module._compile`.

Previously, we resolved during compilation that required reproducible
resolution due to caching. Now we can resolve as we go and support
all `tsconfig.paths`.
2022-02-25 15:43:58 -08:00
Max Schmitt
6438aed36c test: skip test in electron
Follow-up for #12371
2022-02-26 00:17:37 +01:00
Max Schmitt
e035ed488c
test: add test for cookies with expiration (#12304) 2022-02-25 23:00:51 +01:00
Max Schmitt
a95d2320ad
test: mark failing android tests as fixme / fix them (#12371) 2022-02-25 22:56:51 +01:00
Max Schmitt
821a8e93c7
chore: do not double trim in trace viewer (#12338) 2022-02-24 21:55:50 +01:00
Dmitry Gozman
91672595f2
fix(reporters): normalize usage of isTTY, env.CI and debug env variables (#12295)
- `stdout.isTTY` controls whether list reporter updates lines or just adds them;
- `env.CI` is used in a few places to affect the defaults:
  - whether to open interactive html;
  - default reporter dot/line;
  - default terminal reporter added to non-terminal reporters;
- `env.PWTEST_SKIP_TEST_OUTPUT` is removed;
- `env.PW_TEST_DEBUG_REPORTERS` is introduced specifically for tests.
2022-02-24 12:39:28 -08:00
Andrey Lushnikov
5879c7f362
chore: refactor toMatchSnapshot once again (#12313)
Keep massaging code in preparation for `toHaveScreenshot`.

References #9938
2022-02-23 13:17:37 -08:00
Dmitry Gozman
4399623f9f
chore(test runner): make timeout a separate error in TestInfo.errors (#12315)
This way we control the timeout error message from the runner,
so that later on we can differentiate between test timeout, fixture
timeout and hook timeout.
2022-02-23 12:32:12 -08:00
Dmitry Gozman
114edecd3a
fix(list mode): keep outputDir intact (#12291) 2022-02-22 12:50:26 -08:00
Max Schmitt
be2e4866b0
test: add test for sendBeacon and asserting request body (#12274) 2022-02-22 20:15:24 +01:00
Dmitry Gozman
d3c4323021
fix(test runner): improve error message for unexpected calls (#12240) 2022-02-18 18:25:18 -08:00
Dmitry Gozman
ee0dd6ec71
fix(test runner): trim full output path (#12239)
Previously, we only trimmed the "full title" component, but
we should also trim the "relative path" component.
2022-02-18 15:40:36 -08:00
Andrey Lushnikov
0682672242
chore: move comparator logic to playwright-core (#12232)
This will enable implementation of `toHaveScreenshot` on the
server-side.

Drive-by: drop blink-diff

References #9938
2022-02-18 14:39:17 -08:00
Andrey Lushnikov
b9e86b79ee
chore: refactor toMatchSnapshot implementation (#12206)
This patch prepares for the `toHaveScreenshot` implementation
by splitting common parts from `toMatchSnapshot`.

Drive-by: fix default extension generation from `.bin` to `.dat`
for unknown buffers.
2022-02-18 11:21:58 -08:00
Dmitry Gozman
edac84d072
feat(remote): send browser/channel/headless in a header (#12205) 2022-02-18 07:54:33 -08:00
Dmitry Gozman
34eec7eae7
fix(webServer): route output through reporters (#12198) 2022-02-18 07:54:01 -08:00
Dmitry Gozman
15043801cb
chore: use transport for BrowserType.connect (#12196)
This gives us logging, ECONNRESET error handling and proper cleanup.
2022-02-17 20:48:14 -08:00
Andrey Lushnikov
a98babec69
feat(test-runner): introduce pixelCount and pixelRatio options (#12169)
This patch adds additional options to `toMatchSnapshot` method:
- `pixelCount` - acceptable number of pixels that differ to still
  consider images equal. Unset by default.
- `pixelRatio` - acceptable ratio of all image pixels (from 0 to 1) that differ to still
  consider images equal. Unset by default.

Fixes #12167, #10219
2022-02-17 15:44:03 -08:00
Andrey Lushnikov
c98d595bea
fix: support hiding caret in case of matching style rule (#12172) 2022-02-17 14:05:56 -08:00
Max Schmitt
21ae298015
fix(trace-viewer): don't crash when argument is null (#12186) 2022-02-17 22:12:42 +01:00
Max Schmitt
4115235f4d
feat(codegen): use web-first page assertions to match URL (#12177) 2022-02-17 20:52:35 +01:00
Max Schmitt
a667d94d45
chore(codegen): do not over-escape spaces (#12155) 2022-02-17 01:01:46 +01:00
Andrey Lushnikov
086333cd60
feat(test-runner): support unnamed snapshots (#12161)
Fixes #9007
2022-02-16 14:22:01 -08:00
Max Schmitt
92045b7faf
feat(codgen): support radio buttons (#12157) 2022-02-16 19:10:00 +01:00
Dmitry Gozman
47cc7c4ae8
chore: refactor internal cli commands to use commander (#12146) 2022-02-16 09:54:12 -08:00
Yury Semikhatsky
7ee35ae30d
fix(html-report): open all test traces in one viewer (#12142) 2022-02-16 09:09:42 -08:00
Yury Semikhatsky
08fd8d0762
fix(tracing): do not capture iframes in head (#12126) 2022-02-16 09:09:15 -08:00
Dmitry Gozman
85cb3c9713
test: add a test that fixture error after timeout is not a fatal error (#12141) 2022-02-15 18:05:20 -08:00
Andrey Lushnikov
65697d64be
test: fail canvas test on MacOS 11 and less (#12131) 2022-02-15 14:00:26 -08:00
pierscowburn
5db7ce5964
fix: propagate exit code in experimental mode (#12070)
In experimental ESM mode a child process is forked in order to run the tests. Currently the exit code of this child process is not propagated to the exit code of the parent process, which means that the process exits with a status code of `0` even if some of the tests failed.

This makes it difficult to use Playwright in CI in experimental mode, as the CI pipeline as a whole will pass despite the test failures.

This change addresses this by propagating the exit code in the case where it is non-zero.
2022-02-15 13:10:35 -08:00
Yury Semikhatsky
f15610b874
fix(fetch): always return non-empty body regardless of request method (#12102) 2022-02-15 09:06:21 -08:00
Andrey Lushnikov
363b8a6970
feat: support mask option in screenshot methods (#12072)
Fixes https://github.com/microsoft/playwright/issues/10162
2022-02-15 07:05:05 -08:00
Dmitry Gozman
5a0445b8da
feat(remote): let client enable/disable sock proxy (#12086) 2022-02-14 15:10:58 -08:00
Andrey Lushnikov
ef21ce3f56
feat(test-runner): filter out syntax error stack traces (#12095)
Filter out long stack traces from babel when it fails compilation
due to syntax error in test.
2022-02-14 14:33:14 -08:00
Dmitry Gozman
9814c592d2
fix(test runner): shutdown redundant workers (#12062) 2022-02-14 10:57:15 -08:00
Dmitry Gozman
fb00991a78
chore: intercept socks proxy in the driver (#12021) 2022-02-13 14:03:47 -08:00
Pavel Feldman
96b5831a49
chore: add support private methods in TS (#12051) 2022-02-11 14:46:49 -08:00
Yury Semikhatsky
abd7084bcc
fix: match default font families in headless chromium (#11340) 2022-02-11 09:06:17 -08:00
Dmitry Gozman
d8db785c0a
fix(reporters): correctly handle missing stdout.columns (#12016)
When columns are not available, do not trim the output.
2022-02-11 08:33:56 -08:00
Dmitry Gozman
66b5cf5ae1
feat(remote): make PlaywrightServer work with browserType.connect (#11849)
This changes PlaywrigtServer to serve connections like `ws://localhost:3333/?browser=chromium`:
- launches the browser;
- talks `browserType.connect`-style protocol over websocket;
- compatible with `connectOptions` fixture.

```js
await playwright.chromium.connect({ wsEndpoint: 'ws://localhost:3333/?browser=chrome' });
```
2022-02-10 16:36:23 -08:00
Ross Wollman
0d42c16a17
fix(test-runner): undefined body crash with manual attachments (#11995)
The new (as of 1.18) `async testInfo.attach(…)` API handles this
gracefully (and is part of the reason for the new API's existence).
However, for the foreseeable future, it's still possible to manually
push onto the attachments array where we can't validate the contents
until it's too late, so this change ensures more graceful handling in
that case.

Fixes #11565
2022-02-10 12:33:38 -08:00
Dmitry Gozman
9a8e55493f
test: add a test for fetch api respecting port forwarding (#12007) 2022-02-10 12:05:35 -08:00
Dmitry Gozman
9c66068971
fix(connect): make route.fulfill({ response }) work (#12006) 2022-02-10 12:05:04 -08:00
Andrey Lushnikov
9287ef2dfb
test: skip test when run with PWTEST_TRACING (#11999)
This test tries to enable tracing itself; double-enabling
tracing throws an error.

This started failing after 284f76357f
2022-02-10 09:45:18 -08:00
Pavel Feldman
fbc05b74a7
chore: revert "fix(test-runner): escape backslashes in win cli (#11763)" (#12004) 2022-02-10 07:02:37 -08:00
Mateusz Burzyński
b0cd5b1420
feat(mouse): set .buttons correctly for basic mouse commands in Chrome (#10698)
Co-authored-by: Andrey Lushnikov <aslushnikov@gmail.com>
2022-02-09 20:48:16 -08:00
Dmitry Gozman
284f76357f
test: unflake browsertype-connect.spec (#11994)
Consider the scenario:
- First test starts a remote server, connects to it and does not close.
- Remote server fixture stops the server in teardown. Meanwhile,
  the connected browser did not get notified about disconnect just yet.
- Second test starts and sets up tracing in the old connected browser.
- Tracing fails because the browser now realises it has disconnected.
2022-02-09 17:00:33 -08:00
Andrey Lushnikov
6904b3294e
fix(test-runner): fix browser initialization in test modifiers (#11984)
Fixes #11985
2022-02-09 15:30:14 -08:00
Dmitry Gozman
ae7c52154f
fix(fixtures): make sure connected browser respects context options (#11990)
Connected browser was wired up to the wrong browserType object.
2022-02-09 15:25:15 -08:00
Andrey Lushnikov
6f87955243
feat: introduce disableAnimations option for screenshots (#11870)
This option stops all kinds of CSS animations while doing screenshot:
- CSS animations
- CSS transitions
- Web Animations

Animations get different treatment depending on animation duration:
- finite animations are fast-forwarded to its end, issuing the
  `transitionend` event.
- Infinite animations are resetted to its beginning, and then
  resumed after the screenshot.

References #9938, fixes #11912
2022-02-09 12:52:11 -08:00
Darío Kondratiuk
48cc41f3e7
feat: add key support on react engine (#11970)
I've got [this question](https://stackoverflow.com/questions/71050193/react-locator-example/71052432#71052432) on StackOverflow. And although, in that case, the `key` was part of the `props` attributes. That might not always be true.

I am bringing this to the tell to see what you think about this.
I'm also fixing a typo :)
2022-02-09 11:33:15 -08:00
Andrey Lushnikov
439c8e9c40
test: fix tests for chromium-based browser channels (#11974) 2022-02-09 11:29:16 -08:00
Andrey Lushnikov
40b4218962
chore: roll stable test runner to Feb 9, 2022 (#11971) 2022-02-09 09:34:25 -08:00
Yury Semikhatsky
706c897031
feat(fixtures): respect tracing config for APIRequestContext (#11954) 2022-02-09 08:54:09 -08:00
Pavel Feldman
e9e5de2d57
feat(debug): allow preprocessing JS scripts as well (#11953) 2022-02-09 07:14:11 -08:00
Dmitry Gozman
19368e93af
feat(test runner): support connectOptions (#11919)
This allows to specify `connectOptions` in the config that
switch built-in `browser` to be remotely connected.
2022-02-08 20:45:42 -08:00
Dmitry Gozman
5881a46ecf
fix(test runner): skip beforeAll/afterAll when all tests are skipped (#11952)
There is a corner case where tests were skipped like this:

```js
test.skip('title', () => {});
```
2022-02-08 16:36:30 -08:00
Dmitry Gozman
e92caf01b3
fix(webServer): do not set baseURL equal to webServer.url (#11951) 2022-02-08 15:57:36 -08:00
Pavel Feldman
8dff2e35c8
chore: don't throw on no testDir (#11950) 2022-02-08 15:27:05 -08:00
Pavel Feldman
b2e15b8c60
chore: mute more test runner extension vars (#11881) 2022-02-08 09:22:45 -08:00
Dmitry Gozman
8a5c93436d
fix(reporter): do not report parallel tests as slow (#11921) 2022-02-07 20:10:13 -08:00
Yury Semikhatsky
1e00218ead
feat(tracing): suport loading multiple files in trace viewer (#11880) 2022-02-07 17:05:42 -08:00
Dmitry Gozman
4ef22d3387
test: enable "should record open in a new tab with url" on webkit (#11917) 2022-02-07 16:09:11 -08:00
Pavel Feldman
9116adc684
chore: allow opt-into the legacy global setup mode (#11888) 2022-02-07 10:41:56 -08:00
Dmitry Gozman
f82e09be04
feat(codegen): generate locators and frame locators (#11873) 2022-02-04 19:27:45 -08:00
Dmitry Gozman
1503264aca
test: decrease threshold for flaky "should play audio" (#11878) 2022-02-04 16:14:48 -08:00
Dmitry Gozman
af4944388f
test: skip "should support has:locator" on tracing bots (#11876) 2022-02-04 15:34:33 -08:00
Dmitry Gozman
c45dacc834
feat(codegen): make selector generator strict (#11856)
This is required to migrate to locators.
2022-02-04 07:34:23 -08:00
Andrey Lushnikov
547a32885b
feat: hide blinking cursor when making screenshots (#11854)
References #9938
2022-02-03 21:44:23 -08:00
Dmitry Gozman
c9e99d5d97
test: reenable "should intercept network activity from worker 2" (#11851) 2022-02-03 17:16:40 -08:00
Dmitry Gozman
d9a8bb057d
fix(test-fail): allow unhandled expects in test.fail (#11850)
Previously, we would consider this a worker error, but
we make an exception for "expect()" calls.
2022-02-03 17:14:12 -08:00
Yury Semikhatsky
d237ad76c1
test: mark cltr+click test as timing out on windows (#11840) 2022-02-03 09:09:38 -08:00
Pavel Feldman
fdda759a9d
feat(parallel): allow setting enclosing scope parallel mode (#11822) 2022-02-02 20:44:11 -08:00
Andrey Lushnikov
ba0c7e679b
feat(test-runner): support expect.soft (#11800)
Soft expects will still fail the test, but will not abort it's execution. As a consequence of this:
-  `TestResult` now might have multiple errors, which is reflected with a new `testResult.erros: TestError[]` field.
- `TestInfo` now might have multiple errors as well, which is reflected with a new `testInfo.errors: TestError[]` field.

Fixes #7819
2022-02-02 18:33:51 -08:00
Dmitry Gozman
f587a43932
feat(locator): "has" option (#11411)
This introduces `locator('div', { has: locator })` syntax that matches elements containing other elements.
Can be used together with `hasText`.

Internally, has selector engine takes an inner selector escaped with double-quotes:
`div >> has="li >> span >> text=Foo" >> span`.
2022-02-02 16:55:50 -08:00
github-actions[bot]
fba523a9d0
feat(chromium): roll to r965416 (#11802)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Max Schmitt <max@schmitt.mx>
2022-02-02 11:39:10 +01:00
Max Schmitt
c752b28516
chore: pin production dependencies (#11793) 2022-02-02 11:14:41 +01:00
Andrey Lushnikov
b0daa7754f
feat: filter stack traces to exclude test runner frames (#11795)
Before:

```bash
Running 1 test using 1 worker
  1) [chromium] › tests/example.spec.ts:3:1 › should work ==========================================

    Error: expect(received).toBe(expected) // Object.is equality

    Expected: 2
    Received: 1

      2 |
      3 | test('should work', async({page}) => {
    > 4 |   expect(1).toBe(2);
        |             ^
      5 | });
      6 |

        at Proxy.<anonymous> (/Users/andreylushnikov/prog/playwright/packages/playwright-test/src/expect.ts:151:30)
        at /Users/andreylushnikov/tmp/tests/example.spec.ts:4:13
        at /Users/andreylushnikov/prog/playwright/packages/playwright-test/src/workerRunner.ts:335:13
        at runNextTicks (node:internal/process/task_queues:61:5)
        at processImmediate (node:internal/timers:437:9)
        at TestInfoImpl._runFn (/Users/andreylushnikov/prog/playwright/packages/playwright-test/src/testInfo.ts:164:7)
        at WorkerRunner._runTestWithBeforeHooks (/Users/andreylushnikov/prog/playwright/packages/playwright-test/src/workerRunner.ts:317:24)
        at TimeoutRunner.run (/Users/andreylushnikov/prog/playwright/packages/playwright-core/src/utils/async.ts:48:14)
        at TestInfoImpl._runWithTimeout (/Users/andreylushnikov/prog/playwright/packages/playwright-test/src/testInfo.ts:151:7)
        at WorkerRunner._runTestOrAllHook (/Users/andreylushnikov/prog/playwright/packages/playwright-test/src/workerRunner.ts:276:5)
        at WorkerRunner._runSuite (/Users/andreylushnikov/prog/playwright/packages/playwright-test/src/workerRunner.ts:190:11)
        at WorkerRunner.run (/Users/andreylushnikov/prog/playwright/packages/playwright-test/src/workerRunner.ts:137:9)
        at process.<anonymous> (/Users/andreylushnikov/prog/playwright/packages/playwright-test/src/worker.ts:87:5)
```

after:

```
Running 1 test using 1 worker
  1) [chromium] › tests/example.spec.ts:3:1 › should work ==========================================

    Error: expect(received).toBe(expected) // Object.is equality

    Expected: 2
    Received: 1

      2 |
      3 | test('should work', async({page}) => {
    > 4 |   expect(1).toBe(2);
        |             ^
      5 | });
      6 |

        at /Users/andreylushnikov/tmp/tests/example.spec.ts:4:13
```
2022-02-01 18:40:44 -08:00
Dmitry Gozman
a30bc171c5
chore: make playwright-test tests debuggable with extension (#11798) 2022-02-01 17:15:55 -08:00
Pavel Feldman
011d743f90
chore: roll test runner to ToT (#11796) 2022-02-01 15:34:09 -08:00
Pavel Feldman
f875ebe730
fix(test-runner): respect source maps when reporting test files (#11770) 2022-02-01 13:04:54 -08:00
Caio Agiani
b6b60decdf
fix: typos (#11789) 2022-02-01 11:09:41 -08:00
Pavel Feldman
3a5e8184b5
fix(html-reporter): open tests from required file (#11784) 2022-02-01 11:01:52 -08:00
Max Schmitt
e0c4e66272
chore: bump dev dependencies (#11779) 2022-02-01 17:12:11 +01:00
Pavel Feldman
c5d852f1bb
fix(test-runner): escape backslashes in win cli (#11763) 2022-01-31 17:48:05 -08:00
Andrey Lushnikov
2336692e8a
feat: support clarification message for expect (#11735)
The clarification message is displayed in the HTML report as the name of the step:

![image](https://user-images.githubusercontent.com/746130/151852652-48194140-5ea4-439d-afee-12583a8caf71.png)

It is also shown in terminal output:

![image](https://user-images.githubusercontent.com/746130/151852666-5c956ef1-6e94-4bc2-8e55-b58688dfc7e0.png)

Fixes #7816
2022-01-31 17:14:59 -08:00
Pavel Feldman
2b55adaafa
feat(breaking): always report onBegin/onEnd, report file errors (#11758) 2022-01-31 17:09:04 -08:00
Dmitry Gozman
0b04c7d504
fix(drag&drop): relax layout shift logic when dropping (#11760)
When element that is being dragged stays under the mouse,
it prevents the hit target check on drop from working,
because drop target is overlayed by the dragged element.

To workaround this, we perform a one-time hit target check
before moving for the drop, as we used to.
2022-01-31 16:21:35 -08:00
Andrey Lushnikov
b58b004f0f
fix: run reporter.onEnd after webserver teardown (#11712)
Fixes #11647
2022-01-31 06:19:33 -08:00
Yury Semikhatsky
401cd9c0ee
fix(fetch): do not throw on empty response body with br encoding (#11708) 2022-01-28 12:58:58 -08:00
Yury Semikhatsky
312ab57f02
test: ctrl+click during provisional load (#11710) 2022-01-28 11:47:14 -08:00
Dmitry Gozman
30f3cbd6da
fix(fixtures): make sure defaultLaunchOptions are always there (#11713) 2022-01-28 10:51:55 -08:00
Yury Semikhatsky
84248f6e48
fix(webkit): handle will/didCheckPolicyForNavigation (#11631) 2022-01-27 14:58:43 -08:00
Yury Semikhatsky
d305a2ab3f
fix: throw in route.continue if it is called twice (#11701) 2022-01-27 14:58:02 -08:00
Pavel Feldman
29a84b2df8
chore: allow pre-processing scripts (#11702) 2022-01-27 14:32:23 -08:00
Yury Semikhatsky
81a7b2488f
test: enable showDirectoryPicker test (#11669) 2022-01-27 11:40:06 -08:00
Dmitry Gozman
b1fbc4fdbe
fix(test runner): resolve tsconfig for each file (#11662)
This allows us to properly handle path mappings
that are not too ambiguous.
2022-01-26 18:28:42 -08:00
divdavem
512a245f13
feat(test-runner): wait for a url before starting tests (#10138)
The webServer configuration in @playwright/test now accepts a url as an
alternative to a port number to wait for a url to return a 2xx status code.
2022-01-26 16:32:58 -08:00
Yury Semikhatsky
ba86dab83a
test: enable filechooser test in chromium (#11653) 2022-01-26 12:39:59 -08:00
hackerman
872a4be752
fix(server): handle = in cookie values correctly (#11613) 2022-01-26 11:27:43 -08:00
Dmitry Gozman
687a16b848
feat(locator): introduce locator.page() getter (#11630) 2022-01-26 07:58:58 -08:00
Dmitry Gozman
19820de7a9
fix(test runner): correctly save videos when running remotely (#11633) 2022-01-26 07:43:07 -08:00
Andrey Lushnikov
6a7a2971f2
fix(chromium): close all javascript dialogs when closing context (#11614)
Fixes #11581
2022-01-25 13:52:18 -08:00
Yury Semikhatsky
fc188ea16d
test: request tracing start/stop (#11603) 2022-01-25 12:04:03 -08:00
Dmitry Gozman
a8a81eba11
test: default to one worker on CI for tests/playwright-test (#11618) 2022-01-25 10:11:44 -08:00
Ross Wollman
64e7557fb9
fix: falsey behavior in route.continue, page.post, testInfo.attach (#11421)
In several of the Playwright APIs, falsey values were not handled correctly. This changeset adds tests (and some fixes):

- route.continue: If options.postData was the empty string, the continue failed to override the post data.
- page.post (application/json with options.data: false|''|0|null): Raw falsey values were getting dropped (i.e. you can't do the equivalent of curl --header application/json … -d 'false'). This has been fixed with most values across all browsers, but an additional fix is needed for 'null' which the channel serializer treats extra specially.
- testInfo.attach: This didn't get reported as an error when options.path was the empty string, but should have been.
#11413 (and its fix #11414) inspired this search as they are the same
class of bug.
2022-01-24 15:06:36 -08:00
Pavel Feldman
9542b007cf
fix(esm): don't emit module shorthand warning (#11596) 2022-01-24 11:22:56 -08:00
github-actions[bot]
5382a794fe
feat(chromium): roll to r960211 (#11487)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Andrey Lushnikov <aslushnikov@gmail.com>
2022-01-24 08:40:45 -08:00
Max Schmitt
f29a673b4c
fix: do not mute route handler exceptions (#11555) 2022-01-22 22:19:32 +01:00
Yury Semikhatsky
ab9d5a0dc4
chore(tracing): add tracing to APIRequestContext (#11502) 2022-01-22 11:25:13 -08:00
Yury Semikhatsky
8a7e4f9814
test: update wk win expectations for "should report raw headers" (#11558) 2022-01-21 21:49:28 -08:00
Yury Semikhatsky
295d0a65c3
fix(har): do not hang on cached resources (#11556) 2022-01-21 16:31:00 -08:00
Pavel Feldman
6b3e596fd8
fix(baseurl): support path-less baseurl (#11527) 2022-01-20 18:11:56 -08:00
Max Schmitt
fb139cefac
fix: playwright.locator.hasText RegExp flag serialisation in Console API (#11516) 2022-01-21 01:05:37 +01:00
Max Schmitt
5876799228
test: response event for cached img elements (#11506) 2022-01-20 14:38:19 +01:00
Pavel Feldman
a65f7066d5
fix(webkit): improve orientation detection (#11481) 2022-01-19 10:07:38 -08:00
campersau
4a9fc4d30b
test: fix visibility spelling in test (#11476) 2022-01-19 14:46:27 +01:00
Dmitry Gozman
6928c84ac2
chore: move some files out of server/common (#11466)
This is a directory for sharing code between Node and Web.
2022-01-18 19:13:51 -08:00
Pavel Feldman
db0cda9df5
chore: rename default config to match extension pattern (#11446) 2022-01-18 13:31:12 -08:00
Pavel Feldman
daa2f00bfb
chore: roll stable-test-runner to ToT (#11445) 2022-01-17 19:45:59 -08:00
Ross Wollman
33f32368e5
fix(test runner): dispatcher transformation of empty attachments (#11414) 2022-01-17 18:47:24 -08:00
Pavel Feldman
8ecf581b45
chore: focus by line should override only (#11427) 2022-01-16 08:47:09 -08:00
Yury Semikhatsky
cfb86a74fa
fix(webkit): filechooer interception after process swap (#11415) 2022-01-14 17:33:07 -08:00
Max Schmitt
fb22c859d6
chore: add browser like UA to browser fetcher (#11006)
Drive-by: unify all Playwright user agents across the board.

Co-authored-by: Andrey Lushnikov <lushnikov@chromium.org>
2022-01-14 02:46:17 -08:00
Dmitry Gozman
93a20ee419
test: add a failing test for filechooser after navigation (#11381) 2022-01-13 11:24:21 -08:00
Dmitry Gozman
9d5bf0e90d
fix(test runner): fixture teardown double error, testInfo.attach() (#11365)
- Use file path, not content to calculate the attachment hash.
- Always cleanup fixture from the list on teardown, to avoid reporting
  teardown error multiple times: from the test, and from the cleanup.
2022-01-13 10:38:47 -08:00
Andrey Lushnikov
bd837b5863
test: enable autowaiting test on webkit (#11343)
Fixes #11219
2022-01-12 01:52:58 -08:00
Dmitry Gozman
359d523ec3
fix(selectors): allow :scope with additional css (#11338) 2022-01-11 18:40:29 -08:00
Dmitry Gozman
4efb30999f
feat(request): show request context methods as steps (#11337) 2022-01-11 17:33:41 -08:00
Dmitry Gozman
d36ff8a96c
fix(test runner): remove test output for failures (#11308) 2022-01-10 13:22:09 -08:00
Dmitry Gozman
14fd837e94
fix(test runner): hide beforeAll/afterAll hooks from the reporter api (#11306)
This api is not ready yet.
2022-01-10 12:09:51 -08:00
Andrey Lushnikov
7b1fecc009
fix: default to en-US locale in all browsers in Playwright Test (#11133)
It makes sense to default to en-US by default across all our browsers in Playwright Test.

Fixes #11127
2022-01-10 08:37:55 -08:00
github-actions[bot]
d31f13468a
feat(webkit): roll to r1592 (#11261)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Andrey Lushnikov <aslushnikov@gmail.com>
2022-01-10 05:02:07 -08:00
Andrey Lushnikov
5a325a5a1d
test(gardening): disable mp4 capabilities test on firefox (#11289)
Firefox is unhappy with our mp4 file and crashes / moves to faulty
state.

Upstream bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1697004
2022-01-10 03:56:50 -08:00
Pavel Feldman
dc07fa6da6
fix(locator.count): do not touch main workd when computing count (#11256) 2022-01-07 15:52:14 -08:00
Pavel Feldman
ee0ea82d46
test: improve click-during-navigation (#11252) 2022-01-07 12:12:24 -08:00
Yury Semikhatsky
37a97c4201
feat(tracing): capture network failures (#11237) 2022-01-07 11:22:01 -08:00